From 8142b7397d4de01f914c9b5725e53f501c81f410 Mon Sep 17 00:00:00 2001 From: Paul DeLucia <69597248+pauldelucia@users.noreply.github.com> Date: Wed, 29 Oct 2025 13:09:56 +0700 Subject: [PATCH 01/25] fix(drive): reuse existing platform node id during operator update (#2834) --- .../update_operator_identity/v0/mod.rs | 148 +++++++++++++++++- 1 file changed, 142 insertions(+), 6 deletions(-) diff --git a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs index 4da672daefd..3c78e6d4e1f 100644 --- a/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/platform_events/core_based_updates/update_masternode_identities/update_operator_identity/v0/mod.rs @@ -355,12 +355,7 @@ where purpose: Purpose::SYSTEM, security_level: SecurityLevel::CRITICAL, read_only: true, - data: BinaryData::new( - platform_node_id_change - .as_ref() - .expect("platform node id confirmed is some") - .to_vec(), - ), + data: BinaryData::new(new_platform_node_id.to_vec()), disabled_at: None, contract_bounds: None, } @@ -403,6 +398,8 @@ mod tests { use dpp::dashcore_rpc::dashcore_rpc_json::{MasternodeListItem, MasternodeType}; use dpp::dashcore_rpc::json::DMNState; use dpp::identifier::MasternodeIdentifiers; + use dpp::identity::accessors::IdentityGettersV0; + use dpp::identity::identity_public_key::accessors::v0::IdentityPublicKeyGettersV0; use dpp::identity::identity_public_key::v0::IdentityPublicKeyV0; use dpp::identity::{IdentityV0, KeyType, Purpose, SecurityLevel}; use dpp::platform_value::BinaryData; @@ -1023,6 +1020,145 @@ mod tests { .expect("expected to apply drive operations"); } + #[test] + fn test_update_operator_identity_reuses_node_id_without_change() { + let platform_version = PlatformVersion::latest(); + let platform = TestPlatformBuilder::new() + .build_with_mock_rpc() + .set_genesis_state(); + + let block_info = BlockInfo::default(); + + let mut rng = StdRng::seed_from_u64(5); + + let ( + pro_tx_hash, + _identity, + operator_payout_address, + original_pub_key_operator, + node_id_bytes, + ) = create_operator_identity(&platform, &mut rng); + + // Pre-create an operator identity for the new operator key that lacks the platform node key + let private_key_operator_bytes = bls_signatures::PrivateKey::generate_dash(&mut rng) + .expect("expected to generate a private key") + .to_bytes() + .to_vec(); + let private_key_operator = BlsPrivateKey::::from_be_bytes( + &private_key_operator_bytes + .try_into() + .expect("expected the secret key to be 32 bytes"), + ) + .expect( + "expected the conversion between bls signatures library and blsful to happen without failing", + ); + let new_pub_key_operator = private_key_operator.public_key().0.to_compressed().to_vec(); + + let new_operator_identifier = Identifier::create_operator_identifier( + pro_tx_hash.as_byte_array(), + &new_pub_key_operator, + ); + + let operator_key_without_node_id: IdentityPublicKey = IdentityPublicKeyV0 { + id: 0, + key_type: KeyType::BLS12_381, + purpose: Purpose::SYSTEM, + security_level: SecurityLevel::CRITICAL, + read_only: true, + data: BinaryData::new(new_pub_key_operator.clone()), + disabled_at: None, + contract_bounds: None, + } + .into(); + + let mut identity_without_node_id = + Identity::create_basic_identity(new_operator_identifier, platform_version) + .expect("expected to create identity"); + identity_without_node_id.add_public_keys(vec![operator_key_without_node_id]); + + platform + .drive + .add_new_identity( + identity_without_node_id, + true, + &block_info, + true, + None, + platform_version, + ) + .expect("expected to add pre-existing operator identity"); + + // Create an old masternode state with the original operator key and node id + let masternode_list_item = MasternodeListItem { + node_type: MasternodeType::Regular, + pro_tx_hash, + collateral_hash: Txid::from_byte_array(rng.gen::<[u8; 32]>()), + collateral_index: 0, + collateral_address: [0; 20], + operator_reward: 0.0, + state: DMNState { + service: SocketAddr::from_str("1.0.1.1:1234").unwrap(), + registered_height: 0, + pose_revived_height: None, + pose_ban_height: None, + revocation_reason: 0, + owner_address: rng.gen::<[u8; 20]>(), + voting_address: rng.gen::<[u8; 20]>(), + payout_address: rng.gen::<[u8; 20]>(), + pub_key_operator: original_pub_key_operator.clone(), + operator_payout_address: Some(operator_payout_address), + platform_node_id: Some(node_id_bytes), + platform_p2p_port: None, + platform_http_port: None, + }, + }; + + let mut platform_state = platform.state.load().clone().deref().clone(); + platform_state + .full_masternode_list_mut() + .insert(pro_tx_hash, masternode_list_item); + + let transaction = platform.drive.grove.start_transaction(); + + let mut drive_operations = vec![]; + + platform + .update_operator_identity_v0( + &pro_tx_hash, + Some(&new_pub_key_operator), + None, + None, + &platform_state, + &transaction, + &mut drive_operations, + platform_version, + ) + .expect("expected to update operator identity without panic"); + + let expected_identity_bytes = new_operator_identifier.to_buffer(); + let expected_node_id = node_id_bytes.to_vec(); + + let added_platform_node_key = drive_operations.iter().any(|operation| { + if let drive::util::batch::DriveOperation::IdentityOperation( + drive::util::batch::IdentityOperationType::AddNewKeysToIdentity { + identity_id, + non_unique_keys_to_add, + .. + }, + ) = operation + { + if identity_id == &expected_identity_bytes { + return non_unique_keys_to_add + .iter() + .any(|key| key.data().as_slice() == expected_node_id.as_slice()); + } + } + false + }); + + assert!(added_platform_node_key); + } + #[test] fn test_update_operator_change_back_to_previous_public_key() { let platform_version = PlatformVersion::latest(); From a71b2211a2ed35e4a6bf1f5488cc9bbb0d2bf123 Mon Sep 17 00:00:00 2001 From: QuantumExplorer Date: Wed, 29 Oct 2025 09:19:36 +0300 Subject: [PATCH 02/25] chore(release): update changelog and bump version to 2.1.3 (#2835) --- CHANGELOG.md | 7 ++ Cargo.lock | 74 +++++++++---------- package.json | 2 +- packages/bench-suite/package.json | 2 +- packages/check-features/Cargo.toml | 2 +- packages/dapi-grpc/Cargo.toml | 2 +- packages/dapi-grpc/package.json | 2 +- packages/dapi/package.json | 2 +- .../dash-platform-balance-checker/Cargo.toml | 2 +- packages/dash-spv/package.json | 2 +- packages/dashmate/package.json | 2 +- packages/dashpay-contract/Cargo.toml | 2 +- packages/dashpay-contract/package.json | 2 +- packages/data-contracts/Cargo.toml | 2 +- packages/dpns-contract/Cargo.toml | 2 +- packages/dpns-contract/package.json | 2 +- packages/feature-flags-contract/Cargo.toml | 2 +- packages/feature-flags-contract/package.json | 2 +- packages/js-dapi-client/package.json | 2 +- packages/js-dash-sdk/package.json | 2 +- packages/js-evo-sdk/package.json | 2 +- packages/js-grpc-common/package.json | 2 +- packages/keyword-search-contract/Cargo.toml | 2 +- packages/keyword-search-contract/package.json | 2 +- .../Cargo.toml | 2 +- .../package.json | 2 +- packages/platform-test-suite/package.json | 2 +- packages/rs-context-provider/Cargo.toml | 2 +- packages/rs-dapi-client/Cargo.toml | 2 +- packages/rs-dapi-grpc-macros/Cargo.toml | 2 +- packages/rs-dapi/Cargo.toml | 2 +- packages/rs-dash-event-bus/Cargo.toml | 2 +- packages/rs-dpp/Cargo.toml | 2 +- packages/rs-drive-abci/Cargo.toml | 2 +- packages/rs-drive-proof-verifier/Cargo.toml | 2 +- packages/rs-drive/Cargo.toml | 2 +- .../Cargo.toml | 2 +- .../Cargo.toml | 2 +- packages/rs-platform-serialization/Cargo.toml | 2 +- .../rs-platform-value-convertible/Cargo.toml | 2 +- packages/rs-platform-value/Cargo.toml | 2 +- packages/rs-platform-version/Cargo.toml | 2 +- packages/rs-platform-versioning/Cargo.toml | 2 +- packages/rs-platform-wallet/Cargo.toml | 2 +- packages/rs-sdk-ffi/Cargo.toml | 2 +- .../Cargo.toml | 2 +- packages/rs-sdk/Cargo.toml | 2 +- packages/simple-signer/Cargo.toml | 2 +- packages/strategy-tests/Cargo.toml | 2 +- packages/token-history-contract/Cargo.toml | 2 +- packages/token-history-contract/package.json | 2 +- packages/wallet-lib/package.json | 2 +- packages/wallet-utils-contract/Cargo.toml | 2 +- packages/wallet-utils-contract/package.json | 2 +- packages/wasm-dpp/Cargo.toml | 2 +- packages/wasm-dpp/package.json | 2 +- packages/wasm-drive-verify/Cargo.toml | 2 +- packages/wasm-drive-verify/package.json | 2 +- packages/wasm-sdk/Cargo.toml | 2 +- packages/wasm-sdk/package.json | 2 +- packages/withdrawals-contract/Cargo.toml | 2 +- packages/withdrawals-contract/package.json | 2 +- 62 files changed, 104 insertions(+), 97 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d37f055db30..995642d0a6b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +### [2.1.3](https://github.com/dashpay/platform/compare/v2.1.2...v2.1.3) (2025-10-29) + + +### Bug Fixes + +* **drive:** reuse existing platform node id during operator update ([#2834](https://github.com/dashpay/platform/issues/2834)) + ### [2.1.2](https://github.com/dashpay/platform/compare/v2.1.1...v2.1.2) (2025-10-27) diff --git a/Cargo.lock b/Cargo.lock index 72e9913de92..666ec91c453 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -895,7 +895,7 @@ checksum = "613afe47fcd5fac7ccf1db93babcb082c5994d996f20b8b159f2ad1658eb5724" [[package]] name = "check-features" -version = "2.1.2" +version = "2.1.3" dependencies = [ "toml", ] @@ -1367,7 +1367,7 @@ dependencies = [ [[package]] name = "dapi-grpc" -version = "2.1.2" +version = "2.1.3" dependencies = [ "dapi-grpc-macros", "futures-core", @@ -1385,7 +1385,7 @@ dependencies = [ [[package]] name = "dapi-grpc-macros" -version = "2.1.2" +version = "2.1.3" dependencies = [ "dapi-grpc", "heck 0.5.0", @@ -1430,7 +1430,7 @@ dependencies = [ [[package]] name = "dash-context-provider" -version = "2.1.2" +version = "2.1.3" dependencies = [ "dpp", "drive", @@ -1464,7 +1464,7 @@ dependencies = [ [[package]] name = "dash-platform-balance-checker" -version = "2.1.2" +version = "2.1.3" dependencies = [ "anyhow", "clap", @@ -1480,7 +1480,7 @@ dependencies = [ [[package]] name = "dash-sdk" -version = "2.1.2" +version = "2.1.3" dependencies = [ "arc-swap", "assert_matches", @@ -1746,7 +1746,7 @@ dependencies = [ [[package]] name = "dashpay-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "platform-value", "platform-version", @@ -1756,7 +1756,7 @@ dependencies = [ [[package]] name = "data-contracts" -version = "2.1.2" +version = "2.1.3" dependencies = [ "dashpay-contract", "dpns-contract", @@ -1903,7 +1903,7 @@ checksum = "1435fa1053d8b2fbbe9be7e97eca7f33d37b28409959813daefc1446a14247f1" [[package]] name = "dpns-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "platform-value", "platform-version", @@ -1913,7 +1913,7 @@ dependencies = [ [[package]] name = "dpp" -version = "2.1.2" +version = "2.1.3" dependencies = [ "anyhow", "assert_matches", @@ -1969,7 +1969,7 @@ dependencies = [ [[package]] name = "drive" -version = "2.1.2" +version = "2.1.3" dependencies = [ "arc-swap", "assert_matches", @@ -2010,7 +2010,7 @@ dependencies = [ [[package]] name = "drive-abci" -version = "2.1.2" +version = "2.1.3" dependencies = [ "arc-swap", "assert_matches", @@ -2064,7 +2064,7 @@ dependencies = [ [[package]] name = "drive-proof-verifier" -version = "2.1.2" +version = "2.1.3" dependencies = [ "bincode 2.0.0-rc.3", "dapi-grpc", @@ -2318,7 +2318,7 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" [[package]] name = "feature-flags-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "platform-value", "platform-version", @@ -3495,7 +3495,7 @@ dependencies = [ [[package]] name = "json-schema-compatibility-validator" -version = "2.1.2" +version = "2.1.3" dependencies = [ "assert_matches", "json-patch", @@ -3653,7 +3653,7 @@ dependencies = [ [[package]] name = "keyword-search-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "base58", "platform-value", @@ -3805,7 +3805,7 @@ dependencies = [ [[package]] name = "masternode-reward-shares-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "platform-value", "platform-version", @@ -4517,7 +4517,7 @@ checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] name = "platform-serialization" -version = "2.1.2" +version = "2.1.3" dependencies = [ "bincode 2.0.0-rc.3", "platform-version", @@ -4525,7 +4525,7 @@ dependencies = [ [[package]] name = "platform-serialization-derive" -version = "2.1.2" +version = "2.1.3" dependencies = [ "proc-macro2", "quote", @@ -4535,7 +4535,7 @@ dependencies = [ [[package]] name = "platform-value" -version = "2.1.2" +version = "2.1.3" dependencies = [ "base64 0.22.1", "bincode 2.0.0-rc.3", @@ -4554,7 +4554,7 @@ dependencies = [ [[package]] name = "platform-value-convertible" -version = "2.1.2" +version = "2.1.3" dependencies = [ "quote", "syn 2.0.106", @@ -4562,7 +4562,7 @@ dependencies = [ [[package]] name = "platform-version" -version = "2.1.2" +version = "2.1.3" dependencies = [ "bincode 2.0.0-rc.3", "grovedb-version", @@ -4573,7 +4573,7 @@ dependencies = [ [[package]] name = "platform-versioning" -version = "2.1.2" +version = "2.1.3" dependencies = [ "proc-macro2", "quote", @@ -4582,7 +4582,7 @@ dependencies = [ [[package]] name = "platform-wallet" -version = "2.1.2" +version = "2.1.3" dependencies = [ "dashcore 0.40.0 (git+https://github.com/dashpay/rust-dashcore?tag=v0.40.0)", "dpp", @@ -5362,7 +5362,7 @@ dependencies = [ [[package]] name = "rs-dapi" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "axum 0.8.4", @@ -5411,7 +5411,7 @@ dependencies = [ [[package]] name = "rs-dapi-client" -version = "2.1.2" +version = "2.1.3" dependencies = [ "backon", "chrono", @@ -5438,7 +5438,7 @@ dependencies = [ [[package]] name = "rs-dash-event-bus" -version = "2.1.2" +version = "2.1.3" dependencies = [ "metrics", "tokio", @@ -5447,7 +5447,7 @@ dependencies = [ [[package]] name = "rs-sdk-ffi" -version = "2.1.2" +version = "2.1.3" dependencies = [ "bincode 2.0.0-rc.3", "bs58", @@ -5476,7 +5476,7 @@ dependencies = [ [[package]] name = "rs-sdk-trusted-context-provider" -version = "2.1.2" +version = "2.1.3" dependencies = [ "arc-swap", "async-trait", @@ -6167,7 +6167,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "simple-signer" -version = "2.1.2" +version = "2.1.3" dependencies = [ "base64 0.22.1", "bincode 2.0.0-rc.3", @@ -6264,7 +6264,7 @@ dependencies = [ [[package]] name = "strategy-tests" -version = "2.1.2" +version = "2.1.3" dependencies = [ "bincode 2.0.0-rc.3", "dpp", @@ -6661,7 +6661,7 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "token-history-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "platform-value", "platform-version", @@ -7369,7 +7369,7 @@ dependencies = [ [[package]] name = "wallet-utils-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "platform-value", "platform-version", @@ -7508,7 +7508,7 @@ dependencies = [ [[package]] name = "wasm-dpp" -version = "2.1.2" +version = "2.1.3" dependencies = [ "anyhow", "async-trait", @@ -7532,7 +7532,7 @@ dependencies = [ [[package]] name = "wasm-drive-verify" -version = "2.1.2" +version = "2.1.3" dependencies = [ "base64 0.22.1", "bincode 2.0.0-rc.3", @@ -7567,7 +7567,7 @@ dependencies = [ [[package]] name = "wasm-sdk" -version = "2.1.2" +version = "2.1.3" dependencies = [ "base64 0.22.1", "bip39", @@ -8131,7 +8131,7 @@ checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" [[package]] name = "withdrawals-contract" -version = "2.1.2" +version = "2.1.3" dependencies = [ "num_enum 0.5.11", "platform-value", diff --git a/package.json b/package.json index 496129fb392..3305ef0330e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/platform", - "version": "2.1.2", + "version": "2.1.3", "private": true, "scripts": { "setup": "yarn install && yarn run build && yarn run configure", diff --git a/packages/bench-suite/package.json b/packages/bench-suite/package.json index f485fb990a0..3fd862df194 100644 --- a/packages/bench-suite/package.json +++ b/packages/bench-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/bench-suite", "private": true, - "version": "2.1.2", + "version": "2.1.3", "description": "Dash Platform benchmark tool", "scripts": { "bench": "node ./bin/bench.js", diff --git a/packages/check-features/Cargo.toml b/packages/check-features/Cargo.toml index 5d33e0a7c04..ccdc0826543 100644 --- a/packages/check-features/Cargo.toml +++ b/packages/check-features/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "check-features" -version = "2.1.2" +version = "2.1.3" edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html diff --git a/packages/dapi-grpc/Cargo.toml b/packages/dapi-grpc/Cargo.toml index c3762b95c6a..69db2ca09a9 100644 --- a/packages/dapi-grpc/Cargo.toml +++ b/packages/dapi-grpc/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc" description = "GRPC client for Dash Platform" -version = "2.1.2" +version = "2.1.3" authors = [ "Samuel Westrich ", "Igor Markin ", diff --git a/packages/dapi-grpc/package.json b/packages/dapi-grpc/package.json index c6c2a5fc894..03068e83aa2 100644 --- a/packages/dapi-grpc/package.json +++ b/packages/dapi-grpc/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-grpc", - "version": "2.1.2", + "version": "2.1.3", "description": "DAPI GRPC definition file and generated clients", "browser": "browser.js", "main": "node.js", diff --git a/packages/dapi/package.json b/packages/dapi/package.json index 358be8f0f43..a0335c6370c 100644 --- a/packages/dapi/package.json +++ b/packages/dapi/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/dapi", "private": true, - "version": "2.1.2", + "version": "2.1.3", "description": "A decentralized API for the Dash network", "scripts": { "api": "node scripts/api.js", diff --git a/packages/dash-platform-balance-checker/Cargo.toml b/packages/dash-platform-balance-checker/Cargo.toml index 1398bfe9a24..2e0da5b59d7 100644 --- a/packages/dash-platform-balance-checker/Cargo.toml +++ b/packages/dash-platform-balance-checker/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-platform-balance-checker" -version = "2.1.2" +version = "2.1.3" edition = "2021" [[bin]] diff --git a/packages/dash-spv/package.json b/packages/dash-spv/package.json index 218a3310833..4f1cae7295a 100644 --- a/packages/dash-spv/package.json +++ b/packages/dash-spv/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dash-spv", - "version": "3.1.2", + "version": "3.1.3", "description": "Repository containing SPV functions used by @dashevo", "main": "index.js", "scripts": { diff --git a/packages/dashmate/package.json b/packages/dashmate/package.json index 5a763051ee4..3005d20ffc3 100644 --- a/packages/dashmate/package.json +++ b/packages/dashmate/package.json @@ -1,6 +1,6 @@ { "name": "dashmate", - "version": "2.1.2", + "version": "2.1.3", "description": "Distribution package for Dash node installation", "scripts": { "lint": "eslint .", diff --git a/packages/dashpay-contract/Cargo.toml b/packages/dashpay-contract/Cargo.toml index 401cfec26fe..f2aca2d0ef9 100644 --- a/packages/dashpay-contract/Cargo.toml +++ b/packages/dashpay-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dashpay-contract" description = "DashPay data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dashpay-contract/package.json b/packages/dashpay-contract/package.json index d0c354c1b2f..6e02b200d19 100644 --- a/packages/dashpay-contract/package.json +++ b/packages/dashpay-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dashpay-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "Reference contract of the DashPay DPA on Dash Evolution", "scripts": { "lint": "eslint .", diff --git a/packages/data-contracts/Cargo.toml b/packages/data-contracts/Cargo.toml index 44cba4979a9..8700871c71b 100644 --- a/packages/data-contracts/Cargo.toml +++ b/packages/data-contracts/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "data-contracts" description = "Dash Platform system data contracts" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/Cargo.toml b/packages/dpns-contract/Cargo.toml index 890f0724073..123cfea0d1b 100644 --- a/packages/dpns-contract/Cargo.toml +++ b/packages/dpns-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dpns-contract" description = "DPNS data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/dpns-contract/package.json b/packages/dpns-contract/package.json index 0cba3a54701..3c5b6991d2f 100644 --- a/packages/dpns-contract/package.json +++ b/packages/dpns-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dpns-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "A contract and helper scripts for DPNS DApp", "scripts": { "lint": "eslint .", diff --git a/packages/feature-flags-contract/Cargo.toml b/packages/feature-flags-contract/Cargo.toml index 8163bf473f8..34a1d91a4a3 100644 --- a/packages/feature-flags-contract/Cargo.toml +++ b/packages/feature-flags-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "feature-flags-contract" description = "Feature flags data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/feature-flags-contract/package.json b/packages/feature-flags-contract/package.json index 894d215eb51..49fb6fbc1d7 100644 --- a/packages/feature-flags-contract/package.json +++ b/packages/feature-flags-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/feature-flags-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "Data Contract to store Dash Platform feature flags", "scripts": { "build": "", diff --git a/packages/js-dapi-client/package.json b/packages/js-dapi-client/package.json index a919584bcad..8eb9558c55f 100644 --- a/packages/js-dapi-client/package.json +++ b/packages/js-dapi-client/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/dapi-client", - "version": "2.1.2", + "version": "2.1.3", "description": "Client library used to access Dash DAPI endpoints", "main": "lib/index.js", "contributors": [ diff --git a/packages/js-dash-sdk/package.json b/packages/js-dash-sdk/package.json index 5838da728d8..11ed6ca45e4 100644 --- a/packages/js-dash-sdk/package.json +++ b/packages/js-dash-sdk/package.json @@ -1,6 +1,6 @@ { "name": "dash", - "version": "5.1.2", + "version": "5.1.3", "description": "Dash library for JavaScript/TypeScript ecosystem (Wallet, DAPI, Primitives, BLS, ...)", "main": "build/index.js", "unpkg": "dist/dash.min.js", diff --git a/packages/js-evo-sdk/package.json b/packages/js-evo-sdk/package.json index cb1813defee..ed25e6e42db 100644 --- a/packages/js-evo-sdk/package.json +++ b/packages/js-evo-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/evo-sdk", - "version": "2.1.2", + "version": "2.1.3", "type": "module", "main": "./dist/evo-sdk.module.js", "types": "./dist/sdk.d.ts", diff --git a/packages/js-grpc-common/package.json b/packages/js-grpc-common/package.json index 62b17da0d00..9026f765de4 100644 --- a/packages/js-grpc-common/package.json +++ b/packages/js-grpc-common/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/grpc-common", - "version": "2.1.2", + "version": "2.1.3", "description": "Common GRPC library", "main": "index.js", "scripts": { diff --git a/packages/keyword-search-contract/Cargo.toml b/packages/keyword-search-contract/Cargo.toml index 892d4441561..5b79adea1d6 100644 --- a/packages/keyword-search-contract/Cargo.toml +++ b/packages/keyword-search-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "keyword-search-contract" description = "Search data contract schema and tools. Keyword Search contract is used to find other contracts and tokens" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/keyword-search-contract/package.json b/packages/keyword-search-contract/package.json index 6d5f6e6d044..b8083cbad11 100644 --- a/packages/keyword-search-contract/package.json +++ b/packages/keyword-search-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/keyword-search-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "A contract that allows searching for contracts", "scripts": { "lint": "eslint .", diff --git a/packages/masternode-reward-shares-contract/Cargo.toml b/packages/masternode-reward-shares-contract/Cargo.toml index 2eb97251657..05e27fbd8a5 100644 --- a/packages/masternode-reward-shares-contract/Cargo.toml +++ b/packages/masternode-reward-shares-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "masternode-reward-shares-contract" description = "Masternode reward shares data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/masternode-reward-shares-contract/package.json b/packages/masternode-reward-shares-contract/package.json index 559e5f87fc9..a4dbd07e483 100644 --- a/packages/masternode-reward-shares-contract/package.json +++ b/packages/masternode-reward-shares-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/masternode-reward-shares-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "A contract and helper scripts for reward sharing", "scripts": { "lint": "eslint .", diff --git a/packages/platform-test-suite/package.json b/packages/platform-test-suite/package.json index c55aafdbbc1..1434c02ad90 100644 --- a/packages/platform-test-suite/package.json +++ b/packages/platform-test-suite/package.json @@ -1,7 +1,7 @@ { "name": "@dashevo/platform-test-suite", "private": true, - "version": "2.1.2", + "version": "2.1.3", "description": "Dash Network end-to-end tests", "scripts": { "test": "yarn exec bin/test.sh", diff --git a/packages/rs-context-provider/Cargo.toml b/packages/rs-context-provider/Cargo.toml index a2ec3f36d3e..de19aa7aa1e 100644 --- a/packages/rs-context-provider/Cargo.toml +++ b/packages/rs-context-provider/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-context-provider" -version = "2.1.2" +version = "2.1.3" edition = "2021" authors = ["sam@dash.org"] license = "MIT" diff --git a/packages/rs-dapi-client/Cargo.toml b/packages/rs-dapi-client/Cargo.toml index 87b1cd60831..adbceaa7963 100644 --- a/packages/rs-dapi-client/Cargo.toml +++ b/packages/rs-dapi-client/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-dapi-client" -version = "2.1.2" +version = "2.1.3" edition = "2021" [features] diff --git a/packages/rs-dapi-grpc-macros/Cargo.toml b/packages/rs-dapi-grpc-macros/Cargo.toml index 81fa3c04d09..ddc034442bc 100644 --- a/packages/rs-dapi-grpc-macros/Cargo.toml +++ b/packages/rs-dapi-grpc-macros/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "dapi-grpc-macros" -version = "2.1.2" +version = "2.1.3" edition = "2021" description = "Macros used by dapi-grpc. Internal use only." diff --git a/packages/rs-dapi/Cargo.toml b/packages/rs-dapi/Cargo.toml index 1b19083fead..058bbf58385 100644 --- a/packages/rs-dapi/Cargo.toml +++ b/packages/rs-dapi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-dapi" -version = "2.1.2" +version = "2.1.3" edition = "2024" [[bin]] diff --git a/packages/rs-dash-event-bus/Cargo.toml b/packages/rs-dash-event-bus/Cargo.toml index a388cae4173..b052778dc1c 100644 --- a/packages/rs-dash-event-bus/Cargo.toml +++ b/packages/rs-dash-event-bus/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-dash-event-bus" -version = "2.1.2" +version = "2.1.3" edition = "2024" license = "MIT" description = "Shared event bus and Platform events multiplexer for Dash Platform (rs-dapi, rs-drive-abci, rs-sdk)" diff --git a/packages/rs-dpp/Cargo.toml b/packages/rs-dpp/Cargo.toml index 7ec675a5bd2..039bdcd6a37 100644 --- a/packages/rs-dpp/Cargo.toml +++ b/packages/rs-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dpp" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true authors = [ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index c441f85b506..4625ddac515 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-abci" -version = "2.1.2" +version = "2.1.3" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-drive-proof-verifier/Cargo.toml b/packages/rs-drive-proof-verifier/Cargo.toml index 37ec7334b67..c8db2205ede 100644 --- a/packages/rs-drive-proof-verifier/Cargo.toml +++ b/packages/rs-drive-proof-verifier/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "drive-proof-verifier" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index b430e52c046..1645274763d 100644 --- a/packages/rs-drive/Cargo.toml +++ b/packages/rs-drive/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "drive" description = "Dash drive built on top of GroveDB" -version = "2.1.2" +version = "2.1.3" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/rs-json-schema-compatibility-validator/Cargo.toml b/packages/rs-json-schema-compatibility-validator/Cargo.toml index efa09ad165e..8a8a1013437 100644 --- a/packages/rs-json-schema-compatibility-validator/Cargo.toml +++ b/packages/rs-json-schema-compatibility-validator/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "json-schema-compatibility-validator" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true authors = ["Ivan Shumkov "] diff --git a/packages/rs-platform-serialization-derive/Cargo.toml b/packages/rs-platform-serialization-derive/Cargo.toml index 5458c430ae9..3ff1aa17101 100644 --- a/packages/rs-platform-serialization-derive/Cargo.toml +++ b/packages/rs-platform-serialization-derive/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization-derive" authors = ["Samuel Westrich "] description = "Bincode serialization and deserialization derivations" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-serialization/Cargo.toml b/packages/rs-platform-serialization/Cargo.toml index 230832f8252..a3d1c5a5649 100644 --- a/packages/rs-platform-serialization/Cargo.toml +++ b/packages/rs-platform-serialization/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-serialization" authors = ["Samuel Westrich "] description = "Bincode based serialization and deserialization" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value-convertible/Cargo.toml b/packages/rs-platform-value-convertible/Cargo.toml index bdb9e5a19cd..aced90023b5 100644 --- a/packages/rs-platform-value-convertible/Cargo.toml +++ b/packages/rs-platform-value-convertible/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value-convertible" authors = ["Samuel Westrich "] description = "Convertion to and from platform values" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-value/Cargo.toml b/packages/rs-platform-value/Cargo.toml index 0383e019124..6e60cc71028 100644 --- a/packages/rs-platform-value/Cargo.toml +++ b/packages/rs-platform-value/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-value" authors = ["Samuel Westrich "] description = "A simple value module" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index 636dce1e20b..e38e9c3fd59 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-version" authors = ["Samuel Westrich "] description = "Versioning library for Platform" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-versioning/Cargo.toml b/packages/rs-platform-versioning/Cargo.toml index 03e7ea10dd4..5752c282f8c 100644 --- a/packages/rs-platform-versioning/Cargo.toml +++ b/packages/rs-platform-versioning/Cargo.toml @@ -2,7 +2,7 @@ name = "platform-versioning" authors = ["Samuel Westrich "] description = "Version derivation" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/rs-platform-wallet/Cargo.toml b/packages/rs-platform-wallet/Cargo.toml index 11db1bf6577..fd94d2e3821 100644 --- a/packages/rs-platform-wallet/Cargo.toml +++ b/packages/rs-platform-wallet/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "platform-wallet" -version = "2.1.2" +version = "2.1.3" edition = "2021" authors = ["Dash Core Team"] license = "MIT" diff --git a/packages/rs-sdk-ffi/Cargo.toml b/packages/rs-sdk-ffi/Cargo.toml index f52cc9e183d..c07a937b9d3 100644 --- a/packages/rs-sdk-ffi/Cargo.toml +++ b/packages/rs-sdk-ffi/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-sdk-ffi" -version = "2.1.2" +version = "2.1.3" authors = ["Dash Core Group "] edition = "2021" license = "MIT" diff --git a/packages/rs-sdk-trusted-context-provider/Cargo.toml b/packages/rs-sdk-trusted-context-provider/Cargo.toml index 803e996bae2..7378d08e14c 100644 --- a/packages/rs-sdk-trusted-context-provider/Cargo.toml +++ b/packages/rs-sdk-trusted-context-provider/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rs-sdk-trusted-context-provider" -version = "2.1.2" +version = "2.1.3" edition = "2021" authors = ["sam@dash.org"] license = "MIT" diff --git a/packages/rs-sdk/Cargo.toml b/packages/rs-sdk/Cargo.toml index 95545c4b18f..a053671f95a 100644 --- a/packages/rs-sdk/Cargo.toml +++ b/packages/rs-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash-sdk" -version = "2.1.2" +version = "2.1.3" edition = "2021" [dependencies] diff --git a/packages/simple-signer/Cargo.toml b/packages/simple-signer/Cargo.toml index 1112fcea497..59254c3a5c8 100644 --- a/packages/simple-signer/Cargo.toml +++ b/packages/simple-signer/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "simple-signer" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true diff --git a/packages/strategy-tests/Cargo.toml b/packages/strategy-tests/Cargo.toml index e536a5dd2e2..58376f9811d 100644 --- a/packages/strategy-tests/Cargo.toml +++ b/packages/strategy-tests/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "strategy-tests" -version = "2.1.2" +version = "2.1.3" authors = [ "Samuel Westrich ", "Ivan Shumkov ", diff --git a/packages/token-history-contract/Cargo.toml b/packages/token-history-contract/Cargo.toml index 0054adb5f27..d3b0e1583a4 100644 --- a/packages/token-history-contract/Cargo.toml +++ b/packages/token-history-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "token-history-contract" description = "Token history data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/token-history-contract/package.json b/packages/token-history-contract/package.json index e0de64d6c14..16f3b772675 100644 --- a/packages/token-history-contract/package.json +++ b/packages/token-history-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/token-history-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "The token history contract", "scripts": { "lint": "eslint .", diff --git a/packages/wallet-lib/package.json b/packages/wallet-lib/package.json index 1d51d6efd8f..cd1266bc656 100644 --- a/packages/wallet-lib/package.json +++ b/packages/wallet-lib/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-lib", - "version": "9.1.2", + "version": "9.1.3", "description": "Light wallet library for Dash", "main": "src/index.js", "unpkg": "dist/wallet-lib.min.js", diff --git a/packages/wallet-utils-contract/Cargo.toml b/packages/wallet-utils-contract/Cargo.toml index 982612ef8e6..77a312e17f9 100644 --- a/packages/wallet-utils-contract/Cargo.toml +++ b/packages/wallet-utils-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "wallet-utils-contract" description = "Wallet data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/wallet-utils-contract/package.json b/packages/wallet-utils-contract/package.json index 70b935882d0..916d5b184d6 100644 --- a/packages/wallet-utils-contract/package.json +++ b/packages/wallet-utils-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wallet-utils-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "A contract and helper scripts for Wallet DApp", "scripts": { "lint": "eslint .", diff --git a/packages/wasm-dpp/Cargo.toml b/packages/wasm-dpp/Cargo.toml index 4a7950b34d9..a5767ebb349 100644 --- a/packages/wasm-dpp/Cargo.toml +++ b/packages/wasm-dpp/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-dpp" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true authors = ["Anton Suprunchuk "] diff --git a/packages/wasm-dpp/package.json b/packages/wasm-dpp/package.json index 9d9ccba5d11..a22b9f45140 100644 --- a/packages/wasm-dpp/package.json +++ b/packages/wasm-dpp/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-dpp", - "version": "2.1.2", + "version": "2.1.3", "description": "The JavaScript implementation of the Dash Platform Protocol", "main": "dist/index.js", "types": "dist/index.d.ts", diff --git a/packages/wasm-drive-verify/Cargo.toml b/packages/wasm-drive-verify/Cargo.toml index abeea0ee4a2..10f90333b1b 100644 --- a/packages/wasm-drive-verify/Cargo.toml +++ b/packages/wasm-drive-verify/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-drive-verify" -version = "2.1.2" +version = "2.1.3" authors = ["Dash Core Group "] edition = "2021" rust-version = "1.89" diff --git a/packages/wasm-drive-verify/package.json b/packages/wasm-drive-verify/package.json index 4cebbcb255c..33cb0c90c4a 100644 --- a/packages/wasm-drive-verify/package.json +++ b/packages/wasm-drive-verify/package.json @@ -3,7 +3,7 @@ "collaborators": [ "Dash Core Group " ], - "version": "2.1.2", + "version": "2.1.3", "license": "MIT", "description": "WASM bindings for Drive verify functions", "repository": { diff --git a/packages/wasm-sdk/Cargo.toml b/packages/wasm-sdk/Cargo.toml index fbc6d730c08..101aebadfb0 100644 --- a/packages/wasm-sdk/Cargo.toml +++ b/packages/wasm-sdk/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wasm-sdk" -version = "2.1.2" +version = "2.1.3" edition = "2021" publish = false rust-version.workspace = true diff --git a/packages/wasm-sdk/package.json b/packages/wasm-sdk/package.json index 8c3bd9d33bc..ce68a76aa3f 100644 --- a/packages/wasm-sdk/package.json +++ b/packages/wasm-sdk/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/wasm-sdk", - "version": "2.1.2", + "version": "2.1.3", "type": "module", "main": "./dist/sdk.js", "types": "./dist/sdk.d.ts", diff --git a/packages/withdrawals-contract/Cargo.toml b/packages/withdrawals-contract/Cargo.toml index be528e1ed08..852a069853b 100644 --- a/packages/withdrawals-contract/Cargo.toml +++ b/packages/withdrawals-contract/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "withdrawals-contract" description = "Witdrawals data contract schema and tools" -version = "2.1.2" +version = "2.1.3" edition = "2021" rust-version.workspace = true license = "MIT" diff --git a/packages/withdrawals-contract/package.json b/packages/withdrawals-contract/package.json index 40b2ca89765..b05e5a9b443 100644 --- a/packages/withdrawals-contract/package.json +++ b/packages/withdrawals-contract/package.json @@ -1,6 +1,6 @@ { "name": "@dashevo/withdrawals-contract", - "version": "2.1.2", + "version": "2.1.3", "description": "Data Contract to manipulate and track withdrawals", "scripts": { "build": "", From 077ec826fe6b36259fe122fa715913e4b5439a0e Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Wed, 29 Oct 2025 09:55:00 +0100 Subject: [PATCH 03/25] chore(dashmate)!: backport port conflicts with mainnet and testnet on the same host (#2838) --- .../configs/defaults/getBaseConfigFactory.js | 1 + .../configs/defaults/getLocalConfigFactory.js | 10 +++ .../defaults/getTestnetConfigFactory.js | 10 +++ .../configs/getConfigFileMigrationsFactory.js | 61 +++++++++++++++++++ packages/dashmate/docker-compose.yml | 3 - packages/dashmate/docs/config/core.md | 4 +- packages/dashmate/docs/config/dapi.md | 4 +- packages/dashmate/docs/services/core.md | 2 +- packages/dashmate/docs/services/index.md | 4 +- packages/dashmate/docs/services/platform.md | 4 +- .../dashmate/src/config/configJsonSchema.js | 15 +---- .../src/config/generateEnvsFactory.js | 7 +++ .../core/insight/dashcore-node.json.dot | 4 +- .../templates/dynamic-compose.yml.dot | 16 +++++ 14 files changed, 118 insertions(+), 27 deletions(-) diff --git a/packages/dashmate/configs/defaults/getBaseConfigFactory.js b/packages/dashmate/configs/defaults/getBaseConfigFactory.js index 821ab843cbb..a385e8b31f0 100644 --- a/packages/dashmate/configs/defaults/getBaseConfigFactory.js +++ b/packages/dashmate/configs/defaults/getBaseConfigFactory.js @@ -265,6 +265,7 @@ export default function getBaseConfigFactory() { }, }, metrics: { + enabled: false, host: '127.0.0.1', port: 9091, }, diff --git a/packages/dashmate/configs/defaults/getLocalConfigFactory.js b/packages/dashmate/configs/defaults/getLocalConfigFactory.js index 42254deb5de..11d47f1c830 100644 --- a/packages/dashmate/configs/defaults/getLocalConfigFactory.js +++ b/packages/dashmate/configs/defaults/getLocalConfigFactory.js @@ -30,6 +30,9 @@ export default function getLocalConfigFactory(getBaseConfig) { rpc: { port: 20002, }, + zmq: { + port: 49998, + }, }, platform: { gateway: { @@ -45,6 +48,13 @@ export default function getLocalConfigFactory(getBaseConfig) { enabled: false, }, }, + dapi: { + rsDapi: { + metrics: { + port: 29091, + }, + }, + }, drive: { tenderdash: { p2p: { diff --git a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js index 5ea3bccc701..6d0aeafece3 100644 --- a/packages/dashmate/configs/defaults/getTestnetConfigFactory.js +++ b/packages/dashmate/configs/defaults/getTestnetConfigFactory.js @@ -30,6 +30,9 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { rpc: { port: 19998, }, + zmq: { + port: 39998, + }, spork: { address: 'yjPtiKh2uwk3bDutTEA2q9mCtXyiZRWn55', }, @@ -153,6 +156,13 @@ export default function getTestnetConfigFactory(homeDir, getBaseConfig) { }, }, }, + dapi: { + rsDapi: { + metrics: { + port: 19091, + }, + }, + }, }, network: NETWORK_TESTNET, }; diff --git a/packages/dashmate/configs/getConfigFileMigrationsFactory.js b/packages/dashmate/configs/getConfigFileMigrationsFactory.js index d1c091bf09d..735eacb86a4 100644 --- a/packages/dashmate/configs/getConfigFileMigrationsFactory.js +++ b/packages/dashmate/configs/getConfigFileMigrationsFactory.js @@ -1226,6 +1226,67 @@ export default function getConfigFileMigrationsFactory(homeDir, defaultConfigs) return configFile; }, + '2.2.0-dev.1': (configFile) => { + Object.entries(configFile.configs) + .forEach(([name, options]) => { + const defaultConfig = getDefaultConfigByNameOrGroup(name, options.group); + if (!options.platform.dapi.rsDapi) { + options.platform.dapi.rsDapi = lodash.cloneDeep(defaultConfig.get('platform.dapi.rsDapi')); + } + + const defaultMetrics = defaultConfig.get('platform.dapi.rsDapi.metrics'); + const defaultZmqPort = defaultConfig.get('core.zmq.port'); + const baseMetricsPort = base.get('platform.dapi.rsDapi.metrics.port'); + const baseZmqPort = base.get('core.zmq.port'); + + if (!options.platform.dapi.rsDapi.metrics) { + options.platform.dapi.rsDapi.metrics = lodash.cloneDeep(defaultMetrics); + } + + if (typeof options.platform.dapi.rsDapi.metrics.enabled === 'undefined') { + options.platform.dapi.rsDapi.metrics.enabled = defaultMetrics.enabled; + } + + if (!options.core.zmq) { + options.core.zmq = lodash.cloneDeep(defaultConfig.get('core.zmq')); + } else { + options.core.zmq = lodash.cloneDeep(options.core.zmq); + } + + if (typeof options.core.zmq.port === 'undefined') { + options.core.zmq.port = defaultConfig.get('core.zmq.port'); + } + + if (typeof options.platform.dapi.rsDapi.metrics.port === 'undefined') { + options.platform.dapi.rsDapi.metrics.port = defaultMetrics.port; + } + + const targetMetricsPort = Number(defaultMetrics.port); + const targetZmqPort = Number(defaultZmqPort); + const configuredMetricsPort = Number(options.platform.dapi.rsDapi.metrics.port); + const configuredZmqPort = Number(options.core.zmq.port); + const baseMetricsPortNumber = Number(baseMetricsPort); + const baseZmqPortNumber = Number(baseZmqPort); + + if ( + !Number.isNaN(targetMetricsPort) + && targetMetricsPort !== configuredMetricsPort + && configuredMetricsPort === baseMetricsPortNumber + ) { + options.platform.dapi.rsDapi.metrics.port = targetMetricsPort; + } + + if ( + !Number.isNaN(targetZmqPort) + && targetZmqPort !== configuredZmqPort + && (configuredZmqPort === baseZmqPortNumber || configuredZmqPort === 29998) + ) { + options.core.zmq.port = targetZmqPort; + } + }); + + return configFile; + }, }; } diff --git a/packages/dashmate/docker-compose.yml b/packages/dashmate/docker-compose.yml index dc0ba8f2710..5ca9175d830 100644 --- a/packages/dashmate/docker-compose.yml +++ b/packages/dashmate/docker-compose.yml @@ -229,9 +229,6 @@ services: expose: - 3009 # JSON-RPC - 3010 # gRPC (different from current DAPI to avoid conflict) - - ${PLATFORM_DAPI_RS_DAPI_METRICS_PORT:?err} # Metrics - ports: - - ${PLATFORM_DAPI_RS_DAPI_METRICS_HOST:?err}:${PLATFORM_DAPI_RS_DAPI_METRICS_PORT:?err}:${PLATFORM_DAPI_RS_DAPI_METRICS_PORT:?err} profiles: - platform-dapi-rs diff --git a/packages/dashmate/docs/config/core.md b/packages/dashmate/docs/config/core.md index 9f41aacca25..1fc8ec17f53 100644 --- a/packages/dashmate/docs/config/core.md +++ b/packages/dashmate/docs/config/core.md @@ -73,7 +73,7 @@ The `core.zmq` section configures the ZeroMQ notification interface, which provi | Option | Description | Default | Example | |--------|-------------|---------|---------| -| `core.zmq.port` | Port for ZMQ notifications | `29998` | `30998` | +| `core.zmq.port` | Port for ZMQ notifications | `29998` (mainnet),`39998` (testnet), `49998` (local) | `30998` | | `core.zmq.host` | Host binding for Docker port mapping | `127.0.0.1` | `0.0.0.0` | ZMQ settings control real-time blockchain event notifications: @@ -81,7 +81,7 @@ ZMQ settings control real-time blockchain event notifications: - **host**: Controls Docker port exposure: - `127.0.0.1`: ZMQ port exposed only on localhost (local machine access) - `0.0.0.0`: ZMQ port exposed on all interfaces (public internet access - use with caution) -- **port**: The port number for ZMQ notifications +- **port**: The port number for ZMQ notifications. Dashmate offsets the default to prevent clashes between environments (`29998` mainnet, `39998` testnet, `49998` local presets). - DAPI uses ZMQ to receive real-time blockchain data for streaming to clients - ZMQ notifications include raw transactions, blocks, instantlocks, and chainlocks - ZMQ is always enabled in Dash Core as it's used by internal components diff --git a/packages/dashmate/docs/config/dapi.md b/packages/dashmate/docs/config/dapi.md index 54e7989bb4b..7c6a7d90fd4 100644 --- a/packages/dashmate/docs/config/dapi.md +++ b/packages/dashmate/docs/config/dapi.md @@ -53,10 +53,12 @@ This timeout setting controls how long DAPI will wait for state transition resul | Option | Description | Default | Example | |--------|-------------|---------|---------| | `platform.dapi.rsDapi.metrics.host` | Host interface exposed on the Docker host | `127.0.0.1` | `0.0.0.0` | -| `platform.dapi.rsDapi.metrics.port` | Host port for both health checks and Prometheus metrics | `9091` | `9191` | +| `platform.dapi.rsDapi.metrics.port` | Host port for both health checks and Prometheus metrics | `9091` (mainnet), `19091` (testnet), `29091` (local) | `9191` | The rs-dapi metrics server exposes `/health` and `/metrics`. Prometheus-compatible metrics are served from `/metrics` on the configured port, allowing separate node instances on the same machine to use distinct ports. The `/health` endpoint aggregates dependency checks (Drive, Tenderdash, Core) and returns `503` when any upstream component is unhealthy. +Dashmate offsets the default metrics port per preset (mainnet 9091, testnet 19091, local 29091) to avoid clashes when running multiple environments concurrently. + ### Logging | Option | Description | Default | Example | diff --git a/packages/dashmate/docs/services/core.md b/packages/dashmate/docs/services/core.md index 0bb40ec8a73..db42799f96f 100644 --- a/packages/dashmate/docs/services/core.md +++ b/packages/dashmate/docs/services/core.md @@ -33,7 +33,7 @@ Core exposes P2P and RPC ports for communication with other services. It also pr |----------------------|--------------|---------------|---------------------|----------------------|------------------| | **Core** | P2P | 9999 | `core.p2p.port` | 0.0.0.0 (all) | `core.p2p.host` | | | RPC | 9998 | `core.rpc.port` | 127.0.0.1 (local) | `core.rpc.host` | -| | ZMQ | 29998 | `core.zmq.port` | 127.0.0.1 (local) | `core.zmq.host` | +| | ZMQ | 29998 (mainnet), 39998 (testnet), 49998 (local) | `core.zmq.port` | 127.0.0.1 (local) | `core.zmq.host` | | **Insight API/UI** | HTTP | 3001 | `core.insight.port` | 127.0.0.1 (local) | (fixed) | To interact with Core RPC use `dashmate core cli` command. diff --git a/packages/dashmate/docs/services/index.md b/packages/dashmate/docs/services/index.md index f3fd04d5d2c..ec16757e948 100644 --- a/packages/dashmate/docs/services/index.md +++ b/packages/dashmate/docs/services/index.md @@ -73,13 +73,13 @@ Dashmate runs and orchestrate Dash Platform components: | Type | Ports | Default Host Binding | |---------------------|--------------------------------------------------------------|---------------------| | **Public-facing** | Core P2P (9999)
Tenderdash P2P (26656)
Gateway API (443) | 0.0.0.0 (all) | -| **Configurable** | Core ZMQ (29998) | configurable (see below) | +| **Configurable** | Core ZMQ (29998 mainnet / 39998 testnet / 49998 local) | configurable (see below) | | **Localhost-only** | Core RPC (9998)
Insight UI (3001)
Dashmate Helper (9100)
Drive ABCI Metrics (29090)
Drive Debug Tools (6669, 8083)
Tenderdash RPC (26657)
Tenderdash Metrics (26660)
Tenderdash Debug (6060)
Gateway Metrics (9090)
Gateway Admin (9901)
Rate Limiter Metrics (9102) | 127.0.0.1 (local) | | **Internal only** | Drive ABCI (26658)
Drive gRPC (26670)
DAPI JSON-RPC (3004)
DAPI gRPC (3005)
DAPI Streams (3006)
Rate Limiter gRPC (8081)
Rate Limiter StatsD (9125)
Rate Limiter Redis (6379) | (not exposed) | #### Core ZMQ Exposure Configuration -The Core ZMQ port (29998) exposure is configurable via `core.zmq.host`: +The Core ZMQ port (29998 on mainnet, 39998 on testnet, 49998 on local presets) exposure is configurable via `core.zmq.host`: - **`host: '127.0.0.1'`** (default): ZMQ port exposed on localhost only - **`host: '0.0.0.0'`**: ZMQ port exposed on all interfaces (use with caution) diff --git a/packages/dashmate/docs/services/platform.md b/packages/dashmate/docs/services/platform.md index 7bf3d1cd371..d0d5e4e7ef1 100644 --- a/packages/dashmate/docs/services/platform.md +++ b/packages/dashmate/docs/services/platform.md @@ -154,6 +154,6 @@ Tenderdash is the consensus engine that provides Byzantine Fault Tolerant (BFT) | **DAPI API** | JSON-RPC | 3004 | (fixed internal) | (internal) | - | | | gRPC | 3005 | (fixed internal) | (internal) | - | | **DAPI Core Streams** | gRPC Streaming | 3006 | (fixed internal) | (internal) | - | -| **rs-dapi (Rust)** | Health + Metrics | 9091 | `platform.dapi.rsDapi.metrics.port` | 127.0.0.1 | `platform.dapi.rsDapi.metrics.host` | +| **rs-dapi (Rust)** | Health + Metrics | 9091 (mainnet), 19091 (testnet), 29091 (local) | `platform.dapi.rsDapi.metrics.port` | 127.0.0.1 | `platform.dapi.rsDapi.metrics.host` | -The rs-dapi metrics server exposes health endpoints alongside Prometheus data on `/metrics` from the same port. +The rs-dapi metrics server exposes health endpoints alongside Prometheus data on `/metrics` from the same port. Dashmate applies network-specific defaults (mainnet 9091, testnet 19091, local 29091) so multiple presets can coexist on a host without conflicts. diff --git a/packages/dashmate/src/config/configJsonSchema.js b/packages/dashmate/src/config/configJsonSchema.js index cdf693c62a5..8c391cb9525 100644 --- a/packages/dashmate/src/config/configJsonSchema.js +++ b/packages/dashmate/src/config/configJsonSchema.js @@ -880,20 +880,7 @@ export default { additionalProperties: false, }, metrics: { - type: 'object', - properties: { - host: { - type: 'string', - minLength: 1, - }, - port: { - type: 'integer', - minimum: 1, - maximum: 65535, - }, - }, - required: ['host', 'port'], - additionalProperties: false, + $ref: '#/definitions/enabledHostPort', }, logs: { type: 'object', diff --git a/packages/dashmate/src/config/generateEnvsFactory.js b/packages/dashmate/src/config/generateEnvsFactory.js index b2c5190fe75..5da58368fec 100644 --- a/packages/dashmate/src/config/generateEnvsFactory.js +++ b/packages/dashmate/src/config/generateEnvsFactory.js @@ -135,6 +135,13 @@ export default function generateEnvsFactory(configFile, homeDir, getConfigProfil envs.PLATFORM_DAPI_RS_DAPI_LOGS_ACCESS_LOG_PATH = ''; } + if ( + config.has('platform.dapi.rsDapi.metrics.enabled') + && !config.get('platform.dapi.rsDapi.metrics.enabled') + ) { + envs.PLATFORM_DAPI_RS_DAPI_METRICS_PORT = '0'; + } + return envs; } diff --git a/packages/dashmate/templates/core/insight/dashcore-node.json.dot b/packages/dashmate/templates/core/insight/dashcore-node.json.dot index cfb92e73b14..8fb9000f204 100644 --- a/packages/dashmate/templates/core/insight/dashcore-node.json.dot +++ b/packages/dashmate/templates/core/insight/dashcore-node.json.dot @@ -14,8 +14,8 @@ "rpcport": {{= it.core.rpc.port }}, "rpcuser": "dashmate", "rpcpassword": "{{= it.core.rpc.users.dashmate.password }}", - "zmqpubrawtx": "tcp://core:29998", - "zmqpubhashblock": "tcp://core:29998" + "zmqpubrawtx": "tcp://core:{{= it.core.zmq.port }}", + "zmqpubhashblock": "tcp://core:{{= it.core.zmq.port }}" }] }, "@dashevo/insight-api": { diff --git a/packages/dashmate/templates/dynamic-compose.yml.dot b/packages/dashmate/templates/dynamic-compose.yml.dot index 6ed120930fe..9db8a26827c 100644 --- a/packages/dashmate/templates/dynamic-compose.yml.dot +++ b/packages/dashmate/templates/dynamic-compose.yml.dot @@ -28,6 +28,22 @@ services: - {{=it.platform.drive.tenderdash.log.path}}:/var/log/tenderdash/tenderdash.log {{?}} + {{? it.platform.dapi && it.platform.dapi.rsDapi }} + rs_dapi: + expose: + - 3009 + - 3010 + {{? it.platform.dapi.rsDapi.metrics.enabled }} + - {{=it.platform.dapi.rsDapi.metrics.port}} + {{?}} + {{? it.platform.dapi.rsDapi.metrics.enabled }} + ports: + - {{=it.platform.dapi.rsDapi.metrics.host}}:{{=it.platform.dapi.rsDapi.metrics.port}}:{{=it.platform.dapi.rsDapi.metrics.port}} + {{??}} + ports: [] + {{?}} + {{?}} + {{ gatewayLogs = it.platform.gateway.log.accessLogs.filter((l) => l.type === 'file'); }} {{? gatewayLogs.length > 0 }} gateway: From 4b268dc1ca3ee463f3b6918a9074d1c6dcb7eb14 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 17 Nov 2025 14:40:22 +0100 Subject: [PATCH 04/25] test: try to reproduce non deterministic resync causing apphash mismatch on proposer --- Cargo.lock | 17 ++ packages/rs-drive-abci/Cargo.toml | 2 + packages/rs-drive-abci/README.md | 30 ++++ .../examples/prepare_proposal_apphash.rs | 164 ++++++++++++++++++ .../sample_prepare_proposal_request.ron | 20 +++ 5 files changed, 233 insertions(+) create mode 100644 packages/rs-drive-abci/README.md create mode 100644 packages/rs-drive-abci/examples/prepare_proposal_apphash.rs create mode 100644 packages/rs-drive-abci/examples/sample_prepare_proposal_request.ron diff --git a/Cargo.lock b/Cargo.lock index 666ec91c453..50c3508d45f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -597,6 +597,9 @@ name = "bitflags" version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" +dependencies = [ + "serde", +] [[package]] name = "bitvec" @@ -2046,6 +2049,7 @@ dependencies = [ "regex", "reopen", "rocksdb 0.23.0", + "ron", "rust_decimal", "rust_decimal_macros", "serde", @@ -5349,6 +5353,18 @@ dependencies = [ "librocksdb-sys", ] +[[package]] +name = "ron" +version = "0.8.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +dependencies = [ + "base64 0.21.7", + "bitflags 2.9.4", + "serde", + "serde_derive", +] + [[package]] name = "rpassword" version = "7.4.0" @@ -6443,6 +6459,7 @@ dependencies = [ "hex", "lhash", "semver", + "serde_json", "tenderdash-proto", "thiserror 2.0.16", "tokio", diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 4625ddac515..f4afbfcb1a1 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -53,6 +53,7 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features = ], optional = false } tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", tag = "v1.5.0-dev.2", features = [ "grpc", + "serde", ] } lazy_static = "1.4.0" @@ -102,6 +103,7 @@ assert_matches = "1.5.0" drive-abci = { path = ".", features = ["testing-config", "mocks"] } bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f" } mockall = { version = "0.13" } +ron = "0.8" # For tests of grovedb verify rocksdb = { version = "0.23.0" } diff --git a/packages/rs-drive-abci/README.md b/packages/rs-drive-abci/README.md new file mode 100644 index 00000000000..f172ee2fe14 --- /dev/null +++ b/packages/rs-drive-abci/README.md @@ -0,0 +1,30 @@ +# drive-abci + +This crate contains the Drive ABCI application together with a couple of helpers. + +## `prepare_proposal_apphash` example + +The `prepare_proposal_apphash` example replays a `RequestPrepareProposal` against an existing +GroveDB database and prints the resulting app hash. It loads the same `.env` configuration format +as the full server, so you can point it at the same credential and RPC settings that were used +when the faulty block was produced. + +```bash +cargo run -p drive-abci --example prepare_proposal_apphash -- \ + --db-path /path/to/grovedb \ + --request /tmp/request.ron \ + --config /path/to/.env \ + --request-format ron +``` + +Notes: + +- `--request` supports both JSON and RON (default) files. When using RON you can either paste the + full `Request` dump from logging (`Request { value: Some(PrepareProposal(...)) }`) or only the + `RequestPrepareProposal { ... }` portion. +- JSON payloads should be plain `RequestPrepareProposal` objects that follow the proto field names + (e.g., `max_tx_bytes`, `proposer_pro_tx_hash`, …). +- The `.env` file is optional; the loader walks up the directory tree just like the production + binary if `--config` is omitted. +- The program prints the computed app hash in hex (`app_hash: 0x...`), making it easy to compare + two runs. diff --git a/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs b/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs new file mode 100644 index 00000000000..b2b6ef6ac52 --- /dev/null +++ b/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs @@ -0,0 +1,164 @@ +use clap::{Parser, ValueEnum}; +use drive_abci::abci::app::FullAbciApplication; +use drive_abci::config::{FromEnv, PlatformConfig}; +use drive_abci::platform_types::platform::Platform; +use drive_abci::rpc::core::DefaultCoreRPC; +use hex::ToHex; +use serde::de::DeserializeOwned; +use std::error::Error; +use std::fs; +use std::path::{Path, PathBuf}; +use tenderdash_abci::proto::abci::{request, Request, RequestPrepareProposal}; +use tenderdash_abci::Application; +use tracing_subscriber::EnvFilter; + +/// Replay helper for RequestPrepareProposal dumps. +#[derive(Debug, Parser)] +#[command(author, version, about)] +struct Cli { + /// Path to the GroveDB database that should be used for execution. + #[arg(long, value_hint = clap::ValueHint::DirPath)] + db_path: PathBuf, + + /// File that contains serialized Request or RequestPrepareProposal payload. + #[arg(long, value_hint = clap::ValueHint::FilePath)] + request: PathBuf, + + /// Optional .env file path. Defaults to walking up the filesystem like drive-abci. + #[arg(short, long, value_hint = clap::ValueHint::FilePath)] + config: Option, + + /// Format of the serialized request payload. + #[arg(long, value_enum, default_value_t = RequestFormat::Ron)] + request_format: RequestFormat, + +} + +#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] +enum RequestFormat { + Json, + Ron, +} + +fn main() -> Result<(), Box> { + init_logging(); + let cli = Cli::parse(); + run(cli) +} + +fn run(cli: Cli) -> Result<(), Box> { + load_env(cli.config.as_deref())?; + + let mut config = match PlatformConfig::from_env() { + Ok(config) => config, + Err(drive_abci::error::Error::Configuration(envy::Error::MissingValue(field))) => { + return Err(format!("missing configuration option: {}", field.to_uppercase()).into()); + } + Err(err) => return Err(err.into()), + }; + + config.db_path = cli.db_path.clone(); + + let request = load_prepare_proposal(&cli.request, cli.request_format)?; + + let core_rpc = DefaultCoreRPC::open( + config.core.consensus_rpc.url().as_str(), + config.core.consensus_rpc.username.clone(), + config.core.consensus_rpc.password.clone(), + )?; + + let platform: Platform = Platform::open_with_client( + &config.db_path, + Some(config.clone()), + core_rpc, + None, + )?; + + let app = FullAbciApplication::new(&platform); + + let response = app + .prepare_proposal(request) + .map_err(|err| format!("prepare_proposal failed: {:?}", err))?; + + println!("app_hash: 0x{}", response.app_hash.encode_hex::()); + + Ok(()) +} + +fn load_prepare_proposal( + path: &Path, + format: RequestFormat, +) -> Result> { + let raw = fs::read_to_string(path)?; + + match parse_with::(&raw, format) { + Ok(request) => match request.value { + Some(request::Value::PrepareProposal(value)) => Ok(value), + Some(other) => Err(format!( + "expected Request::PrepareProposal but file contains {}", + other.variant_name() + ) + .into()), + None => Err("request payload does not contain a value".into()), + }, + Err(_) => parse_with::(&raw, format), + } +} + +fn load_env(path: Option<&Path>) -> Result<(), Box> { + if let Some(path) = path { + dotenvy::from_path(path)?; + return Ok(()); + } + + match dotenvy::dotenv() { + Ok(_) => Ok(()), + Err(err) if err.not_found() => { + eprintln!("warning: no .env file found"); + Ok(()) + } + Err(err) => Err(err.into()), + } +} + +fn parse_with(raw: &str, format: RequestFormat) -> Result> +where + T: DeserializeOwned, +{ + match format { + RequestFormat::Json => Ok(serde_json::from_str(raw)?), + RequestFormat::Ron => Ok(ron::from_str(raw)?), + } +} + +fn init_logging() { + let env_filter = + EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); + + let _ = tracing_subscriber::fmt().with_env_filter(env_filter).try_init(); +} +trait RequestVariantName { + fn variant_name(&self) -> &'static str; +} + +impl RequestVariantName for request::Value { + fn variant_name(&self) -> &'static str { + match self { + request::Value::Echo(_) => "Echo", + request::Value::Flush(_) => "Flush", + request::Value::Info(_) => "Info", + request::Value::InitChain(_) => "InitChain", + request::Value::Query(_) => "Query", + request::Value::CheckTx(_) => "CheckTx", + request::Value::ListSnapshots(_) => "ListSnapshots", + request::Value::OfferSnapshot(_) => "OfferSnapshot", + request::Value::LoadSnapshotChunk(_) => "LoadSnapshotChunk", + request::Value::ApplySnapshotChunk(_) => "ApplySnapshotChunk", + request::Value::PrepareProposal(_) => "PrepareProposal", + request::Value::ProcessProposal(_) => "ProcessProposal", + request::Value::ExtendVote(_) => "ExtendVote", + request::Value::VerifyVoteExtension(_) => "VerifyVoteExtension", + request::Value::FinalizeBlock(_) => "FinalizeBlock", + } + } +} diff --git a/packages/rs-drive-abci/examples/sample_prepare_proposal_request.ron b/packages/rs-drive-abci/examples/sample_prepare_proposal_request.ron new file mode 100644 index 00000000000..55cfa454bee --- /dev/null +++ b/packages/rs-drive-abci/examples/sample_prepare_proposal_request.ron @@ -0,0 +1,20 @@ +RequestPrepareProposal( + max_tx_bytes: 0, + txs: [], + local_last_commit: Some(CommitInfo( + round: 0, + quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], + block_signature: [136, 2, 201, 44, 54, 184, 149, 90, 153, 51, 152, 3, 167, 159, 214, 100, 192, 253, 74, 105, 199, 160, 139, 57, 61, 11, 175, 9, 247, 241, 113, 116, 187, 243, 232, 214, 96, 34, 120, 212, 183, 148, 150, 10, 184, 239, 42, 164, 0, 67, 26, 227, 150, 71, 246, 22, 171, 141, 33, 189, 64, 155, 237, 128, 209, 238, 109, 243, 41, 41, 118, 242, 204, 134, 191, 163, 192, 67, 242, 162, 214, 90, 194, 229, 226, 60, 58, 188, 237, 27, 215, 17, 202, 44, 235, 191], + threshold_vote_extensions: [], + )), + misbehavior: [], + height: 86023, + time: Some("2025-01-14T12:50:40.902Z"), + next_validators_hash: [80, 142, 96, 154, 117, 162, 231, 122, 167, 239, 119, 189, 105, 164, 1, 23, 174, 229, 247, 198, 158, 41, 56, 80, 191, 227, 44, 203, 166, 248, 252, 22], + round: 0, + core_chain_locked_height: 1176913, + proposer_pro_tx_hash: [135, 7, 82, 52, 172, 71, 53, 59, 66, 187, 151, 206, 70, 51, 12, 182, 124, 212, 100, 140, 1, 240, 178, 57, 61, 126, 114, 155, 13, 103, 137, 24], + proposed_app_version: 7, + version: Some(Consensus(block: "14", app: "7")), + quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], +) From 9f83eec37519d712dde98df22d0cc127d9764699 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Mon, 17 Nov 2025 16:38:55 +0100 Subject: [PATCH 05/25] chore: prepare_proposal_apphash updated --- .../examples/prepare_proposal_apphash.rs | 149 ++++++++++++++---- .../sample_process_proposal_request.ron | 28 ++++ 2 files changed, 147 insertions(+), 30 deletions(-) create mode 100644 packages/rs-drive-abci/examples/sample_process_proposal_request.ron diff --git a/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs b/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs index b2b6ef6ac52..16830e1747c 100644 --- a/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs +++ b/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs @@ -1,14 +1,22 @@ use clap::{Parser, ValueEnum}; +use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use drive_abci::abci::app::FullAbciApplication; use drive_abci::config::{FromEnv, PlatformConfig}; use drive_abci::platform_types::platform::Platform; +use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use drive_abci::rpc::core::DefaultCoreRPC; use hex::ToHex; use serde::de::DeserializeOwned; use std::error::Error; use std::fs; use std::path::{Path, PathBuf}; -use tenderdash_abci::proto::abci::{request, Request, RequestPrepareProposal}; +use tenderdash_abci::proto::abci::{ + request, + response_process_proposal, + Request, + RequestPrepareProposal, + RequestProcessProposal, +}; use tenderdash_abci::Application; use tracing_subscriber::EnvFilter; @@ -20,9 +28,10 @@ struct Cli { #[arg(long, value_hint = clap::ValueHint::DirPath)] db_path: PathBuf, - /// File that contains serialized Request or RequestPrepareProposal payload. - #[arg(long, value_hint = clap::ValueHint::FilePath)] - request: PathBuf, + /// Files that contain serialized Request*, RequestPrepareProposal, or RequestProcessProposal payloads. + /// They will be executed sequentially. + #[arg(long, value_hint = clap::ValueHint::FilePath, required = true)] + requests: Vec, /// Optional .env file path. Defaults to walking up the filesystem like drive-abci. #[arg(short, long, value_hint = clap::ValueHint::FilePath)] @@ -31,7 +40,6 @@ struct Cli { /// Format of the serialized request payload. #[arg(long, value_enum, default_value_t = RequestFormat::Ron)] request_format: RequestFormat, - } #[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] @@ -59,7 +67,21 @@ fn run(cli: Cli) -> Result<(), Box> { config.db_path = cli.db_path.clone(); - let request = load_prepare_proposal(&cli.request, cli.request_format)?; + let mut requests = Vec::new(); + for path in &cli.requests { + let loaded = load_request(path, cli.request_format)?; + println!( + "loaded {} request from {}: {:#?}", + loaded.kind(), + path.display(), + loaded + ); + requests.push((path.clone(), loaded)); + } + + if requests.is_empty() { + return Err("no request files provided".into()); + } let core_rpc = DefaultCoreRPC::open( config.core.consensus_rpc.url().as_str(), @@ -67,41 +89,107 @@ fn run(cli: Cli) -> Result<(), Box> { config.core.consensus_rpc.password.clone(), )?; - let platform: Platform = Platform::open_with_client( - &config.db_path, - Some(config.clone()), - core_rpc, - None, - )?; + let platform: Platform = + Platform::open_with_client(&config.db_path, Some(config.clone()), core_rpc, None)?; + log_last_committed_block(&platform); let app = FullAbciApplication::new(&platform); - let response = app - .prepare_proposal(request) - .map_err(|err| format!("prepare_proposal failed: {:?}", err))?; - - println!("app_hash: 0x{}", response.app_hash.encode_hex::()); + for (path, request) in requests { + match request { + LoadedRequest::Prepare(request) => { + println!("executing prepare_proposal from {}", path.display()); + let response = app + .prepare_proposal(request) + .map_err(|err| { + format!("prepare_proposal failed for {}: {:?}", path.display(), err) + })?; + println!( + "prepare_proposal result ({}): app_hash=0x{}, tx_results={}, tx_records={}", + path.display(), + response.app_hash.encode_hex::(), + response.tx_results.len(), + response.tx_records.len() + ); + } + LoadedRequest::Process(request) => { + println!("executing process_proposal from {}", path.display()); + let response = app + .process_proposal(request) + .map_err(|err| { + format!("process_proposal failed for {}: {:?}", path.display(), err) + })?; + let status = response_process_proposal::ProposalStatus::from_i32(response.status) + .unwrap_or(response_process_proposal::ProposalStatus::Unknown); + println!( + "process_proposal result ({}): status={:?}, app_hash=0x{}, tx_results={}, events={}", + path.display(), + status, + hex::encode(response.app_hash), + response.tx_results.len(), + response.events.len() + ); + } + } + } Ok(()) } -fn load_prepare_proposal( - path: &Path, - format: RequestFormat, -) -> Result> { +#[derive(Debug)] +enum LoadedRequest { + Prepare(RequestPrepareProposal), + Process(RequestProcessProposal), +} + +impl LoadedRequest { + fn kind(&self) -> &'static str { + match self { + LoadedRequest::Prepare(_) => "prepare_proposal", + LoadedRequest::Process(_) => "process_proposal", + } + } +} + +fn load_request(path: &Path, format: RequestFormat) -> Result> { let raw = fs::read_to_string(path)?; - match parse_with::(&raw, format) { - Ok(request) => match request.value { - Some(request::Value::PrepareProposal(value)) => Ok(value), + if let Ok(request) = parse_with::(&raw, format) { + return match request.value { + Some(request::Value::PrepareProposal(value)) => Ok(LoadedRequest::Prepare(value)), + Some(request::Value::ProcessProposal(value)) => Ok(LoadedRequest::Process(value)), Some(other) => Err(format!( - "expected Request::PrepareProposal but file contains {}", + "expected Request::PrepareProposal or Request::ProcessProposal but file contains {}", other.variant_name() ) .into()), None => Err("request payload does not contain a value".into()), - }, - Err(_) => parse_with::(&raw, format), + }; + } + + parse_with::(&raw, format) + .map(LoadedRequest::Prepare) + .or_else(|_| { + parse_with::(&raw, format).map(LoadedRequest::Process) + }) +} + +fn log_last_committed_block(platform: &Platform) +where + C: drive_abci::rpc::core::CoreRPCLike, +{ + let platform_state = platform.state.load(); + if let Some(info) = platform_state.last_committed_block_info() { + let basic_info = info.basic_info(); + println!( + "last_committed_block: height={}, round={}, core_height={}, block_id_hash=0x{}", + basic_info.height, + info.round(), + basic_info.core_height, + hex::encode(info.block_id_hash()) + ); + } else { + println!("last_committed_block: None"); } } @@ -132,10 +220,11 @@ where } fn init_logging() { - let env_filter = - EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); + let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); - let _ = tracing_subscriber::fmt().with_env_filter(env_filter).try_init(); + let _ = tracing_subscriber::fmt() + .with_env_filter(env_filter) + .try_init(); } trait RequestVariantName { fn variant_name(&self) -> &'static str; diff --git a/packages/rs-drive-abci/examples/sample_process_proposal_request.ron b/packages/rs-drive-abci/examples/sample_process_proposal_request.ron new file mode 100644 index 00000000000..c6fa24a91d4 --- /dev/null +++ b/packages/rs-drive-abci/examples/sample_process_proposal_request.ron @@ -0,0 +1,28 @@ +RequestProcessProposal( + txs: [], + proposed_last_commit: Some(CommitInfo( + round: 0, + quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], + block_signature: [136, 2, 201, 44, 54, 184, 149, 90, 153, 51, 152, 3, 167, 159, 214, 100, 192, 253, 74, 105, 199, 160, 139, 57, 61, 11, 175, 9, 247, 241, 113, 116, 187, 243, 232, 214, 96, 34, 120, 212, 183, 148, 150, 10, 184, 239, 42, 164, 0, 67, 26, 227, 150, 71, 246, 22, 171, 141, 33, 189, 64, 155, 237, 128, 209, 238, 109, 243, 41, 41, 118, 242, 204, 134, 191, 163, 192, 67, 242, 162, 214, 90, 194, 229, 226, 60, 58, 188, 237, 27, 215, 17, 202, 44, 235, 191], + threshold_vote_extensions: [], + )), + misbehavior: [], + hash: [3, 63, 85, 253, 115, 253, 54, 212, 92, 243, 30, 67, 55, 132, 175, 209, 136, 193, 149, 113, 201, 9, 8, 33, 201, 131, 128, 93, 198, 170, 0, 68], + height: 86023, + round: 0, + time: Some("2025-01-14T12:50:40.902Z"), + next_validators_hash: [80, 142, 96, 154, 117, 162, 231, 122, 167, 239, 119, 189, 105, 164, 1, 23, 174, 229, 247, 198, 158, 41, 56, 80, 191, 227, 44, 203, 166, 248, 252, 22], + core_chain_locked_height: 1176913, + core_chain_lock_update: Some(CoreChainLock( + core_block_height: 1176913, + core_block_hash: [6, 25, 159, 225, 140, 175, 234, 184, 189, 230, 148, 197, 188, 70, 62, 170, 38, 234, 147, 229, 98, 209, 50, 161, 179, 32, 61, 45, 194, 0, 0, 0], + signature: [149, 89, 203, 42, 173, 22, 235, 79, 164, 70, 8, 15, 122, 248, 125, 76, 142, 113, 219, 249, 70, 211, 148, 128, 157, 23, 31, 193, 160, 50, 166, 97, 132, 152, 223, 128, 255, 241, 158, 169, 32, 199, 226, 52, 66, 147, 253, 45, 9, 103, 177, 68, 193, 122, 52, 82, 60, 158, 18, 196, 48, 29, 57, 198, 147, 236, 35, 166, 225, 81, 176, 237, 158, 143, 135, 233, 128, 68, 125, 173, 172, 228, 32, 209, 131, 37, 174, 64, 128, 39, 165, 236, 225, 113, 82, 206], + )), + proposer_pro_tx_hash: [135, 7, 82, 52, 172, 71, 53, 59, 66, 187, 151, 206, 70, 51, 12, 182, 124, 212, 100, 140, 1, 240, 178, 57, 61, 126, 114, 155, 13, 103, 137, 24], + proposed_app_version: 7, + version: Some(Consensus( + block: "14", + app: "7", + )), + quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], +) From 7f552f232d727f2829bd003f0798477c43e4d53e Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 18 Nov 2025 13:49:43 +0100 Subject: [PATCH 06/25] chore: prepare proposal apphash final --- Cargo.lock | 66 ++++- Cargo.toml | 1 + packages/platform-tools/Cargo.toml | 39 +++ .../README.md | 14 +- .../src/bin}/prepare_proposal_apphash.rs | 260 ++++++++++++++++-- .../platform-tools/src/bin/rocksdb_dump.rs | 81 ++++++ ...layer_sample_prepare_proposal_request.ron} | 0 ...layer_sample_process_proposal_request.ron} | 0 packages/rs-drive-abci/Cargo.toml | 2 - 9 files changed, 420 insertions(+), 43 deletions(-) create mode 100644 packages/platform-tools/Cargo.toml rename packages/{rs-drive-abci => platform-tools}/README.md (67%) rename packages/{rs-drive-abci/examples => platform-tools/src/bin}/prepare_proposal_apphash.rs (50%) create mode 100644 packages/platform-tools/src/bin/rocksdb_dump.rs rename packages/{rs-drive-abci/examples/sample_prepare_proposal_request.ron => platform-tools/vectors/replayer_sample_prepare_proposal_request.ron} (100%) rename packages/{rs-drive-abci/examples/sample_process_proposal_request.ron => platform-tools/vectors/replayer_sample_process_proposal_request.ron} (100%) diff --git a/Cargo.lock b/Cargo.lock index 50c3508d45f..3f3b8d3dea6 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2048,8 +2048,7 @@ dependencies = [ "rand 0.8.5", "regex", "reopen", - "rocksdb 0.23.0", - "ron", + "rocksdb 0.24.0", "rust_decimal", "rust_decimal_macros", "serde", @@ -4537,6 +4536,26 @@ dependencies = [ "virtue 0.0.17", ] +[[package]] +name = "platform-tools" +version = "0.1.0" +dependencies = [ + "clap", + "dotenvy", + "dpp", + "drive-abci", + "envy", + "hex", + "rocksdb 0.24.0", + "ron", + "serde", + "serde_json", + "tenderdash-abci", + "textwrap", + "tracing", + "tracing-subscriber", +] + [[package]] name = "platform-value" version = "2.1.3" @@ -5355,14 +5374,16 @@ dependencies = [ [[package]] name = "ron" -version = "0.8.1" +version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" +checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" dependencies = [ - "base64 0.21.7", "bitflags 2.9.4", + "once_cell", "serde", "serde_derive", + "typeid", + "unicode-ident", ] [[package]] @@ -6216,6 +6237,12 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" +[[package]] +name = "smawk" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" + [[package]] name = "socket2" version = "0.5.10" @@ -6553,6 +6580,17 @@ dependencies = [ "test-case-core", ] +[[package]] +name = "textwrap" +version = "0.16.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" +dependencies = [ + "smawk", + "unicode-linebreak", + "unicode-width", +] + [[package]] name = "thiserror" version = "1.0.69" @@ -7195,6 +7233,12 @@ dependencies = [ "utf-8", ] +[[package]] +name = "typeid" +version = "1.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" + [[package]] name = "typenum" version = "1.18.0" @@ -7222,6 +7266,12 @@ version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" +[[package]] +name = "unicode-linebreak" +version = "0.1.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" + [[package]] name = "unicode-normalization" version = "0.1.24" @@ -7231,6 +7281,12 @@ dependencies = [ "tinyvec", ] +[[package]] +name = "unicode-width" +version = "0.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" + [[package]] name = "unicode-xid" version = "0.2.6" diff --git a/Cargo.toml b/Cargo.toml index c669a9eb00b..a005ea2abdc 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,6 +40,7 @@ members = [ "packages/rs-dash-event-bus", "packages/rs-platform-wallet", "packages/wasm-sdk", + "packages/platform-tools", ] [workspace.package] diff --git a/packages/platform-tools/Cargo.toml b/packages/platform-tools/Cargo.toml new file mode 100644 index 00000000000..1e151e8e03d --- /dev/null +++ b/packages/platform-tools/Cargo.toml @@ -0,0 +1,39 @@ +[package] +name = "platform-tools" +version = "0.1.0" +edition = "2021" +default-run = "rocksdb-dump" + +[dependencies] +clap = { version = "4.5.26", features = ["derive"] } +dpp = { path = "../rs-dpp", default-features = false, features = ["abci"] } +drive-abci = { path = "../rs-drive-abci" } +dotenvy = "0.15.7" +envy = "0.4.2" +hex = "0.4.3" +ron = "0.12" +rocksdb = "0.24.0" +serde = { version = "1.0.219", features = ["derive"] } +serde_json = { version = "1.0" } +tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", tag = "v1.5.0-dev.2", features = [ + "grpc", + "serde", +] } +textwrap = "0.16" +tracing-subscriber = { version = "0.3.16", default-features = false, features = [ + "env-filter", + "ansi", + "fmt", + "std", + "registry", + "tracing-log", +] } +tracing = "0.1" + +[[bin]] +name = "rocksdb-dump" +path = "src/bin/rocksdb_dump.rs" + +[[bin]] +name = "prepare_proposal_apphash" +path = "src/bin/prepare_proposal_apphash.rs" diff --git a/packages/rs-drive-abci/README.md b/packages/platform-tools/README.md similarity index 67% rename from packages/rs-drive-abci/README.md rename to packages/platform-tools/README.md index f172ee2fe14..adce99a327f 100644 --- a/packages/rs-drive-abci/README.md +++ b/packages/platform-tools/README.md @@ -1,25 +1,25 @@ -# drive-abci +# platform-tools -This crate contains the Drive ABCI application together with a couple of helpers. +Utility binaries useful when debugging or inspecting the Dash Platform stack. -## `prepare_proposal_apphash` example +## `prepare_proposal_apphash` -The `prepare_proposal_apphash` example replays a `RequestPrepareProposal` against an existing +Replays one or more `RequestPrepareProposal`/`RequestProcessProposal` payloads against an existing GroveDB database and prints the resulting app hash. It loads the same `.env` configuration format as the full server, so you can point it at the same credential and RPC settings that were used when the faulty block was produced. ```bash -cargo run -p drive-abci --example prepare_proposal_apphash -- \ +cargo run -p platform-tools --bin prepare_proposal_apphash -- \ --db-path /path/to/grovedb \ - --request /tmp/request.ron \ + --requests /tmp/request.ron \ --config /path/to/.env \ --request-format ron ``` Notes: -- `--request` supports both JSON and RON (default) files. When using RON you can either paste the +- `--requests` supports both JSON and RON (default) files. When using RON you can either paste the full `Request` dump from logging (`Request { value: Some(PrepareProposal(...)) }`) or only the `RequestPrepareProposal { ... }` portion. - JSON payloads should be plain `RequestPrepareProposal` objects that follow the proto field names diff --git a/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs b/packages/platform-tools/src/bin/prepare_proposal_apphash.rs similarity index 50% rename from packages/rs-drive-abci/examples/prepare_proposal_apphash.rs rename to packages/platform-tools/src/bin/prepare_proposal_apphash.rs index 16830e1747c..62a8651f269 100644 --- a/packages/rs-drive-abci/examples/prepare_proposal_apphash.rs +++ b/packages/platform-tools/src/bin/prepare_proposal_apphash.rs @@ -7,19 +7,25 @@ use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use drive_abci::rpc::core::DefaultCoreRPC; use hex::ToHex; use serde::de::DeserializeOwned; +use serde_json::{Map as JsonMap, Number as JsonNumber, Value as JsonValue}; use std::error::Error; +use std::fmt; use std::fs; use std::path::{Path, PathBuf}; use tenderdash_abci::proto::abci::{ - request, - response_process_proposal, - Request, - RequestPrepareProposal, - RequestProcessProposal, + request, response_process_proposal, Request, RequestPrepareProposal, RequestProcessProposal, }; use tenderdash_abci::Application; +use textwrap::Options; +use tracing::field::{Field, Visit}; +use tracing::{Event, Subscriber}; +use tracing_subscriber::fmt::format::{FormatEvent, FormatFields, Writer}; +use tracing_subscriber::fmt::FmtContext; +use tracing_subscriber::registry::LookupSpan; use tracing_subscriber::EnvFilter; +const TRACE_WRAP_WIDTH: usize = 120; + /// Replay helper for RequestPrepareProposal dumps. #[derive(Debug, Parser)] #[command(author, version, about)] @@ -70,7 +76,7 @@ fn run(cli: Cli) -> Result<(), Box> { let mut requests = Vec::new(); for path in &cli.requests { let loaded = load_request(path, cli.request_format)?; - println!( + tracing::info!( "loaded {} request from {}: {:#?}", loaded.kind(), path.display(), @@ -98,33 +104,33 @@ fn run(cli: Cli) -> Result<(), Box> { for (path, request) in requests { match request { LoadedRequest::Prepare(request) => { - println!("executing prepare_proposal from {}", path.display()); - let response = app - .prepare_proposal(request) - .map_err(|err| { - format!("prepare_proposal failed for {}: {:?}", path.display(), err) - })?; - println!( - "prepare_proposal result ({}): app_hash=0x{}, tx_results={}, tx_records={}", + let height = request.height; + tracing::info!("executing prepare_proposal from {}", path.display()); + let response = app.prepare_proposal(request).map_err(|err| { + format!("prepare_proposal failed for {}: {:?}", path.display(), err) + })?; + tracing::info!( + "prepare_proposal result ({}): height={}, app_hash=0x{}, tx_results={}, tx_records={}", path.display(), + height, response.app_hash.encode_hex::(), response.tx_results.len(), response.tx_records.len() ); } LoadedRequest::Process(request) => { - println!("executing process_proposal from {}", path.display()); - let response = app - .process_proposal(request) - .map_err(|err| { - format!("process_proposal failed for {}: {:?}", path.display(), err) - })?; - let status = response_process_proposal::ProposalStatus::from_i32(response.status) + tracing::info!("executing process_proposal from {}", path.display()); + let height = request.height; + let response = app.process_proposal(request).map_err(|err| { + format!("process_proposal failed for {}: {:?}", path.display(), err) + })?; + let status = response_process_proposal::ProposalStatus::try_from(response.status) .unwrap_or(response_process_proposal::ProposalStatus::Unknown); - println!( - "process_proposal result ({}): status={:?}, app_hash=0x{}, tx_results={}, events={}", + tracing::info!( + "process_proposal result ({}): status={:?}, height={}, app_hash=0x{}, tx_results={}, events={}", path.display(), status, + height, hex::encode(response.app_hash), response.tx_results.len(), response.events.len() @@ -169,9 +175,7 @@ fn load_request(path: &Path, format: RequestFormat) -> Result(&raw, format) .map(LoadedRequest::Prepare) - .or_else(|_| { - parse_with::(&raw, format).map(LoadedRequest::Process) - }) + .or_else(|_| parse_with::(&raw, format).map(LoadedRequest::Process)) } fn log_last_committed_block(platform: &Platform) @@ -181,7 +185,7 @@ where let platform_state = platform.state.load(); if let Some(info) = platform_state.last_committed_block_info() { let basic_info = info.basic_info(); - println!( + tracing::info!( "last_committed_block: height={}, round={}, core_height={}, block_id_hash=0x{}", basic_info.height, info.round(), @@ -189,7 +193,7 @@ where hex::encode(info.block_id_hash()) ); } else { - println!("last_committed_block: None"); + tracing::info!("last_committed_block: None"); } } @@ -202,7 +206,7 @@ fn load_env(path: Option<&Path>) -> Result<(), Box> { match dotenvy::dotenv() { Ok(_) => Ok(()), Err(err) if err.not_found() => { - eprintln!("warning: no .env file found"); + tracing::warn!("warning: no .env file found"); Ok(()) } Err(err) => Err(err.into()), @@ -221,11 +225,209 @@ where fn init_logging() { let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); + let json_format = PrettyJsonEventFormat::new(TRACE_WRAP_WIDTH); let _ = tracing_subscriber::fmt() .with_env_filter(env_filter) + .event_format(json_format) .try_init(); } + +struct PrettyJsonEventFormat { + width: usize, +} + +impl PrettyJsonEventFormat { + fn new(width: usize) -> Self { + Self { width } + } +} + +impl FormatEvent for PrettyJsonEventFormat +where + S: Subscriber + for<'a> LookupSpan<'a>, + N: for<'a> FormatFields<'a> + 'static, +{ + fn format_event( + &self, + ctx: &FmtContext<'_, S, N>, + writer: Writer<'_>, + event: &Event<'_>, + ) -> fmt::Result { + let mut field_visitor = JsonFieldsVisitor::default(); + event.record(&mut field_visitor); + let fields = field_visitor.finish(); + + let mut payload = JsonMap::new(); + payload.insert( + "level".into(), + JsonValue::String(event.metadata().level().to_string()), + ); + payload.insert( + "target".into(), + JsonValue::String(event.metadata().target().to_string()), + ); + + if let Some(file) = event.metadata().file() { + payload.insert("file".into(), JsonValue::String(file.to_string())); + } + + if let Some(line) = event.metadata().line() { + payload.insert("line".into(), JsonValue::Number(JsonNumber::from(line))); + } + + if !fields.is_empty() { + payload.insert("fields".into(), JsonValue::Object(fields)); + } + + let spans = collect_span_names(ctx); + if !spans.is_empty() { + payload.insert( + "spans".into(), + JsonValue::Array(spans.into_iter().map(JsonValue::String).collect()), + ); + } + + let json = + serde_json::to_string_pretty(&JsonValue::Object(payload)).map_err(|_| fmt::Error)?; + + write_wrapped(writer, &json, self.width) + } +} + +fn write_wrapped(mut writer: Writer<'_>, text: &str, width: usize) -> fmt::Result { + if text.is_empty() { + writer.write_char('\n')?; + return Ok(()); + } + + let mut remaining = text; + + while let Some(idx) = remaining.find('\n') { + let line = &remaining[..idx]; + emit_wrapped_line(&mut writer, line, width)?; + remaining = &remaining[idx + 1..]; + } + + if !remaining.is_empty() { + emit_wrapped_line(&mut writer, remaining, width)?; + } + + Ok(()) +} + +fn emit_wrapped_line(writer: &mut Writer<'_>, line: &str, width: usize) -> fmt::Result { + if line.is_empty() { + writer.write_char('\n')?; + return Ok(()); + } + + let indent_end = line + .char_indices() + .find(|(_, c)| !c.is_whitespace()) + .map(|(idx, _)| idx) + .unwrap_or_else(|| line.len()); + let (indent, content) = line.split_at(indent_end); + + if content.is_empty() { + writer.write_str(indent)?; + writer.write_char('\n')?; + return Ok(()); + } + + let indent_chars = indent.chars().count(); + let mut effective_width = width.saturating_sub(indent_chars); + if effective_width == 0 { + effective_width = 1; + } + + let wrap_options = Options::new(effective_width).break_words(false); + let wrapped = textwrap::wrap(content, &wrap_options); + for piece in wrapped { + if !indent.is_empty() { + writer.write_str(indent)?; + } + writer.write_str(piece.as_ref())?; + writer.write_char('\n')?; + } + + Ok(()) +} + +fn collect_span_names(ctx: &FmtContext<'_, S, N>) -> Vec +where + S: Subscriber + for<'a> LookupSpan<'a>, + N: for<'a> FormatFields<'a> + 'static, +{ + let mut names = Vec::new(); + let mut current = ctx.lookup_current(); + while let Some(span) = current { + names.push(span.name().to_string()); + current = span.parent(); + } + names.reverse(); + names +} + +#[derive(Default)] +struct JsonFieldsVisitor { + fields: JsonMap, +} + +impl JsonFieldsVisitor { + fn finish(self) -> JsonMap { + self.fields + } + + fn insert_value(&mut self, field: &Field, value: JsonValue) { + self.fields.insert(field.name().to_string(), value); + } +} + +impl Visit for JsonFieldsVisitor { + fn record_bool(&mut self, field: &Field, value: bool) { + self.insert_value(field, JsonValue::Bool(value)); + } + + fn record_i64(&mut self, field: &Field, value: i64) { + self.insert_value(field, JsonValue::Number(value.into())); + } + + fn record_u64(&mut self, field: &Field, value: u64) { + self.insert_value(field, JsonValue::Number(value.into())); + } + + fn record_i128(&mut self, field: &Field, value: i128) { + self.insert_value(field, JsonValue::String(value.to_string())); + } + + fn record_u128(&mut self, field: &Field, value: u128) { + self.insert_value(field, JsonValue::String(value.to_string())); + } + + fn record_f64(&mut self, field: &Field, value: f64) { + let json_value = JsonNumber::from_f64(value) + .map(JsonValue::Number) + .unwrap_or(JsonValue::Null); + self.insert_value(field, json_value); + } + + fn record_str(&mut self, field: &Field, value: &str) { + self.insert_value(field, JsonValue::String(value.to_owned())); + } + + fn record_error(&mut self, field: &Field, value: &(dyn std::error::Error + 'static)) { + self.insert_value(field, JsonValue::String(value.to_string())); + } + + fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) { + self.insert_value(field, JsonValue::String(format!("{value:?}"))); + } + + fn record_bytes(&mut self, field: &Field, value: &[u8]) { + self.insert_value(field, JsonValue::String(hex::encode(value))); + } +} trait RequestVariantName { fn variant_name(&self) -> &'static str; } diff --git a/packages/platform-tools/src/bin/rocksdb_dump.rs b/packages/platform-tools/src/bin/rocksdb_dump.rs new file mode 100644 index 00000000000..3bf451f39c8 --- /dev/null +++ b/packages/platform-tools/src/bin/rocksdb_dump.rs @@ -0,0 +1,81 @@ +use clap::Parser; +use rocksdb::{IteratorMode, Options, DB}; +use std::{ + error::Error, + fs::File, + io::{self, BufWriter, Write}, + path::PathBuf, +}; + +/// Export RocksDB contents to a diff-friendly text format. +#[derive(Parser, Debug)] +#[command(author, version, about)] +struct Args { + /// Path to the RocksDB directory. + #[arg(long)] + db_path: PathBuf, + + /// Output file path. If omitted, the export is printed to STDOUT. + #[arg(long)] + output: Option, +} + +fn main() -> Result<(), Box> { + let args = Args::parse(); + + let mut options = Options::default(); + options.create_if_missing(false); + options.create_missing_column_families(false); + + let mut cf_names = DB::list_cf(&options, &args.db_path)?; + if cf_names.is_empty() { + return Err("database does not contain any column families".into()); + } + + cf_names.sort(); + + let db = DB::open_cf_for_read_only(&options, &args.db_path, cf_names.iter(), false)?; + + let writer: Box = match args.output { + Some(path) => Box::new(File::create(path)?), + None => Box::new(io::stdout()), + }; + + let mut writer = BufWriter::new(writer); + + writeln!( + writer, + "# RocksDB export from {}", + args.db_path.display() + )?; + + for (cf_index, cf_name) in cf_names.iter().enumerate() { + let cf_handle = db + .cf_handle(cf_name) + .ok_or_else(|| format!("column family {cf_name} not found"))?; + + if cf_index > 0 { + writeln!(writer)?; + } + + writeln!(writer, "# column_family={cf_name}")?; + + let iter = db.iterator_cf(cf_handle, IteratorMode::Start); + + for item in iter { + let (key, value) = item?; + let key_hex = hex::encode(&key); + let value_hex = hex::encode(&value); + + writeln!( + writer, + "cf={cf_name}\tkey=0x{key_hex}\tvalue=0x{value_hex}\tkey_len={}\tvalue_len={}", + key.len(), + value.len() + )?; + } + } + + writer.flush()?; + Ok(()) +} diff --git a/packages/rs-drive-abci/examples/sample_prepare_proposal_request.ron b/packages/platform-tools/vectors/replayer_sample_prepare_proposal_request.ron similarity index 100% rename from packages/rs-drive-abci/examples/sample_prepare_proposal_request.ron rename to packages/platform-tools/vectors/replayer_sample_prepare_proposal_request.ron diff --git a/packages/rs-drive-abci/examples/sample_process_proposal_request.ron b/packages/platform-tools/vectors/replayer_sample_process_proposal_request.ron similarity index 100% rename from packages/rs-drive-abci/examples/sample_process_proposal_request.ron rename to packages/platform-tools/vectors/replayer_sample_process_proposal_request.ron diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index f4afbfcb1a1..4625ddac515 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -53,7 +53,6 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features = ], optional = false } tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", tag = "v1.5.0-dev.2", features = [ "grpc", - "serde", ] } lazy_static = "1.4.0" @@ -103,7 +102,6 @@ assert_matches = "1.5.0" drive-abci = { path = ".", features = ["testing-config", "mocks"] } bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f" } mockall = { version = "0.13" } -ron = "0.8" # For tests of grovedb verify rocksdb = { version = "0.23.0" } From 3a6a28796f58d6ac04140c934199a7c8f8d2b755 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 18 Nov 2025 13:50:35 +0100 Subject: [PATCH 07/25] drive: bump rocksdb to 0.24 --- packages/rs-drive-abci/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 4625ddac515..109ac004e8a 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -104,7 +104,7 @@ bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "084 mockall = { version = "0.13" } # For tests of grovedb verify -rocksdb = { version = "0.23.0" } +rocksdb = { version = "0.24.0" } integer-encoding = { version = "4.0.0" } [features] From 3db8943753f87ca8098e60eb2f2a49ed9ac95ee2 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:11:43 +0100 Subject: [PATCH 08/25] chore: replay_abci_requests final binary --- Cargo.lock | 38 +++++++++---------- Cargo.toml | 2 +- .../Cargo.toml | 12 +++--- packages/platform-debug-utils/README.md | 9 +++++ .../src/bin/replay_abci_requests.rs} | 27 ++++++++++--- .../src/bin/rocksdb_dump.rs | 0 ...replay_abci_requests_prepare_proposal.ron} | 0 ...replay_abci_requests_process_proposal.ron} | 0 packages/platform-tools/README.md | 30 --------------- 9 files changed, 58 insertions(+), 60 deletions(-) rename packages/{platform-tools => platform-debug-utils}/Cargo.toml (81%) create mode 100644 packages/platform-debug-utils/README.md rename packages/{platform-tools/src/bin/prepare_proposal_apphash.rs => platform-debug-utils/src/bin/replay_abci_requests.rs} (92%) rename packages/{platform-tools => platform-debug-utils}/src/bin/rocksdb_dump.rs (100%) rename packages/{platform-tools/vectors/replayer_sample_prepare_proposal_request.ron => platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron} (100%) rename packages/{platform-tools/vectors/replayer_sample_process_proposal_request.ron => platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron} (100%) delete mode 100644 packages/platform-tools/README.md diff --git a/Cargo.lock b/Cargo.lock index 3f3b8d3dea6..cde9bd742ff 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4519,25 +4519,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" [[package]] -name = "platform-serialization" -version = "2.1.3" -dependencies = [ - "bincode 2.0.0-rc.3", - "platform-version", -] - -[[package]] -name = "platform-serialization-derive" -version = "2.1.3" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.106", - "virtue 0.0.17", -] - -[[package]] -name = "platform-tools" +name = "platform-debug-utils" version = "0.1.0" dependencies = [ "clap", @@ -4556,6 +4538,24 @@ dependencies = [ "tracing-subscriber", ] +[[package]] +name = "platform-serialization" +version = "2.1.3" +dependencies = [ + "bincode 2.0.0-rc.3", + "platform-version", +] + +[[package]] +name = "platform-serialization-derive" +version = "2.1.3" +dependencies = [ + "proc-macro2", + "quote", + "syn 2.0.106", + "virtue 0.0.17", +] + [[package]] name = "platform-value" version = "2.1.3" diff --git a/Cargo.toml b/Cargo.toml index a005ea2abdc..dfd7953a46c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -40,7 +40,7 @@ members = [ "packages/rs-dash-event-bus", "packages/rs-platform-wallet", "packages/wasm-sdk", - "packages/platform-tools", + "packages/platform-debug-utils", ] [workspace.package] diff --git a/packages/platform-tools/Cargo.toml b/packages/platform-debug-utils/Cargo.toml similarity index 81% rename from packages/platform-tools/Cargo.toml rename to packages/platform-debug-utils/Cargo.toml index 1e151e8e03d..bdae01755ef 100644 --- a/packages/platform-tools/Cargo.toml +++ b/packages/platform-debug-utils/Cargo.toml @@ -1,8 +1,10 @@ [package] -name = "platform-tools" version = "0.1.0" -edition = "2021" -default-run = "rocksdb-dump" +rust-version.workspace = true +name = "platform-debug-utils" +edition = "2024" + +default-run = "replay_abci_requests" [dependencies] clap = { version = "4.5.26", features = ["derive"] } @@ -35,5 +37,5 @@ name = "rocksdb-dump" path = "src/bin/rocksdb_dump.rs" [[bin]] -name = "prepare_proposal_apphash" -path = "src/bin/prepare_proposal_apphash.rs" +name = "replay_abci_requests" +path = "src/bin/replay_abci_requests.rs" diff --git a/packages/platform-debug-utils/README.md b/packages/platform-debug-utils/README.md new file mode 100644 index 00000000000..7240a159f98 --- /dev/null +++ b/packages/platform-debug-utils/README.md @@ -0,0 +1,9 @@ +# platform-debug-utils + +Small utilities that make inspecting Dash Platform state easier. Run any binary with `--help` to +see detailed usage and examples. + +- `rocksdb-dump`: export RocksDB or GroveDB contents into a diff-friendly text file grouped by + column family. +- `replay_abci_requests`: replay serialized RequestPrepareProposal / RequestProcessProposal payloads + against a GroveDB snapshot to inspect resulting app hashes and outcomes; see vectors/ for sample payloads. diff --git a/packages/platform-tools/src/bin/prepare_proposal_apphash.rs b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs similarity index 92% rename from packages/platform-tools/src/bin/prepare_proposal_apphash.rs rename to packages/platform-debug-utils/src/bin/replay_abci_requests.rs index 62a8651f269..c93dd1b67d5 100644 --- a/packages/platform-tools/src/bin/prepare_proposal_apphash.rs +++ b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs @@ -12,34 +12,51 @@ use std::error::Error; use std::fmt; use std::fs; use std::path::{Path, PathBuf}; +use tenderdash_abci::Application; use tenderdash_abci::proto::abci::{ - request, response_process_proposal, Request, RequestPrepareProposal, RequestProcessProposal, + Request, RequestPrepareProposal, RequestProcessProposal, request, response_process_proposal, }; -use tenderdash_abci::Application; use textwrap::Options; use tracing::field::{Field, Visit}; use tracing::{Event, Subscriber}; -use tracing_subscriber::fmt::format::{FormatEvent, FormatFields, Writer}; +use tracing_subscriber::EnvFilter; use tracing_subscriber::fmt::FmtContext; +use tracing_subscriber::fmt::format::{FormatEvent, FormatFields, Writer}; use tracing_subscriber::registry::LookupSpan; -use tracing_subscriber::EnvFilter; const TRACE_WRAP_WIDTH: usize = 120; /// Replay helper for RequestPrepareProposal dumps. #[derive(Debug, Parser)] -#[command(author, version, about)] +#[command( + name = "replay_abci_requests", + author, + version, + about = "Replay serialized ABCI requests against an existing GroveDB database.", + long_about = "Feed captured RequestPrepareProposal or RequestProcessProposal payloads (RON or JSON) \ +sequentially into the Drive ABCI application to recompute app hashes, inspect tx outcomes, and debug \ +state mismatches. Request files accept both the outer Request wrapper or the specific request type, \ +and configuration mirrors drive-abci's .env loading so you can point at the same RPC credentials. \ +\n\nExample:\n replay_abci_requests --db-path /path/to/grovedb --requests dump.ron \ +--config /path/to/.env --request-format ron\n\nUse multiple --requests flags to replay several inputs \ +in chronological order." +)] struct Cli { /// Path to the GroveDB database that should be used for execution. + /// You can use a command like `./state_backup.sh export --component abci abci.tar.gz testnet` + /// to dump the GroveDB database from existing Platform node. #[arg(long, value_hint = clap::ValueHint::DirPath)] db_path: PathBuf, /// Files that contain serialized Request*, RequestPrepareProposal, or RequestProcessProposal payloads. /// They will be executed sequentially. + /// + /// See vectors/ directory for example request payloads. #[arg(long, value_hint = clap::ValueHint::FilePath, required = true)] requests: Vec, /// Optional .env file path. Defaults to walking up the filesystem like drive-abci. + /// .env file format is the same as used by drive-abci. #[arg(short, long, value_hint = clap::ValueHint::FilePath)] config: Option, diff --git a/packages/platform-tools/src/bin/rocksdb_dump.rs b/packages/platform-debug-utils/src/bin/rocksdb_dump.rs similarity index 100% rename from packages/platform-tools/src/bin/rocksdb_dump.rs rename to packages/platform-debug-utils/src/bin/rocksdb_dump.rs diff --git a/packages/platform-tools/vectors/replayer_sample_prepare_proposal_request.ron b/packages/platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron similarity index 100% rename from packages/platform-tools/vectors/replayer_sample_prepare_proposal_request.ron rename to packages/platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron diff --git a/packages/platform-tools/vectors/replayer_sample_process_proposal_request.ron b/packages/platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron similarity index 100% rename from packages/platform-tools/vectors/replayer_sample_process_proposal_request.ron rename to packages/platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron diff --git a/packages/platform-tools/README.md b/packages/platform-tools/README.md deleted file mode 100644 index adce99a327f..00000000000 --- a/packages/platform-tools/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# platform-tools - -Utility binaries useful when debugging or inspecting the Dash Platform stack. - -## `prepare_proposal_apphash` - -Replays one or more `RequestPrepareProposal`/`RequestProcessProposal` payloads against an existing -GroveDB database and prints the resulting app hash. It loads the same `.env` configuration format -as the full server, so you can point it at the same credential and RPC settings that were used -when the faulty block was produced. - -```bash -cargo run -p platform-tools --bin prepare_proposal_apphash -- \ - --db-path /path/to/grovedb \ - --requests /tmp/request.ron \ - --config /path/to/.env \ - --request-format ron -``` - -Notes: - -- `--requests` supports both JSON and RON (default) files. When using RON you can either paste the - full `Request` dump from logging (`Request { value: Some(PrepareProposal(...)) }`) or only the - `RequestPrepareProposal { ... }` portion. -- JSON payloads should be plain `RequestPrepareProposal` objects that follow the proto field names - (e.g., `max_tx_bytes`, `proposer_pro_tx_hash`, …). -- The `.env` file is optional; the loader walks up the directory tree just like the production - binary if `--config` is omitted. -- The program prints the computed app hash in hex (`app_hash: 0x...`), making it easy to compare - two runs. From e11fb8d51d4f8f38f7b9696b26ab151709958c04 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 18 Nov 2025 14:39:53 +0100 Subject: [PATCH 09/25] chore: improve help --- packages/platform-debug-utils/src/bin/replay_abci_requests.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs index c93dd1b67d5..a79c07fa3cc 100644 --- a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs +++ b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs @@ -37,7 +37,7 @@ const TRACE_WRAP_WIDTH: usize = 120; sequentially into the Drive ABCI application to recompute app hashes, inspect tx outcomes, and debug \ state mismatches. Request files accept both the outer Request wrapper or the specific request type, \ and configuration mirrors drive-abci's .env loading so you can point at the same RPC credentials. \ -\n\nExample:\n replay_abci_requests --db-path /path/to/grovedb --requests dump.ron \ +\n\nExample:\n RUST_LOG=trace replay_abci_requests --db-path /path/to/grovedb --requests dump.ron \ --config /path/to/.env --request-format ron\n\nUse multiple --requests flags to replay several inputs \ in chronological order." )] From 0f056cd75a38c81ebb8861f157b6664102e36df7 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Wed, 26 Nov 2025 10:47:02 +0100 Subject: [PATCH 10/25] chore: replayer, most recent version --- Cargo.lock | 14 + packages/platform-debug-utils/Cargo.toml | 2 + .../src/bin/replay_abci_requests.rs | 646 +++++----- .../src/bin/replay_support/cli.rs | 123 ++ .../src/bin/replay_support/log_ingest.rs | 1082 +++++++++++++++++ .../src/bin/replay_support/mod.rs | 4 + .../src/bin/replay_support/replay.rs | 644 ++++++++++ .../src/bin/replay_support/telemetry.rs | 251 ++++ .../src/bin/rocksdb_dump.rs | 8 +- .../src/abci/handler/process_proposal.rs | 16 +- .../engine/finalize_block_proposal/v0/mod.rs | 5 +- .../engine/run_block_proposal/v0/mod.rs | 1 + .../execution/types/block_state_info/mod.rs | 2 + .../types/block_state_info/v0/mod.rs | 13 +- .../v0/mod.rs | 3 +- 15 files changed, 2431 insertions(+), 383 deletions(-) create mode 100644 packages/platform-debug-utils/src/bin/replay_support/cli.rs create mode 100644 packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs create mode 100644 packages/platform-debug-utils/src/bin/replay_support/mod.rs create mode 100644 packages/platform-debug-utils/src/bin/replay_support/replay.rs create mode 100644 packages/platform-debug-utils/src/bin/replay_support/telemetry.rs diff --git a/Cargo.lock b/Cargo.lock index 869e47591f5..b8eb347a2c3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4522,7 +4522,9 @@ dependencies = [ "serde_json", "tenderdash-abci", "textwrap", + "time", "tracing", + "tracing-appender", "tracing-subscriber", ] @@ -7115,6 +7117,18 @@ dependencies = [ "tracing-core", ] +[[package]] +name = "tracing-appender" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" +dependencies = [ + "crossbeam-channel", + "thiserror 1.0.69", + "time", + "tracing-subscriber", +] + [[package]] name = "tracing-attributes" version = "0.1.30" diff --git a/packages/platform-debug-utils/Cargo.toml b/packages/platform-debug-utils/Cargo.toml index bdae01755ef..c5eb4189691 100644 --- a/packages/platform-debug-utils/Cargo.toml +++ b/packages/platform-debug-utils/Cargo.toml @@ -17,6 +17,7 @@ ron = "0.12" rocksdb = "0.24.0" serde = { version = "1.0.219", features = ["derive"] } serde_json = { version = "1.0" } +time = { version = "0.3", features = ["macros"] } tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", tag = "v1.5.0-dev.2", features = [ "grpc", "serde", @@ -31,6 +32,7 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features = "tracing-log", ] } tracing = "0.1" +tracing-appender = "0.2" [[bin]] name = "rocksdb-dump" diff --git a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs index a79c07fa3cc..27cad4d9648 100644 --- a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs +++ b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs @@ -1,79 +1,24 @@ -use clap::{Parser, ValueEnum}; +mod replay_support; +use clap::Parser; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use drive_abci::abci::app::FullAbciApplication; use drive_abci::config::{FromEnv, PlatformConfig}; use drive_abci::platform_types::platform::Platform; use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use drive_abci::rpc::core::DefaultCoreRPC; -use hex::ToHex; -use serde::de::DeserializeOwned; -use serde_json::{Map as JsonMap, Number as JsonNumber, Value as JsonValue}; +use replay_support::cli::{Cli, SkipRequest, load_env}; +use replay_support::log_ingest::LogRequestStream; +use replay_support::replay::{ + LoadedRequest, ProgressReporter, ReplayItem, ReplaySource, ensure_db_directory, + execute_request, load_request, log_last_committed_block, +}; +use replay_support::telemetry::init_logging; use std::error::Error; -use std::fmt; -use std::fs; use std::path::{Path, PathBuf}; -use tenderdash_abci::Application; -use tenderdash_abci::proto::abci::{ - Request, RequestPrepareProposal, RequestProcessProposal, request, response_process_proposal, -}; -use textwrap::Options; -use tracing::field::{Field, Visit}; -use tracing::{Event, Subscriber}; -use tracing_subscriber::EnvFilter; -use tracing_subscriber::fmt::FmtContext; -use tracing_subscriber::fmt::format::{FormatEvent, FormatFields, Writer}; -use tracing_subscriber::registry::LookupSpan; - -const TRACE_WRAP_WIDTH: usize = 120; - -/// Replay helper for RequestPrepareProposal dumps. -#[derive(Debug, Parser)] -#[command( - name = "replay_abci_requests", - author, - version, - about = "Replay serialized ABCI requests against an existing GroveDB database.", - long_about = "Feed captured RequestPrepareProposal or RequestProcessProposal payloads (RON or JSON) \ -sequentially into the Drive ABCI application to recompute app hashes, inspect tx outcomes, and debug \ -state mismatches. Request files accept both the outer Request wrapper or the specific request type, \ -and configuration mirrors drive-abci's .env loading so you can point at the same RPC credentials. \ -\n\nExample:\n RUST_LOG=trace replay_abci_requests --db-path /path/to/grovedb --requests dump.ron \ ---config /path/to/.env --request-format ron\n\nUse multiple --requests flags to replay several inputs \ -in chronological order." -)] -struct Cli { - /// Path to the GroveDB database that should be used for execution. - /// You can use a command like `./state_backup.sh export --component abci abci.tar.gz testnet` - /// to dump the GroveDB database from existing Platform node. - #[arg(long, value_hint = clap::ValueHint::DirPath)] - db_path: PathBuf, - - /// Files that contain serialized Request*, RequestPrepareProposal, or RequestProcessProposal payloads. - /// They will be executed sequentially. - /// - /// See vectors/ directory for example request payloads. - #[arg(long, value_hint = clap::ValueHint::FilePath, required = true)] - requests: Vec, - - /// Optional .env file path. Defaults to walking up the filesystem like drive-abci. - /// .env file format is the same as used by drive-abci. - #[arg(short, long, value_hint = clap::ValueHint::FilePath)] - config: Option, - - /// Format of the serialized request payload. - #[arg(long, value_enum, default_value_t = RequestFormat::Ron)] - request_format: RequestFormat, -} - -#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] -enum RequestFormat { - Json, - Ron, -} fn main() -> Result<(), Box> { - init_logging(); let cli = Cli::parse(); + let _log_guard = init_logging(cli.output.as_deref())?; run(cli) } @@ -89,21 +34,56 @@ fn run(cli: Cli) -> Result<(), Box> { }; config.db_path = cli.db_path.clone(); + let db_was_created = ensure_db_directory(&config.db_path)?; - let mut requests = Vec::new(); + let mut replay_items = Vec::new(); for path in &cli.requests { let loaded = load_request(path, cli.request_format)?; - tracing::info!( - "loaded {} request from {}: {:#?}", - loaded.kind(), - path.display(), - loaded + tracing::info!("loaded {} request from {}", loaded.kind(), path.display()); + let canonical_path = canonicalize_path(path); + let item = ReplayItem::from_file(canonical_path, loaded); + if should_skip_item(&item, &cli.skip) { + tracing::info!("skipping request {} due to --skip", item.describe()); + continue; + } + replay_items.push(item); + } + + let mut log_streams = Vec::new(); + for path in &cli.logs { + let mut stream = LogRequestStream::open(path)?; + if stream.peek()?.is_some() { + tracing::info!("streaming ABCI requests from log {}", path.display()); + log_streams.push(stream); + } else { + tracing::warn!("no supported ABCI requests found in log {}", path.display()); + } + } + + if replay_items.is_empty() && log_streams.is_empty() { + return Err( + "no requests to replay; provide --requests and/or --logs with relevant inputs".into(), ); - requests.push((path.clone(), loaded)); } - if requests.is_empty() { - return Err("no request files provided".into()); + if db_was_created { + let first_is_init_chain = if let Some(item) = replay_items.first() { + matches!(item.request, LoadedRequest::InitChain(_)) + } else if let Some(stream) = log_streams.first_mut() { + advance_stream(stream, None, &cli.skip)?; + match stream.peek()? { + Some(item) => matches!(item.request, LoadedRequest::InitChain(_)), + None => false, + } + } else { + false + }; + + if !first_is_init_chain { + return Err( + "database path did not exist; first replayed request must be init_chain".into(), + ); + } } let core_rpc = DefaultCoreRPC::open( @@ -115,358 +95,284 @@ fn run(cli: Cli) -> Result<(), Box> { let platform: Platform = Platform::open_with_client(&config.db_path, Some(config.clone()), core_rpc, None)?; log_last_committed_block(&platform); - - let app = FullAbciApplication::new(&platform); - - for (path, request) in requests { - match request { - LoadedRequest::Prepare(request) => { - let height = request.height; - tracing::info!("executing prepare_proposal from {}", path.display()); - let response = app.prepare_proposal(request).map_err(|err| { - format!("prepare_proposal failed for {}: {:?}", path.display(), err) - })?; + let mut known_height = platform + .state + .load() + .last_committed_block_info() + .as_ref() + .map(|info| info.basic_info().height); + + if let Some(limit) = cli.stop_height { + if let Some(current) = known_height { + if current >= limit { tracing::info!( - "prepare_proposal result ({}): height={}, app_hash=0x{}, tx_results={}, tx_records={}", - path.display(), - height, - response.app_hash.encode_hex::(), - response.tx_results.len(), - response.tx_records.len() - ); - } - LoadedRequest::Process(request) => { - tracing::info!("executing process_proposal from {}", path.display()); - let height = request.height; - let response = app.process_proposal(request).map_err(|err| { - format!("process_proposal failed for {}: {:?}", path.display(), err) - })?; - let status = response_process_proposal::ProposalStatus::try_from(response.status) - .unwrap_or(response_process_proposal::ProposalStatus::Unknown); - tracing::info!( - "process_proposal result ({}): status={:?}, height={}, app_hash=0x{}, tx_results={}, events={}", - path.display(), - status, - height, - hex::encode(response.app_hash), - response.tx_results.len(), - response.events.len() + "current platform height {} is already at or above stop height {}; ending replay", + current, + limit ); + return Ok(()); } } } - Ok(()) -} - -#[derive(Debug)] -enum LoadedRequest { - Prepare(RequestPrepareProposal), - Process(RequestProcessProposal), -} + let app = FullAbciApplication::new(&platform); + let mut progress = if cli.progress { + Some(ProgressReporter::new(cli.stop_height)) + } else { + None + }; -impl LoadedRequest { - fn kind(&self) -> &'static str { - match self { - LoadedRequest::Prepare(_) => "prepare_proposal", - LoadedRequest::Process(_) => "process_proposal", + for item in replay_items { + if stop_height_reached(cli.stop_height, known_height) { + tracing::info!( + "stop height {} reached; skipping remaining request files", + cli.stop_height.unwrap() + ); + break; + } + let committed = execute_request(&app, item, progress.as_mut())?; + update_known_height(&mut known_height, committed); + if stop_height_reached(cli.stop_height, known_height) { + tracing::info!( + "stop height {} reached after request files; skipping remaining inputs", + cli.stop_height.unwrap() + ); + break; } } -} - -fn load_request(path: &Path, format: RequestFormat) -> Result> { - let raw = fs::read_to_string(path)?; - - if let Ok(request) = parse_with::(&raw, format) { - return match request.value { - Some(request::Value::PrepareProposal(value)) => Ok(LoadedRequest::Prepare(value)), - Some(request::Value::ProcessProposal(value)) => Ok(LoadedRequest::Process(value)), - Some(other) => Err(format!( - "expected Request::PrepareProposal or Request::ProcessProposal but file contains {}", - other.variant_name() - ) - .into()), - None => Err("request payload does not contain a value".into()), - }; - } - - parse_with::(&raw, format) - .map(LoadedRequest::Prepare) - .or_else(|_| parse_with::(&raw, format).map(LoadedRequest::Process)) -} -fn log_last_committed_block(platform: &Platform) -where - C: drive_abci::rpc::core::CoreRPCLike, -{ - let platform_state = platform.state.load(); - if let Some(info) = platform_state.last_committed_block_info() { - let basic_info = info.basic_info(); + for mut stream in log_streams { + if stop_height_reached(cli.stop_height, known_height) { + tracing::info!( + "stop height {} reached; skipping remaining log streams", + cli.stop_height.unwrap() + ); + break; + } + let mut validator = RequestSequenceValidator::new(stream.path().to_path_buf()); + let mut executed = 0usize; + loop { + if stop_height_reached(cli.stop_height, known_height) { + tracing::info!( + "stop height {} reached; stopping replay for log {}", + cli.stop_height.unwrap(), + stream.path().display() + ); + break; + } + advance_stream(&mut stream, known_height, &cli.skip)?; + let Some(item) = stream.next_item()? else { + break; + }; + validator.observe(&item)?; + let committed = execute_request(&app, item, progress.as_mut())?; + update_known_height(&mut known_height, committed); + executed += 1; + } + validator.finish()?; tracing::info!( - "last_committed_block: height={}, round={}, core_height={}, block_id_hash=0x{}", - basic_info.height, - info.round(), - basic_info.core_height, - hex::encode(info.block_id_hash()) + "replayed {} ABCI requests from log {}", + executed, + stream.path().display() ); - } else { - tracing::info!("last_committed_block: None"); - } -} - -fn load_env(path: Option<&Path>) -> Result<(), Box> { - if let Some(path) = path { - dotenvy::from_path(path)?; - return Ok(()); } - match dotenvy::dotenv() { - Ok(_) => Ok(()), - Err(err) if err.not_found() => { - tracing::warn!("warning: no .env file found"); - Ok(()) - } - Err(err) => Err(err.into()), - } + Ok(()) } -fn parse_with(raw: &str, format: RequestFormat) -> Result> -where - T: DeserializeOwned, -{ - match format { - RequestFormat::Json => Ok(serde_json::from_str(raw)?), - RequestFormat::Ron => Ok(ron::from_str(raw)?), +fn update_known_height(current: &mut Option, new_height: Option) { + if let Some(height) = new_height { + match current { + Some(existing) if height <= *existing => {} + _ => *current = Some(height), + } } } -fn init_logging() { - let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); - let json_format = PrettyJsonEventFormat::new(TRACE_WRAP_WIDTH); - - let _ = tracing_subscriber::fmt() - .with_env_filter(env_filter) - .event_format(json_format) - .try_init(); +fn canonicalize_path(path: &Path) -> PathBuf { + path.canonicalize().unwrap_or_else(|_| path.to_path_buf()) } -struct PrettyJsonEventFormat { - width: usize, +fn should_skip_item(item: &ReplayItem, skip: &[SkipRequest]) -> bool { + skip.iter().any(|target| match &item.source { + ReplaySource::File(path) => target.line.is_none() && paths_equal(path, &target.path), + ReplaySource::Log { path, line, .. } => { + if !paths_equal(path, &target.path) { + return false; + } + match target.line { + Some(target_line) => target_line == *line, + None => true, + } + } + }) } -impl PrettyJsonEventFormat { - fn new(width: usize) -> Self { - Self { width } +fn paths_equal(a: &Path, b: &Path) -> bool { + if let (Ok(canon_a), Ok(canon_b)) = (a.canonicalize(), b.canonicalize()) { + canon_a == canon_b + } else { + a == b } } -impl FormatEvent for PrettyJsonEventFormat -where - S: Subscriber + for<'a> LookupSpan<'a>, - N: for<'a> FormatFields<'a> + 'static, -{ - fn format_event( - &self, - ctx: &FmtContext<'_, S, N>, - writer: Writer<'_>, - event: &Event<'_>, - ) -> fmt::Result { - let mut field_visitor = JsonFieldsVisitor::default(); - event.record(&mut field_visitor); - let fields = field_visitor.finish(); - - let mut payload = JsonMap::new(); - payload.insert( - "level".into(), - JsonValue::String(event.metadata().level().to_string()), - ); - payload.insert( - "target".into(), - JsonValue::String(event.metadata().target().to_string()), - ); - - if let Some(file) = event.metadata().file() { - payload.insert("file".into(), JsonValue::String(file.to_string())); - } - - if let Some(line) = event.metadata().line() { - payload.insert("line".into(), JsonValue::Number(JsonNumber::from(line))); - } - - if !fields.is_empty() { - payload.insert("fields".into(), JsonValue::Object(fields)); - } - - let spans = collect_span_names(ctx); - if !spans.is_empty() { - payload.insert( - "spans".into(), - JsonValue::Array(spans.into_iter().map(JsonValue::String).collect()), +fn advance_stream( + stream: &mut LogRequestStream, + known_height: Option, + skip: &[SkipRequest], +) -> Result<(), Box> { + if let Some(height) = known_height { + let skipped = stream.skip_processed_entries(height)?; + if skipped > 0 { + tracing::info!( + "skipped {} ABCI requests already applied (height <= {}) in log {}", + skipped, + height, + stream.path().display() ); } - - let json = - serde_json::to_string_pretty(&JsonValue::Object(payload)).map_err(|_| fmt::Error)?; - - write_wrapped(writer, &json, self.width) } -} - -fn write_wrapped(mut writer: Writer<'_>, text: &str, width: usize) -> fmt::Result { - if text.is_empty() { - writer.write_char('\n')?; - return Ok(()); - } - - let mut remaining = text; - - while let Some(idx) = remaining.find('\n') { - let line = &remaining[..idx]; - emit_wrapped_line(&mut writer, line, width)?; - remaining = &remaining[idx + 1..]; - } - - if !remaining.is_empty() { - emit_wrapped_line(&mut writer, remaining, width)?; - } - + drain_skipped_entries(stream, skip)?; Ok(()) } -fn emit_wrapped_line(writer: &mut Writer<'_>, line: &str, width: usize) -> fmt::Result { - if line.is_empty() { - writer.write_char('\n')?; +fn drain_skipped_entries( + stream: &mut LogRequestStream, + skip: &[SkipRequest], +) -> Result<(), Box> { + if skip.is_empty() { return Ok(()); } - let indent_end = line - .char_indices() - .find(|(_, c)| !c.is_whitespace()) - .map(|(idx, _)| idx) - .unwrap_or_else(|| line.len()); - let (indent, content) = line.split_at(indent_end); - - if content.is_empty() { - writer.write_str(indent)?; - writer.write_char('\n')?; - return Ok(()); - } - - let indent_chars = indent.chars().count(); - let mut effective_width = width.saturating_sub(indent_chars); - if effective_width == 0 { - effective_width = 1; - } + loop { + let Some(item) = stream.peek()? else { + break; + }; - let wrap_options = Options::new(effective_width).break_words(false); - let wrapped = textwrap::wrap(content, &wrap_options); - for piece in wrapped { - if !indent.is_empty() { - writer.write_str(indent)?; + if should_skip_item(item, skip) { + let description = item.describe(); + if stream.next_item()?.is_none() { + break; + } + tracing::info!("skipping request {} due to --skip", description); + continue; } - writer.write_str(piece.as_ref())?; - writer.write_char('\n')?; - } - Ok(()) -} - -fn collect_span_names(ctx: &FmtContext<'_, S, N>) -> Vec -where - S: Subscriber + for<'a> LookupSpan<'a>, - N: for<'a> FormatFields<'a> + 'static, -{ - let mut names = Vec::new(); - let mut current = ctx.lookup_current(); - while let Some(span) = current { - names.push(span.name().to_string()); - current = span.parent(); + break; } - names.reverse(); - names -} -#[derive(Default)] -struct JsonFieldsVisitor { - fields: JsonMap, + Ok(()) } -impl JsonFieldsVisitor { - fn finish(self) -> JsonMap { - self.fields - } - - fn insert_value(&mut self, field: &Field, value: JsonValue) { - self.fields.insert(field.name().to_string(), value); - } +struct RequestSequenceValidator { + path: PathBuf, + last_height: Option, + saw_process: bool, + saw_finalize: bool, } -impl Visit for JsonFieldsVisitor { - fn record_bool(&mut self, field: &Field, value: bool) { - self.insert_value(field, JsonValue::Bool(value)); - } - - fn record_i64(&mut self, field: &Field, value: i64) { - self.insert_value(field, JsonValue::Number(value.into())); - } - - fn record_u64(&mut self, field: &Field, value: u64) { - self.insert_value(field, JsonValue::Number(value.into())); - } - - fn record_i128(&mut self, field: &Field, value: i128) { - self.insert_value(field, JsonValue::String(value.to_string())); +impl RequestSequenceValidator { + fn new(path: PathBuf) -> Self { + Self { + path, + last_height: None, + saw_process: false, + saw_finalize: false, + } } - fn record_u128(&mut self, field: &Field, value: u128) { - self.insert_value(field, JsonValue::String(value.to_string())); - } + fn observe(&mut self, item: &ReplayItem) -> Result<(), Box> { + let height = match item.request.block_height() { + Some(height) => height, + None => return Ok(()), + }; - fn record_f64(&mut self, field: &Field, value: f64) { - let json_value = JsonNumber::from_f64(value) - .map(JsonValue::Number) - .unwrap_or(JsonValue::Null); - self.insert_value(field, json_value); + match &item.request { + LoadedRequest::Process(_) => self.record_process(height, &item.describe()), + LoadedRequest::Finalize(_) => self.record_finalize(height, &item.describe()), + _ => Ok(()), + } } - fn record_str(&mut self, field: &Field, value: &str) { - self.insert_value(field, JsonValue::String(value.to_owned())); + fn record_process(&mut self, height: u64, origin: &str) -> Result<(), Box> { + self.bump_height(height, origin)?; + self.saw_process = true; + Ok(()) } - fn record_error(&mut self, field: &Field, value: &(dyn std::error::Error + 'static)) { - self.insert_value(field, JsonValue::String(value.to_string())); + fn record_finalize(&mut self, height: u64, origin: &str) -> Result<(), Box> { + self.bump_height(height, origin)?; + if !self.saw_process { + return Err(format!( + "log {} contains finalize_block before process_proposal at height {} ({})", + self.path.display(), + height, + origin + ) + .into()); + } + self.saw_finalize = true; + Ok(()) } - fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) { - self.insert_value(field, JsonValue::String(format!("{value:?}"))); + fn bump_height(&mut self, height: u64, origin: &str) -> Result<(), Box> { + match self.last_height { + Some(last) if height < last => { + return Err(format!( + "log {} has out-of-order height {} before {} ({})", + self.path.display(), + last, + height, + origin + ) + .into()); + } + Some(last) if height == last => Ok(()), + Some(last) => { + if !self.saw_process || !self.saw_finalize { + return Err(format!( + "log {} missing process/finalize pair for height {} before {}", + self.path.display(), + last, + origin + ) + .into()); + } + if height != last + 1 { + return Err(format!( + "log {} skipped heights ({} -> {}) before {}", + self.path.display(), + last, + height, + origin + ) + .into()); + } + self.last_height = Some(height); + self.saw_process = false; + self.saw_finalize = false; + Ok(()) + } + None => { + self.last_height = Some(height); + Ok(()) + } + } } - fn record_bytes(&mut self, field: &Field, value: &[u8]) { - self.insert_value(field, JsonValue::String(hex::encode(value))); + fn finish(&self) -> Result<(), Box> { + if self.last_height.is_some() && (!self.saw_process || !self.saw_finalize) { + return Err(format!( + "log {} ended before height {} had both process_proposal and finalize_block", + self.path.display(), + self.last_height.unwrap() + ) + .into()); + } + Ok(()) } } -trait RequestVariantName { - fn variant_name(&self) -> &'static str; -} -impl RequestVariantName for request::Value { - fn variant_name(&self) -> &'static str { - match self { - request::Value::Echo(_) => "Echo", - request::Value::Flush(_) => "Flush", - request::Value::Info(_) => "Info", - request::Value::InitChain(_) => "InitChain", - request::Value::Query(_) => "Query", - request::Value::CheckTx(_) => "CheckTx", - request::Value::ListSnapshots(_) => "ListSnapshots", - request::Value::OfferSnapshot(_) => "OfferSnapshot", - request::Value::LoadSnapshotChunk(_) => "LoadSnapshotChunk", - request::Value::ApplySnapshotChunk(_) => "ApplySnapshotChunk", - request::Value::PrepareProposal(_) => "PrepareProposal", - request::Value::ProcessProposal(_) => "ProcessProposal", - request::Value::ExtendVote(_) => "ExtendVote", - request::Value::VerifyVoteExtension(_) => "VerifyVoteExtension", - request::Value::FinalizeBlock(_) => "FinalizeBlock", - } - } +fn stop_height_reached(limit: Option, known_height: Option) -> bool { + matches!((limit, known_height), (Some(limit), Some(height)) if height >= limit) } diff --git a/packages/platform-debug-utils/src/bin/replay_support/cli.rs b/packages/platform-debug-utils/src/bin/replay_support/cli.rs new file mode 100644 index 00000000000..da602af2934 --- /dev/null +++ b/packages/platform-debug-utils/src/bin/replay_support/cli.rs @@ -0,0 +1,123 @@ +use clap::{Parser, ValueEnum}; +use serde::de::DeserializeOwned; +use std::error::Error; +use std::path::{Path, PathBuf}; + +/// Replay helper for Request* dumps. +#[derive(Debug, Parser)] +#[command( + name = "replay_abci_requests", + author, + version, + about = "Replay serialized ABCI requests against an existing GroveDB database.", + long_about = "Feed captured Request* payloads (RON or JSON) or entire drive-abci JSON trace logs \ +sequentially into the Drive ABCI application to recompute app hashes, inspect tx outcomes, and debug \ +state mismatches. Request files accept both the outer Request wrapper or the specific request type, \ +and configuration mirrors drive-abci's .env loading so you can point at the same RPC credentials. \ +\n\nTo ingest log files enable trace level JSON logging first, e.g.:\n dashmate config set platform.drive.abci.logs.file.format json\n dashmate config set platform.drive.abci.logs.file.level trace \ +\n\nExample:\n RUST_LOG=trace replay_abci_requests --db-path /path/to/grovedb --requests dump.ron \ +--config /path/to/.env --request-format ron\n\nUse multiple --requests flags to replay several inputs \ +in chronological order." +)] +pub struct Cli { + /// Path to the GroveDB database that should be used for execution. + /// You can use a command like `./state_backup.sh export --component abci abci.tar.gz testnet` + /// to dump the GroveDB database from existing Platform node. + #[arg(long, value_hint = clap::ValueHint::DirPath)] + pub db_path: PathBuf, + + /// Files that contain serialized Request*, RequestPrepareProposal, or RequestProcessProposal payloads. + /// They will be executed sequentially before any --logs entries. + /// + /// See vectors/ directory for example request payloads. + #[arg(long, value_hint = clap::ValueHint::FilePath)] + pub requests: Vec, + + /// drive-abci JSON logs that contain trace level "received ABCI request" entries. + /// Relevant requests will be extracted and replayed chronologically. + #[arg(long, value_hint = clap::ValueHint::FilePath)] + pub logs: Vec, + + /// Optional .env file path. Defaults to walking up the filesystem like drive-abci. + /// .env file format is the same as used by drive-abci. + #[arg(short, long, value_hint = clap::ValueHint::FilePath)] + pub config: Option, + + /// Format of the serialized request payload. + #[arg(long, value_enum, default_value_t = RequestFormat::Ron)] + pub request_format: RequestFormat, + + /// Print progress information (height + app hash) to stdout after each finalize_block. + #[arg(short, long)] + pub progress: bool, + + /// Write structured JSON logs to the provided file instead of stderr. + #[arg(long, value_hint = clap::ValueHint::FilePath)] + pub output: Option, + + /// Skip replaying specific requests (use PATH for files or PATH:LINE for log entries). + #[arg(long = "skip", value_name = "PATH[:LINE]", value_parser = parse_skip_request)] + pub skip: Vec, + + /// Stop replay after reaching this block height (inclusive). + #[arg(long, value_name = "HEIGHT")] + pub stop_height: Option, +} + +#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] +pub enum RequestFormat { + Json, + Ron, +} + +#[derive(Debug, Clone)] +pub struct SkipRequest { + pub path: PathBuf, + pub line: Option, +} + +pub fn parse_skip_request(raw: &str) -> Result { + let (path_part, line_part) = match raw.rsplit_once(':') { + Some((path, line_str)) => match line_str.parse::() { + Ok(line) => (path, Some(line)), + Err(_) => (raw, None), + }, + None => (raw, None), + }; + + let path_buf = PathBuf::from(path_part); + let canonical = path_buf + .canonicalize() + .unwrap_or_else(|_| PathBuf::from(path_part)); + + Ok(SkipRequest { + path: canonical, + line: line_part, + }) +} + +pub fn load_env(path: Option<&Path>) -> Result<(), Box> { + if let Some(path) = path { + dotenvy::from_path(path)?; + return Ok(()); + } + + match dotenvy::dotenv() { + Ok(_) => Ok(()), + Err(err) if err.not_found() => { + tracing::warn!("warning: no .env file found"); + Ok(()) + } + Err(err) => Err(err.into()), + } +} + +pub fn parse_with(raw: &str, format: RequestFormat) -> Result> +where + T: DeserializeOwned, +{ + match format { + RequestFormat::Json => Ok(serde_json::from_str(raw)?), + RequestFormat::Ron => Ok(ron::from_str(raw)?), + } +} diff --git a/packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs b/packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs new file mode 100644 index 00000000000..ff68c1b826d --- /dev/null +++ b/packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs @@ -0,0 +1,1082 @@ +use super::replay::{LoadedRequest, ReplayItem}; +use hex::encode as hex_encode; +use serde::de::Error as DeError; +use serde::de::IgnoredAny; +use serde::de::value; +use serde::de::{DeserializeOwned, DeserializeSeed, EnumAccess, IntoDeserializer, VariantAccess}; +use serde::forward_to_deserialize_any; +use serde::{Deserialize, Deserializer}; +use std::collections::BTreeMap; +use std::fmt; +use std::fs::File; +use std::io::{BufRead, BufReader, Lines}; +use std::path::{Path, PathBuf}; +use tenderdash_abci::proto::serializers::timestamp::to_rfc3339_nanos; +use time::OffsetDateTime; + +pub struct LogRequestStream { + path: PathBuf, + lines: Lines>, + line_number: usize, + buffered: Option, +} + +impl LogRequestStream { + pub fn open(path: &Path) -> Result> { + let file = File::open(path)?; + let canonical = path.canonicalize().unwrap_or_else(|_| path.to_path_buf()); + Ok(Self { + path: canonical, + lines: BufReader::new(file).lines(), + line_number: 0, + buffered: None, + }) + } + + pub fn path(&self) -> &Path { + &self.path + } + + pub fn peek(&mut self) -> Result, Box> { + if self.buffered.is_none() { + self.buffered = self.read_next_request()?; + } + Ok(self.buffered.as_ref()) + } + + pub fn next_item(&mut self) -> Result, Box> { + if let Some(item) = self.buffered.take() { + return Ok(Some(item)); + } + self.read_next_request() + } + + pub fn skip_processed_entries( + &mut self, + max_height: u64, + ) -> Result> { + let mut skipped = 0usize; + loop { + let Some(item) = self.peek()? else { + break; + }; + + let should_skip = match item.request.block_height() { + Some(height) => height <= max_height, + None => false, + }; + + if should_skip { + let _ = self.next_item()?; + skipped += 1; + } else { + break; + } + } + + Ok(skipped) + } + + fn read_next_request(&mut self) -> Result, Box> { + while let Some(line_result) = self.lines.next() { + let line = line_result?; + self.line_number += 1; + if line.trim().is_empty() { + continue; + } + + let entry: LogEntry = match serde_json::from_str(&line) { + Ok(entry) => entry, + Err(err) => { + tracing::debug!( + "skipping malformed log line {}:{} ({:?})", + self.path.display(), + self.line_number, + err + ); + continue; + } + }; + + let LogEntry { + timestamp, + fields, + span, + } = entry; + + let Some(fields) = fields else { + continue; + }; + + if fields.message.as_deref() != Some("received ABCI request") { + continue; + } + + let Some(raw_request) = fields.request.as_deref() else { + continue; + }; + + let endpoint = span.and_then(|s| s.endpoint); + + match parse_logged_request(raw_request) { + Ok(Some(loaded)) => { + return Ok(Some(ReplayItem::from_log( + self.path(), + self.line_number, + timestamp, + endpoint, + loaded, + ))); + } + Ok(None) => { + // tracing::trace!( + // "skipping replay for ABCI request {}:{} (no-op variant)", + // self.path.display(), + // self.line_number + // ); + } + Err(err) => { + tracing::warn!( + "failed to parse ABCI request from {}:{} ({})", + self.path.display(), + self.line_number, + err + ); + } + } + } + + Ok(None) + } +} + +#[derive(Debug, Deserialize)] +struct LogEntry { + timestamp: Option, + fields: Option, + span: Option, +} + +#[derive(Debug, Deserialize)] +struct LogFields { + message: Option, + request: Option, +} + +#[derive(Debug, Deserialize)] +struct LogSpan { + endpoint: Option, +} + +fn parse_logged_request( + raw: &str, +) -> Result, Box> { + let parser = DebugValueParser::new(raw); + let parsed = parser + .parse() + .map_err(|err| format!("failed to parse request payload: {}", err))?; + convert_parsed_request(parsed) +} + +fn convert_parsed_request( + value: ParsedValue, +) -> Result, Box> { + match value { + ParsedValue::Tagged { tag, value } if tag == "Request" => { + let mut object = value.into_object()?; + let inner = object + .remove("value") + .ok_or_else(|| "request log entry missing value field".to_string())?; + parse_request_variant(inner) + } + other => parse_request_variant(other), + } +} + +fn parse_request_variant( + value: ParsedValue, +) -> Result, Box> { + let (tag, inner) = match value { + ParsedValue::Tagged { tag, value } => (tag, *value), + _ => return Err("request log entry is missing request variant tag".into()), + }; + + let normalized = tag.trim_start_matches("Request"); + + match normalized { + "InitChain" => deserialize_to_loaded(inner, LoadedRequest::InitChain).map(Some), + "Info" => deserialize_to_loaded(inner, LoadedRequest::Info).map(Some), + "PrepareProposal" => deserialize_to_loaded(inner, LoadedRequest::Prepare).map(Some), + "ProcessProposal" => deserialize_to_loaded(inner, LoadedRequest::Process).map(Some), + "FinalizeBlock" => deserialize_to_loaded(inner, LoadedRequest::Finalize).map(Some), + "ExtendVote" => deserialize_to_loaded(inner, LoadedRequest::ExtendVote).map(Some), + "VerifyVoteExtension" => { + deserialize_to_loaded(inner, LoadedRequest::VerifyVoteExtension).map(Some) + } + "Flush" => Ok(None), + other => Err(format!("unsupported request variant {}", other).into()), + } +} + +pub struct DebugValueParser<'a> { + input: &'a [u8], + pos: usize, +} + +impl<'a> DebugValueParser<'a> { + fn new(raw: &'a str) -> Self { + Self { + input: raw.as_bytes(), + pos: 0, + } + } + + fn parse(mut self) -> Result { + let value = self.parse_value()?; + self.skip_ws(); + if self.pos != self.input.len() { + Err(self.error("unexpected trailing characters")) + } else { + Ok(value) + } + } + + fn parse_value(&mut self) -> Result { + self.skip_ws(); + + if self.consume("Some(") { + let value = self.parse_value()?; + self.skip_ws(); + self.expect(')')?; + return Ok(value); + } + + if self.consume("None") { + return Ok(ParsedValue::Null); + } + + if self.consume("true") { + return Ok(ParsedValue::Bool(true)); + } + + if self.consume("false") { + return Ok(ParsedValue::Bool(false)); + } + + match self.peek_char() { + Some('{') => return self.parse_object(None), + Some('[') => return self.parse_array(), + Some('"') => return self.parse_string(), + Some(ch) if ch == '-' || ch.is_ascii_digit() => return self.parse_number(), + Some(_) => {} + None => return Err(self.error("unexpected end of input")), + } + + let ident = self.parse_identifier()?; + self.skip_ws(); + match self.peek_char() { + Some('{') => self.parse_object(Some(ident)), + Some('(') => { + self.pos += 1; + let value = self.parse_value()?; + self.skip_ws(); + self.expect(')')?; + Ok(ParsedValue::Tagged { + tag: ident, + value: Box::new(value), + }) + } + _ => Ok(normalize_identifier_value(ident)), + } + } + + fn parse_object(&mut self, tag: Option) -> Result { + self.expect('{')?; + let mut map = BTreeMap::new(); + loop { + self.skip_ws(); + if self.peek_char() == Some('}') { + self.pos += 1; + break; + } + let key = normalize_field_key(self.parse_identifier()?); + self.skip_ws(); + self.expect(':')?; + let value = self.parse_value()?; + map.insert(key, value); + self.skip_ws(); + if self.peek_char() == Some(',') { + self.pos += 1; + } + } + + let object = ParsedValue::Object(map); + if let Some(tag) = tag { + ParsedValue::from_tagged(tag, object) + } else { + Ok(object) + } + } + + fn parse_array(&mut self) -> Result { + self.expect('[')?; + let mut values = Vec::new(); + loop { + self.skip_ws(); + if self.peek_char() == Some(']') { + self.pos += 1; + break; + } + let value = self.parse_value()?; + values.push(value); + self.skip_ws(); + if self.peek_char() == Some(',') { + self.pos += 1; + } + } + Ok(ParsedValue::Array(values)) + } + + fn parse_string(&mut self) -> Result { + self.expect('"')?; + let mut output = String::new(); + while let Some(ch) = self.next_char() { + match ch { + '"' => return Ok(ParsedValue::String(output)), + '\\' => { + let escaped = self + .next_char() + .ok_or_else(|| self.error("unterminated escape sequence"))?; + let translated = match escaped { + '"' => '"', + '\\' => '\\', + 'n' => '\n', + 'r' => '\r', + 't' => '\t', + other => other, + }; + output.push(translated); + } + other => output.push(other), + } + } + Err(self.error("unterminated string literal")) + } + + fn parse_number(&mut self) -> Result { + let start = self.pos; + if self.peek_char() == Some('-') { + self.pos += 1; + } + while matches!(self.peek_char(), Some(ch) if ch.is_ascii_digit()) { + self.pos += 1; + } + let number = std::str::from_utf8(&self.input[start..self.pos]) + .map_err(|_| self.error("invalid number encoding"))?; + Ok(ParsedValue::Number(number.to_string())) + } + + fn parse_identifier(&mut self) -> Result { + self.skip_ws(); + let start = self.pos; + while let Some(ch) = self.peek_char() { + if ch.is_alphanumeric() || ch == '_' || ch == '#' { + self.pos += 1; + } else { + break; + } + } + if self.pos == start { + Err(self.error("expected identifier")) + } else { + Ok(String::from_utf8_lossy(&self.input[start..self.pos]).to_string()) + } + } + + fn expect(&mut self, expected: char) -> Result<(), ParseError> { + self.skip_ws(); + match self.peek_char() { + Some(ch) if ch == expected => { + self.pos += 1; + Ok(()) + } + _ => Err(self.error(format!("expected '{}'", expected))), + } + } + + fn consume(&mut self, expected: &str) -> bool { + if self.input[self.pos..].starts_with(expected.as_bytes()) { + self.pos += expected.len(); + true + } else { + false + } + } + + fn peek_char(&self) -> Option { + self.input.get(self.pos).copied().map(|b| b as char) + } + + fn next_char(&mut self) -> Option { + let ch = self.peek_char()?; + self.pos += 1; + Some(ch) + } + + fn skip_ws(&mut self) { + while matches!(self.peek_char(), Some(ch) if ch.is_whitespace()) { + self.pos += 1; + } + } + + fn error>(&self, msg: T) -> ParseError { + ParseError { + message: msg.into(), + } + } +} + +#[derive(Debug, Clone)] +enum ParsedValue { + Null, + Bool(bool), + Number(String), + String(String), + Array(Vec), + Object(BTreeMap), + Tagged { + tag: String, + value: Box, + }, +} + +impl ParsedValue { + fn into_object(self) -> Result, Box> { + match self { + ParsedValue::Object(map) => Ok(map), + ParsedValue::Tagged { value, .. } => value.into_object(), + other => Err(format!("expected object but found {:?}", other).into()), + } + } + + fn to_string_value(&self) -> Result> { + match self { + ParsedValue::String(value) => Ok(value.clone()), + ParsedValue::Number(value) => Ok(value.clone()), + ParsedValue::Tagged { value, .. } => value.to_string_value(), + other => Err(format!("expected string but found {:?}", other).into()), + } + } + + fn from_tagged(tag: String, value: ParsedValue) -> Result { + match normalize_type_tag(&tag) { + "Timestamp" => Ok(ParsedValue::String(format_timestamp(value)?)), + "Duration" => Ok(ParsedValue::String(format_duration(value)?)), + "VoteExtension" => Ok(ParsedValue::Tagged { + tag, + value: Box::new(normalize_vote_extension(value)?), + }), + _ => Ok(ParsedValue::Tagged { + tag, + value: Box::new(value), + }), + } + } +} + +fn normalize_type_tag(tag: &str) -> &str { + tag.rsplit("::").next().unwrap_or(tag) +} + +fn normalize_identifier_value(token: String) -> ParsedValue { + let trimmed = token.trim(); + if let Some(suffix) = trimmed.strip_prefix("ConsensusVersion") + && !suffix.is_empty() + && suffix.chars().all(|ch| ch.is_ascii_digit()) + { + return ParsedValue::Number(suffix.to_string()); + } + if is_enum_variant_identifier(trimmed) { + return ParsedValue::Tagged { + tag: "EnumVariant".to_string(), + value: Box::new(ParsedValue::String(trimmed.to_string())), + }; + } + + ParsedValue::String(trimmed.to_string()) +} + +fn is_enum_variant_identifier(value: &str) -> bool { + let mut chars = value.chars(); + let first = match chars.next() { + Some(ch) => ch, + None => return false, + }; + if !first.is_ascii_uppercase() { + return false; + } + chars.all(|ch| ch.is_ascii_alphanumeric() || ch == '_') +} + +fn normalize_field_key(key: String) -> String { + key.strip_prefix("r#").unwrap_or(&key).to_string() +} + +fn normalize_vote_extension(value: ParsedValue) -> Result { + let mut map = value.into_object()?; + if let Some(field) = map.get_mut("type") { + convert_enum_variant(field, vote_extension_type_from_name)?; + } + Ok(ParsedValue::Object(map)) +} + +fn convert_enum_variant(field: &mut ParsedValue, resolver: F) -> Result<(), ParseError> +where + F: Fn(&str) -> Option, +{ + if let ParsedValue::Tagged { tag, value } = field { + if tag == "EnumVariant" { + let name = value + .to_string_value() + .map_err(|err| ParseError::new(err.to_string()))?; + if let Some(num) = resolver(&name) { + *field = ParsedValue::Number(num.to_string()); + } else { + *field = ParsedValue::String(name); + } + } + } + Ok(()) +} + +fn vote_extension_type_from_name(name: &str) -> Option { + use tenderdash_abci::proto::types::VoteExtensionType; + + let normalized = camel_to_upper_snake(name); + VoteExtensionType::from_str_name(normalized.as_str()).map(|value| value as i32) +} + +fn camel_to_upper_snake(value: &str) -> String { + let mut out = String::new(); + for (idx, ch) in value.chars().enumerate() { + if ch.is_ascii_uppercase() && idx != 0 { + out.push('_'); + } + out.push(ch.to_ascii_uppercase()); + } + out +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parses_vote_extension_with_raw_identifier_keys() { + let raw = "Request { value: Some(FinalizeBlock(RequestFinalizeBlock { commit: Some(CommitInfo { round: 0, quorum_hash: [], block_signature: [], threshold_vote_extensions: [VoteExtension { r#type: ThresholdRecoverRaw, extension: [], signature: [], sign_request_id: None }] }), misbehavior: [], hash: [], height: 1, round: 0, block: None, block_id: None })) }"; + let request = parse_logged_request(raw).expect("parse succeeds"); + assert!(matches!(request, Some(LoadedRequest::Finalize(_)))); + } +} + +#[derive(Debug)] +struct ParseError { + message: String, +} + +impl fmt::Display for ParseError { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.message) + } +} + +impl std::error::Error for ParseError {} + +impl ParseError { + fn new>(msg: T) -> Self { + Self { + message: msg.into(), + } + } +} + +impl From> for ParseError { + fn from(err: Box) -> Self { + ParseError::new(err.to_string()) + } +} + +struct TaggedEnumAccess { + tag: String, + value: ParsedValue, +} + +impl<'de> EnumAccess<'de> for TaggedEnumAccess { + type Error = value::Error; + type Variant = VariantDeserializer; + + fn variant_seed(self, seed: V) -> Result<(V::Value, Self::Variant), Self::Error> + where + V: DeserializeSeed<'de>, + { + let variant = seed.deserialize(self.tag.into_deserializer())?; + Ok((variant, VariantDeserializer { value: self.value })) + } +} + +struct VariantDeserializer { + value: ParsedValue, +} + +impl<'de> VariantAccess<'de> for VariantDeserializer { + type Error = value::Error; + + fn unit_variant(self) -> Result<(), Self::Error> { + IgnoredAny::deserialize(self.value.into_deserializer()).map(|_| ()) + } + + fn newtype_variant_seed(self, seed: T) -> Result + where + T: DeserializeSeed<'de>, + { + let normalized = match self.value { + ParsedValue::Tagged { tag, value: inner } if tag == "EnumVariant" => { + ParsedValue::String(inner.to_string_value().map_err(value::Error::custom)?) + } + other => other, + }; + seed.deserialize(normalized) + } + + fn tuple_variant(self, len: usize, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + Deserializer::deserialize_tuple(self.value, len, visitor) + } + + fn struct_variant( + self, + fields: &'static [&'static str], + visitor: V, + ) -> Result + where + V: serde::de::Visitor<'de>, + { + Deserializer::deserialize_struct(self.value, "", fields, visitor) + } +} + +impl<'de> IntoDeserializer<'de, value::Error> for ParsedValue { + type Deserializer = Self; + + fn into_deserializer(self) -> Self { + self + } +} + +impl<'de> Deserializer<'de> for ParsedValue { + type Error = value::Error; + + fn deserialize_any(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Null => visitor.visit_unit(), + ParsedValue::Bool(value) => visitor.visit_bool(value), + ParsedValue::Number(value) => { + if let Ok(int) = value.parse::() { + visitor.visit_i64(int) + } else if let Ok(uint) = value.parse::() { + visitor.visit_u64(uint) + } else if let Ok(float) = value.parse::() { + visitor.visit_f64(float) + } else { + visitor.visit_string(value) + } + } + ParsedValue::String(value) => visitor.visit_string(value), + ParsedValue::Array(values) => { + let iter = values.into_iter().map(|v| v.into_deserializer()); + let mut seq = value::SeqDeserializer::new(iter); + let output = visitor.visit_seq(&mut seq)?; + seq.end()?; + Ok(output) + } + ParsedValue::Object(map) => { + let iter = map + .into_iter() + .map(|(k, v)| (k.into_deserializer(), v.into_deserializer())); + let mut map_deserializer = value::MapDeserializer::new(iter); + let output = visitor.visit_map(&mut map_deserializer)?; + map_deserializer.end()?; + Ok(output) + } + ParsedValue::Tagged { value, .. } => value.deserialize_any(visitor), + } + } + + fn deserialize_bool(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Bool(value) => visitor.visit_bool(value), + ParsedValue::String(value) => match value.to_lowercase().as_str() { + "true" => visitor.visit_bool(true), + "false" => visitor.visit_bool(false), + _ => Err(DeError::custom("invalid boolean value")), + }, + ParsedValue::Tagged { value, .. } => value.deserialize_bool(visitor), + other => Err(DeError::custom(format!("expected bool got {:?}", other))), + } + } + + fn deserialize_i64(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Number(value) | ParsedValue::String(value) => { + let parsed = value.parse::().map_err(DeError::custom)?; + visitor.visit_i64(parsed) + } + ParsedValue::Tagged { value, .. } => value.deserialize_i64(visitor), + other => Err(DeError::custom(format!("expected i64 got {:?}", other))), + } + } + + fn deserialize_u64(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Number(value) | ParsedValue::String(value) => { + let parsed = value.parse::().map_err(DeError::custom)?; + visitor.visit_u64(parsed) + } + ParsedValue::Tagged { value, .. } => value.deserialize_u64(visitor), + other => Err(DeError::custom(format!("expected u64 got {:?}", other))), + } + } + + fn deserialize_f32(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Number(value) | ParsedValue::String(value) => { + let parsed = value.parse::().map_err(DeError::custom)?; + visitor.visit_f32(parsed) + } + ParsedValue::Tagged { value, .. } => value.deserialize_f32(visitor), + other => Err(DeError::custom(format!("expected f32 got {:?}", other))), + } + } + + fn deserialize_f64(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Number(value) | ParsedValue::String(value) => { + let parsed = value.parse::().map_err(DeError::custom)?; + visitor.visit_f64(parsed) + } + ParsedValue::Tagged { value, .. } => value.deserialize_f64(visitor), + other => Err(DeError::custom(format!("expected f64 got {:?}", other))), + } + } + + fn deserialize_string(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::String(value) => visitor.visit_string(value), + ParsedValue::Number(value) => visitor.visit_string(value), + ParsedValue::Bool(value) => visitor.visit_string(value.to_string()), + ParsedValue::Array(values) => { + let hex = array_to_hex(values)?; + visitor.visit_string(hex) + } + ParsedValue::Tagged { value, .. } => value.deserialize_string(visitor), + other => Err(DeError::custom(format!("expected string got {:?}", other))), + } + } + + fn deserialize_str(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + self.deserialize_string(visitor) + } + + fn deserialize_option(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Null => visitor.visit_none(), + ParsedValue::Tagged { value, .. } => value.deserialize_option(visitor), + other => visitor.visit_some(other.into_deserializer()), + } + } + + fn deserialize_seq(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Array(values) => { + let iter = values.into_iter().map(|v| v.into_deserializer()); + let mut seq = value::SeqDeserializer::new(iter); + let output = visitor.visit_seq(&mut seq)?; + seq.end()?; + Ok(output) + } + ParsedValue::Tagged { value, .. } => value.deserialize_seq(visitor), + other => Err(DeError::custom(format!( + "expected sequence got {:?}", + other + ))), + } + } + + fn deserialize_map(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Object(map) => { + let iter = map + .into_iter() + .map(|(k, v)| (k.into_deserializer(), v.into_deserializer())); + let mut map_deserializer = value::MapDeserializer::new(iter); + let output = visitor.visit_map(&mut map_deserializer)?; + map_deserializer.end()?; + Ok(output) + } + ParsedValue::Tagged { value, .. } => value.deserialize_map(visitor), + other => Err(DeError::custom(format!("expected map got {:?}", other))), + } + } + + fn deserialize_enum( + self, + _name: &'static str, + _variants: &'static [&'static str], + visitor: V, + ) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::String(tag) | ParsedValue::Number(tag) => { + visitor.visit_enum(TaggedEnumAccess { + tag, + value: ParsedValue::Null, + }) + } + ParsedValue::Tagged { tag, value } => { + visitor.visit_enum(TaggedEnumAccess { tag, value: *value }) + } + ParsedValue::Object(map) => { + if map.len() == 1 { + let (tag, value) = map.into_iter().next().unwrap(); + visitor.visit_enum(TaggedEnumAccess { tag, value }) + } else { + Err(value::Error::custom(format!( + "invalid enum representation {:?}", + map + ))) + } + } + other => Err(value::Error::custom(format!( + "invalid enum representation {:?}", + other + ))), + } + } + + fn deserialize_bytes(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Array(values) => { + let mut buffer = Vec::with_capacity(values.len()); + for value in values { + let byte = match value { + ParsedValue::Number(s) | ParsedValue::String(s) => { + s.parse::().map_err(DeError::custom)? + } + other => { + return Err(DeError::custom(format!("expected byte got {:?}", other))); + } + }; + buffer.push(byte); + } + visitor.visit_byte_buf(buffer) + } + ParsedValue::String(value) => visitor.visit_byte_buf(value.into_bytes()), + ParsedValue::Tagged { value, .. } => value.deserialize_bytes(visitor), + other => Err(DeError::custom(format!("expected bytes got {:?}", other))), + } + } + + fn deserialize_byte_buf(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + self.deserialize_bytes(visitor) + } + + fn deserialize_identifier(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + self.deserialize_string(visitor) + } + + fn deserialize_ignored_any(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + visitor.visit_unit() + } + + fn deserialize_unit(self, visitor: V) -> Result + where + V: serde::de::Visitor<'de>, + { + match self { + ParsedValue::Null => visitor.visit_unit(), + ParsedValue::Tagged { value, .. } => value.deserialize_unit(visitor), + other => Err(DeError::custom(format!("expected unit got {:?}", other))), + } + } + + fn deserialize_struct( + self, + _name: &'static str, + _fields: &'static [&'static str], + visitor: V, + ) -> Result + where + V: serde::de::Visitor<'de>, + { + self.deserialize_map(visitor) + } + + forward_to_deserialize_any! { + char i8 i16 i32 i128 u8 u16 u32 u128 + unit_struct newtype_struct tuple tuple_struct + } +} + +fn format_timestamp(value: ParsedValue) -> Result { + let (seconds, nanos) = parse_seconds_nanos(value, "Timestamp")?; + if nanos < -999_999_999 || nanos > 999_999_999 { + return Err(ParseError::new("timestamp nanos out of range")); + } + let total = seconds + .checked_mul(1_000_000_000) + .and_then(|base| base.checked_add(nanos)) + .ok_or_else(|| ParseError::new("timestamp overflow"))?; + let datetime = OffsetDateTime::from_unix_timestamp_nanos(total) + .map_err(|_| ParseError::new("invalid timestamp"))?; + Ok(to_rfc3339_nanos(datetime)) +} + +fn format_duration(value: ParsedValue) -> Result { + let (seconds, nanos) = parse_seconds_nanos(value, "Duration")?; + if seconds < 0 || nanos < 0 { + return Err(ParseError::new("duration cannot be negative")); + } + if nanos >= 1_000_000_000 { + return Err(ParseError::new("duration nanos out of range")); + } + let total = seconds + .checked_mul(1_000_000_000) + .and_then(|base| base.checked_add(nanos)) + .ok_or_else(|| ParseError::new("duration overflow"))?; + Ok(total.to_string()) +} + +fn parse_seconds_nanos(value: ParsedValue, kind: &str) -> Result<(i128, i128), ParseError> { + let mut map = match value { + ParsedValue::Object(map) => map, + ParsedValue::Tagged { value, .. } => return parse_seconds_nanos(*value, kind), + other => { + return Err(ParseError::new(format!( + "expected {} object, got {:?}", + kind, other + ))); + } + }; + let seconds = parse_number_field(map.remove("seconds"), "seconds")?; + let nanos = parse_number_field(map.remove("nanos"), "nanos")?; + Ok((seconds, nanos)) +} + +fn parse_number_field(value: Option, field: &str) -> Result { + match value { + Some(value) => parse_number_value(value, field), + None => Ok(0), + } +} + +fn parse_number_value(value: ParsedValue, field: &str) -> Result { + match value { + ParsedValue::Number(num) | ParsedValue::String(num) => num + .parse::() + .map_err(|_| ParseError::new(format!("invalid number for {}", field))), + ParsedValue::Bool(value) => Ok(if value { 1 } else { 0 }), + ParsedValue::Tagged { value, .. } => parse_number_value(*value, field), + ParsedValue::Object(map) => Err(ParseError::new(format!( + "expected numeric value for {} but got {:?}", + field, + ParsedValue::Object(map) + ))), + other => Err(ParseError::new(format!( + "expected numeric value for {} but got {:?}", + field, other + ))), + } +} + +fn array_to_hex(values: Vec) -> Result { + let mut bytes = Vec::with_capacity(values.len()); + for value in values { + let byte = match value { + ParsedValue::Number(num) | ParsedValue::String(num) => { + let parsed = num.parse::().map_err(value::Error::custom)?; + if !(0..=255).contains(&parsed) { + return Err(value::Error::custom("byte out of range")); + } + parsed as u8 + } + other => { + return Err(value::Error::custom(format!( + "expected byte got {:?}", + other + ))); + } + }; + bytes.push(byte); + } + Ok(hex_encode(bytes)) +} +fn deserialize_to_loaded( + value: ParsedValue, + wrap: F, +) -> Result> +where + T: DeserializeOwned, + F: FnOnce(T) -> LoadedRequest, +{ + let request = T::deserialize(value)?; + Ok(wrap(request)) +} diff --git a/packages/platform-debug-utils/src/bin/replay_support/mod.rs b/packages/platform-debug-utils/src/bin/replay_support/mod.rs new file mode 100644 index 00000000000..d7c8ace1ff0 --- /dev/null +++ b/packages/platform-debug-utils/src/bin/replay_support/mod.rs @@ -0,0 +1,4 @@ +pub mod cli; +pub mod log_ingest; +pub mod replay; +pub mod telemetry; diff --git a/packages/platform-debug-utils/src/bin/replay_support/replay.rs b/packages/platform-debug-utils/src/bin/replay_support/replay.rs new file mode 100644 index 00000000000..81076525b98 --- /dev/null +++ b/packages/platform-debug-utils/src/bin/replay_support/replay.rs @@ -0,0 +1,644 @@ +use super::cli::{RequestFormat, parse_with}; +use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; +use dpp::version::PlatformVersion; +use drive_abci::abci::app::FullAbciApplication; +use drive_abci::platform_types::platform::Platform; +use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; +use hex::ToHex; +use std::collections::VecDeque; +use std::convert::TryFrom; +use std::error::Error; +use std::fmt::Write as _; +use std::fs; +use std::path::{Path, PathBuf}; +use std::time::{Duration, Instant}; +use tenderdash_abci::Application; +use tenderdash_abci::proto::abci::{ + Request, RequestExtendVote, RequestFinalizeBlock, RequestInfo, RequestInitChain, + RequestPrepareProposal, RequestProcessProposal, RequestVerifyVoteExtension, request, + response_process_proposal, response_verify_vote_extension, +}; + +#[derive(Debug, Clone)] +pub struct ReplayItem { + pub source: ReplaySource, + pub request: LoadedRequest, +} + +impl ReplayItem { + pub fn from_file(path: PathBuf, request: LoadedRequest) -> Self { + Self { + source: ReplaySource::File(path), + request, + } + } + + pub fn from_log( + path: &Path, + line: usize, + timestamp: Option, + endpoint: Option, + request: LoadedRequest, + ) -> Self { + Self { + source: ReplaySource::Log { + path: path.to_path_buf(), + line, + timestamp, + endpoint, + }, + request, + } + } + + pub fn describe(&self) -> String { + self.source.describe() + } +} + +#[derive(Debug, Clone)] +pub enum ReplaySource { + File(PathBuf), + Log { + path: PathBuf, + line: usize, + timestamp: Option, + endpoint: Option, + }, +} + +impl ReplaySource { + fn describe(&self) -> String { + match self { + ReplaySource::File(path) => format!("{}", path.display()), + ReplaySource::Log { + path, + line, + timestamp, + endpoint, + } => { + let mut out = format!("{}:{}", path.display(), line); + if let Some(endpoint) = endpoint { + write!(&mut out, " {}", endpoint).ok(); + } + if let Some(ts) = timestamp { + write!(&mut out, " @{}", ts).ok(); + } + out + } + } + } +} + +#[derive(Debug, Clone)] +pub enum LoadedRequest { + InitChain(RequestInitChain), + Info(RequestInfo), + Prepare(RequestPrepareProposal), + Process(RequestProcessProposal), + Finalize(RequestFinalizeBlock), + ExtendVote(RequestExtendVote), + VerifyVoteExtension(RequestVerifyVoteExtension), +} + +impl LoadedRequest { + pub fn kind(&self) -> &'static str { + match self { + LoadedRequest::InitChain(_) => "init_chain", + LoadedRequest::Info(_) => "info", + LoadedRequest::Prepare(_) => "prepare_proposal", + LoadedRequest::Process(_) => "process_proposal", + LoadedRequest::Finalize(_) => "finalize_block", + LoadedRequest::ExtendVote(_) => "extend_vote", + LoadedRequest::VerifyVoteExtension(_) => "verify_vote_extension", + } + } + + pub fn block_height(&self) -> Option { + fn to_height(value: i64) -> Option { + u64::try_from(value).ok() + } + + match self { + LoadedRequest::InitChain(_) => Some(0), + LoadedRequest::Info(_) => None, + LoadedRequest::Prepare(request) => to_height(request.height), + LoadedRequest::Process(request) => to_height(request.height), + LoadedRequest::Finalize(request) => to_height(request.height), + LoadedRequest::ExtendVote(request) => to_height(request.height), + LoadedRequest::VerifyVoteExtension(request) => to_height(request.height), + } + } +} + +pub fn ensure_db_directory(path: &Path) -> Result> { + if path.exists() { + if !path.is_dir() { + return Err(format!("{} exists but is not a directory", path.display()).into()); + } + return Ok(false); + } + + fs::create_dir_all(path)?; + tracing::info!( + "database directory {} was missing; created a fresh instance (expect InitChain)", + path.display() + ); + Ok(true) +} + +pub fn load_request(path: &Path, format: RequestFormat) -> Result> { + let raw = fs::read_to_string(path)?; + + if let Ok(request) = parse_with::(&raw, format) { + return map_request_value(request); + } + + macro_rules! try_parse { + ($ty:ty, $variant:ident) => { + if let Ok(value) = parse_with::<$ty>(&raw, format) { + return Ok(LoadedRequest::$variant(value)); + } + }; + } + + try_parse!(RequestInitChain, InitChain); + try_parse!(RequestInfo, Info); + try_parse!(RequestPrepareProposal, Prepare); + try_parse!(RequestProcessProposal, Process); + try_parse!(RequestFinalizeBlock, Finalize); + try_parse!(RequestExtendVote, ExtendVote); + try_parse!(RequestVerifyVoteExtension, VerifyVoteExtension); + + Err("unsupported request file format".into()) +} + +fn map_request_value(request: Request) -> Result> { + match request.value { + Some(request::Value::InitChain(value)) => Ok(LoadedRequest::InitChain(value)), + Some(request::Value::Info(value)) => Ok(LoadedRequest::Info(value)), + Some(request::Value::PrepareProposal(value)) => Ok(LoadedRequest::Prepare(value)), + Some(request::Value::ProcessProposal(value)) => Ok(LoadedRequest::Process(value)), + Some(request::Value::FinalizeBlock(value)) => Ok(LoadedRequest::Finalize(value)), + Some(request::Value::ExtendVote(value)) => Ok(LoadedRequest::ExtendVote(value)), + Some(request::Value::VerifyVoteExtension(value)) => { + Ok(LoadedRequest::VerifyVoteExtension(value)) + } + Some(other) => Err(format!( + "request file contains unsupported variant {}", + request_variant_name(&other) + ) + .into()), + None => Err("request payload does not contain a value".into()), + } +} + +pub fn execute_request( + app: &FullAbciApplication, + item: ReplayItem, + progress: Option<&mut ProgressReporter>, +) -> Result, Box> +where + C: drive_abci::rpc::core::CoreRPCLike, +{ + let origin = item.describe(); + let mut committed_height = None; + match item.request { + LoadedRequest::InitChain(request) => { + tracing::info!("executing init_chain from {}", origin); + let response = app.init_chain(request).map_err(|err| { + logged_error(format!("init_chain failed for {}: {:?}", origin, err)) + })?; + tracing::info!( + "init_chain result ({}): app_hash=0x{}, validator_updates={}", + origin, + hex::encode(&response.app_hash), + response + .validator_set_update + .as_ref() + .map(|v| v.validator_updates.len()) + .unwrap_or(0) + ); + committed_height = app + .platform + .state + .load() + .last_committed_block_info() + .as_ref() + .map(|info| info.basic_info().height); + } + LoadedRequest::Info(request) => { + tracing::info!("executing info from {}", origin); + let response = app + .info(request) + .map_err(|err| logged_error(format!("info failed for {}: {:?}", origin, err)))?; + tracing::info!( + "info result ({}): last_block_height={}, last_block_app_hash=0x{}", + origin, + response.last_block_height, + hex::encode(response.last_block_app_hash) + ); + // Do not update committed_height; Info is read-only. + } + LoadedRequest::Prepare(request) => { + let height = request.height; + let context = format_height_round(Some(height), Some(request.round)); + tracing::info!( + "executing prepare_proposal from {} (height={})", + origin, + height + ); + let response = app.prepare_proposal(request).map_err(|err| { + logged_error(format!( + "prepare_proposal failed for {}{}: {:?}", + origin, context, err + )) + })?; + tracing::info!( + "prepare_proposal result ({}): height={}, app_hash=0x{}, tx_results={}, tx_records={}", + origin, + height, + response.app_hash.encode_hex::(), + response.tx_results.len(), + response.tx_records.len() + ); + } + LoadedRequest::Process(request) => { + let height = request.height; + let context = format_height_round(Some(height), Some(request.round)); + tracing::info!( + "executing process_proposal from {} (height={})", + origin, + height + ); + let response = app.process_proposal(request).map_err(|err| { + logged_error(format!( + "process_proposal failed for {}{}: {:?}", + origin, context, err + )) + })?; + let status = response_process_proposal::ProposalStatus::try_from(response.status) + .unwrap_or(response_process_proposal::ProposalStatus::Unknown); + tracing::info!( + "process_proposal result ({}): status={:?}, height={}, app_hash=0x{}, tx_results={}, events={}", + origin, + status, + height, + hex::encode(response.app_hash), + response.tx_results.len(), + response.events.len() + ); + } + LoadedRequest::Finalize(request) => { + let height = request.height; + let round = request.round; + let context = format_height_round(Some(height), Some(round)); + tracing::info!( + "executing finalize_block from {} (height={}, round={})", + origin, + height, + round + ); + let expected = extract_expected_app_hash(&request); + + let response = app.finalize_block(request).map_err(|err| { + logged_error(format!( + "finalize_block failed for {}{}: {:?}", + origin, context, err + )) + })?; + let actual_hash = app + .platform + .state + .load() + .last_committed_block_app_hash() + .map(|hash| hash.to_vec()); + let grove_hash = app + .platform + .drive + .grove + .root_hash( + None, + &app.platform + .state + .load() + .current_platform_version()? + .drive + .grove_version, + ) + .unwrap() + .unwrap_or_default(); + let actual_hex = actual_hash + .as_ref() + .map(|hash| hex::encode(hash)) + .unwrap_or_else(|| "unknown".to_string()); + tracing::info!( + "finalize_block result ({}): height={}, retain_height={}, state_app_hash=0x{}, grove_root=0x{}", + origin, + height, + response.retain_height, + actual_hex, + hex::encode(grove_hash) + ); + match (expected.as_ref(), actual_hash.as_ref()) { + (Some(expected_hash), Some(actual_hash)) => { + if expected_hash != actual_hash { + return Err(logged_error(format!( + "app_hash mismatch for {}{}: expected 0x{}, got 0x{}", + origin, + context, + hex::encode(expected_hash), + actual_hex + ))); + } + if expected_hash != &grove_hash { + return Err(logged_error(format!( + "grovedb root mismatch for {}{}: expected 0x{}, grove 0x{}", + origin, + context, + hex::encode(expected_hash), + hex::encode(grove_hash) + ))); + } + } + (Some(_), None) => { + return Err(logged_error(format!( + "finalize_block executed for {}{} but platform state did not expose app_hash", + origin, context + ))); + } + (None, Some(_)) => { + tracing::warn!( + "could not extract expected app_hash from finalize_block request {}{}", + origin, + context + ); + } + (None, None) => { + tracing::warn!( + "could not extract expected app_hash from request or state for {}{}", + origin, + context + ); + } + } + if let Some(reporter) = progress { + if let Ok(block_height) = u64::try_from(height) { + if let Some(hash) = actual_hash.as_deref().or_else(|| expected.as_deref()) { + reporter.record(block_height, hash); + } + } + } + committed_height = u64::try_from(height).ok(); + } + LoadedRequest::ExtendVote(request) => { + let context = format_height_round(Some(request.height), Some(request.round)); + tracing::info!( + "executing extend_vote from {} (height={}, round={})", + origin, + request.height, + request.round + ); + let response = app.extend_vote(request).map_err(|err| { + logged_error(format!( + "extend_vote failed for {}{}: {:?}", + origin, context, err + )) + })?; + let total_bytes: usize = response + .vote_extensions + .iter() + .map(|ext| ext.extension.len()) + .sum(); + tracing::info!( + "extend_vote result ({}): vote_extensions={}, total_extension_bytes={}", + origin, + response.vote_extensions.len(), + total_bytes + ); + } + LoadedRequest::VerifyVoteExtension(request) => { + let context = format_height_round(Some(request.height), Some(request.round)); + tracing::info!( + "executing verify_vote_extension from {} (height={}, round={})", + origin, + request.height, + request.round + ); + let response = app.verify_vote_extension(request).map_err(|err| { + logged_error(format!( + "verify_vote_extension failed for {}{}: {:?}", + origin, context, err + )) + })?; + let status = response_verify_vote_extension::VerifyStatus::try_from(response.status) + .unwrap_or(response_verify_vote_extension::VerifyStatus::Unknown); + tracing::info!( + "verify_vote_extension result ({}): status={:?}", + origin, + status + ); + } + } + + Ok(committed_height) +} + +const PROGRESS_MIN_INTERVAL: Duration = Duration::from_secs(1); +const PROGRESS_WINDOW_SHORT: Duration = Duration::from_secs(60); +const PROGRESS_WINDOW_LONG: Duration = Duration::from_secs(300); + +pub struct ProgressReporter { + history: VecDeque<(Instant, u64)>, + last_emit: Option, + stop_height: Option, +} + +impl ProgressReporter { + pub fn new(stop_height: Option) -> Self { + Self { + history: VecDeque::new(), + last_emit: None, + stop_height, + } + } + + pub fn record(&mut self, height: u64, app_hash: &[u8]) { + let now = Instant::now(); + self.history.push_back((now, height)); + self.trim_history(now); + + if let Some(last) = self.last_emit { + if now.duration_since(last) < PROGRESS_MIN_INTERVAL { + return; + } + } + + let rate_1m = self.rate_per_minute(now, PROGRESS_WINDOW_SHORT); + let rate_5m = self.rate_per_minute(now, PROGRESS_WINDOW_LONG); + let eta = Self::format_eta(self.eta(rate_5m, height)); + println!( + "height={} app_hash={} rate_1m={} rate_5m={} eta={}", + height, + Self::short_hash(app_hash), + Self::format_rate(rate_1m), + Self::format_rate(rate_5m), + eta + ); + self.last_emit = Some(now); + } + + fn trim_history(&mut self, now: Instant) { + while let Some((ts, _)) = self.history.front() { + if now.duration_since(*ts) > PROGRESS_WINDOW_LONG { + self.history.pop_front(); + } else { + break; + } + } + } + + fn rate_per_minute(&self, now: Instant, window: Duration) -> Option { + let latest = self.history.back()?; + let start = self + .history + .iter() + .find(|(ts, _)| now.duration_since(*ts) <= window)?; + let elapsed = now.duration_since(start.0).as_secs_f64(); + if elapsed <= 0.0 { + return None; + } + let delta = latest.1.saturating_sub(start.1) as f64; + Some(delta / elapsed * 60.0) + } + + fn format_rate(rate: Option) -> String { + rate.map(|value| format!("{:.2} blk/min", value)) + .unwrap_or_else(|| "n/a".to_string()) + } + + fn eta(&self, rate_5m: Option, current_height: u64) -> Option { + let target = self.stop_height?; + if current_height >= target { + return Some(Duration::from_secs(0)); + } + let rate = rate_5m?; + if rate <= 0.0 { + return None; + } + let remaining = target.saturating_sub(current_height) as f64; + let seconds = (remaining / rate * 60.0).round(); + if seconds.is_finite() && seconds >= 0.0 { + Some(Duration::from_secs(seconds as u64)) + } else { + None + } + } + + fn format_eta(duration: Option) -> String { + duration + .map(|d| { + let total = d.as_secs(); + let hours = total / 3600; + let minutes = (total % 3600) / 60; + let seconds = total % 60; + if hours > 0 { + format!("{:02}h{:02}m{:02}s", hours, minutes, seconds) + } else if minutes > 0 { + format!("{:02}m{:02}s", minutes, seconds) + } else { + format!("{:02}s", seconds) + } + }) + .unwrap_or_else(|| "n/a".to_string()) + } + + fn short_hash(app_hash: &[u8]) -> String { + let hex = hex::encode(app_hash); + let end = hex.len().min(10); + hex[..end].to_string() + } +} + +fn extract_expected_app_hash(request: &RequestFinalizeBlock) -> Option> { + request + .block + .as_ref() + .and_then(|block| block.header.as_ref()) + .map(|header| header.app_hash.clone()) +} + +fn format_height_round(height: Option, round: Option) -> String { + let mut parts = Vec::new(); + if let Some(h) = height { + parts.push(format!("height={}", h)); + } + if let Some(r) = round { + parts.push(format!("round={}", r)); + } + + if parts.is_empty() { + String::new() + } else { + format!(" ({})", parts.join(", ")) + } +} + +pub(crate) fn logged_error(message: String) -> Box { + tracing::error!("{}", message); + message.into() +} + +pub fn log_last_committed_block(platform: &Platform) +where + C: drive_abci::rpc::core::CoreRPCLike, +{ + let platform_state = platform.state.load(); + let grove_version = &platform_state + .current_platform_version() + .unwrap_or(PlatformVersion::latest()) + .drive + .grove_version; + let grove_hash = platform + .drive + .grove + .root_hash(None, grove_version) + .unwrap() + .unwrap_or_default(); + + if let Some(info) = platform_state.last_committed_block_info() { + let app_hash = info.app_hash(); + let basic_info = info.basic_info(); + tracing::info!( + height = basic_info.height, + round = info.round(), + core_height = basic_info.core_height, + block_id_hash = %hex::encode(info.block_id_hash()), + app_hash = %hex::encode(app_hash), + grove_hash = %hex::encode(grove_hash), + "Platform state at last committed block", + ); + } else { + tracing::info!("last_committed_block: None"); + } +} + +fn request_variant_name(value: &request::Value) -> &'static str { + match value { + request::Value::Echo(_) => "Echo", + request::Value::Flush(_) => "Flush", + request::Value::Info(_) => "Info", + request::Value::InitChain(_) => "InitChain", + request::Value::Query(_) => "Query", + request::Value::CheckTx(_) => "CheckTx", + request::Value::ListSnapshots(_) => "ListSnapshots", + request::Value::OfferSnapshot(_) => "OfferSnapshot", + request::Value::LoadSnapshotChunk(_) => "LoadSnapshotChunk", + request::Value::ApplySnapshotChunk(_) => "ApplySnapshotChunk", + request::Value::PrepareProposal(_) => "PrepareProposal", + request::Value::ProcessProposal(_) => "ProcessProposal", + request::Value::ExtendVote(_) => "ExtendVote", + request::Value::VerifyVoteExtension(_) => "VerifyVoteExtension", + request::Value::FinalizeBlock(_) => "FinalizeBlock", + } +} diff --git a/packages/platform-debug-utils/src/bin/replay_support/telemetry.rs b/packages/platform-debug-utils/src/bin/replay_support/telemetry.rs new file mode 100644 index 00000000000..0fa5ffb581a --- /dev/null +++ b/packages/platform-debug-utils/src/bin/replay_support/telemetry.rs @@ -0,0 +1,251 @@ +use hex; +use serde_json::{Map as JsonMap, Number as JsonNumber, Value as JsonValue}; +use std::error::Error; +use std::fmt::{self, Display}; +use std::fs::OpenOptions; +use std::path::Path; +use textwrap::Options; +use tracing::field::{Field, Visit}; +use tracing::{Event, Subscriber}; +use tracing_appender::non_blocking::WorkerGuard; +use tracing_subscriber::fmt::format::{FormatEvent, FormatFields, Writer}; +use tracing_subscriber::fmt::FmtContext; +use tracing_subscriber::registry::LookupSpan; +use tracing_subscriber::EnvFilter; + +const TRACE_WRAP_WIDTH: usize = 120; + +pub fn init_logging(log_output: Option<&Path>) -> Result, Box> { + let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); + let json_format = PrettyJsonEventFormat::new(TRACE_WRAP_WIDTH); + let fmt_builder = tracing_subscriber::fmt() + .with_env_filter(env_filter) + .event_format(json_format); + + if let Some(path) = log_output { + let file = OpenOptions::new().create(true).append(true).open(path)?; + let (writer, guard) = tracing_appender::non_blocking(file); + fmt_builder + .with_writer(writer) + .try_init() + .map_err(ErrorString::from)?; + Ok(Some(guard)) + } else { + fmt_builder + .with_writer(std::io::stderr) + .try_init() + .map_err(ErrorString::from)?; + Ok(None) + } +} + +#[derive(Debug)] +struct ErrorString(String); +impl Display for ErrorString { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + write!(f, "{}", self.0) + } +} +impl Error for ErrorString {} + +impl From> for ErrorString { + fn from(value: Box) -> Self { + ErrorString(value.to_string()) + } +} + +struct PrettyJsonEventFormat { + width: usize, +} + +impl PrettyJsonEventFormat { + fn new(width: usize) -> Self { + Self { width } + } +} + +impl FormatEvent for PrettyJsonEventFormat +where + S: Subscriber + for<'a> LookupSpan<'a>, + N: for<'a> FormatFields<'a> + 'static, +{ + fn format_event( + &self, + ctx: &FmtContext<'_, S, N>, + writer: Writer<'_>, + event: &Event<'_>, + ) -> fmt::Result { + let mut field_visitor = JsonFieldsVisitor::default(); + event.record(&mut field_visitor); + let fields = field_visitor.finish(); + + let mut payload = JsonMap::new(); + payload.insert( + "level".into(), + JsonValue::String(event.metadata().level().to_string()), + ); + payload.insert( + "target".into(), + JsonValue::String(event.metadata().target().to_string()), + ); + + if let Some(file) = event.metadata().file() { + payload.insert("file".into(), JsonValue::String(file.to_string())); + } + + if let Some(line) = event.metadata().line() { + payload.insert("line".into(), JsonValue::Number(JsonNumber::from(line))); + } + + if !fields.is_empty() { + payload.insert("fields".into(), JsonValue::Object(fields)); + } + + let spans = collect_span_names(ctx); + if !spans.is_empty() { + payload.insert( + "spans".into(), + JsonValue::Array(spans.into_iter().map(JsonValue::String).collect()), + ); + } + + let json = + serde_json::to_string_pretty(&JsonValue::Object(payload)).map_err(|_| fmt::Error)?; + + write_wrapped(writer, &json, self.width) + } +} + +fn write_wrapped(mut writer: Writer<'_>, text: &str, width: usize) -> fmt::Result { + if text.is_empty() { + writer.write_char('\n')?; + return Ok(()); + } + + let mut remaining = text; + + while let Some(idx) = remaining.find('\n') { + let line = &remaining[..idx]; + emit_wrapped_line(&mut writer, line, width)?; + remaining = &remaining[idx + 1..]; + } + + if !remaining.is_empty() { + emit_wrapped_line(&mut writer, remaining, width)?; + } + + Ok(()) +} + +fn emit_wrapped_line(writer: &mut Writer<'_>, line: &str, width: usize) -> fmt::Result { + if line.is_empty() { + writer.write_char('\n')?; + return Ok(()); + } + + let indent_end = line + .char_indices() + .find(|(_, c)| !c.is_whitespace()) + .map(|(idx, _)| idx) + .unwrap_or_else(|| line.len()); + let (indent, content) = line.split_at(indent_end); + + if content.is_empty() { + writer.write_str(indent)?; + writer.write_char('\n')?; + return Ok(()); + } + + let indent_chars = indent.chars().count(); + let mut effective_width = width.saturating_sub(indent_chars); + if effective_width == 0 { + effective_width = 1; + } + + let wrap_options = Options::new(effective_width).break_words(false); + let wrapped = textwrap::wrap(content, &wrap_options); + for piece in wrapped { + if !indent.is_empty() { + writer.write_str(indent)?; + } + writer.write_str(piece.as_ref())?; + writer.write_char('\n')?; + } + + Ok(()) +} + +fn collect_span_names(ctx: &FmtContext<'_, S, N>) -> Vec +where + S: Subscriber + for<'a> LookupSpan<'a>, + N: for<'a> FormatFields<'a> + 'static, +{ + let mut names = Vec::new(); + let mut current = ctx.lookup_current(); + while let Some(span) = current { + names.push(span.name().to_string()); + current = span.parent(); + } + names.reverse(); + names +} + +#[derive(Default)] +struct JsonFieldsVisitor { + fields: JsonMap, +} + +impl JsonFieldsVisitor { + fn finish(self) -> JsonMap { + self.fields + } + + fn insert_value(&mut self, field: &Field, value: JsonValue) { + self.fields.insert(field.name().to_string(), value); + } +} + +impl Visit for JsonFieldsVisitor { + fn record_bool(&mut self, field: &Field, value: bool) { + self.insert_value(field, JsonValue::Bool(value)); + } + + fn record_i64(&mut self, field: &Field, value: i64) { + self.insert_value(field, JsonValue::Number(value.into())); + } + + fn record_u64(&mut self, field: &Field, value: u64) { + self.insert_value(field, JsonValue::Number(value.into())); + } + + fn record_i128(&mut self, field: &Field, value: i128) { + self.insert_value(field, JsonValue::String(value.to_string())); + } + + fn record_u128(&mut self, field: &Field, value: u128) { + self.insert_value(field, JsonValue::String(value.to_string())); + } + + fn record_f64(&mut self, field: &Field, value: f64) { + let json_value = JsonNumber::from_f64(value) + .map(JsonValue::Number) + .unwrap_or(JsonValue::Null); + self.insert_value(field, json_value); + } + + fn record_str(&mut self, field: &Field, value: &str) { + self.insert_value(field, JsonValue::String(value.to_owned())); + } + + fn record_error(&mut self, field: &Field, value: &(dyn std::error::Error + 'static)) { + self.insert_value(field, JsonValue::String(value.to_string())); + } + + fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) { + self.insert_value(field, JsonValue::String(format!("{value:?}"))); + } + + fn record_bytes(&mut self, field: &Field, value: &[u8]) { + self.insert_value(field, JsonValue::String(hex::encode(value))); + } +} diff --git a/packages/platform-debug-utils/src/bin/rocksdb_dump.rs b/packages/platform-debug-utils/src/bin/rocksdb_dump.rs index 3bf451f39c8..caef774372d 100644 --- a/packages/platform-debug-utils/src/bin/rocksdb_dump.rs +++ b/packages/platform-debug-utils/src/bin/rocksdb_dump.rs @@ -1,5 +1,5 @@ use clap::Parser; -use rocksdb::{IteratorMode, Options, DB}; +use rocksdb::{DB, IteratorMode, Options}; use std::{ error::Error, fs::File, @@ -43,11 +43,7 @@ fn main() -> Result<(), Box> { let mut writer = BufWriter::new(writer); - writeln!( - writer, - "# RocksDB export from {}", - args.db_path.display() - )?; + writeln!(writer, "# RocksDB export from {}", args.db_path.display())?; for (cf_index, cf_name) in cf_names.iter().enumerate() { let cf_handle = db diff --git a/packages/rs-drive-abci/src/abci/handler/process_proposal.rs b/packages/rs-drive-abci/src/abci/handler/process_proposal.rs index e10a60aef0d..9a8c3cd9c35 100644 --- a/packages/rs-drive-abci/src/abci/handler/process_proposal.rs +++ b/packages/rs-drive-abci/src/abci/handler/process_proposal.rs @@ -33,12 +33,11 @@ where if let Some(block_execution_context) = block_execution_context_guard.as_mut() { // We are already in a block, or in init chain. // This only makes sense if we were the proposer unless we are at a future round - if block_execution_context.block_state_info().round() != (request.round as u32) { + let block_state_info = block_execution_context.block_state_info(); + if block_state_info.round() != (request.round as u32) { // We were not the proposer, and we should process something new drop_block_execution_context = true; - } else if let Some(current_block_hash) = - block_execution_context.block_state_info().block_hash() - { + } else if let Some(current_block_hash) = block_state_info.block_hash() { // There is also the possibility that this block already came in, but tenderdash crashed // Now tenderdash is sending it again if let Some(proposal_info) = block_execution_context.proposer_results() { @@ -69,6 +68,15 @@ where } else { // We are getting a different block hash for a block of the same round // This is a terrible issue + tracing::error!( + method = "process_proposal", + block_state_info = ?block_state_info, + "received a process proposal request twice with different hash for height {}/round {}: existing hash {:?}, new hash {:?}", + request.height, + request.round, + current_block_hash, + request.hash, + ); Err(Error::Abci(AbciError::BadRequest( "received a process proposal request twice with different hash".to_string(), )))?; diff --git a/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs b/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs index c8d71074316..c4b5aac7f71 100644 --- a/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs @@ -104,17 +104,20 @@ where block_header.core_chain_locked_height, block_header.proposer_pro_tx_hash, hash, + block_header.app_hash, )? { // we are on the wrong height or round validation_result.add_error(AbciError::WrongFinalizeBlockReceived(format!( - "received a block for h: {} r: {}, block hash: {}, core height: {}, expected h: {} r: {}, block hash: {}, core height: {}", + "received a block for h: {} r: {}, block hash: {}, app_hash: {}, core height: {}, expected h: {} r: {}, block hash: {}, app_hash: {}, core height: {}", height, round, hex::encode(hash), + hex::encode(block_header.app_hash), block_header.core_chain_locked_height, block_state_info.height(), block_state_info.round(), block_state_info.block_hash().map(hex::encode).unwrap_or("None".to_string()), + hex::encode(block_state_info.app_hash().unwrap_or_default()), block_state_info.core_chain_locked_height() ))); return Ok(validation_result.into()); 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 e8ee8308050..7c829b5043f 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 @@ -399,6 +399,7 @@ where tracing::trace!( method = "run_block_proposal_v0", app_hash = hex::encode(root_hash), + block_hash = hex::encode(block_proposal.block_hash.unwrap_or_default()), platform_state_fingerprint = hex::encode( block_execution_context .block_platform_state() diff --git a/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs b/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs index 684bcaaa569..8eb714a5979 100644 --- a/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs @@ -168,6 +168,7 @@ impl BlockStateInfoV0Methods for BlockStateInfo { core_block_height: u32, proposer_pro_tx_hash: [u8; 32], commit_hash: I, + app_hash: I, ) -> Result { match self { BlockStateInfo::V0(v0) => v0.matches_expected_block_info( @@ -176,6 +177,7 @@ impl BlockStateInfoV0Methods for BlockStateInfo { core_block_height, proposer_pro_tx_hash, commit_hash, + app_hash, ), } } diff --git a/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs b/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs index 8e3b405e651..50bb83e19b0 100644 --- a/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs @@ -100,6 +100,7 @@ pub trait BlockStateInfoV0Methods { core_block_height: u32, proposer_pro_tx_hash: [u8; 32], commit_hash: I, + app_hash: I, ) -> Result; } @@ -151,12 +152,18 @@ impl BlockStateInfoV0Methods for BlockStateInfoV0 { core_block_height: u32, proposer_pro_tx_hash: [u8; 32], commit_hash: I, + app_hash: I, ) -> Result { let received_hash = commit_hash.try_into().map_err(|_| { Error::Abci(AbciError::BadRequestDataSize( "can't convert hash as vec to [u8;32]".to_string(), )) })?; + let received_app_hash = app_hash.try_into().map_err(|_| { + Error::Abci(AbciError::BadRequestDataSize( + "can't convert app hash as vec to [u8;32]".to_string(), + )) + })?; // the order is important here, don't verify commit hash before height and round tracing::trace!( self=?self, @@ -165,14 +172,18 @@ impl BlockStateInfoV0Methods for BlockStateInfoV0 { ?core_block_height, proposer_pro_tx_hash = hex::encode(proposer_pro_tx_hash), commit_hash = hex::encode(received_hash), + app_hash = hex::encode(received_app_hash), "check if block info matches request" ); + // TODO: consider app_hash verification Ok(self.height == height && self.round == round && self.core_chain_locked_height == core_block_height && self.proposer_pro_tx_hash == proposer_pro_tx_hash && self.block_hash.is_some() - && self.block_hash.unwrap() == received_hash) + && self.block_hash.unwrap() == received_hash + && self.app_hash.is_some() + && self.app_hash.unwrap_or_default() == received_app_hash) } } 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 2f2346d88b6..e0a125b1a57 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 @@ -138,7 +138,8 @@ impl Drive { deletion_batch, &mut vec![], &platform_version.drive, - )?; + ) + .inspect_err(|err| tracing::error!(?err, "vote deletion batch failed"))?; } Ok(()) From 45dc85401ebe0cc29707df6acb0226ab4e5024d6 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Wed, 26 Nov 2025 12:18:39 +0100 Subject: [PATCH 11/25] feat(drive-abci): improved state verification in drive-abci verify --- .../storage/fetch_platform_state/mod.rs | 2 + .../src/execution/storage/mod.rs | 2 +- packages/rs-drive-abci/src/lib.rs | 2 + packages/rs-drive-abci/src/main.rs | 62 +------- packages/rs-drive-abci/src/verify/mod.rs | 140 ++++++++++++++++++ 5 files changed, 148 insertions(+), 60 deletions(-) create mode 100644 packages/rs-drive-abci/src/verify/mod.rs diff --git a/packages/rs-drive-abci/src/execution/storage/fetch_platform_state/mod.rs b/packages/rs-drive-abci/src/execution/storage/fetch_platform_state/mod.rs index f2537eca34f..1955ac5dc2f 100644 --- a/packages/rs-drive-abci/src/execution/storage/fetch_platform_state/mod.rs +++ b/packages/rs-drive-abci/src/execution/storage/fetch_platform_state/mod.rs @@ -1,3 +1,5 @@ +//! Fetches execution state from grovedb storage + use crate::error::execution::ExecutionError; use crate::error::Error; use crate::platform_types::platform::Platform; diff --git a/packages/rs-drive-abci/src/execution/storage/mod.rs b/packages/rs-drive-abci/src/execution/storage/mod.rs index 54302920e5d..92c2b2417dc 100644 --- a/packages/rs-drive-abci/src/execution/storage/mod.rs +++ b/packages/rs-drive-abci/src/execution/storage/mod.rs @@ -1,2 +1,2 @@ -mod fetch_platform_state; +pub mod fetch_platform_state; mod store_platform_state; diff --git a/packages/rs-drive-abci/src/lib.rs b/packages/rs-drive-abci/src/lib.rs index a81b24d0ef0..6b5e93eb7a7 100644 --- a/packages/rs-drive-abci/src/lib.rs +++ b/packages/rs-drive-abci/src/lib.rs @@ -52,3 +52,5 @@ pub mod utils; /// Drive server pub mod server; +/// Verification helpers +pub mod verify; diff --git a/packages/rs-drive-abci/src/main.rs b/packages/rs-drive-abci/src/main.rs index fdb1b9e23c7..c99e9ac73cd 100644 --- a/packages/rs-drive-abci/src/main.rs +++ b/packages/rs-drive-abci/src/main.rs @@ -2,12 +2,13 @@ //! //! RS-Drive-ABCI server starts a single-threaded server and listens to connections from Tenderdash. +use drive_abci::verify::verify_grovedb; + use clap::{Parser, Subcommand}; use dapi_grpc::platform::v0::get_status_request; use dapi_grpc::platform::v0::get_status_request::GetStatusRequestV0; use dapi_grpc::platform::v0::platform_client::PlatformClient; use dapi_grpc::tonic::transport::Uri; -use dpp::version::PlatformVersion; use drive_abci::config::{FromEnv, PlatformConfig}; use drive_abci::core::wait_for_core_to_sync::v0::wait_for_core_to_sync_v0; use drive_abci::logging::{LogBuilder, LogConfig, LogDestination, Loggers}; @@ -16,7 +17,6 @@ use drive_abci::platform_types::platform::Platform; use drive_abci::rpc::core::DefaultCoreRPC; use drive_abci::{logging, server}; use itertools::Itertools; -use std::fs::remove_file; #[cfg(all(tokio_unstable, feature = "console"))] use std::net::SocketAddr; use std::path::PathBuf; @@ -151,7 +151,7 @@ impl Cli { } Commands::Config => dump_config(&config)?, Commands::Status => runtime.block_on(check_status(&config))?, - Commands::Verify => verify_grovedb(&config.db_path, true)?, + Commands::Verify => drive_abci::verify::run(&config, true)?, Commands::Version => print_version(), }; @@ -331,62 +331,6 @@ async fn check_status(config: &PlatformConfig) -> Result<(), String> { .map_err(|e| format!("can't request status: {e}")) } -/// Verify GroveDB integrity. -/// -/// This function will execute GroveDB integrity checks if one of the following conditions is met: -/// - `force` is `true` -/// - file `.fsck` in `config.db_path` exists -/// -/// After successful verification, .fsck file is removed. -fn verify_grovedb(db_path: &PathBuf, force: bool) -> Result<(), String> { - let fsck = PathBuf::from(db_path).join(".fsck"); - - if !force { - if !fsck.exists() { - return Ok(()); - } - tracing::info!( - "found {} file, starting grovedb verification", - fsck.display() - ); - } - - let grovedb = drive::grovedb::GroveDb::open(db_path).expect("open grovedb"); - //todo: get platform version instead of taking latest - let result = grovedb - .visualize_verify_grovedb( - None, - true, - true, - &PlatformVersion::latest().drive.grove_version, - ) - .map_err(|e| e.to_string()); - - match result { - Ok(data) => { - for result in data { - tracing::warn!(?result, "grovedb verification") - } - tracing::info!("grovedb verification finished"); - - if fsck.exists() { - if let Err(e) = remove_file(&fsck) { - tracing::warn!( - error = ?e, - path =fsck.display().to_string(), - "grovedb verification: cannot remove .fsck file: please remove it manually to avoid running verification again", - ); - } - } - Ok(()) - } - Err(e) => { - tracing::error!("grovedb verification failed: {}", e); - Err(e) - } - } -} - /// Print current software version. fn print_version() { println!("{}", env!("CARGO_PKG_VERSION")); diff --git a/packages/rs-drive-abci/src/verify/mod.rs b/packages/rs-drive-abci/src/verify/mod.rs new file mode 100644 index 00000000000..fb529bbf548 --- /dev/null +++ b/packages/rs-drive-abci/src/verify/mod.rs @@ -0,0 +1,140 @@ +use crate::config::PlatformConfig; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; +use crate::platform_types::platform_state::PlatformState; +use crate::rpc::core::DefaultCoreRPC; +use dpp::version::PlatformVersion; +use drive::drive::Drive; +use std::fs::remove_file; +use std::path::PathBuf; + +/// Run all verification steps: +/// - GroveDB integrity +/// - platform state app hash vs GroveDB root +/// - configuration consistency with stored protocol version +pub fn run(config: &PlatformConfig, force: bool) -> Result<(), String> { + verify_grovedb(&config.db_path, force)?; + + let (drive, maybe_platform_version) = + Drive::open(&config.db_path, Some(config.drive.clone())).map_err(|e| e.to_string())?; + + let platform_version = maybe_platform_version.unwrap_or_else(PlatformVersion::latest); + + let platform_state = + Platform::::fetch_platform_state(&drive, None, platform_version) + .map_err(|e| e.to_string())? + .ok_or_else(|| "platform state missing from database".to_string())?; + + verify_app_hash_matches_grove_root(&drive, &platform_state, platform_version)?; + verify_config_matches_db(config, &drive)?; + + Ok(()) +} + +/// Verify GroveDB integrity. +/// +/// This function will execute GroveDB integrity checks if one of the following conditions is met: +/// - `force` is `true` +/// - file `.fsck` in `db_path` exists +/// +/// After successful verification, .fsck file is removed. +pub fn verify_grovedb(db_path: &PathBuf, force: bool) -> Result<(), String> { + let fsck = PathBuf::from(db_path).join(".fsck"); + + if !force { + if !fsck.exists() { + return Ok(()); + } + tracing::info!( + "found {} file, starting grovedb verification", + fsck.display() + ); + } + + let grovedb = drive::grovedb::GroveDb::open(db_path).expect("open grovedb"); + // TODO: fetch platform version instead of taking latest + let result = grovedb + .visualize_verify_grovedb( + None, + true, + true, + &PlatformVersion::latest().drive.grove_version, + ) + .map_err(|e| e.to_string()); + + match result { + Ok(data) => { + for result in data { + tracing::warn!(?result, "grovedb verification") + } + tracing::info!("grovedb verification finished"); + + if fsck.exists() { + if let Err(e) = remove_file(&fsck) { + tracing::warn!( + error = ?e, + path =fsck.display().to_string(), + "grovedb verification: cannot remove .fsck file: please remove it manually to avoid running verification again", + ); + } + } + Ok(()) + } + Err(e) => { + tracing::error!("grovedb verification failed: {}", e); + Err(e) + } + } +} + +fn verify_app_hash_matches_grove_root( + drive: &Drive, + platform_state: &PlatformState, + platform_version: &PlatformVersion, +) -> Result<(), String> { + let app_hash = platform_state + .last_committed_block_app_hash() + .ok_or_else(|| "platform state missing last committed app hash".to_string())?; + + let grove_root = drive + .grove + .root_hash(None, &platform_version.drive.grove_version) + .unwrap() + .map_err(|e| e.to_string())?; + + if grove_root != app_hash { + return Err(format!( + "app hash mismatch: platform state 0x{} vs grovedb root 0x{}", + hex::encode(app_hash), + hex::encode(grove_root) + )); + } + + tracing::info!("platform state app hash matches grovedb root hash"); + Ok(()) +} + +fn verify_config_matches_db(_config: &PlatformConfig, drive: &Drive) -> Result<(), String> { + let stored_protocol_version = drive + .fetch_current_protocol_version(None) + .map_err(|e| e.to_string())?; + + if let Some(stored) = stored_protocol_version { + let binary_supported = PlatformVersion::latest().protocol_version; + if stored > binary_supported { + return Err(format!( + "database protocol version {} is newer than binary supports {}", + stored, binary_supported + )); + } + tracing::info!( + "protocol version in DB {} is compatible with binary {}", + stored, + binary_supported + ); + } else { + tracing::warn!("no protocol version found in DB to compare with binary support"); + } + + Ok(()) +} From 8b311e4ee1473374db75d7f5d2363c48c5dac343 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Wed, 26 Nov 2025 15:11:32 +0100 Subject: [PATCH 12/25] feat(replay): verify initial database on start --- .../src/bin/replay_abci_requests.rs | 43 ++++++++++--------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs index 27cad4d9648..c755eb1a576 100644 --- a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs +++ b/packages/platform-debug-utils/src/bin/replay_abci_requests.rs @@ -6,6 +6,7 @@ use drive_abci::config::{FromEnv, PlatformConfig}; use drive_abci::platform_types::platform::Platform; use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use drive_abci::rpc::core::DefaultCoreRPC; +use drive_abci::verify; use replay_support::cli::{Cli, SkipRequest, load_env}; use replay_support::log_ingest::LogRequestStream; use replay_support::replay::{ @@ -36,6 +37,9 @@ fn run(cli: Cli) -> Result<(), Box> { config.db_path = cli.db_path.clone(); let db_was_created = ensure_db_directory(&config.db_path)?; + tracing::info!("running database verification before replay"); + verify::run(&config, true).map_err(|e| format!("verification failed before replay: {}", e))?; + let mut replay_items = Vec::new(); for path in &cli.requests { let loaded = load_request(path, cli.request_format)?; @@ -102,17 +106,16 @@ fn run(cli: Cli) -> Result<(), Box> { .as_ref() .map(|info| info.basic_info().height); - if let Some(limit) = cli.stop_height { - if let Some(current) = known_height { - if current >= limit { - tracing::info!( - "current platform height {} is already at or above stop height {}; ending replay", - current, - limit - ); - return Ok(()); - } - } + if let Some(limit) = cli.stop_height + && let Some(current) = known_height + && current >= limit + { + tracing::info!( + "current platform height {} is already at or above stop height {}; ending replay", + current, + limit + ); + return Ok(()); } let app = FullAbciApplication::new(&platform); @@ -317,16 +320,14 @@ impl RequestSequenceValidator { fn bump_height(&mut self, height: u64, origin: &str) -> Result<(), Box> { match self.last_height { - Some(last) if height < last => { - return Err(format!( - "log {} has out-of-order height {} before {} ({})", - self.path.display(), - last, - height, - origin - ) - .into()); - } + Some(last) if height < last => Err(format!( + "log {} has out-of-order height {} before {} ({})", + self.path.display(), + last, + height, + origin + ) + .into()), Some(last) if height == last => Ok(()), Some(last) => { if !self.saw_process || !self.saw_finalize { From 323193f7706198622cddf85a5f30cfc5ab4bd2a9 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 27 Nov 2025 12:05:04 +0100 Subject: [PATCH 13/25] refactor: move replay to `drive-abci replay` --- Cargo.lock | 65 +---- Cargo.toml | 1 - packages/platform-debug-utils/Cargo.toml | 43 --- packages/platform-debug-utils/README.md | 9 - .../src/bin/replay_support/cli.rs | 123 -------- .../src/bin/replay_support/mod.rs | 4 - .../src/bin/replay_support/telemetry.rs | 251 ----------------- .../src/bin/rocksdb_dump.rs | 77 ----- .../replay_abci_requests_prepare_proposal.ron | 20 -- .../replay_abci_requests_process_proposal.ron | 28 -- packages/rs-drive-abci/Cargo.toml | 11 +- packages/rs-drive-abci/src/lib.rs | 3 + packages/rs-drive-abci/src/main.rs | 13 +- packages/rs-drive-abci/src/replay/cli.rs | 80 ++++++ .../src/replay}/log_ingest.rs | 180 ++++++++++-- .../src/replay/mod.rs} | 223 ++++++--------- .../src/replay/runner.rs} | 264 ++++++------------ 17 files changed, 438 insertions(+), 957 deletions(-) delete mode 100644 packages/platform-debug-utils/Cargo.toml delete mode 100644 packages/platform-debug-utils/README.md delete mode 100644 packages/platform-debug-utils/src/bin/replay_support/cli.rs delete mode 100644 packages/platform-debug-utils/src/bin/replay_support/mod.rs delete mode 100644 packages/platform-debug-utils/src/bin/replay_support/telemetry.rs delete mode 100644 packages/platform-debug-utils/src/bin/rocksdb_dump.rs delete mode 100644 packages/platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron delete mode 100644 packages/platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron create mode 100644 packages/rs-drive-abci/src/replay/cli.rs rename packages/{platform-debug-utils/src/bin/replay_support => rs-drive-abci/src/replay}/log_ingest.rs (59%) rename packages/{platform-debug-utils/src/bin/replay_abci_requests.rs => rs-drive-abci/src/replay/mod.rs} (62%) rename packages/{platform-debug-utils/src/bin/replay_support/replay.rs => rs-drive-abci/src/replay/runner.rs} (72%) diff --git a/Cargo.lock b/Cargo.lock index b8eb347a2c3..16dfcb16f5c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2043,6 +2043,7 @@ dependencies = [ "regex", "reopen", "rocksdb 0.24.0", + "ron", "rust_decimal", "rust_decimal_macros", "serde", @@ -2052,6 +2053,7 @@ dependencies = [ "tempfile", "tenderdash-abci", "thiserror 1.0.69", + "time", "tokio", "tokio-util", "tracing", @@ -4506,28 +4508,6 @@ version = "0.3.32" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" -[[package]] -name = "platform-debug-utils" -version = "0.1.0" -dependencies = [ - "clap", - "dotenvy", - "dpp", - "drive-abci", - "envy", - "hex", - "rocksdb 0.24.0", - "ron", - "serde", - "serde_json", - "tenderdash-abci", - "textwrap", - "time", - "tracing", - "tracing-appender", - "tracing-subscriber", -] - [[package]] name = "platform-serialization" version = "2.2.0-dev.1" @@ -6227,12 +6207,6 @@ version = "1.15.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03" -[[package]] -name = "smawk" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" - [[package]] name = "socket2" version = "0.5.10" @@ -6570,17 +6544,6 @@ dependencies = [ "test-case-core", ] -[[package]] -name = "textwrap" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" -dependencies = [ - "smawk", - "unicode-linebreak", - "unicode-width", -] - [[package]] name = "thiserror" version = "1.0.69" @@ -7117,18 +7080,6 @@ dependencies = [ "tracing-core", ] -[[package]] -name = "tracing-appender" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3566e8ce28cc0a3fe42519fc80e6b4c943cc4c8cef275620eb8dac2d3d4e06cf" -dependencies = [ - "crossbeam-channel", - "thiserror 1.0.69", - "time", - "tracing-subscriber", -] - [[package]] name = "tracing-attributes" version = "0.1.30" @@ -7268,12 +7219,6 @@ version = "1.0.19" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f63a545481291138910575129486daeaf8ac54aee4387fe7906919f7830c7d9d" -[[package]] -name = "unicode-linebreak" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" - [[package]] name = "unicode-normalization" version = "0.1.24" @@ -7283,12 +7228,6 @@ dependencies = [ "tinyvec", ] -[[package]] -name = "unicode-width" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4ac048d71ede7ee76d585517add45da530660ef4390e49b098733c6e897f254" - [[package]] name = "unicode-xid" version = "0.2.6" diff --git a/Cargo.toml b/Cargo.toml index ff47df0daad..e60a2bd71d5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,6 @@ members = [ "packages/rs-dash-event-bus", "packages/rs-platform-wallet", "packages/wasm-sdk", - "packages/platform-debug-utils", ] [workspace.package] diff --git a/packages/platform-debug-utils/Cargo.toml b/packages/platform-debug-utils/Cargo.toml deleted file mode 100644 index c5eb4189691..00000000000 --- a/packages/platform-debug-utils/Cargo.toml +++ /dev/null @@ -1,43 +0,0 @@ -[package] -version = "0.1.0" -rust-version.workspace = true -name = "platform-debug-utils" -edition = "2024" - -default-run = "replay_abci_requests" - -[dependencies] -clap = { version = "4.5.26", features = ["derive"] } -dpp = { path = "../rs-dpp", default-features = false, features = ["abci"] } -drive-abci = { path = "../rs-drive-abci" } -dotenvy = "0.15.7" -envy = "0.4.2" -hex = "0.4.3" -ron = "0.12" -rocksdb = "0.24.0" -serde = { version = "1.0.219", features = ["derive"] } -serde_json = { version = "1.0" } -time = { version = "0.3", features = ["macros"] } -tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", tag = "v1.5.0-dev.2", features = [ - "grpc", - "serde", -] } -textwrap = "0.16" -tracing-subscriber = { version = "0.3.16", default-features = false, features = [ - "env-filter", - "ansi", - "fmt", - "std", - "registry", - "tracing-log", -] } -tracing = "0.1" -tracing-appender = "0.2" - -[[bin]] -name = "rocksdb-dump" -path = "src/bin/rocksdb_dump.rs" - -[[bin]] -name = "replay_abci_requests" -path = "src/bin/replay_abci_requests.rs" diff --git a/packages/platform-debug-utils/README.md b/packages/platform-debug-utils/README.md deleted file mode 100644 index 7240a159f98..00000000000 --- a/packages/platform-debug-utils/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# platform-debug-utils - -Small utilities that make inspecting Dash Platform state easier. Run any binary with `--help` to -see detailed usage and examples. - -- `rocksdb-dump`: export RocksDB or GroveDB contents into a diff-friendly text file grouped by - column family. -- `replay_abci_requests`: replay serialized RequestPrepareProposal / RequestProcessProposal payloads - against a GroveDB snapshot to inspect resulting app hashes and outcomes; see vectors/ for sample payloads. diff --git a/packages/platform-debug-utils/src/bin/replay_support/cli.rs b/packages/platform-debug-utils/src/bin/replay_support/cli.rs deleted file mode 100644 index da602af2934..00000000000 --- a/packages/platform-debug-utils/src/bin/replay_support/cli.rs +++ /dev/null @@ -1,123 +0,0 @@ -use clap::{Parser, ValueEnum}; -use serde::de::DeserializeOwned; -use std::error::Error; -use std::path::{Path, PathBuf}; - -/// Replay helper for Request* dumps. -#[derive(Debug, Parser)] -#[command( - name = "replay_abci_requests", - author, - version, - about = "Replay serialized ABCI requests against an existing GroveDB database.", - long_about = "Feed captured Request* payloads (RON or JSON) or entire drive-abci JSON trace logs \ -sequentially into the Drive ABCI application to recompute app hashes, inspect tx outcomes, and debug \ -state mismatches. Request files accept both the outer Request wrapper or the specific request type, \ -and configuration mirrors drive-abci's .env loading so you can point at the same RPC credentials. \ -\n\nTo ingest log files enable trace level JSON logging first, e.g.:\n dashmate config set platform.drive.abci.logs.file.format json\n dashmate config set platform.drive.abci.logs.file.level trace \ -\n\nExample:\n RUST_LOG=trace replay_abci_requests --db-path /path/to/grovedb --requests dump.ron \ ---config /path/to/.env --request-format ron\n\nUse multiple --requests flags to replay several inputs \ -in chronological order." -)] -pub struct Cli { - /// Path to the GroveDB database that should be used for execution. - /// You can use a command like `./state_backup.sh export --component abci abci.tar.gz testnet` - /// to dump the GroveDB database from existing Platform node. - #[arg(long, value_hint = clap::ValueHint::DirPath)] - pub db_path: PathBuf, - - /// Files that contain serialized Request*, RequestPrepareProposal, or RequestProcessProposal payloads. - /// They will be executed sequentially before any --logs entries. - /// - /// See vectors/ directory for example request payloads. - #[arg(long, value_hint = clap::ValueHint::FilePath)] - pub requests: Vec, - - /// drive-abci JSON logs that contain trace level "received ABCI request" entries. - /// Relevant requests will be extracted and replayed chronologically. - #[arg(long, value_hint = clap::ValueHint::FilePath)] - pub logs: Vec, - - /// Optional .env file path. Defaults to walking up the filesystem like drive-abci. - /// .env file format is the same as used by drive-abci. - #[arg(short, long, value_hint = clap::ValueHint::FilePath)] - pub config: Option, - - /// Format of the serialized request payload. - #[arg(long, value_enum, default_value_t = RequestFormat::Ron)] - pub request_format: RequestFormat, - - /// Print progress information (height + app hash) to stdout after each finalize_block. - #[arg(short, long)] - pub progress: bool, - - /// Write structured JSON logs to the provided file instead of stderr. - #[arg(long, value_hint = clap::ValueHint::FilePath)] - pub output: Option, - - /// Skip replaying specific requests (use PATH for files or PATH:LINE for log entries). - #[arg(long = "skip", value_name = "PATH[:LINE]", value_parser = parse_skip_request)] - pub skip: Vec, - - /// Stop replay after reaching this block height (inclusive). - #[arg(long, value_name = "HEIGHT")] - pub stop_height: Option, -} - -#[derive(Debug, Copy, Clone, Eq, PartialEq, ValueEnum)] -pub enum RequestFormat { - Json, - Ron, -} - -#[derive(Debug, Clone)] -pub struct SkipRequest { - pub path: PathBuf, - pub line: Option, -} - -pub fn parse_skip_request(raw: &str) -> Result { - let (path_part, line_part) = match raw.rsplit_once(':') { - Some((path, line_str)) => match line_str.parse::() { - Ok(line) => (path, Some(line)), - Err(_) => (raw, None), - }, - None => (raw, None), - }; - - let path_buf = PathBuf::from(path_part); - let canonical = path_buf - .canonicalize() - .unwrap_or_else(|_| PathBuf::from(path_part)); - - Ok(SkipRequest { - path: canonical, - line: line_part, - }) -} - -pub fn load_env(path: Option<&Path>) -> Result<(), Box> { - if let Some(path) = path { - dotenvy::from_path(path)?; - return Ok(()); - } - - match dotenvy::dotenv() { - Ok(_) => Ok(()), - Err(err) if err.not_found() => { - tracing::warn!("warning: no .env file found"); - Ok(()) - } - Err(err) => Err(err.into()), - } -} - -pub fn parse_with(raw: &str, format: RequestFormat) -> Result> -where - T: DeserializeOwned, -{ - match format { - RequestFormat::Json => Ok(serde_json::from_str(raw)?), - RequestFormat::Ron => Ok(ron::from_str(raw)?), - } -} diff --git a/packages/platform-debug-utils/src/bin/replay_support/mod.rs b/packages/platform-debug-utils/src/bin/replay_support/mod.rs deleted file mode 100644 index d7c8ace1ff0..00000000000 --- a/packages/platform-debug-utils/src/bin/replay_support/mod.rs +++ /dev/null @@ -1,4 +0,0 @@ -pub mod cli; -pub mod log_ingest; -pub mod replay; -pub mod telemetry; diff --git a/packages/platform-debug-utils/src/bin/replay_support/telemetry.rs b/packages/platform-debug-utils/src/bin/replay_support/telemetry.rs deleted file mode 100644 index 0fa5ffb581a..00000000000 --- a/packages/platform-debug-utils/src/bin/replay_support/telemetry.rs +++ /dev/null @@ -1,251 +0,0 @@ -use hex; -use serde_json::{Map as JsonMap, Number as JsonNumber, Value as JsonValue}; -use std::error::Error; -use std::fmt::{self, Display}; -use std::fs::OpenOptions; -use std::path::Path; -use textwrap::Options; -use tracing::field::{Field, Visit}; -use tracing::{Event, Subscriber}; -use tracing_appender::non_blocking::WorkerGuard; -use tracing_subscriber::fmt::format::{FormatEvent, FormatFields, Writer}; -use tracing_subscriber::fmt::FmtContext; -use tracing_subscriber::registry::LookupSpan; -use tracing_subscriber::EnvFilter; - -const TRACE_WRAP_WIDTH: usize = 120; - -pub fn init_logging(log_output: Option<&Path>) -> Result, Box> { - let env_filter = EnvFilter::try_from_default_env().unwrap_or_else(|_| EnvFilter::new("info")); - let json_format = PrettyJsonEventFormat::new(TRACE_WRAP_WIDTH); - let fmt_builder = tracing_subscriber::fmt() - .with_env_filter(env_filter) - .event_format(json_format); - - if let Some(path) = log_output { - let file = OpenOptions::new().create(true).append(true).open(path)?; - let (writer, guard) = tracing_appender::non_blocking(file); - fmt_builder - .with_writer(writer) - .try_init() - .map_err(ErrorString::from)?; - Ok(Some(guard)) - } else { - fmt_builder - .with_writer(std::io::stderr) - .try_init() - .map_err(ErrorString::from)?; - Ok(None) - } -} - -#[derive(Debug)] -struct ErrorString(String); -impl Display for ErrorString { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.0) - } -} -impl Error for ErrorString {} - -impl From> for ErrorString { - fn from(value: Box) -> Self { - ErrorString(value.to_string()) - } -} - -struct PrettyJsonEventFormat { - width: usize, -} - -impl PrettyJsonEventFormat { - fn new(width: usize) -> Self { - Self { width } - } -} - -impl FormatEvent for PrettyJsonEventFormat -where - S: Subscriber + for<'a> LookupSpan<'a>, - N: for<'a> FormatFields<'a> + 'static, -{ - fn format_event( - &self, - ctx: &FmtContext<'_, S, N>, - writer: Writer<'_>, - event: &Event<'_>, - ) -> fmt::Result { - let mut field_visitor = JsonFieldsVisitor::default(); - event.record(&mut field_visitor); - let fields = field_visitor.finish(); - - let mut payload = JsonMap::new(); - payload.insert( - "level".into(), - JsonValue::String(event.metadata().level().to_string()), - ); - payload.insert( - "target".into(), - JsonValue::String(event.metadata().target().to_string()), - ); - - if let Some(file) = event.metadata().file() { - payload.insert("file".into(), JsonValue::String(file.to_string())); - } - - if let Some(line) = event.metadata().line() { - payload.insert("line".into(), JsonValue::Number(JsonNumber::from(line))); - } - - if !fields.is_empty() { - payload.insert("fields".into(), JsonValue::Object(fields)); - } - - let spans = collect_span_names(ctx); - if !spans.is_empty() { - payload.insert( - "spans".into(), - JsonValue::Array(spans.into_iter().map(JsonValue::String).collect()), - ); - } - - let json = - serde_json::to_string_pretty(&JsonValue::Object(payload)).map_err(|_| fmt::Error)?; - - write_wrapped(writer, &json, self.width) - } -} - -fn write_wrapped(mut writer: Writer<'_>, text: &str, width: usize) -> fmt::Result { - if text.is_empty() { - writer.write_char('\n')?; - return Ok(()); - } - - let mut remaining = text; - - while let Some(idx) = remaining.find('\n') { - let line = &remaining[..idx]; - emit_wrapped_line(&mut writer, line, width)?; - remaining = &remaining[idx + 1..]; - } - - if !remaining.is_empty() { - emit_wrapped_line(&mut writer, remaining, width)?; - } - - Ok(()) -} - -fn emit_wrapped_line(writer: &mut Writer<'_>, line: &str, width: usize) -> fmt::Result { - if line.is_empty() { - writer.write_char('\n')?; - return Ok(()); - } - - let indent_end = line - .char_indices() - .find(|(_, c)| !c.is_whitespace()) - .map(|(idx, _)| idx) - .unwrap_or_else(|| line.len()); - let (indent, content) = line.split_at(indent_end); - - if content.is_empty() { - writer.write_str(indent)?; - writer.write_char('\n')?; - return Ok(()); - } - - let indent_chars = indent.chars().count(); - let mut effective_width = width.saturating_sub(indent_chars); - if effective_width == 0 { - effective_width = 1; - } - - let wrap_options = Options::new(effective_width).break_words(false); - let wrapped = textwrap::wrap(content, &wrap_options); - for piece in wrapped { - if !indent.is_empty() { - writer.write_str(indent)?; - } - writer.write_str(piece.as_ref())?; - writer.write_char('\n')?; - } - - Ok(()) -} - -fn collect_span_names(ctx: &FmtContext<'_, S, N>) -> Vec -where - S: Subscriber + for<'a> LookupSpan<'a>, - N: for<'a> FormatFields<'a> + 'static, -{ - let mut names = Vec::new(); - let mut current = ctx.lookup_current(); - while let Some(span) = current { - names.push(span.name().to_string()); - current = span.parent(); - } - names.reverse(); - names -} - -#[derive(Default)] -struct JsonFieldsVisitor { - fields: JsonMap, -} - -impl JsonFieldsVisitor { - fn finish(self) -> JsonMap { - self.fields - } - - fn insert_value(&mut self, field: &Field, value: JsonValue) { - self.fields.insert(field.name().to_string(), value); - } -} - -impl Visit for JsonFieldsVisitor { - fn record_bool(&mut self, field: &Field, value: bool) { - self.insert_value(field, JsonValue::Bool(value)); - } - - fn record_i64(&mut self, field: &Field, value: i64) { - self.insert_value(field, JsonValue::Number(value.into())); - } - - fn record_u64(&mut self, field: &Field, value: u64) { - self.insert_value(field, JsonValue::Number(value.into())); - } - - fn record_i128(&mut self, field: &Field, value: i128) { - self.insert_value(field, JsonValue::String(value.to_string())); - } - - fn record_u128(&mut self, field: &Field, value: u128) { - self.insert_value(field, JsonValue::String(value.to_string())); - } - - fn record_f64(&mut self, field: &Field, value: f64) { - let json_value = JsonNumber::from_f64(value) - .map(JsonValue::Number) - .unwrap_or(JsonValue::Null); - self.insert_value(field, json_value); - } - - fn record_str(&mut self, field: &Field, value: &str) { - self.insert_value(field, JsonValue::String(value.to_owned())); - } - - fn record_error(&mut self, field: &Field, value: &(dyn std::error::Error + 'static)) { - self.insert_value(field, JsonValue::String(value.to_string())); - } - - fn record_debug(&mut self, field: &Field, value: &dyn fmt::Debug) { - self.insert_value(field, JsonValue::String(format!("{value:?}"))); - } - - fn record_bytes(&mut self, field: &Field, value: &[u8]) { - self.insert_value(field, JsonValue::String(hex::encode(value))); - } -} diff --git a/packages/platform-debug-utils/src/bin/rocksdb_dump.rs b/packages/platform-debug-utils/src/bin/rocksdb_dump.rs deleted file mode 100644 index caef774372d..00000000000 --- a/packages/platform-debug-utils/src/bin/rocksdb_dump.rs +++ /dev/null @@ -1,77 +0,0 @@ -use clap::Parser; -use rocksdb::{DB, IteratorMode, Options}; -use std::{ - error::Error, - fs::File, - io::{self, BufWriter, Write}, - path::PathBuf, -}; - -/// Export RocksDB contents to a diff-friendly text format. -#[derive(Parser, Debug)] -#[command(author, version, about)] -struct Args { - /// Path to the RocksDB directory. - #[arg(long)] - db_path: PathBuf, - - /// Output file path. If omitted, the export is printed to STDOUT. - #[arg(long)] - output: Option, -} - -fn main() -> Result<(), Box> { - let args = Args::parse(); - - let mut options = Options::default(); - options.create_if_missing(false); - options.create_missing_column_families(false); - - let mut cf_names = DB::list_cf(&options, &args.db_path)?; - if cf_names.is_empty() { - return Err("database does not contain any column families".into()); - } - - cf_names.sort(); - - let db = DB::open_cf_for_read_only(&options, &args.db_path, cf_names.iter(), false)?; - - let writer: Box = match args.output { - Some(path) => Box::new(File::create(path)?), - None => Box::new(io::stdout()), - }; - - let mut writer = BufWriter::new(writer); - - writeln!(writer, "# RocksDB export from {}", args.db_path.display())?; - - for (cf_index, cf_name) in cf_names.iter().enumerate() { - let cf_handle = db - .cf_handle(cf_name) - .ok_or_else(|| format!("column family {cf_name} not found"))?; - - if cf_index > 0 { - writeln!(writer)?; - } - - writeln!(writer, "# column_family={cf_name}")?; - - let iter = db.iterator_cf(cf_handle, IteratorMode::Start); - - for item in iter { - let (key, value) = item?; - let key_hex = hex::encode(&key); - let value_hex = hex::encode(&value); - - writeln!( - writer, - "cf={cf_name}\tkey=0x{key_hex}\tvalue=0x{value_hex}\tkey_len={}\tvalue_len={}", - key.len(), - value.len() - )?; - } - } - - writer.flush()?; - Ok(()) -} diff --git a/packages/platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron b/packages/platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron deleted file mode 100644 index 55cfa454bee..00000000000 --- a/packages/platform-debug-utils/vectors/replay_abci_requests_prepare_proposal.ron +++ /dev/null @@ -1,20 +0,0 @@ -RequestPrepareProposal( - max_tx_bytes: 0, - txs: [], - local_last_commit: Some(CommitInfo( - round: 0, - quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], - block_signature: [136, 2, 201, 44, 54, 184, 149, 90, 153, 51, 152, 3, 167, 159, 214, 100, 192, 253, 74, 105, 199, 160, 139, 57, 61, 11, 175, 9, 247, 241, 113, 116, 187, 243, 232, 214, 96, 34, 120, 212, 183, 148, 150, 10, 184, 239, 42, 164, 0, 67, 26, 227, 150, 71, 246, 22, 171, 141, 33, 189, 64, 155, 237, 128, 209, 238, 109, 243, 41, 41, 118, 242, 204, 134, 191, 163, 192, 67, 242, 162, 214, 90, 194, 229, 226, 60, 58, 188, 237, 27, 215, 17, 202, 44, 235, 191], - threshold_vote_extensions: [], - )), - misbehavior: [], - height: 86023, - time: Some("2025-01-14T12:50:40.902Z"), - next_validators_hash: [80, 142, 96, 154, 117, 162, 231, 122, 167, 239, 119, 189, 105, 164, 1, 23, 174, 229, 247, 198, 158, 41, 56, 80, 191, 227, 44, 203, 166, 248, 252, 22], - round: 0, - core_chain_locked_height: 1176913, - proposer_pro_tx_hash: [135, 7, 82, 52, 172, 71, 53, 59, 66, 187, 151, 206, 70, 51, 12, 182, 124, 212, 100, 140, 1, 240, 178, 57, 61, 126, 114, 155, 13, 103, 137, 24], - proposed_app_version: 7, - version: Some(Consensus(block: "14", app: "7")), - quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], -) diff --git a/packages/platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron b/packages/platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron deleted file mode 100644 index c6fa24a91d4..00000000000 --- a/packages/platform-debug-utils/vectors/replay_abci_requests_process_proposal.ron +++ /dev/null @@ -1,28 +0,0 @@ -RequestProcessProposal( - txs: [], - proposed_last_commit: Some(CommitInfo( - round: 0, - quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], - block_signature: [136, 2, 201, 44, 54, 184, 149, 90, 153, 51, 152, 3, 167, 159, 214, 100, 192, 253, 74, 105, 199, 160, 139, 57, 61, 11, 175, 9, 247, 241, 113, 116, 187, 243, 232, 214, 96, 34, 120, 212, 183, 148, 150, 10, 184, 239, 42, 164, 0, 67, 26, 227, 150, 71, 246, 22, 171, 141, 33, 189, 64, 155, 237, 128, 209, 238, 109, 243, 41, 41, 118, 242, 204, 134, 191, 163, 192, 67, 242, 162, 214, 90, 194, 229, 226, 60, 58, 188, 237, 27, 215, 17, 202, 44, 235, 191], - threshold_vote_extensions: [], - )), - misbehavior: [], - hash: [3, 63, 85, 253, 115, 253, 54, 212, 92, 243, 30, 67, 55, 132, 175, 209, 136, 193, 149, 113, 201, 9, 8, 33, 201, 131, 128, 93, 198, 170, 0, 68], - height: 86023, - round: 0, - time: Some("2025-01-14T12:50:40.902Z"), - next_validators_hash: [80, 142, 96, 154, 117, 162, 231, 122, 167, 239, 119, 189, 105, 164, 1, 23, 174, 229, 247, 198, 158, 41, 56, 80, 191, 227, 44, 203, 166, 248, 252, 22], - core_chain_locked_height: 1176913, - core_chain_lock_update: Some(CoreChainLock( - core_block_height: 1176913, - core_block_hash: [6, 25, 159, 225, 140, 175, 234, 184, 189, 230, 148, 197, 188, 70, 62, 170, 38, 234, 147, 229, 98, 209, 50, 161, 179, 32, 61, 45, 194, 0, 0, 0], - signature: [149, 89, 203, 42, 173, 22, 235, 79, 164, 70, 8, 15, 122, 248, 125, 76, 142, 113, 219, 249, 70, 211, 148, 128, 157, 23, 31, 193, 160, 50, 166, 97, 132, 152, 223, 128, 255, 241, 158, 169, 32, 199, 226, 52, 66, 147, 253, 45, 9, 103, 177, 68, 193, 122, 52, 82, 60, 158, 18, 196, 48, 29, 57, 198, 147, 236, 35, 166, 225, 81, 176, 237, 158, 143, 135, 233, 128, 68, 125, 173, 172, 228, 32, 209, 131, 37, 174, 64, 128, 39, 165, 236, 225, 113, 82, 206], - )), - proposer_pro_tx_hash: [135, 7, 82, 52, 172, 71, 53, 59, 66, 187, 151, 206, 70, 51, 12, 182, 124, 212, 100, 140, 1, 240, 178, 57, 61, 126, 114, 155, 13, 103, 137, 24], - proposed_app_version: 7, - version: Some(Consensus( - block: "14", - app: "7", - )), - quorum_hash: [0, 0, 1, 4, 40, 157, 152, 198, 129, 2, 67, 167, 182, 13, 4, 36, 192, 180, 245, 230, 204, 2, 137, 192, 14, 141, 39, 81, 97, 0, 170, 234], -) diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 0c708b1de4b..a326d4d5c83 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -15,6 +15,7 @@ license = "MIT" [dependencies] arc-swap = "1.7.0" bincode = { version = "=2.0.0-rc.3", features = ["serde"] } +base64 = { version = "0.22.1", optional = true } ciborium = { version = "0.2.2" } chrono = "0.4.35" serde = { version = "1.0.219", features = ["derive"] } @@ -54,6 +55,11 @@ tracing-subscriber = { version = "0.3.16", default-features = false, features = tenderdash-abci = { git = "https://github.com/dashpay/rs-tenderdash-abci", tag = "v1.5.0-dev.2", features = [ "grpc", ] } +time = { version = "0.3", optional = true, features = [ + "macros", + "formatting", + "serde-human-readable", +] } lazy_static = "1.4.0" itertools = { version = "0.13" } @@ -75,9 +81,9 @@ tokio = { version = "1.40", features = [ tokio-util = { version = "0.7" } derive_more = { version = "1.0", features = ["from", "deref", "deref_mut"] } async-trait = "0.1.77" +ron = { version = "0.12", optional = true } console-subscriber = { version = "0.4", optional = true } bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f", optional = true } - [dev-dependencies] bs58 = { version = "0.5.0" } base64 = "0.22.1" @@ -113,7 +119,8 @@ mocks = ["mockall", "drive/fixtures-and-mocks", "bls-signatures"] console = ["console-subscriber", "tokio/tracing"] testing-config = [] grovedbg = ["drive/grovedbg"] - +# `abci-server replay` command +replay = ["dep:ron", "dep:time", "tenderdash-abci/serde"] [[bin]] name = "drive-abci" path = "src/main.rs" diff --git a/packages/rs-drive-abci/src/lib.rs b/packages/rs-drive-abci/src/lib.rs index 6b5e93eb7a7..bc696fcd8b0 100644 --- a/packages/rs-drive-abci/src/lib.rs +++ b/packages/rs-drive-abci/src/lib.rs @@ -50,6 +50,9 @@ pub mod query; /// Various utils pub mod utils; +/// Replay captured ABCI requests against drive-abci +#[cfg(feature = "replay")] +pub mod replay; /// Drive server pub mod server; /// Verification helpers diff --git a/packages/rs-drive-abci/src/main.rs b/packages/rs-drive-abci/src/main.rs index c99e9ac73cd..5f8e332301a 100644 --- a/packages/rs-drive-abci/src/main.rs +++ b/packages/rs-drive-abci/src/main.rs @@ -1,7 +1,8 @@ //! Main server process for RS-Drive-ABCI //! //! RS-Drive-ABCI server starts a single-threaded server and listens to connections from Tenderdash. - +#[cfg(feature = "replay")] +use drive_abci::replay::{self, ReplayArgs}; use drive_abci::verify::verify_grovedb; use clap::{Parser, Subcommand}; @@ -63,6 +64,11 @@ enum Commands { /// Print current software version #[command()] Version, + + /// Replay ABCI requests captured from drive-abci logs. + #[cfg(feature = "replay")] + #[command()] + Replay(ReplayArgs), } /// Server that accepts connections from Tenderdash, and @@ -153,6 +159,11 @@ impl Cli { Commands::Status => runtime.block_on(check_status(&config))?, Commands::Verify => drive_abci::verify::run(&config, true)?, Commands::Version => print_version(), + #[cfg(feature = "replay")] + Commands::Replay(args) => { + replay::run(config, args, cancel.clone()).map_err(|e| e.to_string())?; + return Ok(()); + } }; Ok(()) diff --git a/packages/rs-drive-abci/src/replay/cli.rs b/packages/rs-drive-abci/src/replay/cli.rs new file mode 100644 index 00000000000..f51964a35a8 --- /dev/null +++ b/packages/rs-drive-abci/src/replay/cli.rs @@ -0,0 +1,80 @@ +use clap::Args; +use std::path::{Path, PathBuf}; + +/// Replay ABCI requests captured from drive-abci logs. +#[derive(Debug, Args, Clone)] +#[command(about, long_about)] +pub struct ReplayArgs { + /// Path to the GroveDB database that should be used for execution. + /// Defaults to the path from drive-abci configuration. + #[arg(long, value_hint = clap::ValueHint::DirPath)] + pub db_path: Option, + + /// drive-abci JSON logs that contain TRACE level "received ABCI request" entries. + /// Relevant requests will be extracted and replayed chronologically. + /// Other log entries are ignored. + #[arg(long = "log", value_hint = clap::ValueHint::FilePath)] + pub logs: Vec, + + /// Log progress information at INFO level after each finalize_block. + #[arg(short, long)] + pub progress: bool, + + /// Skip replaying specific requests (use PATH for files or PATH:LINE for log entries). + #[arg(long = "skip", value_name = "PATH[:LINE]", value_parser = parse_skip_request)] + pub skip: Vec, + + /// Stop replay after reaching this block height (inclusive). + #[arg(long, value_name = "HEIGHT")] + pub stop_height: Option, +} + +/// Request selector used by `--skip` flag. +#[derive(Debug, Clone)] +pub struct SkipRequest { + /// Canonicalized log path. + pub path: PathBuf, + /// Optional line number to match entries within the log. + pub line: Option, +} + +pub fn parse_skip_request(raw: &str) -> Result { + let (path_part, line_part) = match raw.rsplit_once(':') { + Some((path, line_str)) => match line_str.parse::() { + Ok(line) => (path, Some(line)), + Err(_) => (raw, None), + }, + None => (raw, None), + }; + + let path_buf = PathBuf::from(path_part); + let canonical = path_buf + .canonicalize() + .unwrap_or_else(|_| PathBuf::from(path_part)); + + Ok(SkipRequest { + path: canonical, + line: line_part, + }) +} + +/// Check if a log path and optional line match the skip selector. +pub fn skip_matches(path: &Path, line: Option, needle: &SkipRequest) -> bool { + if !paths_equal(path, &needle.path) { + return false; + } + + match (line, needle.line) { + (_, None) => true, + (Some(actual), Some(expected)) => actual == expected, + _ => false, + } +} + +fn paths_equal(a: &Path, b: &Path) -> bool { + if let (Ok(canon_a), Ok(canon_b)) = (a.canonicalize(), b.canonicalize()) { + canon_a == canon_b + } else { + a == b + } +} diff --git a/packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs b/packages/rs-drive-abci/src/replay/log_ingest.rs similarity index 59% rename from packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs rename to packages/rs-drive-abci/src/replay/log_ingest.rs index ff68c1b826d..2ec22af2eb9 100644 --- a/packages/platform-debug-utils/src/bin/replay_support/log_ingest.rs +++ b/packages/rs-drive-abci/src/replay/log_ingest.rs @@ -1,8 +1,8 @@ -use super::replay::{LoadedRequest, ReplayItem}; +use crate::replay::{LoadedRequest, ReplayItem}; use hex::encode as hex_encode; +use serde::de::value; use serde::de::Error as DeError; use serde::de::IgnoredAny; -use serde::de::value; use serde::de::{DeserializeOwned, DeserializeSeed, EnumAccess, IntoDeserializer, VariantAccess}; use serde::forward_to_deserialize_any; use serde::{Deserialize, Deserializer}; @@ -168,9 +168,7 @@ struct LogSpan { endpoint: Option, } -fn parse_logged_request( - raw: &str, -) -> Result, Box> { +fn parse_logged_request(raw: &str) -> Result, Box> { let parser = DebugValueParser::new(raw); let parsed = parser .parse() @@ -180,7 +178,7 @@ fn parse_logged_request( fn convert_parsed_request( value: ParsedValue, -) -> Result, Box> { +) -> Result, Box> { match value { ParsedValue::Tagged { tag, value } if tag == "Request" => { let mut object = value.into_object()?; @@ -195,7 +193,7 @@ fn convert_parsed_request( fn parse_request_variant( value: ParsedValue, -) -> Result, Box> { +) -> Result, Box> { let (tag, inner) = match value { ParsedValue::Tagged { tag, value } => (tag, *value), _ => return Err("request log entry is missing request variant tag".into()), @@ -490,11 +488,10 @@ fn normalize_type_tag(tag: &str) -> &str { fn normalize_identifier_value(token: String) -> ParsedValue { let trimmed = token.trim(); - if let Some(suffix) = trimmed.strip_prefix("ConsensusVersion") - && !suffix.is_empty() - && suffix.chars().all(|ch| ch.is_ascii_digit()) - { - return ParsedValue::Number(suffix.to_string()); + if let Some(suffix) = trimmed.strip_prefix("ConsensusVersion") { + if !suffix.is_empty() && suffix.chars().all(|ch| ch.is_ascii_digit()) { + return ParsedValue::Number(suffix.to_string()); + } } if is_enum_variant_identifier(trimmed) { return ParsedValue::Tagged { @@ -567,18 +564,6 @@ fn camel_to_upper_snake(value: &str) -> String { out } -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn parses_vote_extension_with_raw_identifier_keys() { - let raw = "Request { value: Some(FinalizeBlock(RequestFinalizeBlock { commit: Some(CommitInfo { round: 0, quorum_hash: [], block_signature: [], threshold_vote_extensions: [VoteExtension { r#type: ThresholdRecoverRaw, extension: [], signature: [], sign_request_id: None }] }), misbehavior: [], hash: [], height: 1, round: 0, block: None, block_id: None })) }"; - let request = parse_logged_request(raw).expect("parse succeeds"); - assert!(matches!(request, Some(LoadedRequest::Finalize(_)))); - } -} - #[derive(Debug)] struct ParseError { message: String, @@ -978,7 +963,7 @@ impl<'de> Deserializer<'de> for ParsedValue { fn format_timestamp(value: ParsedValue) -> Result { let (seconds, nanos) = parse_seconds_nanos(value, "Timestamp")?; - if nanos < -999_999_999 || nanos > 999_999_999 { + if !(-999_999_999..=999_999_999).contains(&nanos) { return Err(ParseError::new("timestamp nanos out of range")); } let total = seconds @@ -1080,3 +1065,148 @@ where let request = T::deserialize(value)?; Ok(wrap(request)) } + +#[cfg(test)] +mod tests { + use super::*; + + fn parse_from_log(raw: &str) -> LoadedRequest { + parse_logged_request(raw) + .expect("log line should parse") + .expect("request should not be filtered out") + } + + #[test] + fn parses_info_requests_from_testnet_log() { + let request_one = parse_from_log(TESTNET_INFO_ONE); + assert!(matches!(request_one, LoadedRequest::Info(_))); + } + + #[test] + fn parses_init_chain_from_testnet_log() { + let request = parse_from_log(TESTNET_INIT_CHAIN); + assert!(matches!(request, LoadedRequest::InitChain(_))); + } + + #[test] + fn parses_process_proposal_samples_from_testnet_log() { + let request_one = parse_from_log(TESTNET_PROCESS_PROPOSAL_ONE); + let request_two = parse_from_log(TESTNET_PROCESS_PROPOSAL_TWO); + assert!(matches!(request_one, LoadedRequest::Process(_))); + assert!(matches!(request_two, LoadedRequest::Process(_))); + } + + #[test] + fn parses_finalize_block_samples_from_testnet_log() { + let request_one = parse_from_log(TESTNET_FINALIZE_BLOCK_ONE); + let request_two = parse_from_log(TESTNET_FINALIZE_BLOCK_TWO); + assert!(matches!(request_one, LoadedRequest::Finalize(_))); + assert!(matches!(request_two, LoadedRequest::Finalize(_))); + } + + const TESTNET_INFO_ONE: &str = r#"Request { value: Some(Info(RequestInfo { version: "1.5.1", block_version: 14, p2p_version: 10, abci_version: "1.3.0" })) }"#; + + const TESTNET_INIT_CHAIN: &str = r#"Request { value: Some(InitChain(RequestInitChain { time: Some(Timestamp { seconds: 1764074708, nanos: 919000000 }), chain_id: "dash-testnet-51", consensus_params: Some(ConsensusParams { block: Some(BlockParams { max_bytes: 2097152, max_gas: 57631392000 }), evidence: Some(EvidenceParams { max_age_num_blocks: 100000, max_age_duration: Some(Duration { seconds: 172800, nanos: 0 }), max_bytes: 512000 }), validator: Some(ValidatorParams { pub_key_types: ["bls12381"], voting_power_threshold: None }), version: Some(VersionParams { app_version: 1, consensus_version: ConsensusVersion0 }), synchrony: Some(SynchronyParams { message_delay: Some(Duration { seconds: 32, nanos: 0 }), precision: Some(Duration { seconds: 0, nanos: 500000000 }) }), timeout: Some(TimeoutParams { propose: Some(Duration { seconds: 30, nanos: 0 }), propose_delta: Some(Duration { seconds: 1, nanos: 0 }), vote: Some(Duration { seconds: 2, nanos: 0 }), vote_delta: Some(Duration { seconds: 0, nanos: 500000000 }) }), abci: Some(AbciParams { recheck_tx: true }) }), validator_set: None, app_state_bytes: [], initial_height: 1, initial_core_height: 0 })) }"#; + + const TESTNET_PROCESS_PROPOSAL_ONE: &str = r#"Request { value: Some(ProcessProposal(RequestProcessProposal { txs: [], proposed_last_commit: Some(CommitInfo { round: 0, quorum_hash: [], block_signature: [], threshold_vote_extensions: [] }), misbehavior: [], hash: [8, 250, 2, 194, 126, 192, 57, 11, 163, 1, 228, 252, 126, 61, 126, 173, 179, 80, 200, 25, 62, 62, 98, 160, 147, 104, 151, 6, 227, 162, 11, 250], height: 1, round: 0, time: Some(Timestamp { seconds: 1721353209, nanos: 0 }), next_validators_hash: [67, 141, 67, 156, 14, 170, 45, 148, 50, 130, 83, 98, 80, 9, 168, 59, 20, 74, 245, 208, 222, 120, 248, 14, 0, 20, 181, 247, 167, 138, 75, 141], core_chain_locked_height: 1090319, core_chain_lock_update: Some(CoreChainLock { core_block_height: 1090319, core_block_hash: [188, 208, 158, 250, 148, 183, 195, 57, 139, 20, 13, 219, 224, 167, 123, 230, 49, 159, 25, 154, 160, 12, 51, 34, 68, 102, 209, 84, 48, 1, 0, 0], signature: [149, 121, 58, 158, 78, 248, 78, 170, 243, 117, 235, 255, 251, 46, 2, 74, 179, 31, 158, 246, 193, 93, 23, 193, 136, 122, 196, 15, 108, 247, 172, 6, 169, 101, 215, 149, 150, 32, 35, 97, 252, 255, 134, 112, 170, 172, 13, 222, 3, 228, 106, 52, 44, 158, 242, 165, 19, 40, 253, 34, 104, 130, 246, 229, 84, 55, 221, 223, 40, 152, 72, 43, 159, 46, 78, 5, 1, 158, 149, 145, 239, 220, 27, 196, 104, 176, 16, 54, 90, 38, 68, 184, 43, 57, 17, 245] }), proposer_pro_tx_hash: [5, 182, 135, 151, 131, 68, 250, 36, 51, 178, 170, 153, 212, 31, 100, 62, 45, 133, 129, 167, 137, 205, 194, 48, 132, 136, 156, 236, 165, 36, 78, 168], proposed_app_version: 1, version: Some(Consensus { block: 14, app: 1 }), quorum_hash: [0, 0, 0, 175, 88, 108, 85, 57, 26, 90, 172, 207, 12, 99, 142, 240, 100, 211, 71, 145, 227, 27, 243, 154, 158, 173, 160, 199, 112, 203, 8, 120] })) }"#; + + const TESTNET_PROCESS_PROPOSAL_TWO: &str = r#" + Request { value: Some(ProcessProposal(RequestProcessProposal { + txs: [ + [2, 0, 45, 78, 164, 90, 178, 144, 237, 162, 36, 16, 179, 136, 18, 243, 44, 66, + 117, 63, 224, 169, 203, 74, 197, 21, 20, 112, 113, 175, 43, 58, 235, 155, 1, 0, + 0, 0, 243, 207, 138, 132, 145, 226, 98, 94, 28, 101, 1, 87, 179, 136, 251, 237, + 65, 245, 65, 210, 208, 250, 92, 95, 42, 14, 220, 187, 116, 60, 109, 126, 5, 14, + 99, 111, 110, 116, 97, 99, 116, 82, 101, 113, 117, 101, 115, 116, 162, 161, 180, + 172, 111, 239, 34, 234, 42, 26, 104, 232, 18, 54, 68, 179, 87, 135, 95, 107, 65, + 44, 24, 16, 146, 129, 193, 70, 231, 178, 113, 188, 218, 18, 242, 101, 39, 134, + 235, 177, 130, 11, 124, 221, 128, 91, 176, 191, 225, 147, 222, 242, 151, 236, + 236, 119, 26, 9, 32, 3, 155, 51, 167, 142, 6, 16, 97, 99, 99, 111, 117, 110, 116, + 82, 101, 102, 101, 114, 101, 110, 99, 101, 3, 252, 27, 90, 108, 236, 21, 101, 110, + 99, 114, 121, 112, 116, 101, 100, 65, 99, 99, 111, 117, 110, 116, 76, 97, 98, 101, + 108, 10, 48, 248, 254, 160, 126, 247, 196, 142, 207, 10, 98, 88, 135, 178, 200, + 37, 183, 104, 217, 69, 81, 239, 30, 184, 149, 165, 180, 206, 62, 82, 172, 165, + 148, 122, 215, 182, 102, 159, 96, 57, 23, 138, 78, 41, 202, 192, 88, 118, 155, + 18, 101, 110, 99, 114, 121, 112, 116, 101, 100, 80, 117, 98, 108, 105, 99, 75, 101, + 121, 10, 96, 119, 70, 51, 109, 72, 189, 126, 141, 103, 114, 93, 25, 171, 156, 67, + 231, 69, 47, 111, 71, 201, 112, 14, 39, 163, 85, 103, 129, 55, 72, 255, 60, 11, 84, + 118, 32, 32, 59, 37, 45, 157, 214, 105, 54, 239, 69, 2, 113, 133, 8, 59, 41, 161, + 75, 22, 61, 13, 211, 49, 222, 72, 61, 1, 175, 251, 138, 74, 218, 228, 202, 199, 1, + 212, 219, 106, 81, 12, 123, 204, 181, 33, 215, 246, 216, 4, 168, 10, 128, 39, 13, + 98, 209, 118, 32, 60, 184, 17, 114, 101, 99, 105, 112, 105, 101, 110, 116, 75, 101, + 121, 73, 110, 100, 101, 120, 3, 0, 14, 115, 101, 110, 100, 101, 114, 75, 101, 121, + 73, 110, 100, 101, 120, 3, 2, 8, 116, 111, 85, 115, 101, 114, 73, 100, 16, 97, 76, + 52, 201, 139, 195, 240, 166, 24, 149, 31, 14, 97, 49, 5, 152, 160, 173, 142, 194, + 37, 0, 127, 31, 0, 31, 221, 247, 231, 178, 146, 240, 0, 0, 1, 65, 32, 27, 157, 91, + 5, 79, 181, 46, 205, 236, 51, 129, 157, 4, 6, 188, 236, 188, 172, 164, 231, 164, + 44, 201, 66, 104, 173, 34, 228, 80, 60, 212, 197, 5, 47, 41, 78, 154, 99, 29, 118, + 227, 86, 165, 172, 247, 43, 246, 245, 194, 84, 41, 198, 99, 130, 36, 116, 66, 187, + 56, 25, 160, 87, 213, 138], + [2, 0, 45, 78, 164, 90, 178, 144, 237, 162, 36, 16, 179, 136, 18, 243, 44, 66, + 117, 63, 224, 169, 203, 74, 197, 21, 20, 112, 113, 175, 43, 58, 235, 155, 1, 0, + 0, 0, 23, 72, 90, 243, 202, 126, 196, 210, 19, 54, 234, 23, 177, 178, 215, 167, + 129, 47, 66, 193, 218, 34, 147, 66, 196, 207, 97, 224, 245, 71, 183, 9, 6, 14, 99, + 111, 110, 116, 97, 99, 116, 82, 101, 113, 117, 101, 115, 116, 162, 161, 180, 172, + 111, 239, 34, 234, 42, 26, 104, 232, 18, 54, 68, 179, 87, 135, 95, 107, 65, 44, + 24, 16, 146, 129, 193, 70, 231, 178, 113, 188, 112, 237, 137, 163, 235, 139, 117, + 158, 116, 242, 14, 29, 130, 74, 80, 169, 171, 187, 92, 209, 189, 71, 123, 134, 23, + 239, 26, 77, 73, 181, 204, 96, 6, 16, 97, 99, 99, 111, 117, 110, 116, 82, 101, 102, + 101, 114, 101, 110, 99, 101, 3, 252, 8, 49, 150, 10, 21, 101, 110, 99, 114, 121, + 112, 116, 101, 100, 65, 99, 99, 111, 117, 110, 116, 76, 97, 98, 101, 108, 10, 48, + 164, 30, 75, 218, 213, 182, 166, 107, 190, 19, 180, 130, 228, 190, 22, 103, 105, + 179, 192, 237, 213, 2, 126, 237, 158, 129, 98, 101, 236, 82, 40, 147, 165, 129, + 70, 0, 29, 52, 143, 160, 58, 10, 236, 15, 56, 144, 224, 186, 18, 101, 110, 99, 114, + 121, 112, 116, 101, 100, 80, 117, 98, 108, 105, 99, 75, 101, 121, 10, 96, 215, 58, + 88, 42, 120, 211, 175, 41, 107, 102, 20, 249, 7, 50, 252, 46, 247, 204, 180, 39, + 25, 7, 21, 243, 52, 77, 95, 48, 207, 57, 229, 118, 30, 133, 144, 91, 233, 3, 49, + 164, 44, 194, 138, 30, 156, 11, 130, 80, 67, 117, 154, 30, 173, 134, 89, 38, 96, 2, + 198, 229, 126, 157, 193, 7, 88, 16, 40, 3, 55, 187, 56, 168, 63, 160, 1, 199, 22, + 54, 254, 6, 57, 104, 83, 86, 253, 16, 68, 66, 59, 111, 88, 37, 30, 49, 169, 180, + 17, 114, 101, 99, 105, 112, 105, 101, 110, 116, 75, 101, 121, 73, 110, 100, 101, + 120, 3, 0, 14, 115, 101, 110, 100, 101, 114, 75, 101, 121, 73, 110, 100, 101, 120, + 3, 2, 8, 116, 111, 85, 115, 101, 114, 73, 100, 16, 196, 168, 68, 208, 100, 228, + 139, 149, 204, 118, 244, 251, 67, 150, 233, 2, 230, 196, 230, 251, 123, 37, 91, + 103, 36, 82, 228, 68, 124, 146, 62, 106, 0, 0, 1, 65, 31, 179, 111, 38, 201, 227, + 221, 204, 150, 217, 184, 31, 64, 226, 82, 115, 119, 176, 0, 222, 67, 184, 189, 4, + 188, 81, 57, 153, 140, 156, 32, 175, 129, 38, 61, 58, 107, 95, 142, 225, 152, 199, + 186, 84, 188, 96, 9, 117, 65, 129, 190, 57, 24, 19, 206, 160, 123, 156, 141, 244, + 247, 131, 25, 195, 240], + ], + proposed_last_commit: Some(CommitInfo { + round: 0, + quorum_hash: [0, 0, 1, 140, 150, 8, 55, 78, 73, 90, 22, 124, 90, 202, 73, 150, 16, + 239, 91, 176, 76, 16, 181, 122, 236, 22, 197, 148, 202, 119, 77, 210], + block_signature: [167, 217, 185, 35, 134, 188, 204, 114, 135, 31, 147, 221, 25, 172, + 21, 164, 212, 143, 70, 44, 40, 154, 69, 16, 86, 203, 154, 15, 178, + 35, 99, 179, 48, 33, 97, 122, 88, 145, 128, 177, 217, 39, 247, 107, + 67, 76, 68, 229, 8, 94, 197, 196, 13, 137, 165, 213, 181, 9, 147, + 68, 147, 173, 38, 105, 250, 176, 184, 88, 221, 229, 33, 180, 241, + 186, 127, 206, 105, 27, 124, 46, 191, 61, 110, 60, 237, 9, 83, 133, + 218, 103, 111, 218, 252, 150, 64, 84], + threshold_vote_extensions: [], + }), + misbehavior: [], + hash: [103, 112, 201, 57, 9, 25, 69, 8, 44, 216, 190, 152, 108, 87, 2, 168, 213, 242, + 101, 49, 254, 70, 159, 120, 184, 44, 135, 82, 71, 117, 194, 8], + height: 1763, + round: 0, + time: Some(Timestamp { seconds: 1724858882, nanos: 478000000 }), + next_validators_hash: [29, 218, 86, 252, 12, 33, 231, 178, 231, 204, 7, 223, 50, 81, 89, + 121, 242, 146, 120, 127, 206, 60, 181, 255, 207, 242, 41, 32, 40, + 153, 108, 65], + core_chain_locked_height: 1092300, + core_chain_lock_update: None, + proposer_pro_tx_hash: [136, 37, 27, 212, 177, 36, 239, 235, 135, 83, 125, 234, 190, 236, + 84, 246, 200, 245, 117, 244, 223, 129, 241, 12, 245, 232, 238, + 160, 115, 9, 43, 111], + proposed_app_version: 1, + version: Some(Consensus { block: 14, app: 1 }), + quorum_hash: [0, 0, 1, 140, 150, 8, 55, 78, 73, 90, 22, 124, 90, 202, 73, 150, 16, 239, + 91, 176, 76, 16, 181, 122, 236, 22, 197, 148, 202, 119, 77, 210], + })) } + "#; + + const TESTNET_FINALIZE_BLOCK_ONE: &str = r#"Request { value: Some(FinalizeBlock(RequestFinalizeBlock { commit: Some(CommitInfo { round: 0, quorum_hash: [0, 0, 0, 175, 88, 108, 85, 57, 26, 90, 172, 207, 12, 99, 142, 240, 100, 211, 71, 145, 227, 27, 243, 154, 158, 173, 160, 199, 112, 203, 8, 120], block_signature: [135, 31, 49, 75, 118, 108, 104, 68, 227, 56, 171, 253, 41, 152, 98, 72, 166, 144, 178, 146, 18, 67, 56, 20, 130, 110, 158, 62, 6, 77, 138, 57, 113, 138, 206, 99, 241, 112, 245, 11, 237, 77, 36, 214, 24, 174, 166, 1, 21, 165, 233, 228, 11, 201, 201, 241, 5, 23, 224, 16, 178, 200, 142, 7, 105, 222, 229, 179, 82, 115, 216, 243, 16, 48, 204, 162, 100, 154, 25, 120, 1, 85, 170, 219, 228, 3, 170, 60, 81, 141, 68, 116, 22, 7, 239, 249], threshold_vote_extensions: [] }), misbehavior: [], hash: [8, 250, 2, 194, 126, 192, 57, 11, 163, 1, 228, 252, 126, 61, 126, 173, 179, 80, 200, 25, 62, 62, 98, 160, 147, 104, 151, 6, 227, 162, 11, 250], height: 1, round: 0, block: Some(Block { header: Some(Header { version: Some(Consensus { block: 14, app: 1 }), chain_id: "dash-testnet-51", height: 1, time: Some(Timestamp { seconds: 1721353209, nanos: 0 }), last_block_id: Some(BlockId { hash: [], part_set_header: Some(PartSetHeader { total: 0, hash: [] }), state_id: [] }), last_commit_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], data_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], validators_hash: [151, 116, 141, 147, 83, 105, 231, 87, 207, 88, 182, 176, 208, 225, 89, 251, 214, 179, 23, 205, 112, 160, 49, 250, 160, 132, 171, 97, 31, 189, 74, 77], next_validators_hash: [67, 141, 67, 156, 14, 170, 45, 148, 50, 130, 83, 98, 80, 9, 168, 59, 20, 74, 245, 208, 222, 120, 248, 14, 0, 20, 181, 247, 167, 138, 75, 141], consensus_hash: [180, 208, 169, 232, 73, 81, 202, 221, 119, 226, 150, 68, 128, 3, 115, 113, 118, 178, 89, 72, 173, 246, 104, 172, 110, 192, 105, 38, 200, 31, 172, 134], next_consensus_hash: [180, 208, 169, 232, 73, 81, 202, 221, 119, 226, 150, 68, 128, 3, 115, 113, 118, 178, 89, 72, 173, 246, 104, 172, 110, 192, 105, 38, 200, 31, 172, 134], app_hash: [191, 12, 203, 156, 160, 113, 186, 1, 174, 110, 103, 160, 192, 144, 249, 120, 3, 210, 109, 86, 214, 117, 220, 213, 19, 23, 129, 203, 202, 200, 236, 143], results_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], evidence_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], proposed_app_version: 1, proposer_pro_tx_hash: [5, 182, 135, 151, 131, 68, 250, 36, 51, 178, 170, 153, 212, 31, 100, 62, 45, 133, 129, 167, 137, 205, 194, 48, 132, 136, 156, 236, 165, 36, 78, 168], core_chain_locked_height: 1090319 }), data: Some(Data { txs: [] }), evidence: Some(EvidenceList { evidence: [] }), last_commit: Some(Commit { height: 0, round: 0, block_id: Some(BlockId { hash: [], part_set_header: Some(PartSetHeader { total: 0, hash: [] }), state_id: [] }), quorum_hash: [], threshold_block_signature: [], threshold_vote_extensions: [] }), core_chain_lock: Some(CoreChainLock { core_block_height: 1090319, core_block_hash: [188, 208, 158, 250, 148, 183, 195, 57, 139, 20, 13, 219, 224, 167, 123, 230, 49, 159, 25, 154, 160, 12, 51, 34, 68, 102, 209, 84, 48, 1, 0, 0], signature: [149, 121, 58, 158, 78, 248, 78, 170, 243, 117, 235, 255, 251, 46, 2, 74, 179, 31, 158, 246, 193, 93, 23, 193, 136, 122, 196, 15, 108, 247, 172, 6, 169, 101, 215, 149, 150, 32, 35, 97, 252, 255, 134, 112, 170, 172, 13, 222, 3, 228, 106, 52, 44, 158, 242, 165, 19, 40, 253, 34, 104, 130, 246, 229, 84, 55, 221, 223, 40, 152, 72, 43, 159, 46, 78, 5, 1, 158, 149, 145, 239, 220, 27, 196, 104, 176, 16, 54, 90, 38, 68, 184, 43, 57, 17, 245] }) }), block_id: Some(BlockId { hash: [8, 250, 2, 194, 126, 192, 57, 11, 163, 1, 228, 252, 126, 61, 126, 173, 179, 80, 200, 25, 62, 62, 98, 160, 147, 104, 151, 6, 227, 162, 11, 250], part_set_header: Some(PartSetHeader { total: 1, hash: [67, 44, 224, 208, 150, 55, 48, 6, 49, 94, 42, 158, 112, 26, 240, 103, 185, 51, 202, 165, 106, 78, 124, 206, 99, 140, 58, 172, 22, 209, 227, 68] }), state_id: [209, 145, 66, 195, 68, 86, 204, 201, 247, 175, 60, 157, 38, 207, 138, 107, 56, 77, 204, 254, 146, 83, 246, 110, 152, 76, 39, 22, 153, 243, 181, 131] }) })) }"#; + + const TESTNET_FINALIZE_BLOCK_TWO: &str = r#"Request { value: Some(FinalizeBlock(RequestFinalizeBlock { commit: Some(CommitInfo { round: 1, quorum_hash: [0, 0, 0, 217, 55, 192, 219, 26, 45, 97, 224, 140, 152, 79, 68, 251, 208, 148, 3, 190, 152, 206, 230, 126, 107, 37, 117, 76, 217, 104, 133, 231], block_signature: [151, 132, 224, 84, 5, 251, 44, 38, 191, 110, 146, 82, 255, 249, 7, 150, 50, 168, 38, 237, 69, 227, 135, 55, 144, 47, 4, 155, 3, 138, 102, 99, 154, 133, 217, 187, 169, 154, 174, 115, 139, 173, 105, 25, 62, 73, 129, 87, 7, 28, 172, 121, 137, 254, 243, 31, 71, 185, 143, 151, 213, 225, 44, 199, 70, 25, 157, 230, 75, 62, 81, 254, 217, 86, 171, 220, 120, 188, 69, 24, 109, 222, 98, 224, 102, 201, 145, 82, 53, 13, 228, 150, 0, 137, 116, 16], threshold_vote_extensions: [] }), misbehavior: [], hash: [98, 147, 39, 112, 110, 207, 177, 37, 173, 61, 20, 160, 95, 228, 179, 90, 184, 83, 202, 86, 64, 254, 53, 133, 57, 32, 50, 21, 253, 32, 16, 172], height: 2, round: 1, block: Some(Block { header: Some(Header { version: Some(Consensus { block: 14, app: 1 }), chain_id: "dash-testnet-51", height: 2, time: Some(Timestamp { seconds: 1724575888, nanos: 328000000 }), last_block_id: Some(BlockId { hash: [8, 250, 2, 194, 126, 192, 57, 11, 163, 1, 228, 252, 126, 61, 126, 173, 179, 80, 200, 25, 62, 62, 98, 160, 147, 104, 151, 6, 227, 162, 11, 250], part_set_header: Some(PartSetHeader { total: 1, hash: [67, 44, 224, 208, 150, 55, 48, 6, 49, 94, 42, 158, 112, 26, 240, 103, 185, 51, 202, 165, 106, 78, 124, 206, 99, 140, 58, 172, 22, 209, 227, 68] }), state_id: [209, 145, 66, 195, 68, 86, 204, 201, 247, 175, 60, 157, 38, 207, 138, 107, 56, 77, 204, 254, 146, 83, 246, 110, 152, 76, 39, 22, 153, 243, 181, 131] }), last_commit_hash: [125, 172, 60, 185, 43, 201, 215, 188, 72, 11, 207, 101, 109, 98, 7, 127, 216, 155, 4, 101, 230, 18, 156, 15, 99, 93, 122, 164, 178, 27, 60, 194], data_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], validators_hash: [67, 141, 67, 156, 14, 170, 45, 148, 50, 130, 83, 98, 80, 9, 168, 59, 20, 74, 245, 208, 222, 120, 248, 14, 0, 20, 181, 247, 167, 138, 75, 141], next_validators_hash: [67, 141, 67, 156, 14, 170, 45, 148, 50, 130, 83, 98, 80, 9, 168, 59, 20, 74, 245, 208, 222, 120, 248, 14, 0, 20, 181, 247, 167, 138, 75, 141], consensus_hash: [180, 208, 169, 232, 73, 81, 202, 221, 119, 226, 150, 68, 128, 3, 115, 113, 118, 178, 89, 72, 173, 246, 104, 172, 110, 192, 105, 38, 200, 31, 172, 134], next_consensus_hash: [180, 208, 169, 232, 73, 81, 202, 221, 119, 226, 150, 68, 128, 3, 115, 113, 118, 178, 89, 72, 173, 246, 104, 172, 110, 192, 105, 38, 200, 31, 172, 134], app_hash: [77, 189, 142, 170, 172, 111, 216, 169, 207, 157, 71, 134, 71, 149, 189, 31, 53, 102, 178, 80, 54, 238, 37, 128, 18, 176, 16, 200, 2, 126, 109, 200], results_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], evidence_hash: [227, 176, 196, 66, 152, 252, 28, 20, 154, 251, 244, 200, 153, 111, 185, 36, 39, 174, 65, 228, 100, 155, 147, 76, 164, 149, 153, 27, 120, 82, 184, 85], proposed_app_version: 1, proposer_pro_tx_hash: [20, 61, 205, 106, 107, 118, 132, 253, 224, 30, 136, 161, 14, 93, 101, 222, 154, 41, 36, 76, 94, 205, 88, 109, 20, 163, 66, 101, 112, 37, 241, 19], core_chain_locked_height: 1090320 }), data: Some(Data { txs: [] }), evidence: Some(EvidenceList { evidence: [] }), last_commit: Some(Commit { height: 1, round: 0, block_id: Some(BlockId { hash: [8, 250, 2, 194, 126, 192, 57, 11, 163, 1, 228, 252, 126, 61, 126, 173, 179, 80, 200, 25, 62, 62, 98, 160, 147, 104, 151, 6, 227, 162, 11, 250], part_set_header: Some(PartSetHeader { total: 1, hash: [67, 44, 224, 208, 150, 55, 48, 6, 49, 94, 42, 158, 112, 26, 240, 103, 185, 51, 202, 165, 106, 78, 124, 206, 99, 140, 58, 172, 22, 209, 227, 68] }), state_id: [209, 145, 66, 195, 68, 86, 204, 201, 247, 175, 60, 157, 38, 207, 138, 107, 56, 77, 204, 254, 146, 83, 246, 110, 152, 76, 39, 22, 153, 243, 181, 131] }), quorum_hash: [0, 0, 0, 175, 88, 108, 85, 57, 26, 90, 172, 207, 12, 99, 142, 240, 100, 211, 71, 145, 227, 27, 243, 154, 158, 173, 160, 199, 112, 203, 8, 120], threshold_block_signature: [135, 31, 49, 75, 118, 108, 104, 68, 227, 56, 171, 253, 41, 152, 98, 72, 166, 144, 178, 146, 18, 67, 56, 20, 130, 110, 158, 62, 6, 77, 138, 57, 113, 138, 206, 99, 241, 112, 245, 11, 237, 77, 36, 214, 24, 174, 166, 1, 21, 165, 233, 228, 11, 201, 201, 241, 5, 23, 224, 16, 178, 200, 142, 7, 105, 222, 229, 179, 82, 115, 216, 243, 16, 48, 204, 162, 100, 154, 25, 120, 1, 85, 170, 219, 228, 3, 170, 60, 81, 141, 68, 116, 22, 7, 239, 249], threshold_vote_extensions: [] }), core_chain_lock: Some(CoreChainLock { core_block_height: 1090320, core_block_hash: [26, 216, 69, 45, 191, 148, 30, 6, 168, 162, 186, 137, 78, 18, 75, 156, 96, 37, 84, 103, 102, 16, 247, 253, 135, 49, 45, 177, 223, 0, 0, 0], signature: [180, 194, 224, 93, 153, 74, 203, 51, 184, 6, 210, 221, 105, 118, 214, 63, 153, 251, 150, 114, 108, 127, 204, 60, 218, 225, 67, 219, 1, 243, 242, 197, 83, 108, 245, 71, 67, 13, 18, 17, 65, 133, 148, 4, 209, 211, 188, 233, 24, 183, 215, 105, 227, 42, 217, 128, 60, 80, 202, 225, 220, 209, 240, 9, 200, 195, 48, 13, 154, 13, 142, 216, 112, 83, 180, 84, 254, 238, 233, 201, 141, 58, 116, 171, 125, 110, 118, 14, 225, 89, 66, 58, 3, 9, 42, 179] }) }), block_id: Some(BlockId { hash: [98, 147, 39, 112, 110, 207, 177, 37, 173, 61, 20, 160, 95, 228, 179, 90, 184, 83, 202, 86, 64, 254, 53, 133, 57, 32, 50, 21, 253, 32, 16, 172], part_set_header: Some(PartSetHeader { total: 1, hash: [200, 235, 186, 216, 169, 238, 109, 8, 187, 66, 3, 161, 186, 230, 247, 3, 129, 181, 218, 148, 158, 153, 68, 17, 111, 14, 75, 230, 202, 104, 255, 47] }), state_id: [45, 73, 190, 78, 51, 91, 154, 204, 110, 181, 196, 96, 54, 5, 235, 82, 94, 133, 4, 141, 52, 209, 253, 137, 36, 137, 200, 161, 182, 225, 218, 147] }) })) }"#; +} diff --git a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs b/packages/rs-drive-abci/src/replay/mod.rs similarity index 62% rename from packages/platform-debug-utils/src/bin/replay_abci_requests.rs rename to packages/rs-drive-abci/src/replay/mod.rs index c755eb1a576..a91885cb9cd 100644 --- a/packages/platform-debug-utils/src/bin/replay_abci_requests.rs +++ b/packages/rs-drive-abci/src/replay/mod.rs @@ -1,60 +1,44 @@ -mod replay_support; -use clap::Parser; +mod cli; +mod log_ingest; +mod runner; + +use crate::abci::app::FullAbciApplication; +use crate::config::PlatformConfig; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; +use crate::rpc::core::DefaultCoreRPC; +use crate::verify; +use cli::SkipRequest; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; -use drive_abci::abci::app::FullAbciApplication; -use drive_abci::config::{FromEnv, PlatformConfig}; -use drive_abci::platform_types::platform::Platform; -use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; -use drive_abci::rpc::core::DefaultCoreRPC; -use drive_abci::verify; -use replay_support::cli::{Cli, SkipRequest, load_env}; -use replay_support::log_ingest::LogRequestStream; -use replay_support::replay::{ - LoadedRequest, ProgressReporter, ReplayItem, ReplaySource, ensure_db_directory, - execute_request, load_request, log_last_committed_block, +use log_ingest::LogRequestStream; +use runner::{ + ensure_db_directory, execute_request, log_last_committed_block, stop_height_reached, + LoadedRequest, ProgressReporter, ReplayItem, }; -use replay_support::telemetry::init_logging; use std::error::Error; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; +use tokio_util::sync::CancellationToken; -fn main() -> Result<(), Box> { - let cli = Cli::parse(); - let _log_guard = init_logging(cli.output.as_deref())?; - run(cli) -} - -fn run(cli: Cli) -> Result<(), Box> { - load_env(cli.config.as_deref())?; - - let mut config = match PlatformConfig::from_env() { - Ok(config) => config, - Err(drive_abci::error::Error::Configuration(envy::Error::MissingValue(field))) => { - return Err(format!("missing configuration option: {}", field.to_uppercase()).into()); - } - Err(err) => return Err(err.into()), - }; +pub use cli::ReplayArgs; - config.db_path = cli.db_path.clone(); +/// Replay ABCI requests captured in drive-abci JSON logs. +pub fn run( + mut config: PlatformConfig, + args: ReplayArgs, + cancel: CancellationToken, +) -> Result<(), Box> { + let db_path = args + .db_path + .clone() + .unwrap_or_else(|| config.db_path.clone()); + config.db_path = db_path; let db_was_created = ensure_db_directory(&config.db_path)?; tracing::info!("running database verification before replay"); verify::run(&config, true).map_err(|e| format!("verification failed before replay: {}", e))?; - let mut replay_items = Vec::new(); - for path in &cli.requests { - let loaded = load_request(path, cli.request_format)?; - tracing::info!("loaded {} request from {}", loaded.kind(), path.display()); - let canonical_path = canonicalize_path(path); - let item = ReplayItem::from_file(canonical_path, loaded); - if should_skip_item(&item, &cli.skip) { - tracing::info!("skipping request {} due to --skip", item.describe()); - continue; - } - replay_items.push(item); - } - let mut log_streams = Vec::new(); - for path in &cli.logs { + for path in &args.logs { let mut stream = LogRequestStream::open(path)?; if stream.peek()?.is_some() { tracing::info!("streaming ABCI requests from log {}", path.display()); @@ -64,24 +48,18 @@ fn run(cli: Cli) -> Result<(), Box> { } } - if replay_items.is_empty() && log_streams.is_empty() { - return Err( - "no requests to replay; provide --requests and/or --logs with relevant inputs".into(), - ); + if log_streams.is_empty() { + return Err("no requests to replay; provide --log with relevant inputs".into()); } if db_was_created { - let first_is_init_chain = if let Some(item) = replay_items.first() { - matches!(item.request, LoadedRequest::InitChain(_)) - } else if let Some(stream) = log_streams.first_mut() { - advance_stream(stream, None, &cli.skip)?; - match stream.peek()? { - Some(item) => matches!(item.request, LoadedRequest::InitChain(_)), - None => false, + let mut first_is_init_chain = false; + if let Some(stream) = log_streams.first_mut() { + advance_stream(stream, None, &args.skip)?; + if let Some(item) = stream.peek()? { + first_is_init_chain = matches!(item.request, LoadedRequest::InitChain(_)); } - } else { - false - }; + } if !first_is_init_chain { return Err( @@ -106,64 +84,60 @@ fn run(cli: Cli) -> Result<(), Box> { .as_ref() .map(|info| info.basic_info().height); - if let Some(limit) = cli.stop_height - && let Some(current) = known_height - && current >= limit - { - tracing::info!( - "current platform height {} is already at or above stop height {}; ending replay", - current, - limit - ); - return Ok(()); + if let Some(limit) = args.stop_height { + if let Some(current) = known_height { + if current >= limit { + tracing::info!( + "current platform height {} is already at or above stop height {}; ending replay", + current, + limit + ); + return Ok(()); + } + } } let app = FullAbciApplication::new(&platform); - let mut progress = if cli.progress { - Some(ProgressReporter::new(cli.stop_height)) + let mut progress = if args.progress { + Some(ProgressReporter::new(args.stop_height)) } else { None }; + let mut cancelled = false; - for item in replay_items { - if stop_height_reached(cli.stop_height, known_height) { - tracing::info!( - "stop height {} reached; skipping remaining request files", - cli.stop_height.unwrap() - ); - break; - } - let committed = execute_request(&app, item, progress.as_mut())?; - update_known_height(&mut known_height, committed); - if stop_height_reached(cli.stop_height, known_height) { - tracing::info!( - "stop height {} reached after request files; skipping remaining inputs", - cli.stop_height.unwrap() - ); + for mut stream in log_streams { + if cancel.is_cancelled() { + tracing::info!("cancellation requested; stopping remaining log streams"); + cancelled = true; break; } - } - - for mut stream in log_streams { - if stop_height_reached(cli.stop_height, known_height) { + if stop_height_reached(args.stop_height, known_height) { tracing::info!( "stop height {} reached; skipping remaining log streams", - cli.stop_height.unwrap() + args.stop_height.unwrap() ); break; } let mut validator = RequestSequenceValidator::new(stream.path().to_path_buf()); let mut executed = 0usize; loop { - if stop_height_reached(cli.stop_height, known_height) { + if cancel.is_cancelled() { + tracing::info!( + "cancellation requested; stopping replay for log {}", + stream.path().display() + ); + cancelled = true; + break; + } + if stop_height_reached(args.stop_height, known_height) { tracing::info!( "stop height {} reached; stopping replay for log {}", - cli.stop_height.unwrap(), + args.stop_height.unwrap(), stream.path().display() ); break; } - advance_stream(&mut stream, known_height, &cli.skip)?; + advance_stream(&mut stream, known_height, &args.skip)?; let Some(item) = stream.next_item()? else { break; }; @@ -172,6 +146,9 @@ fn run(cli: Cli) -> Result<(), Box> { update_known_height(&mut known_height, committed); executed += 1; } + if cancelled { + break; + } validator.finish()?; tracing::info!( "replayed {} ABCI requests from log {}", @@ -180,43 +157,11 @@ fn run(cli: Cli) -> Result<(), Box> { ); } - Ok(()) -} - -fn update_known_height(current: &mut Option, new_height: Option) { - if let Some(height) = new_height { - match current { - Some(existing) if height <= *existing => {} - _ => *current = Some(height), - } + if cancelled { + tracing::info!("replay interrupted by cancellation"); } -} - -fn canonicalize_path(path: &Path) -> PathBuf { - path.canonicalize().unwrap_or_else(|_| path.to_path_buf()) -} - -fn should_skip_item(item: &ReplayItem, skip: &[SkipRequest]) -> bool { - skip.iter().any(|target| match &item.source { - ReplaySource::File(path) => target.line.is_none() && paths_equal(path, &target.path), - ReplaySource::Log { path, line, .. } => { - if !paths_equal(path, &target.path) { - return false; - } - match target.line { - Some(target_line) => target_line == *line, - None => true, - } - } - }) -} -fn paths_equal(a: &Path, b: &Path) -> bool { - if let (Ok(canon_a), Ok(canon_b)) = (a.canonicalize(), b.canonicalize()) { - canon_a == canon_b - } else { - a == b - } + Ok(()) } fn advance_stream( @@ -267,6 +212,20 @@ fn drain_skipped_entries( Ok(()) } +fn should_skip_item(item: &ReplayItem, skip: &[SkipRequest]) -> bool { + skip.iter() + .any(|target| cli::skip_matches(item.source.path(), Some(item.source.line()), target)) +} + +fn update_known_height(current: &mut Option, new_height: Option) { + if let Some(height) = new_height { + match current { + Some(existing) if height <= *existing => {} + _ => *current = Some(height), + } + } +} + struct RequestSequenceValidator { path: PathBuf, last_height: Option, @@ -373,7 +332,3 @@ impl RequestSequenceValidator { Ok(()) } } - -fn stop_height_reached(limit: Option, known_height: Option) -> bool { - matches!((limit, known_height), (Some(limit), Some(height)) if height >= limit) -} diff --git a/packages/platform-debug-utils/src/bin/replay_support/replay.rs b/packages/rs-drive-abci/src/replay/runner.rs similarity index 72% rename from packages/platform-debug-utils/src/bin/replay_support/replay.rs rename to packages/rs-drive-abci/src/replay/runner.rs index 81076525b98..b9707334e0f 100644 --- a/packages/platform-debug-utils/src/bin/replay_support/replay.rs +++ b/packages/rs-drive-abci/src/replay/runner.rs @@ -1,9 +1,8 @@ -use super::cli::{RequestFormat, parse_with}; +use crate::abci::app::FullAbciApplication; +use crate::platform_types::platform::Platform; +use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use dpp::version::PlatformVersion; -use drive_abci::abci::app::FullAbciApplication; -use drive_abci::platform_types::platform::Platform; -use drive_abci::platform_types::platform_state::v0::PlatformStateV0Methods; use hex::ToHex; use std::collections::VecDeque; use std::convert::TryFrom; @@ -12,28 +11,21 @@ use std::fmt::Write as _; use std::fs; use std::path::{Path, PathBuf}; use std::time::{Duration, Instant}; -use tenderdash_abci::Application; use tenderdash_abci::proto::abci::{ - Request, RequestExtendVote, RequestFinalizeBlock, RequestInfo, RequestInitChain, - RequestPrepareProposal, RequestProcessProposal, RequestVerifyVoteExtension, request, - response_process_proposal, response_verify_vote_extension, + response_process_proposal, response_verify_vote_extension, RequestExtendVote, + RequestFinalizeBlock, RequestInfo, RequestInitChain, RequestPrepareProposal, + RequestProcessProposal, RequestVerifyVoteExtension, }; +use tenderdash_abci::Application; #[derive(Debug, Clone)] -pub struct ReplayItem { - pub source: ReplaySource, - pub request: LoadedRequest, +pub(super) struct ReplayItem { + pub(super) source: ReplaySource, + pub(super) request: LoadedRequest, } impl ReplayItem { - pub fn from_file(path: PathBuf, request: LoadedRequest) -> Self { - Self { - source: ReplaySource::File(path), - request, - } - } - - pub fn from_log( + pub(super) fn from_log( path: &Path, line: usize, timestamp: Option, @@ -41,7 +33,7 @@ impl ReplayItem { request: LoadedRequest, ) -> Self { Self { - source: ReplaySource::Log { + source: ReplaySource { path: path.to_path_buf(), line, timestamp, @@ -51,47 +43,42 @@ impl ReplayItem { } } - pub fn describe(&self) -> String { + pub(super) fn describe(&self) -> String { self.source.describe() } } #[derive(Debug, Clone)] -pub enum ReplaySource { - File(PathBuf), - Log { - path: PathBuf, - line: usize, - timestamp: Option, - endpoint: Option, - }, +pub(super) struct ReplaySource { + path: PathBuf, + line: usize, + timestamp: Option, + endpoint: Option, } impl ReplaySource { fn describe(&self) -> String { - match self { - ReplaySource::File(path) => format!("{}", path.display()), - ReplaySource::Log { - path, - line, - timestamp, - endpoint, - } => { - let mut out = format!("{}:{}", path.display(), line); - if let Some(endpoint) = endpoint { - write!(&mut out, " {}", endpoint).ok(); - } - if let Some(ts) = timestamp { - write!(&mut out, " @{}", ts).ok(); - } - out - } + let mut out = format!("{}:{}", self.path.display(), self.line); + if let Some(endpoint) = &self.endpoint { + write!(&mut out, " {}", endpoint).ok(); + } + if let Some(ts) = &self.timestamp { + write!(&mut out, " @{}", ts).ok(); } + out + } + + pub(super) fn path(&self) -> &Path { + &self.path + } + + pub(super) fn line(&self) -> usize { + self.line } } #[derive(Debug, Clone)] -pub enum LoadedRequest { +pub(super) enum LoadedRequest { InitChain(RequestInitChain), Info(RequestInfo), Prepare(RequestPrepareProposal), @@ -102,19 +89,7 @@ pub enum LoadedRequest { } impl LoadedRequest { - pub fn kind(&self) -> &'static str { - match self { - LoadedRequest::InitChain(_) => "init_chain", - LoadedRequest::Info(_) => "info", - LoadedRequest::Prepare(_) => "prepare_proposal", - LoadedRequest::Process(_) => "process_proposal", - LoadedRequest::Finalize(_) => "finalize_block", - LoadedRequest::ExtendVote(_) => "extend_vote", - LoadedRequest::VerifyVoteExtension(_) => "verify_vote_extension", - } - } - - pub fn block_height(&self) -> Option { + pub(super) fn block_height(&self) -> Option { fn to_height(value: i64) -> Option { u64::try_from(value).ok() } @@ -131,7 +106,7 @@ impl LoadedRequest { } } -pub fn ensure_db_directory(path: &Path) -> Result> { +pub(super) fn ensure_db_directory(path: &Path) -> Result> { if path.exists() { if !path.is_dir() { return Err(format!("{} exists but is not a directory", path.display()).into()); @@ -147,65 +122,19 @@ pub fn ensure_db_directory(path: &Path) -> Result> { Ok(true) } -pub fn load_request(path: &Path, format: RequestFormat) -> Result> { - let raw = fs::read_to_string(path)?; - - if let Ok(request) = parse_with::(&raw, format) { - return map_request_value(request); - } - - macro_rules! try_parse { - ($ty:ty, $variant:ident) => { - if let Ok(value) = parse_with::<$ty>(&raw, format) { - return Ok(LoadedRequest::$variant(value)); - } - }; - } - - try_parse!(RequestInitChain, InitChain); - try_parse!(RequestInfo, Info); - try_parse!(RequestPrepareProposal, Prepare); - try_parse!(RequestProcessProposal, Process); - try_parse!(RequestFinalizeBlock, Finalize); - try_parse!(RequestExtendVote, ExtendVote); - try_parse!(RequestVerifyVoteExtension, VerifyVoteExtension); - - Err("unsupported request file format".into()) -} - -fn map_request_value(request: Request) -> Result> { - match request.value { - Some(request::Value::InitChain(value)) => Ok(LoadedRequest::InitChain(value)), - Some(request::Value::Info(value)) => Ok(LoadedRequest::Info(value)), - Some(request::Value::PrepareProposal(value)) => Ok(LoadedRequest::Prepare(value)), - Some(request::Value::ProcessProposal(value)) => Ok(LoadedRequest::Process(value)), - Some(request::Value::FinalizeBlock(value)) => Ok(LoadedRequest::Finalize(value)), - Some(request::Value::ExtendVote(value)) => Ok(LoadedRequest::ExtendVote(value)), - Some(request::Value::VerifyVoteExtension(value)) => { - Ok(LoadedRequest::VerifyVoteExtension(value)) - } - Some(other) => Err(format!( - "request file contains unsupported variant {}", - request_variant_name(&other) - ) - .into()), - None => Err("request payload does not contain a value".into()), - } -} - -pub fn execute_request( +pub(super) fn execute_request( app: &FullAbciApplication, item: ReplayItem, progress: Option<&mut ProgressReporter>, ) -> Result, Box> where - C: drive_abci::rpc::core::CoreRPCLike, + C: crate::rpc::core::CoreRPCLike, { let origin = item.describe(); let mut committed_height = None; match item.request { LoadedRequest::InitChain(request) => { - tracing::info!("executing init_chain from {}", origin); + tracing::debug!("executing init_chain from {}", origin); let response = app.init_chain(request).map_err(|err| { logged_error(format!("init_chain failed for {}: {:?}", origin, err)) })?; @@ -228,7 +157,7 @@ where .map(|info| info.basic_info().height); } LoadedRequest::Info(request) => { - tracing::info!("executing info from {}", origin); + tracing::debug!("executing info from {}", origin); let response = app .info(request) .map_err(|err| logged_error(format!("info failed for {}: {:?}", origin, err)))?; @@ -238,12 +167,11 @@ where response.last_block_height, hex::encode(response.last_block_app_hash) ); - // Do not update committed_height; Info is read-only. } LoadedRequest::Prepare(request) => { let height = request.height; let context = format_height_round(Some(height), Some(request.round)); - tracing::info!( + tracing::debug!( "executing prepare_proposal from {} (height={})", origin, height @@ -254,7 +182,7 @@ where origin, context, err )) })?; - tracing::info!( + tracing::debug!( "prepare_proposal result ({}): height={}, app_hash=0x{}, tx_results={}, tx_records={}", origin, height, @@ -266,7 +194,7 @@ where LoadedRequest::Process(request) => { let height = request.height; let context = format_height_round(Some(height), Some(request.round)); - tracing::info!( + tracing::debug!( "executing process_proposal from {} (height={})", origin, height @@ -279,7 +207,7 @@ where })?; let status = response_process_proposal::ProposalStatus::try_from(response.status) .unwrap_or(response_process_proposal::ProposalStatus::Unknown); - tracing::info!( + tracing::debug!( "process_proposal result ({}): status={:?}, height={}, app_hash=0x{}, tx_results={}, events={}", origin, status, @@ -293,7 +221,7 @@ where let height = request.height; let round = request.round; let context = format_height_round(Some(height), Some(round)); - tracing::info!( + tracing::debug!( "executing finalize_block from {} (height={}, round={})", origin, height, @@ -332,7 +260,7 @@ where .as_ref() .map(|hash| hex::encode(hash)) .unwrap_or_else(|| "unknown".to_string()); - tracing::info!( + tracing::debug!( "finalize_block result ({}): height={}, retain_height={}, state_app_hash=0x{}, grove_root=0x{}", origin, height, @@ -384,7 +312,7 @@ where } if let Some(reporter) = progress { if let Ok(block_height) = u64::try_from(height) { - if let Some(hash) = actual_hash.as_deref().or_else(|| expected.as_deref()) { + if let Some(hash) = actual_hash.as_deref().or(expected.as_deref()) { reporter.record(block_height, hash); } } @@ -393,7 +321,7 @@ where } LoadedRequest::ExtendVote(request) => { let context = format_height_round(Some(request.height), Some(request.round)); - tracing::info!( + tracing::debug!( "executing extend_vote from {} (height={}, round={})", origin, request.height, @@ -410,7 +338,7 @@ where .iter() .map(|ext| ext.extension.len()) .sum(); - tracing::info!( + tracing::debug!( "extend_vote result ({}): vote_extensions={}, total_extension_bytes={}", origin, response.vote_extensions.len(), @@ -419,7 +347,7 @@ where } LoadedRequest::VerifyVoteExtension(request) => { let context = format_height_round(Some(request.height), Some(request.round)); - tracing::info!( + tracing::debug!( "executing verify_vote_extension from {} (height={}, round={})", origin, request.height, @@ -433,7 +361,7 @@ where })?; let status = response_verify_vote_extension::VerifyStatus::try_from(response.status) .unwrap_or(response_verify_vote_extension::VerifyStatus::Unknown); - tracing::info!( + tracing::debug!( "verify_vote_extension result ({}): status={:?}", origin, status @@ -448,14 +376,14 @@ const PROGRESS_MIN_INTERVAL: Duration = Duration::from_secs(1); const PROGRESS_WINDOW_SHORT: Duration = Duration::from_secs(60); const PROGRESS_WINDOW_LONG: Duration = Duration::from_secs(300); -pub struct ProgressReporter { +pub(super) struct ProgressReporter { history: VecDeque<(Instant, u64)>, last_emit: Option, stop_height: Option, } impl ProgressReporter { - pub fn new(stop_height: Option) -> Self { + pub(super) fn new(stop_height: Option) -> Self { Self { history: VecDeque::new(), last_emit: None, @@ -463,7 +391,7 @@ impl ProgressReporter { } } - pub fn record(&mut self, height: u64, app_hash: &[u8]) { + pub(super) fn record(&mut self, height: u64, app_hash: &[u8]) { let now = Instant::now(); self.history.push_back((now, height)); self.trim_history(now); @@ -477,13 +405,13 @@ impl ProgressReporter { let rate_1m = self.rate_per_minute(now, PROGRESS_WINDOW_SHORT); let rate_5m = self.rate_per_minute(now, PROGRESS_WINDOW_LONG); let eta = Self::format_eta(self.eta(rate_5m, height)); - println!( - "height={} app_hash={} rate_1m={} rate_5m={} eta={}", + tracing::info!( height, - Self::short_hash(app_hash), - Self::format_rate(rate_1m), - Self::format_rate(rate_5m), - eta + app_hash = Self::short_hash(app_hash), + rate_1m = Self::format_rate(rate_1m), + rate_5m = Self::format_rate(rate_5m), + eta, + "block processed", ); self.last_emit = Some(now); } @@ -560,38 +488,14 @@ impl ProgressReporter { } } -fn extract_expected_app_hash(request: &RequestFinalizeBlock) -> Option> { - request - .block - .as_ref() - .and_then(|block| block.header.as_ref()) - .map(|header| header.app_hash.clone()) -} - -fn format_height_round(height: Option, round: Option) -> String { - let mut parts = Vec::new(); - if let Some(h) = height { - parts.push(format!("height={}", h)); - } - if let Some(r) = round { - parts.push(format!("round={}", r)); - } - - if parts.is_empty() { - String::new() - } else { - format!(" ({})", parts.join(", ")) - } -} - -pub(crate) fn logged_error(message: String) -> Box { +fn logged_error(message: String) -> Box { tracing::error!("{}", message); message.into() } -pub fn log_last_committed_block(platform: &Platform) +pub(super) fn log_last_committed_block(platform: &Platform) where - C: drive_abci::rpc::core::CoreRPCLike, + C: crate::rpc::core::CoreRPCLike, { let platform_state = platform.state.load(); let grove_version = &platform_state @@ -623,22 +527,30 @@ where } } -fn request_variant_name(value: &request::Value) -> &'static str { - match value { - request::Value::Echo(_) => "Echo", - request::Value::Flush(_) => "Flush", - request::Value::Info(_) => "Info", - request::Value::InitChain(_) => "InitChain", - request::Value::Query(_) => "Query", - request::Value::CheckTx(_) => "CheckTx", - request::Value::ListSnapshots(_) => "ListSnapshots", - request::Value::OfferSnapshot(_) => "OfferSnapshot", - request::Value::LoadSnapshotChunk(_) => "LoadSnapshotChunk", - request::Value::ApplySnapshotChunk(_) => "ApplySnapshotChunk", - request::Value::PrepareProposal(_) => "PrepareProposal", - request::Value::ProcessProposal(_) => "ProcessProposal", - request::Value::ExtendVote(_) => "ExtendVote", - request::Value::VerifyVoteExtension(_) => "VerifyVoteExtension", - request::Value::FinalizeBlock(_) => "FinalizeBlock", +pub(super) fn stop_height_reached(limit: Option, known_height: Option) -> bool { + matches!((limit, known_height), (Some(limit), Some(height)) if height >= limit) +} + +fn extract_expected_app_hash(request: &RequestFinalizeBlock) -> Option> { + request + .block + .as_ref() + .and_then(|block| block.header.as_ref()) + .map(|header| header.app_hash.clone()) +} + +fn format_height_round(height: Option, round: Option) -> String { + let mut parts = Vec::new(); + if let Some(h) = height { + parts.push(format!("height={}", h)); + } + if let Some(r) = round { + parts.push(format!("round={}", r)); + } + + if parts.is_empty() { + String::new() + } else { + format!(" ({})", parts.join(", ")) } } From abaa8d54bdadea0bc1ae92aa4bf4b6cb78dd2f9d Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 27 Nov 2025 14:11:34 +0100 Subject: [PATCH 14/25] chore: adjust .env.testnet to match testnet --- packages/rs-drive-abci/.env.testnet | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/rs-drive-abci/.env.testnet b/packages/rs-drive-abci/.env.testnet index dccf681adf6..7d7c361c562 100644 --- a/packages/rs-drive-abci/.env.testnet +++ b/packages/rs-drive-abci/.env.testnet @@ -33,21 +33,21 @@ CORE_CHECK_TX_JSON_RPC_PASSWORD=password INITIAL_CORE_CHAINLOCKED_HEIGHT=1243 # https://github.com/dashevo/dashcore-lib/blob/286c33a9d29d33f05d874c47a9b33764a0be0cf1/lib/constants/index.js#L42-L57 -VALIDATOR_SET_QUORUM_TYPE=llmq_25_67 -VALIDATOR_SET_QUORUM_SIZE=25 +VALIDATOR_SET_QUORUM_TYPE=6 +VALIDATOR_SET_QUORUM_SIZE=100 VALIDATOR_SET_QUORUM_WINDOW=24 VALIDATOR_SET_QUORUM_ACTIVE_SIGNERS=24 VALIDATOR_SET_QUORUM_ROTATION=false VALIDATOR_SET_ROTATION_BLOCK_COUNT=64 -CHAIN_LOCK_QUORUM_TYPE=llmq_50_60 -CHAIN_LOCK_QUORUM_SIZE=50 +CHAIN_LOCK_QUORUM_TYPE=1 +CHAIN_LOCK_QUORUM_SIZE=400 CHAIN_LOCK_QUORUM_WINDOW=24 CHAIN_LOCK_QUORUM_ACTIVE_SIGNERS=24 CHAIN_LOCK_QUORUM_ROTATION=false -INSTANT_LOCK_QUORUM_TYPE=llmq_60_75 -INSTANT_LOCK_QUORUM_SIZE=50 +INSTANT_LOCK_QUORUM_TYPE=5 +INSTANT_LOCK_QUORUM_SIZE=60 INSTANT_LOCK_QUORUM_WINDOW=288 INSTANT_LOCK_QUORUM_ACTIVE_SIGNERS=32 INSTANT_LOCK_QUORUM_ROTATION=true @@ -77,9 +77,9 @@ MASTERNODE_REWARD_SHARES_SECOND_PUBLIC_KEY=02bf55f97f189895da29824781053140ee66b WITHDRAWALS_MASTER_PUBLIC_KEY=027057cdf58628635ef7b75e6b6c90dd996a16929cd68130e16b9328d429e5e03a WITHDRAWALS_SECOND_PUBLIC_KEY=022084d827fea4823a69aa7c8d3e02fe780eaa0ef1e5e9841af395ba7e40465ab6 -EPOCH_TIME_LENGTH_S=788400 +EPOCH_TIME_LENGTH_S=3600 -CHAIN_ID=devnet +CHAIN_ID=dash-testnet-51 BLOCK_SPACING_MS=5000 TOKIO_CONSOLE_ENABLED=false From 9352a626ba1a342ecc8bd2e7d47d6fb6a150131f Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 5 Dec 2025 14:15:21 +0100 Subject: [PATCH 15/25] refactor: move finalize block apphash verification to separate pr --- .../engine/finalize_block_proposal/v0/mod.rs | 5 +---- .../src/execution/types/block_state_info/mod.rs | 2 -- .../src/execution/types/block_state_info/v0/mod.rs | 13 +------------ 3 files changed, 2 insertions(+), 18 deletions(-) diff --git a/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs b/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs index c4b5aac7f71..c8d71074316 100644 --- a/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/engine/finalize_block_proposal/v0/mod.rs @@ -104,20 +104,17 @@ where block_header.core_chain_locked_height, block_header.proposer_pro_tx_hash, hash, - block_header.app_hash, )? { // we are on the wrong height or round validation_result.add_error(AbciError::WrongFinalizeBlockReceived(format!( - "received a block for h: {} r: {}, block hash: {}, app_hash: {}, core height: {}, expected h: {} r: {}, block hash: {}, app_hash: {}, core height: {}", + "received a block for h: {} r: {}, block hash: {}, core height: {}, expected h: {} r: {}, block hash: {}, core height: {}", height, round, hex::encode(hash), - hex::encode(block_header.app_hash), block_header.core_chain_locked_height, block_state_info.height(), block_state_info.round(), block_state_info.block_hash().map(hex::encode).unwrap_or("None".to_string()), - hex::encode(block_state_info.app_hash().unwrap_or_default()), block_state_info.core_chain_locked_height() ))); return Ok(validation_result.into()); diff --git a/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs b/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs index 8eb714a5979..684bcaaa569 100644 --- a/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/block_state_info/mod.rs @@ -168,7 +168,6 @@ impl BlockStateInfoV0Methods for BlockStateInfo { core_block_height: u32, proposer_pro_tx_hash: [u8; 32], commit_hash: I, - app_hash: I, ) -> Result { match self { BlockStateInfo::V0(v0) => v0.matches_expected_block_info( @@ -177,7 +176,6 @@ impl BlockStateInfoV0Methods for BlockStateInfo { core_block_height, proposer_pro_tx_hash, commit_hash, - app_hash, ), } } diff --git a/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs b/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs index 50bb83e19b0..8e3b405e651 100644 --- a/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs +++ b/packages/rs-drive-abci/src/execution/types/block_state_info/v0/mod.rs @@ -100,7 +100,6 @@ pub trait BlockStateInfoV0Methods { core_block_height: u32, proposer_pro_tx_hash: [u8; 32], commit_hash: I, - app_hash: I, ) -> Result; } @@ -152,18 +151,12 @@ impl BlockStateInfoV0Methods for BlockStateInfoV0 { core_block_height: u32, proposer_pro_tx_hash: [u8; 32], commit_hash: I, - app_hash: I, ) -> Result { let received_hash = commit_hash.try_into().map_err(|_| { Error::Abci(AbciError::BadRequestDataSize( "can't convert hash as vec to [u8;32]".to_string(), )) })?; - let received_app_hash = app_hash.try_into().map_err(|_| { - Error::Abci(AbciError::BadRequestDataSize( - "can't convert app hash as vec to [u8;32]".to_string(), - )) - })?; // the order is important here, don't verify commit hash before height and round tracing::trace!( self=?self, @@ -172,18 +165,14 @@ impl BlockStateInfoV0Methods for BlockStateInfoV0 { ?core_block_height, proposer_pro_tx_hash = hex::encode(proposer_pro_tx_hash), commit_hash = hex::encode(received_hash), - app_hash = hex::encode(received_app_hash), "check if block info matches request" ); - // TODO: consider app_hash verification Ok(self.height == height && self.round == round && self.core_chain_locked_height == core_block_height && self.proposer_pro_tx_hash == proposer_pro_tx_hash && self.block_hash.is_some() - && self.block_hash.unwrap() == received_hash - && self.app_hash.is_some() - && self.app_hash.unwrap_or_default() == received_app_hash) + && self.block_hash.unwrap() == received_hash) } } From 4750697073b4cdf4a5ae42800fa64a8843e53ead Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 5 Dec 2025 15:44:05 +0100 Subject: [PATCH 16/25] only 1 log file supported --- packages/rs-drive-abci/src/replay/cli.rs | 95 ++++++++++---------- packages/rs-drive-abci/src/replay/mod.rs | 106 +++++++++-------------- 2 files changed, 91 insertions(+), 110 deletions(-) diff --git a/packages/rs-drive-abci/src/replay/cli.rs b/packages/rs-drive-abci/src/replay/cli.rs index f51964a35a8..b9e5963bfd0 100644 --- a/packages/rs-drive-abci/src/replay/cli.rs +++ b/packages/rs-drive-abci/src/replay/cli.rs @@ -1,5 +1,5 @@ use clap::Args; -use std::path::{Path, PathBuf}; +use std::path::PathBuf; /// Replay ABCI requests captured from drive-abci logs. #[derive(Debug, Args, Clone)] @@ -10,71 +10,76 @@ pub struct ReplayArgs { #[arg(long, value_hint = clap::ValueHint::DirPath)] pub db_path: Option, - /// drive-abci JSON logs that contain TRACE level "received ABCI request" entries. + /// drive-abci JSON log that contains TRACE level "received ABCI request" entries. /// Relevant requests will be extracted and replayed chronologically. /// Other log entries are ignored. #[arg(long = "log", value_hint = clap::ValueHint::FilePath)] - pub logs: Vec, + pub log: PathBuf, /// Log progress information at INFO level after each finalize_block. #[arg(short, long)] pub progress: bool, - /// Skip replaying specific requests (use PATH for files or PATH:LINE for log entries). - #[arg(long = "skip", value_name = "PATH[:LINE]", value_parser = parse_skip_request)] - pub skip: Vec, + /// Skip replaying specific log entries by their line numbers (supports ranges and comma lists). + #[arg( + long = "skip", + value_name = "LINE[-LINE]", + value_delimiter = ',', + value_parser = parse_skip_selector + )] + pub skip: Vec, /// Stop replay after reaching this block height (inclusive). #[arg(long, value_name = "HEIGHT")] pub stop_height: Option, } -/// Request selector used by `--skip` flag. -#[derive(Debug, Clone)] -pub struct SkipRequest { - /// Canonicalized log path. - pub path: PathBuf, - /// Optional line number to match entries within the log. - pub line: Option, +/// Selector used by `--skip` flag to filter log line numbers. +#[derive(Debug, Clone, Copy)] +pub enum SkipSelector { + Line(usize), + Range { start: usize, end: usize }, } -pub fn parse_skip_request(raw: &str) -> Result { - let (path_part, line_part) = match raw.rsplit_once(':') { - Some((path, line_str)) => match line_str.parse::() { - Ok(line) => (path, Some(line)), - Err(_) => (raw, None), - }, - None => (raw, None), - }; - - let path_buf = PathBuf::from(path_part); - let canonical = path_buf - .canonicalize() - .unwrap_or_else(|_| PathBuf::from(path_part)); - - Ok(SkipRequest { - path: canonical, - line: line_part, - }) +impl SkipSelector { + pub fn matches(&self, line: usize) -> bool { + match self { + SkipSelector::Line(target) => line == *target, + SkipSelector::Range { start, end } => (*start..=*end).contains(&line), + } + } } -/// Check if a log path and optional line match the skip selector. -pub fn skip_matches(path: &Path, line: Option, needle: &SkipRequest) -> bool { - if !paths_equal(path, &needle.path) { - return false; +pub fn parse_skip_selector(raw: &str) -> Result { + let trimmed = raw.trim(); + if trimmed.is_empty() { + return Err("skip value cannot be empty".to_string()); } - match (line, needle.line) { - (_, None) => true, - (Some(actual), Some(expected)) => actual == expected, - _ => false, + if let Some((start, end)) = trimmed.split_once('-') { + let start_line = parse_line_number(start)?; + let end_line = parse_line_number(end)?; + if start_line > end_line { + return Err(format!( + "invalid skip range {}-{} (start must be <= end)", + start_line, end_line + )); + } + return Ok(SkipSelector::Range { + start: start_line, + end: end_line, + }); } + + let line = parse_line_number(trimmed)?; + Ok(SkipSelector::Line(line)) } -fn paths_equal(a: &Path, b: &Path) -> bool { - if let (Ok(canon_a), Ok(canon_b)) = (a.canonicalize(), b.canonicalize()) { - canon_a == canon_b - } else { - a == b - } +fn parse_line_number(raw: &str) -> Result { + raw.trim().parse::().map_err(|_| { + format!( + "invalid skip target '{}'; expected positive line number", + raw.trim() + ) + }) } diff --git a/packages/rs-drive-abci/src/replay/mod.rs b/packages/rs-drive-abci/src/replay/mod.rs index a91885cb9cd..942dd0896cb 100644 --- a/packages/rs-drive-abci/src/replay/mod.rs +++ b/packages/rs-drive-abci/src/replay/mod.rs @@ -8,7 +8,7 @@ use crate::platform_types::platform::Platform; use crate::platform_types::platform_state::v0::PlatformStateV0Methods; use crate::rpc::core::DefaultCoreRPC; use crate::verify; -use cli::SkipRequest; +use cli::SkipSelector; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use log_ingest::LogRequestStream; use runner::{ @@ -37,28 +37,22 @@ pub fn run( tracing::info!("running database verification before replay"); verify::run(&config, true).map_err(|e| format!("verification failed before replay: {}", e))?; - let mut log_streams = Vec::new(); - for path in &args.logs { - let mut stream = LogRequestStream::open(path)?; - if stream.peek()?.is_some() { - tracing::info!("streaming ABCI requests from log {}", path.display()); - log_streams.push(stream); - } else { - tracing::warn!("no supported ABCI requests found in log {}", path.display()); - } - } - - if log_streams.is_empty() { - return Err("no requests to replay; provide --log with relevant inputs".into()); + let mut stream = LogRequestStream::open(&args.log)?; + if stream.peek()?.is_some() { + tracing::info!("streaming ABCI requests from log {}", args.log.display()); + } else { + return Err(format!( + "no supported ABCI requests found in log {}; provide --log with relevant inputs", + args.log.display() + ) + .into()); } if db_was_created { let mut first_is_init_chain = false; - if let Some(stream) = log_streams.first_mut() { - advance_stream(stream, None, &args.skip)?; - if let Some(item) = stream.peek()? { - first_is_init_chain = matches!(item.request, LoadedRequest::InitChain(_)); - } + advance_stream(&mut stream, None, &args.skip)?; + if let Some(item) = stream.peek()? { + first_is_init_chain = matches!(item.request, LoadedRequest::InitChain(_)); } if !first_is_init_chain { @@ -104,58 +98,40 @@ pub fn run( None }; let mut cancelled = false; - - for mut stream in log_streams { + let mut validator = RequestSequenceValidator::new(stream.path().to_path_buf()); + let mut executed = 0usize; + loop { if cancel.is_cancelled() { - tracing::info!("cancellation requested; stopping remaining log streams"); + tracing::info!( + "cancellation requested; stopping replay for log {}", + stream.path().display() + ); cancelled = true; break; } if stop_height_reached(args.stop_height, known_height) { tracing::info!( - "stop height {} reached; skipping remaining log streams", - args.stop_height.unwrap() + "stop height {} reached; stopping replay for log {}", + args.stop_height.unwrap(), + stream.path().display() ); break; } - let mut validator = RequestSequenceValidator::new(stream.path().to_path_buf()); - let mut executed = 0usize; - loop { - if cancel.is_cancelled() { - tracing::info!( - "cancellation requested; stopping replay for log {}", - stream.path().display() - ); - cancelled = true; - break; - } - if stop_height_reached(args.stop_height, known_height) { - tracing::info!( - "stop height {} reached; stopping replay for log {}", - args.stop_height.unwrap(), - stream.path().display() - ); - break; - } - advance_stream(&mut stream, known_height, &args.skip)?; - let Some(item) = stream.next_item()? else { - break; - }; - validator.observe(&item)?; - let committed = execute_request(&app, item, progress.as_mut())?; - update_known_height(&mut known_height, committed); - executed += 1; - } - if cancelled { + advance_stream(&mut stream, known_height, &args.skip)?; + let Some(item) = stream.next_item()? else { break; - } - validator.finish()?; - tracing::info!( - "replayed {} ABCI requests from log {}", - executed, - stream.path().display() - ); + }; + validator.observe(&item)?; + let committed = execute_request(&app, item, progress.as_mut())?; + update_known_height(&mut known_height, committed); + executed += 1; } + validator.finish()?; + tracing::info!( + "replayed {} ABCI requests from log {}", + executed, + stream.path().display() + ); if cancelled { tracing::info!("replay interrupted by cancellation"); @@ -167,7 +143,7 @@ pub fn run( fn advance_stream( stream: &mut LogRequestStream, known_height: Option, - skip: &[SkipRequest], + skip: &[SkipSelector], ) -> Result<(), Box> { if let Some(height) = known_height { let skipped = stream.skip_processed_entries(height)?; @@ -186,7 +162,7 @@ fn advance_stream( fn drain_skipped_entries( stream: &mut LogRequestStream, - skip: &[SkipRequest], + skip: &[SkipSelector], ) -> Result<(), Box> { if skip.is_empty() { return Ok(()); @@ -212,9 +188,9 @@ fn drain_skipped_entries( Ok(()) } -fn should_skip_item(item: &ReplayItem, skip: &[SkipRequest]) -> bool { - skip.iter() - .any(|target| cli::skip_matches(item.source.path(), Some(item.source.line()), target)) +fn should_skip_item(item: &ReplayItem, skip: &[SkipSelector]) -> bool { + let line = item.source.line(); + skip.iter().any(|selector| selector.matches(line)) } fn update_known_height(current: &mut Option, new_height: Option) { From d7960ecc8c8e6fd8443b3580e8238219dc0e6466 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Fri, 5 Dec 2025 16:56:03 +0100 Subject: [PATCH 17/25] chore: clippy --- packages/rs-drive-abci/src/replay/runner.rs | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/packages/rs-drive-abci/src/replay/runner.rs b/packages/rs-drive-abci/src/replay/runner.rs index b9707334e0f..2aca5ead2ac 100644 --- a/packages/rs-drive-abci/src/replay/runner.rs +++ b/packages/rs-drive-abci/src/replay/runner.rs @@ -68,10 +68,6 @@ impl ReplaySource { out } - pub(super) fn path(&self) -> &Path { - &self.path - } - pub(super) fn line(&self) -> usize { self.line } @@ -258,7 +254,7 @@ where .unwrap_or_default(); let actual_hex = actual_hash .as_ref() - .map(|hash| hex::encode(hash)) + .map(hex::encode) .unwrap_or_else(|| "unknown".to_string()); tracing::debug!( "finalize_block result ({}): height={}, retain_height={}, state_app_hash=0x{}, grove_root=0x{}", From 8337e128314ec596bd27059f3c998834ecebc207 Mon Sep 17 00:00:00 2001 From: lklimek <842586+lklimek@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:27:09 +0100 Subject: [PATCH 18/25] Update packages/rs-drive-abci/src/replay/cli.rs Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- packages/rs-drive-abci/src/replay/cli.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rs-drive-abci/src/replay/cli.rs b/packages/rs-drive-abci/src/replay/cli.rs index b9e5963bfd0..2860bf08932 100644 --- a/packages/rs-drive-abci/src/replay/cli.rs +++ b/packages/rs-drive-abci/src/replay/cli.rs @@ -78,7 +78,7 @@ pub fn parse_skip_selector(raw: &str) -> Result { fn parse_line_number(raw: &str) -> Result { raw.trim().parse::().map_err(|_| { format!( - "invalid skip target '{}'; expected positive line number", + "invalid skip target '{}'; expected valid line number", raw.trim() ) }) From b3e1702783d916ffc0cf1ed093ba4ea76e360efe Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:38:33 +0100 Subject: [PATCH 19/25] chore: fix build after merge --- packages/rs-drive-abci/src/replay/mod.rs | 2 +- packages/rs-drive-abci/src/replay/runner.rs | 2 +- packages/rs-drive-abci/src/verify/mod.rs | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/rs-drive-abci/src/replay/mod.rs b/packages/rs-drive-abci/src/replay/mod.rs index 942dd0896cb..97ee8a1ab13 100644 --- a/packages/rs-drive-abci/src/replay/mod.rs +++ b/packages/rs-drive-abci/src/replay/mod.rs @@ -5,7 +5,7 @@ mod runner; use crate::abci::app::FullAbciApplication; use crate::config::PlatformConfig; use crate::platform_types::platform::Platform; -use crate::platform_types::platform_state::v0::PlatformStateV0Methods; +use crate::platform_types::platform_state::PlatformStateV0Methods; use crate::rpc::core::DefaultCoreRPC; use crate::verify; use cli::SkipSelector; diff --git a/packages/rs-drive-abci/src/replay/runner.rs b/packages/rs-drive-abci/src/replay/runner.rs index 2aca5ead2ac..7d5deb45884 100644 --- a/packages/rs-drive-abci/src/replay/runner.rs +++ b/packages/rs-drive-abci/src/replay/runner.rs @@ -1,6 +1,6 @@ use crate::abci::app::FullAbciApplication; use crate::platform_types::platform::Platform; -use crate::platform_types::platform_state::v0::PlatformStateV0Methods; +use crate::platform_types::platform_state::PlatformStateV0Methods; use dpp::block::extended_block_info::v0::ExtendedBlockInfoV0Getters; use dpp::version::PlatformVersion; use hex::ToHex; diff --git a/packages/rs-drive-abci/src/verify/mod.rs b/packages/rs-drive-abci/src/verify/mod.rs index fb529bbf548..fb87bb950cc 100644 --- a/packages/rs-drive-abci/src/verify/mod.rs +++ b/packages/rs-drive-abci/src/verify/mod.rs @@ -1,7 +1,6 @@ use crate::config::PlatformConfig; use crate::platform_types::platform::Platform; -use crate::platform_types::platform_state::v0::PlatformStateV0Methods; -use crate::platform_types::platform_state::PlatformState; +use crate::platform_types::platform_state::{PlatformState, PlatformStateV0Methods}; use crate::rpc::core::DefaultCoreRPC; use dpp::version::PlatformVersion; use drive::drive::Drive; From abe62044b5bfeaf6121921c79601f88c9994c1b4 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:47:11 +0100 Subject: [PATCH 20/25] ci: enable `replay` feature on docker drive-abci debug image --- .github/actions/docker/action.yaml | 4 ++++ .github/workflows/release-docker-image.yml | 5 +++++ .github/workflows/release.yml | 1 + Dockerfile | 14 +++++++++++--- packages/rs-drive-abci/Cargo.toml | 1 + 5 files changed, 22 insertions(+), 3 deletions(-) diff --git a/.github/actions/docker/action.yaml b/.github/actions/docker/action.yaml index 5501a609135..7d1c66cfd34 100644 --- a/.github/actions/docker/action.yaml +++ b/.github/actions/docker/action.yaml @@ -50,6 +50,9 @@ inputs: cache_to_name: description: "Save cache to name manifest (should be used only on default branch)" default: "false" + additional_features: + description: Extra Cargo features to enable (comma-separated) + default: "" outputs: digest: value: ${{ steps.docker_build.outputs.digest }} @@ -192,6 +195,7 @@ runs: AWS=${{ env.HOME }}/.aws/credentials build-args: | CARGO_BUILD_PROFILE=${{ inputs.cargo_profile }} + ADDITIONAL_FEATURES=${{ inputs.additional_features }} ${{ steps.sccache.outputs.env_vars }} cache-from: ${{ steps.layer_cache_settings.outputs.cache_from }} cache-to: ${{ steps.layer_cache_settings.outputs.cache_to }} diff --git a/.github/workflows/release-docker-image.yml b/.github/workflows/release-docker-image.yml index 68c0af43984..9bd9dca16d5 100644 --- a/.github/workflows/release-docker-image.yml +++ b/.github/workflows/release-docker-image.yml @@ -25,6 +25,10 @@ on: type: string description: Cargo profile. i.e. release, dev default: release + additional_features: + type: string + description: Extra Cargo features to enable for Drive builds (comma-separated) + default: "" env: DIGEST_NAME: digests-${{ inputs.image_org }}-${{ inputs.image_name }}-${{ inputs.tag }}-${{ inputs.cargo_profile }}-${{ github.sha }} DIGEST_DIR_PATH: /tmp/digests @@ -66,6 +70,7 @@ jobs: cache_secret_access_key: ${{ secrets.CACHE_SECRET_KEY }} # On release, we generate a new "base" image, so we need to save cache to name manifest, like '.../drive' cache_to_name: ${{ github.event_name == 'release' && 'true' || 'false' }} + additional_features: ${{ inputs.additional_features }} - name: Export digest run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e9f3992c6b9..d63e907651c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -178,6 +178,7 @@ jobs: target: drive-abci cargo_profile: dev tag: ${{ inputs.tag || github.event.release.tag_name }}-debug + additional_features: console,grovedbg,replay release-rs-dapi-image: name: Release RS-DAPI image diff --git a/Dockerfile b/Dockerfile index 8403f924b56..7102fd8fdfc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -417,6 +417,7 @@ FROM deps AS build-drive-abci # This is only for testing purpose and should be used only for # local development environment ARG SDK_TEST_DATA +ARG ADDITIONAL_FEATURES="" SHELL ["/bin/bash", "-o", "pipefail","-e", "-x", "-c"] @@ -431,10 +432,13 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM --mount=type=secret,id=AWS \ set -ex; \ source /root/env && \ + export FEATURES_FLAG=""; \ + ADDITIONAL_FEATURES_TRIMMED="$(echo "${ADDITIONAL_FEATURES}" | tr -d '[:space:]')"; \ if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ mv .cargo/config-release.toml .cargo/config.toml; \ - else \ - export FEATURES_FLAG="--features=console,grovedbg"; \ + fi && \ + if [[ -n "${ADDITIONAL_FEATURES_TRIMMED}" ]]; then \ + export FEATURES_FLAG="--features=${ADDITIONAL_FEATURES_TRIMMED}"; \ fi && \ if [ "${SDK_TEST_DATA}" == "true" ]; then \ mv .cargo/config-test-sdk-data.toml .cargo/config.toml; \ @@ -504,13 +508,17 @@ RUN --mount=type=cache,sharing=shared,id=cargo_registry_index,target=${CARGO_HOM --mount=type=secret,id=AWS \ set -ex; \ source /root/env && \ + export FEATURES_FLAG=""; \ + ADDITIONAL_FEATURES_TRIMMED="$(echo "${ADDITIONAL_FEATURES}" | tr -d '[:space:]')"; \ if [[ "${CARGO_BUILD_PROFILE}" == "release" ]] ; then \ mv .cargo/config-release.toml .cargo/config.toml; \ export OUT_DIRECTORY=release; \ else \ - export FEATURES_FLAG="--features=console,grovedbg"; \ export OUT_DIRECTORY=debug; \ fi && \ + if [[ -n "${ADDITIONAL_FEATURES_TRIMMED}" ]]; then \ + export FEATURES_FLAG="--features=${ADDITIONAL_FEATURES_TRIMMED}"; \ + fi && \ if [ "${SDK_TEST_DATA}" == "true" ]; then \ mv .cargo/config-test-sdk-data.toml .cargo/config.toml; \ fi && \ diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index a326d4d5c83..03b00f39d43 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -84,6 +84,7 @@ async-trait = "0.1.77" ron = { version = "0.12", optional = true } console-subscriber = { version = "0.4", optional = true } bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f", optional = true } + [dev-dependencies] bs58 = { version = "0.5.0" } base64 = "0.22.1" From ed49cd176a7b02124a19052cd387518670c5f7a0 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:58:10 +0100 Subject: [PATCH 21/25] chore: cargo machete --- Cargo.lock | 26 -------------------------- packages/rs-drive-abci/Cargo.toml | 8 ++------ 2 files changed, 2 insertions(+), 32 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 55466ad20ec..03ca05daffc 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -597,9 +597,6 @@ name = "bitflags" version = "2.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394" -dependencies = [ - "serde", -] [[package]] name = "bitvec" @@ -2012,10 +2009,8 @@ dependencies = [ "arc-swap", "assert_matches", "async-trait", - "base64 0.22.1", "bincode 2.0.0-rc.3", "bls-signatures", - "bs58", "chrono", "ciborium", "clap", @@ -2043,7 +2038,6 @@ dependencies = [ "regex", "reopen", "rocksdb 0.24.0", - "ron", "rust_decimal", "rust_decimal_macros", "serde", @@ -5342,20 +5336,6 @@ dependencies = [ "librocksdb-sys", ] -[[package]] -name = "ron" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" -dependencies = [ - "bitflags 2.9.4", - "once_cell", - "serde", - "serde_derive", - "typeid", - "unicode-ident", -] - [[package]] name = "rpassword" version = "7.4.0" @@ -7186,12 +7166,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "typeid" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" - [[package]] name = "typenum" version = "1.18.0" diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 03b00f39d43..1017286745b 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -15,7 +15,6 @@ license = "MIT" [dependencies] arc-swap = "1.7.0" bincode = { version = "=2.0.0-rc.3", features = ["serde"] } -base64 = { version = "0.22.1", optional = true } ciborium = { version = "0.2.2" } chrono = "0.4.35" serde = { version = "1.0.219", features = ["derive"] } @@ -81,13 +80,10 @@ tokio = { version = "1.40", features = [ tokio-util = { version = "0.7" } derive_more = { version = "1.0", features = ["from", "deref", "deref_mut"] } async-trait = "0.1.77" -ron = { version = "0.12", optional = true } console-subscriber = { version = "0.4", optional = true } bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "0842b17583888e8f46c252a4ee84cdfd58e0546f", optional = true } [dev-dependencies] -bs58 = { version = "0.5.0" } -base64 = "0.22.1" platform-version = { path = "../rs-platform-version", features = [ "mock-versions", ] } @@ -115,13 +111,13 @@ rocksdb = { version = "0.24.0" } integer-encoding = { version = "4.0.0" } [features] -default = ["bls-signatures"] +default = ["bls-signatures", "replay"] mocks = ["mockall", "drive/fixtures-and-mocks", "bls-signatures"] console = ["console-subscriber", "tokio/tracing"] testing-config = [] grovedbg = ["drive/grovedbg"] # `abci-server replay` command -replay = ["dep:ron", "dep:time", "tenderdash-abci/serde"] +replay = ["dep:time", "tenderdash-abci/serde"] [[bin]] name = "drive-abci" path = "src/main.rs" From d9b41b729fe76c75c9adb4b4235219de4dd7b1b9 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Thu, 18 Dec 2025 14:59:16 +0100 Subject: [PATCH 22/25] disable replay by default --- packages/rs-drive-abci/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index 1017286745b..c52d4c843a3 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -111,7 +111,7 @@ rocksdb = { version = "0.24.0" } integer-encoding = { version = "4.0.0" } [features] -default = ["bls-signatures", "replay"] +default = ["bls-signatures"] mocks = ["mockall", "drive/fixtures-and-mocks", "bls-signatures"] console = ["console-subscriber", "tokio/tracing"] testing-config = [] From 862f638a04055d01d115e2a67b48af6fbbce926c Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:36:13 +0100 Subject: [PATCH 23/25] refactor: improve state_backup.sh script --- scripts/state_backup.sh | 111 ++++++++++++++++++++++++++++------------ 1 file changed, 79 insertions(+), 32 deletions(-) diff --git a/scripts/state_backup.sh b/scripts/state_backup.sh index efd61b04991..630e1737bb9 100755 --- a/scripts/state_backup.sh +++ b/scripts/state_backup.sh @@ -1,30 +1,53 @@ #!/usr/bin/env bash set -euo pipefail -DASHMATE_BIN=${DASHMATE_BIN:-dashmate} +DASHMATE_CMD_RAW=${DASHMATE_CMD:-${DASHMATE_BIN:-dashmate}} +read -r -a DASHMATE_CMD <<<"$DASHMATE_CMD_RAW" abci_usage() { - printf 'usage: transfer_drive_abci_state.sh export|import --component abci|tenderdash\n\n export [archive] [config]\n import [config]\n' >&2 + cat >&2 <<'EOF' +Usage: + scripts/state_backup.sh export [archive] [options] + scripts/state_backup.sh import [options] + +Components: + abci | tenderdash + +Options: + --config Dashmate config name (passed to --config) + --dashmate Dashmate command (default: dashmate) + -h, --help Show this help + +Examples: + scripts/state_backup.sh export abci + scripts/state_backup.sh export tenderdash /tmp/td_state.tar.gz --config local + scripts/state_backup.sh import abci /tmp/abci_state.tar.gz --dashmate "docker compose run dashmate" +EOF exit 1 } -abci_timestamp() { date +%Y%m%dT%H%M%S; } +timestamp() { date +%Y%m%dT%H%M%S; } abci_resolve_config() { local cfg=${1:-} - if [ -n "$cfg" ]; then echo "$cfg"; else ${DASHMATE_BIN} config default; fi + if [ -n "$cfg" ]; then echo "$cfg"; else "${DASHMATE_CMD[@]}" config default; fi } abci_resolve_volume() { local cfg=$1 - local project=$(${DASHMATE_BIN} config envs --config "$cfg" | awk -F= '$1=="COMPOSE_PROJECT_NAME"{print $2}') + local project=$("${DASHMATE_CMD[@]}" config envs --config "$cfg" | awk -F= '$1=="COMPOSE_PROJECT_NAME"{print $2}') echo "${project}_${ABCI_VOLUME_SUFFIX:-drive_abci_data}" } +transfer_help() { + local component=$1 + local archive=$2 + printf 'Move the archive manually, for example:\n scp %s user@remote:\nThen on the target host run:\n scripts/state_backup.sh import %s %s [--config ]\n' "$archive" "$component" "$(basename "$archive")" +} abci_export_state() { - local archive=${1:-drive_abci_state_$(abci_timestamp).tar.gz} local cfg=$(abci_resolve_config "${2:-}") + local archive=${1:-drive_abci_state_${cfg}_$(timestamp).tar.gz} local volume volume=$(abci_resolve_volume "$cfg") local dir=$(dirname "$archive") file=$(basename "$archive") mkdir -p "$dir" docker run --rm -v "${volume}:/data:ro" -v "$dir:/out" busybox:1.36 sh -c "cd /data && tar cz --numeric-owner -f /out/$file ." echo "$archive" - abci_transfer_help >&2 + transfer_help "abci" "$archive" >&2 } abci_import_state() { local archive=${1:?archive required} @@ -40,22 +63,21 @@ abci_import_state() { docker run --rm -v "${volume}:/data" busybox:1.36 sh -c 'rm -rf /data/*' docker run --rm -v "${volume}:/data" -v "$dir:/in:ro" busybox:1.36 sh -c "cd /data && tar xzp -f /in/$file" } -abci_transfer_help() { printf 'Move the archive manually, for example:\n scp drive_abci_state_.tar.gz user@remote:/path\nThen on the target host run:\n scripts/transfer_drive_abci_state.sh import /path/drive_abci_state_.tar.gz [config] --component abci\n'; } tenderdash_resolve_volume() { local cfg=$1 - local project=$(${DASHMATE_BIN} config envs --config "$cfg" | awk -F= '$1=="COMPOSE_PROJECT_NAME"{print $2}') + local project=$("${DASHMATE_CMD[@]}" config envs --config "$cfg" | awk -F= '$1=="COMPOSE_PROJECT_NAME"{print $2}') echo "${project}_${TENDERDASH_VOLUME_SUFFIX:-drive_tenderdash}" } tenderdash_export_state() { - local archive=${1:-tenderdash_state_$(abci_timestamp).tar.gz} local cfg=$(abci_resolve_config "${2:-}") + local archive=${1:-tenderdash_state_${cfg}_$(timestamp).tar.gz} local volume volume=$(tenderdash_resolve_volume "$cfg") local dir=$(dirname "$archive") file=$(basename "$archive") mkdir -p "$dir" docker run --rm -v "${volume}:/tenderdash:ro" -v "$dir:/out" busybox:1.36 sh -c "set -e; cd /tenderdash; for f in data/blockstore.db data/evidence.db data/state.db data/tx_index.db; do [ -e \"\$f\" ] || { echo \"missing \$f\" >&2; exit 1; }; done; tar cz --numeric-owner -f /out/$file data/blockstore.db data/evidence.db data/state.db data/tx_index.db" echo "$archive" - tenderdash_transfer_help >&2 + transfer_help "tenderdash" "$archive" >&2 } tenderdash_import_state() { local archive=${1:?archive required} @@ -71,48 +93,73 @@ tenderdash_import_state() { docker run --rm -v "${volume}:/tenderdash" busybox:1.36 sh -c 'set -e; mkdir -p /tenderdash/data; rm -rf /tenderdash/data/blockstore.db /tenderdash/data/evidence.db /tenderdash/data/state.db /tenderdash/data/tx_index.db' docker run --rm -v "${volume}:/tenderdash" -v "$dir:/in:ro" busybox:1.36 sh -c "cd /tenderdash && tar xzp -f /in/$file" } -tenderdash_transfer_help() { printf 'Move the archive manually, for example:\n scp tenderdash_state_.tar.gz user@remote:/path\nThen on the target host run:\n scripts/transfer_drive_abci_state.sh import /path/tenderdash_state_.tar.gz [config] --component tenderdash\n'; } cmd=${1:-} +component=${2:-} [ -n "$cmd" ] || abci_usage -shift || true -component="" -rest=() +[ -n "$component" ] || abci_usage +shift 2 || true + +archive="" +config="" +dashmate="" while [ $# -gt 0 ]; do case $1 in - --component) - if [ $# -lt 2 ]; then - echo "Missing value for --component" >&2 - exit 1 - fi - component=${2:-} + --config) + [ $# -ge 2 ] || { echo "Missing value for --config" >&2; exit 1; } + config=$2 shift 2 ;; - --component=*) - component=${1#*=} + --config=*) + config=${1#*=} shift ;; - *) - rest+=("$1") + --dashmate) + [ $# -ge 2 ] || { echo "Missing value for --dashmate" >&2; exit 1; } + dashmate=$2 + shift 2 + ;; + --dashmate=*) + dashmate=${1#*=} shift ;; + -h|--help) + abci_usage + ;; + *) + if [ -z "$archive" ]; then + archive=$1 + shift + else + echo "Unexpected argument: $1" >&2 + exit 1 + fi + ;; esac done -set -- "${rest[@]}" -if [ -z "$component" ]; then - abci_usage + +if [ -n "$dashmate" ]; then + DASHMATE_CMD_RAW=$dashmate + read -r -a DASHMATE_CMD <<<"$DASHMATE_CMD_RAW" fi + case $component in abci) case $cmd in - export) abci_export_state "${1:-}" "${2:-}" ;; - import) abci_import_state "${1:-}" "${2:-}" ;; + export) abci_export_state "${archive:-}" "${config:-}" ;; + import) + [ -n "$archive" ] || { echo "archive is required for import" >&2; exit 1; } + abci_import_state "$archive" "${config:-}" + ;; *) abci_usage ;; esac ;; tenderdash) case $cmd in - export) tenderdash_export_state "${1:-}" "${2:-}" ;; - import) tenderdash_import_state "${1:-}" "${2:-}" ;; + export) tenderdash_export_state "${archive:-}" "${config:-}" ;; + import) + [ -n "$archive" ] || { echo "archive is required for import" >&2; exit 1; } + tenderdash_import_state "$archive" "${config:-}" + ;; *) abci_usage ;; esac ;; From 98bfcfdcecf8c4182cc9a4c8739c389dd20c4515 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:52:18 +0100 Subject: [PATCH 24/25] build: grovedb v4.0.0 --- Cargo.lock | 40 ++++++++++++------------- packages/rs-drive-abci/Cargo.toml | 2 +- packages/rs-drive/Cargo.toml | 12 ++++---- packages/rs-platform-version/Cargo.toml | 2 +- 4 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 25e2723a492..709a3d84b74 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2484,8 +2484,8 @@ dependencies = [ [[package]] name = "grovedb" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "axum 0.8.8", "bincode 2.0.0-rc.3", @@ -2517,8 +2517,8 @@ dependencies = [ [[package]] name = "grovedb-costs" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "integer-encoding", "intmap", @@ -2527,8 +2527,8 @@ dependencies = [ [[package]] name = "grovedb-element" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "bincode 2.0.0-rc.3", "bincode_derive", @@ -2542,8 +2542,8 @@ dependencies = [ [[package]] name = "grovedb-epoch-based-storage-flags" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "grovedb-costs", "hex", @@ -2554,8 +2554,8 @@ dependencies = [ [[package]] name = "grovedb-merk" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "bincode 2.0.0-rc.3", "bincode_derive", @@ -2579,16 +2579,16 @@ dependencies = [ [[package]] name = "grovedb-path" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "hex", ] [[package]] name = "grovedb-storage" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "blake3", "grovedb-costs", @@ -2606,8 +2606,8 @@ dependencies = [ [[package]] name = "grovedb-version" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "thiserror 2.0.17", "versioned-feature-core 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2615,8 +2615,8 @@ dependencies = [ [[package]] name = "grovedb-visualize" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "hex", "itertools 0.14.0", @@ -2624,8 +2624,8 @@ dependencies = [ [[package]] name = "grovedbg-types" -version = "3.1.0" -source = "git+https://github.com/dashpay/grovedb?rev=83a8fe5b64a92fe25cb550f9e448b16345d920e9#83a8fe5b64a92fe25cb550f9e448b16345d920e9" +version = "4.0.0" +source = "git+https://github.com/dashpay/grovedb?tag=v4.0.0#9d63f129096a829db6a5ce75aa28ba31880a5c27" dependencies = [ "serde", "serde_with 3.16.1", diff --git a/packages/rs-drive-abci/Cargo.toml b/packages/rs-drive-abci/Cargo.toml index df74d316b1a..a45bac67174 100644 --- a/packages/rs-drive-abci/Cargo.toml +++ b/packages/rs-drive-abci/Cargo.toml @@ -110,7 +110,7 @@ dash-platform-macros = { path = "../rs-dash-platform-macros" } libc = "0.2" # For tests of grovedb verify -rocksdb = { version = "0.24.0" } +rocksdb = { git = "https://github.com/QuantumExplorer/rust-rocksdb.git", rev = "52772eea7bcd214d1d07d80aa538b1d24e5015b7" } integer-encoding = { version = "4.0.0" } [features] diff --git a/packages/rs-drive/Cargo.toml b/packages/rs-drive/Cargo.toml index bf629721603..ca2ac82c250 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 = "83a8fe5b64a92fe25cb550f9e448b16345d920e9", optional = true, default-features = false } -grovedb-costs = { git = "https://github.com/dashpay/grovedb", rev = "83a8fe5b64a92fe25cb550f9e448b16345d920e9", optional = true } -grovedb-path = { git = "https://github.com/dashpay/grovedb", rev = "83a8fe5b64a92fe25cb550f9e448b16345d920e9" } -grovedb-storage = { git = "https://github.com/dashpay/grovedb", rev = "83a8fe5b64a92fe25cb550f9e448b16345d920e9", optional = true } -grovedb-version = { git = "https://github.com/dashpay/grovedb", rev = "83a8fe5b64a92fe25cb550f9e448b16345d920e9" } -grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", rev = "83a8fe5b64a92fe25cb550f9e448b16345d920e9" } +grovedb = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0", optional = true, default-features = false } +grovedb-costs = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0", optional = true } +grovedb-path = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0" } +grovedb-storage = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0", optional = true } +grovedb-version = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0" } +grovedb-epoch-based-storage-flags = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0" } [dev-dependencies] criterion = "0.5" diff --git a/packages/rs-platform-version/Cargo.toml b/packages/rs-platform-version/Cargo.toml index 435e98ba7af..398f70e70a0 100644 --- a/packages/rs-platform-version/Cargo.toml +++ b/packages/rs-platform-version/Cargo.toml @@ -11,7 +11,7 @@ license = "MIT" thiserror = { version = "2.0.12" } 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 = "83a8fe5b64a92fe25cb550f9e448b16345d920e9" } +grovedb-version = { git = "https://github.com/dashpay/grovedb", tag = "v4.0.0" } once_cell = "1.19.0" [features] From 928dbfde638f2d538e763a4f3f64be4b637613c9 Mon Sep 17 00:00:00 2001 From: Lukasz Klimek <842586+lklimek@users.noreply.github.com> Date: Tue, 6 Jan 2026 13:56:50 +0100 Subject: [PATCH 25/25] chore: update protobuf files --- .../clients/drive/v0/nodejs/drive_pbjs.js | 3168 ++++++++++++++++ .../dash/platform/dapi/v0/PlatformGrpc.java | 148 + .../platform/v0/nodejs/platform_pbjs.js | 3168 ++++++++++++++++ .../platform/v0/nodejs/platform_protoc.js | 3201 ++++++++++++++++- .../platform/v0/objective-c/Platform.pbobjc.h | 301 ++ .../platform/v0/objective-c/Platform.pbobjc.m | 816 +++++ .../platform/v0/objective-c/Platform.pbrpc.h | 26 + .../platform/v0/objective-c/Platform.pbrpc.m | 40 + .../platform/v0/python/platform_pb2.py | 776 +++- .../platform/v0/python/platform_pb2_grpc.py | 66 + .../clients/platform/v0/web/platform_pb.d.ts | 387 ++ .../clients/platform/v0/web/platform_pb.js | 3201 ++++++++++++++++- .../platform/v0/web/platform_pb_service.d.ts | 38 + .../platform/v0/web/platform_pb_service.js | 80 + 14 files changed, 15093 insertions(+), 323 deletions(-) diff --git a/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js b/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js index 71b24b510a3..712285d7841 100644 --- a/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js +++ b/packages/dapi-grpc/clients/drive/v0/nodejs/drive_pbjs.js @@ -2277,6 +2277,72 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getRecentAddressBalanceChanges}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getRecentAddressBalanceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} [response] GetRecentAddressBalanceChangesResponse + */ + + /** + * Calls getRecentAddressBalanceChanges. + * @function getRecentAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} request GetRecentAddressBalanceChangesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getRecentAddressBalanceChangesCallback} callback Node-style callback called with the error, if any, and GetRecentAddressBalanceChangesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getRecentAddressBalanceChanges = function getRecentAddressBalanceChanges(request, callback) { + return this.rpcCall(getRecentAddressBalanceChanges, $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest, $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse, request, callback); + }, "name", { value: "getRecentAddressBalanceChanges" }); + + /** + * Calls getRecentAddressBalanceChanges. + * @function getRecentAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} request GetRecentAddressBalanceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getRecentCompactedAddressBalanceChanges}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getRecentCompactedAddressBalanceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} [response] GetRecentCompactedAddressBalanceChangesResponse + */ + + /** + * Calls getRecentCompactedAddressBalanceChanges. + * @function getRecentCompactedAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} request GetRecentCompactedAddressBalanceChangesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getRecentCompactedAddressBalanceChangesCallback} callback Node-style callback called with the error, if any, and GetRecentCompactedAddressBalanceChangesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getRecentCompactedAddressBalanceChanges = function getRecentCompactedAddressBalanceChanges(request, callback) { + return this.rpcCall(getRecentCompactedAddressBalanceChanges, $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest, $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse, request, callback); + }, "name", { value: "getRecentCompactedAddressBalanceChanges" }); + + /** + * Calls getRecentCompactedAddressBalanceChanges. + * @function getRecentCompactedAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} request GetRecentCompactedAddressBalanceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Platform; })(); @@ -75700,6 +75766,744 @@ $root.org = (function() { return AddressInfoEntries; })(); + v0.AddressBalanceChange = (function() { + + /** + * Properties of an AddressBalanceChange. + * @memberof org.dash.platform.dapi.v0 + * @interface IAddressBalanceChange + * @property {Uint8Array|null} [address] AddressBalanceChange address + * @property {number|Long|null} [setBalance] AddressBalanceChange setBalance + * @property {number|Long|null} [addToBalance] AddressBalanceChange addToBalance + */ + + /** + * Constructs a new AddressBalanceChange. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents an AddressBalanceChange. + * @implements IAddressBalanceChange + * @constructor + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange=} [properties] Properties to set + */ + function AddressBalanceChange(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]]; + } + + /** + * AddressBalanceChange address. + * @member {Uint8Array} address + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + AddressBalanceChange.prototype.address = $util.newBuffer([]); + + /** + * AddressBalanceChange setBalance. + * @member {number|Long} setBalance + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + AddressBalanceChange.prototype.setBalance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * AddressBalanceChange addToBalance. + * @member {number|Long} addToBalance + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + AddressBalanceChange.prototype.addToBalance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddressBalanceChange operation. + * @member {"setBalance"|"addToBalance"|undefined} operation + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + Object.defineProperty(AddressBalanceChange.prototype, "operation", { + get: $util.oneOfGetter($oneOfFields = ["setBalance", "addToBalance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddressBalanceChange instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.AddressBalanceChange} AddressBalanceChange instance + */ + AddressBalanceChange.create = function create(properties) { + return new AddressBalanceChange(properties); + }; + + /** + * Encodes the specified AddressBalanceChange message. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceChange.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange} message AddressBalanceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.setBalance != null && Object.hasOwnProperty.call(message, "setBalance")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.setBalance); + if (message.addToBalance != null && Object.hasOwnProperty.call(message, "addToBalance")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.addToBalance); + return writer; + }; + + /** + * Encodes the specified AddressBalanceChange message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceChange.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange} message AddressBalanceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressBalanceChange message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @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.AddressBalanceChange} AddressBalanceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceChange.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.AddressBalanceChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.setBalance = reader.uint64(); + break; + case 3: + message.addToBalance = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressBalanceChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.AddressBalanceChange} AddressBalanceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressBalanceChange message. + * @function verify + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressBalanceChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.setBalance != null && message.hasOwnProperty("setBalance")) { + properties.operation = 1; + if (!$util.isInteger(message.setBalance) && !(message.setBalance && $util.isInteger(message.setBalance.low) && $util.isInteger(message.setBalance.high))) + return "setBalance: integer|Long expected"; + } + if (message.addToBalance != null && message.hasOwnProperty("addToBalance")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + if (!$util.isInteger(message.addToBalance) && !(message.addToBalance && $util.isInteger(message.addToBalance.low) && $util.isInteger(message.addToBalance.high))) + return "addToBalance: integer|Long expected"; + } + return null; + }; + + /** + * Creates an AddressBalanceChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.AddressBalanceChange} AddressBalanceChange + */ + AddressBalanceChange.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.AddressBalanceChange) + return object; + var message = new $root.org.dash.platform.dapi.v0.AddressBalanceChange(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length >= 0) + message.address = object.address; + if (object.setBalance != null) + if ($util.Long) + (message.setBalance = $util.Long.fromValue(object.setBalance)).unsigned = true; + else if (typeof object.setBalance === "string") + message.setBalance = parseInt(object.setBalance, 10); + else if (typeof object.setBalance === "number") + message.setBalance = object.setBalance; + else if (typeof object.setBalance === "object") + message.setBalance = new $util.LongBits(object.setBalance.low >>> 0, object.setBalance.high >>> 0).toNumber(true); + if (object.addToBalance != null) + if ($util.Long) + (message.addToBalance = $util.Long.fromValue(object.addToBalance)).unsigned = true; + else if (typeof object.addToBalance === "string") + message.addToBalance = parseInt(object.addToBalance, 10); + else if (typeof object.addToBalance === "number") + message.addToBalance = object.addToBalance; + else if (typeof object.addToBalance === "object") + message.addToBalance = new $util.LongBits(object.addToBalance.low >>> 0, object.addToBalance.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an AddressBalanceChange message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.AddressBalanceChange} message AddressBalanceChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressBalanceChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.setBalance != null && message.hasOwnProperty("setBalance")) { + if (typeof message.setBalance === "number") + object.setBalance = options.longs === String ? String(message.setBalance) : message.setBalance; + else + object.setBalance = options.longs === String ? $util.Long.prototype.toString.call(message.setBalance) : options.longs === Number ? new $util.LongBits(message.setBalance.low >>> 0, message.setBalance.high >>> 0).toNumber(true) : message.setBalance; + if (options.oneofs) + object.operation = "setBalance"; + } + if (message.addToBalance != null && message.hasOwnProperty("addToBalance")) { + if (typeof message.addToBalance === "number") + object.addToBalance = options.longs === String ? String(message.addToBalance) : message.addToBalance; + else + object.addToBalance = options.longs === String ? $util.Long.prototype.toString.call(message.addToBalance) : options.longs === Number ? new $util.LongBits(message.addToBalance.low >>> 0, message.addToBalance.high >>> 0).toNumber(true) : message.addToBalance; + if (options.oneofs) + object.operation = "addToBalance"; + } + return object; + }; + + /** + * Converts this AddressBalanceChange to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + * @returns {Object.} JSON object + */ + AddressBalanceChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddressBalanceChange; + })(); + + v0.BlockAddressBalanceChanges = (function() { + + /** + * Properties of a BlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @interface IBlockAddressBalanceChanges + * @property {number|Long|null} [blockHeight] BlockAddressBalanceChanges blockHeight + * @property {Array.|null} [changes] BlockAddressBalanceChanges changes + */ + + /** + * Constructs a new BlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a BlockAddressBalanceChanges. + * @implements IBlockAddressBalanceChanges + * @constructor + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges=} [properties] Properties to set + */ + function BlockAddressBalanceChanges(properties) { + this.changes = []; + 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]]; + } + + /** + * BlockAddressBalanceChanges blockHeight. + * @member {number|Long} blockHeight + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @instance + */ + BlockAddressBalanceChanges.prototype.blockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BlockAddressBalanceChanges changes. + * @member {Array.} changes + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @instance + */ + BlockAddressBalanceChanges.prototype.changes = $util.emptyArray; + + /** + * Creates a new BlockAddressBalanceChanges instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} BlockAddressBalanceChanges instance + */ + BlockAddressBalanceChanges.create = function create(properties) { + return new BlockAddressBalanceChanges(properties); + }; + + /** + * Encodes the specified BlockAddressBalanceChanges message. Does not implicitly {@link org.dash.platform.dapi.v0.BlockAddressBalanceChanges.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges} message BlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockAddressBalanceChanges.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockHeight != null && Object.hasOwnProperty.call(message, "blockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.blockHeight); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.org.dash.platform.dapi.v0.AddressBalanceChange.encode(message.changes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlockAddressBalanceChanges message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.BlockAddressBalanceChanges.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges} message BlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockAddressBalanceChanges.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockAddressBalanceChanges message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @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.BlockAddressBalanceChanges} BlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockAddressBalanceChanges.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.BlockAddressBalanceChanges(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockHeight = reader.uint64(); + break; + case 2: + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.org.dash.platform.dapi.v0.AddressBalanceChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockAddressBalanceChanges message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} BlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockAddressBalanceChanges.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockAddressBalanceChanges message. + * @function verify + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockAddressBalanceChanges.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (!$util.isInteger(message.blockHeight) && !(message.blockHeight && $util.isInteger(message.blockHeight.low) && $util.isInteger(message.blockHeight.high))) + return "blockHeight: integer|Long expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.AddressBalanceChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a BlockAddressBalanceChanges message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} BlockAddressBalanceChanges + */ + BlockAddressBalanceChanges.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges) + return object; + var message = new $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges(); + if (object.blockHeight != null) + if ($util.Long) + (message.blockHeight = $util.Long.fromValue(object.blockHeight)).unsigned = true; + else if (typeof object.blockHeight === "string") + message.blockHeight = parseInt(object.blockHeight, 10); + else if (typeof object.blockHeight === "number") + message.blockHeight = object.blockHeight; + else if (typeof object.blockHeight === "object") + message.blockHeight = new $util.LongBits(object.blockHeight.low >>> 0, object.blockHeight.high >>> 0).toNumber(true); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".org.dash.platform.dapi.v0.BlockAddressBalanceChanges.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.BlockAddressBalanceChanges.changes: object expected"); + message.changes[i] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BlockAddressBalanceChanges message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} message BlockAddressBalanceChanges + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockAddressBalanceChanges.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.blockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockHeight = options.longs === String ? "0" : 0; + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (typeof message.blockHeight === "number") + object.blockHeight = options.longs === String ? String(message.blockHeight) : message.blockHeight; + else + object.blockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.blockHeight) : options.longs === Number ? new $util.LongBits(message.blockHeight.low >>> 0, message.blockHeight.high >>> 0).toNumber(true) : message.blockHeight; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this BlockAddressBalanceChanges to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @instance + * @returns {Object.} JSON object + */ + BlockAddressBalanceChanges.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockAddressBalanceChanges; + })(); + + v0.AddressBalanceUpdateEntries = (function() { + + /** + * Properties of an AddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @interface IAddressBalanceUpdateEntries + * @property {Array.|null} [blockChanges] AddressBalanceUpdateEntries blockChanges + */ + + /** + * Constructs a new AddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents an AddressBalanceUpdateEntries. + * @implements IAddressBalanceUpdateEntries + * @constructor + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries=} [properties] Properties to set + */ + function AddressBalanceUpdateEntries(properties) { + this.blockChanges = []; + 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]]; + } + + /** + * AddressBalanceUpdateEntries blockChanges. + * @member {Array.} blockChanges + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @instance + */ + AddressBalanceUpdateEntries.prototype.blockChanges = $util.emptyArray; + + /** + * Creates a new AddressBalanceUpdateEntries instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries instance + */ + AddressBalanceUpdateEntries.create = function create(properties) { + return new AddressBalanceUpdateEntries(properties); + }; + + /** + * Encodes the specified AddressBalanceUpdateEntries message. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries} message AddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceUpdateEntries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockChanges != null && message.blockChanges.length) + for (var i = 0; i < message.blockChanges.length; ++i) + $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.encode(message.blockChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddressBalanceUpdateEntries message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries} message AddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceUpdateEntries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressBalanceUpdateEntries message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @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.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceUpdateEntries.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.AddressBalanceUpdateEntries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.blockChanges && message.blockChanges.length)) + message.blockChanges = []; + message.blockChanges.push($root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressBalanceUpdateEntries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceUpdateEntries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressBalanceUpdateEntries message. + * @function verify + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressBalanceUpdateEntries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockChanges != null && message.hasOwnProperty("blockChanges")) { + if (!Array.isArray(message.blockChanges)) + return "blockChanges: array expected"; + for (var i = 0; i < message.blockChanges.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.verify(message.blockChanges[i]); + if (error) + return "blockChanges." + error; + } + } + return null; + }; + + /** + * Creates an AddressBalanceUpdateEntries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries + */ + AddressBalanceUpdateEntries.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries) + return object; + var message = new $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries(); + if (object.blockChanges) { + if (!Array.isArray(object.blockChanges)) + throw TypeError(".org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.blockChanges: array expected"); + message.blockChanges = []; + for (var i = 0; i < object.blockChanges.length; ++i) { + if (typeof object.blockChanges[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.blockChanges: object expected"); + message.blockChanges[i] = $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.fromObject(object.blockChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AddressBalanceUpdateEntries message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} message AddressBalanceUpdateEntries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressBalanceUpdateEntries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.blockChanges = []; + if (message.blockChanges && message.blockChanges.length) { + object.blockChanges = []; + for (var j = 0; j < message.blockChanges.length; ++j) + object.blockChanges[j] = $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.toObject(message.blockChanges[j], options); + } + return object; + }; + + /** + * Converts this AddressBalanceUpdateEntries to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @instance + * @returns {Object.} JSON object + */ + AddressBalanceUpdateEntries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddressBalanceUpdateEntries; + })(); + v0.GetAddressInfoResponse = (function() { /** @@ -78126,6 +78930,7 @@ $root.org = (function() { * @interface IGetAddressesBranchStateRequestV0 * @property {Uint8Array|null} [key] GetAddressesBranchStateRequestV0 key * @property {number|null} [depth] GetAddressesBranchStateRequestV0 depth + * @property {number|Long|null} [checkpointHeight] GetAddressesBranchStateRequestV0 checkpointHeight */ /** @@ -78159,6 +78964,14 @@ $root.org = (function() { */ GetAddressesBranchStateRequestV0.prototype.depth = 0; + /** + * GetAddressesBranchStateRequestV0 checkpointHeight. + * @member {number|Long} checkpointHeight + * @memberof org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0 + * @instance + */ + GetAddressesBranchStateRequestV0.prototype.checkpointHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** * Creates a new GetAddressesBranchStateRequestV0 instance using the specified properties. * @function create @@ -78187,6 +79000,8 @@ $root.org = (function() { writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); if (message.depth != null && Object.hasOwnProperty.call(message, "depth")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.depth); + if (message.checkpointHeight != null && Object.hasOwnProperty.call(message, "checkpointHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.checkpointHeight); return writer; }; @@ -78227,6 +79042,9 @@ $root.org = (function() { case 2: message.depth = reader.uint32(); break; + case 3: + message.checkpointHeight = reader.uint64(); + break; default: reader.skipType(tag & 7); break; @@ -78268,6 +79086,9 @@ $root.org = (function() { if (message.depth != null && message.hasOwnProperty("depth")) if (!$util.isInteger(message.depth)) return "depth: integer expected"; + if (message.checkpointHeight != null && message.hasOwnProperty("checkpointHeight")) + if (!$util.isInteger(message.checkpointHeight) && !(message.checkpointHeight && $util.isInteger(message.checkpointHeight.low) && $util.isInteger(message.checkpointHeight.high))) + return "checkpointHeight: integer|Long expected"; return null; }; @@ -78290,6 +79111,15 @@ $root.org = (function() { message.key = object.key; if (object.depth != null) message.depth = object.depth >>> 0; + if (object.checkpointHeight != null) + if ($util.Long) + (message.checkpointHeight = $util.Long.fromValue(object.checkpointHeight)).unsigned = true; + else if (typeof object.checkpointHeight === "string") + message.checkpointHeight = parseInt(object.checkpointHeight, 10); + else if (typeof object.checkpointHeight === "number") + message.checkpointHeight = object.checkpointHeight; + else if (typeof object.checkpointHeight === "object") + message.checkpointHeight = new $util.LongBits(object.checkpointHeight.low >>> 0, object.checkpointHeight.high >>> 0).toNumber(true); return message; }; @@ -78315,11 +79145,21 @@ $root.org = (function() { object.key = $util.newBuffer(object.key); } object.depth = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.checkpointHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.checkpointHeight = options.longs === String ? "0" : 0; } if (message.key != null && message.hasOwnProperty("key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; if (message.depth != null && message.hasOwnProperty("depth")) object.depth = message.depth; + if (message.checkpointHeight != null && message.hasOwnProperty("checkpointHeight")) + if (typeof message.checkpointHeight === "number") + object.checkpointHeight = options.longs === String ? String(message.checkpointHeight) : message.checkpointHeight; + else + object.checkpointHeight = options.longs === String ? $util.Long.prototype.toString.call(message.checkpointHeight) : options.longs === Number ? new $util.LongBits(message.checkpointHeight.low >>> 0, message.checkpointHeight.high >>> 0).toNumber(true) : message.checkpointHeight; return object; }; @@ -78747,6 +79587,2334 @@ $root.org = (function() { return GetAddressesBranchStateResponse; })(); + v0.GetRecentAddressBalanceChangesRequest = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentAddressBalanceChangesRequest + * @property {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0|null} [v0] GetRecentAddressBalanceChangesRequest v0 + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentAddressBalanceChangesRequest. + * @implements IGetRecentAddressBalanceChangesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesRequest(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]]; + } + + /** + * GetRecentAddressBalanceChangesRequest v0. + * @member {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @instance + */ + GetRecentAddressBalanceChangesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentAddressBalanceChangesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @instance + */ + Object.defineProperty(GetRecentAddressBalanceChangesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentAddressBalanceChangesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest instance + */ + GetRecentAddressBalanceChangesRequest.create = function create(properties) { + return new GetRecentAddressBalanceChangesRequest(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} message GetRecentAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} message GetRecentAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @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.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentAddressBalanceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest + */ + GetRecentAddressBalanceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} message GetRecentAddressBalanceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentAddressBalanceChangesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @interface IGetRecentAddressBalanceChangesRequestV0 + * @property {number|Long|null} [startHeight] GetRecentAddressBalanceChangesRequestV0 startHeight + * @property {boolean|null} [prove] GetRecentAddressBalanceChangesRequestV0 prove + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @classdesc Represents a GetRecentAddressBalanceChangesRequestV0. + * @implements IGetRecentAddressBalanceChangesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesRequestV0(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]]; + } + + /** + * GetRecentAddressBalanceChangesRequestV0 startHeight. + * @member {number|Long} startHeight + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentAddressBalanceChangesRequestV0.prototype.startHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetRecentAddressBalanceChangesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentAddressBalanceChangesRequestV0.prototype.prove = false; + + /** + * Creates a new GetRecentAddressBalanceChangesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 instance + */ + GetRecentAddressBalanceChangesRequestV0.create = function create(properties) { + return new GetRecentAddressBalanceChangesRequestV0(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0} message GetRecentAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startHeight != null && Object.hasOwnProperty.call(message, "startHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startHeight); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0} message GetRecentAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startHeight = reader.uint64(); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (!$util.isInteger(message.startHeight) && !(message.startHeight && $util.isInteger(message.startHeight.low) && $util.isInteger(message.startHeight.high))) + return "startHeight: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetRecentAddressBalanceChangesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 + */ + GetRecentAddressBalanceChangesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0(); + if (object.startHeight != null) + if ($util.Long) + (message.startHeight = $util.Long.fromValue(object.startHeight)).unsigned = true; + else if (typeof object.startHeight === "string") + message.startHeight = parseInt(object.startHeight, 10); + else if (typeof object.startHeight === "number") + message.startHeight = object.startHeight; + else if (typeof object.startHeight === "object") + message.startHeight = new $util.LongBits(object.startHeight.low >>> 0, object.startHeight.high >>> 0).toNumber(true); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} message GetRecentAddressBalanceChangesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesRequestV0.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.startHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startHeight = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (typeof message.startHeight === "number") + object.startHeight = options.longs === String ? String(message.startHeight) : message.startHeight; + else + object.startHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startHeight) : options.longs === Number ? new $util.LongBits(message.startHeight.low >>> 0, message.startHeight.high >>> 0).toNumber(true) : message.startHeight; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetRecentAddressBalanceChangesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentAddressBalanceChangesRequestV0; + })(); + + return GetRecentAddressBalanceChangesRequest; + })(); + + v0.GetRecentAddressBalanceChangesResponse = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentAddressBalanceChangesResponse + * @property {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0|null} [v0] GetRecentAddressBalanceChangesResponse v0 + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentAddressBalanceChangesResponse. + * @implements IGetRecentAddressBalanceChangesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesResponse(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]]; + } + + /** + * GetRecentAddressBalanceChangesResponse v0. + * @member {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @instance + */ + GetRecentAddressBalanceChangesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentAddressBalanceChangesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @instance + */ + Object.defineProperty(GetRecentAddressBalanceChangesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentAddressBalanceChangesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse instance + */ + GetRecentAddressBalanceChangesResponse.create = function create(properties) { + return new GetRecentAddressBalanceChangesResponse(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse} message GetRecentAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse} message GetRecentAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @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.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentAddressBalanceChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentAddressBalanceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse + */ + GetRecentAddressBalanceChangesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} message GetRecentAddressBalanceChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentAddressBalanceChangesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @interface IGetRecentAddressBalanceChangesResponseV0 + * @property {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries|null} [addressBalanceUpdateEntries] GetRecentAddressBalanceChangesResponseV0 addressBalanceUpdateEntries + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetRecentAddressBalanceChangesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetRecentAddressBalanceChangesResponseV0 metadata + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @classdesc Represents a GetRecentAddressBalanceChangesResponseV0. + * @implements IGetRecentAddressBalanceChangesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesResponseV0(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]]; + } + + /** + * GetRecentAddressBalanceChangesResponseV0 addressBalanceUpdateEntries. + * @member {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries|null|undefined} addressBalanceUpdateEntries + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentAddressBalanceChangesResponseV0.prototype.addressBalanceUpdateEntries = null; + + /** + * GetRecentAddressBalanceChangesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentAddressBalanceChangesResponseV0.prototype.proof = null; + + /** + * GetRecentAddressBalanceChangesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentAddressBalanceChangesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentAddressBalanceChangesResponseV0 result. + * @member {"addressBalanceUpdateEntries"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + Object.defineProperty(GetRecentAddressBalanceChangesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["addressBalanceUpdateEntries", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentAddressBalanceChangesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 instance + */ + GetRecentAddressBalanceChangesResponseV0.create = function create(properties) { + return new GetRecentAddressBalanceChangesResponseV0(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0} message GetRecentAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addressBalanceUpdateEntries != null && Object.hasOwnProperty.call(message, "addressBalanceUpdateEntries")) + $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.encode(message.addressBalanceUpdateEntries, 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 GetRecentAddressBalanceChangesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0} message GetRecentAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.addressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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 GetRecentAddressBalanceChangesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.addressBalanceUpdateEntries != null && message.hasOwnProperty("addressBalanceUpdateEntries")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.verify(message.addressBalanceUpdateEntries); + if (error) + return "addressBalanceUpdateEntries." + 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 GetRecentAddressBalanceChangesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 + */ + GetRecentAddressBalanceChangesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0(); + if (object.addressBalanceUpdateEntries != null) { + if (typeof object.addressBalanceUpdateEntries !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.addressBalanceUpdateEntries: object expected"); + message.addressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.fromObject(object.addressBalanceUpdateEntries); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} message GetRecentAddressBalanceChangesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.addressBalanceUpdateEntries != null && message.hasOwnProperty("addressBalanceUpdateEntries")) { + object.addressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.toObject(message.addressBalanceUpdateEntries, options); + if (options.oneofs) + object.result = "addressBalanceUpdateEntries"; + } + 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 GetRecentAddressBalanceChangesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentAddressBalanceChangesResponseV0; + })(); + + return GetRecentAddressBalanceChangesResponse; + })(); + + v0.CompactedBlockAddressBalanceChanges = (function() { + + /** + * Properties of a CompactedBlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @interface ICompactedBlockAddressBalanceChanges + * @property {number|Long|null} [startBlockHeight] CompactedBlockAddressBalanceChanges startBlockHeight + * @property {number|Long|null} [endBlockHeight] CompactedBlockAddressBalanceChanges endBlockHeight + * @property {Array.|null} [changes] CompactedBlockAddressBalanceChanges changes + */ + + /** + * Constructs a new CompactedBlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a CompactedBlockAddressBalanceChanges. + * @implements ICompactedBlockAddressBalanceChanges + * @constructor + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges=} [properties] Properties to set + */ + function CompactedBlockAddressBalanceChanges(properties) { + this.changes = []; + 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]]; + } + + /** + * CompactedBlockAddressBalanceChanges startBlockHeight. + * @member {number|Long} startBlockHeight + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + */ + CompactedBlockAddressBalanceChanges.prototype.startBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CompactedBlockAddressBalanceChanges endBlockHeight. + * @member {number|Long} endBlockHeight + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + */ + CompactedBlockAddressBalanceChanges.prototype.endBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CompactedBlockAddressBalanceChanges changes. + * @member {Array.} changes + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + */ + CompactedBlockAddressBalanceChanges.prototype.changes = $util.emptyArray; + + /** + * Creates a new CompactedBlockAddressBalanceChanges instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges instance + */ + CompactedBlockAddressBalanceChanges.create = function create(properties) { + return new CompactedBlockAddressBalanceChanges(properties); + }; + + /** + * Encodes the specified CompactedBlockAddressBalanceChanges message. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges} message CompactedBlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedBlockAddressBalanceChanges.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startBlockHeight != null && Object.hasOwnProperty.call(message, "startBlockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startBlockHeight); + if (message.endBlockHeight != null && Object.hasOwnProperty.call(message, "endBlockHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.endBlockHeight); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.org.dash.platform.dapi.v0.AddressBalanceChange.encode(message.changes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompactedBlockAddressBalanceChanges message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges} message CompactedBlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedBlockAddressBalanceChanges.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactedBlockAddressBalanceChanges message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @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.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedBlockAddressBalanceChanges.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.CompactedBlockAddressBalanceChanges(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startBlockHeight = reader.uint64(); + break; + case 2: + message.endBlockHeight = reader.uint64(); + break; + case 3: + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.org.dash.platform.dapi.v0.AddressBalanceChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactedBlockAddressBalanceChanges message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedBlockAddressBalanceChanges.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactedBlockAddressBalanceChanges message. + * @function verify + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactedBlockAddressBalanceChanges.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (!$util.isInteger(message.startBlockHeight) && !(message.startBlockHeight && $util.isInteger(message.startBlockHeight.low) && $util.isInteger(message.startBlockHeight.high))) + return "startBlockHeight: integer|Long expected"; + if (message.endBlockHeight != null && message.hasOwnProperty("endBlockHeight")) + if (!$util.isInteger(message.endBlockHeight) && !(message.endBlockHeight && $util.isInteger(message.endBlockHeight.low) && $util.isInteger(message.endBlockHeight.high))) + return "endBlockHeight: integer|Long expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.AddressBalanceChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a CompactedBlockAddressBalanceChanges message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges + */ + CompactedBlockAddressBalanceChanges.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges) + return object; + var message = new $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges(); + if (object.startBlockHeight != null) + if ($util.Long) + (message.startBlockHeight = $util.Long.fromValue(object.startBlockHeight)).unsigned = true; + else if (typeof object.startBlockHeight === "string") + message.startBlockHeight = parseInt(object.startBlockHeight, 10); + else if (typeof object.startBlockHeight === "number") + message.startBlockHeight = object.startBlockHeight; + else if (typeof object.startBlockHeight === "object") + message.startBlockHeight = new $util.LongBits(object.startBlockHeight.low >>> 0, object.startBlockHeight.high >>> 0).toNumber(true); + if (object.endBlockHeight != null) + if ($util.Long) + (message.endBlockHeight = $util.Long.fromValue(object.endBlockHeight)).unsigned = true; + else if (typeof object.endBlockHeight === "string") + message.endBlockHeight = parseInt(object.endBlockHeight, 10); + else if (typeof object.endBlockHeight === "number") + message.endBlockHeight = object.endBlockHeight; + else if (typeof object.endBlockHeight === "object") + message.endBlockHeight = new $util.LongBits(object.endBlockHeight.low >>> 0, object.endBlockHeight.high >>> 0).toNumber(true); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.changes: object expected"); + message.changes[i] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompactedBlockAddressBalanceChanges message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} message CompactedBlockAddressBalanceChanges + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactedBlockAddressBalanceChanges.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.startBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startBlockHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.endBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endBlockHeight = options.longs === String ? "0" : 0; + } + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (typeof message.startBlockHeight === "number") + object.startBlockHeight = options.longs === String ? String(message.startBlockHeight) : message.startBlockHeight; + else + object.startBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startBlockHeight) : options.longs === Number ? new $util.LongBits(message.startBlockHeight.low >>> 0, message.startBlockHeight.high >>> 0).toNumber(true) : message.startBlockHeight; + if (message.endBlockHeight != null && message.hasOwnProperty("endBlockHeight")) + if (typeof message.endBlockHeight === "number") + object.endBlockHeight = options.longs === String ? String(message.endBlockHeight) : message.endBlockHeight; + else + object.endBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.endBlockHeight) : options.longs === Number ? new $util.LongBits(message.endBlockHeight.low >>> 0, message.endBlockHeight.high >>> 0).toNumber(true) : message.endBlockHeight; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this CompactedBlockAddressBalanceChanges to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + * @returns {Object.} JSON object + */ + CompactedBlockAddressBalanceChanges.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactedBlockAddressBalanceChanges; + })(); + + v0.CompactedAddressBalanceUpdateEntries = (function() { + + /** + * Properties of a CompactedAddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @interface ICompactedAddressBalanceUpdateEntries + * @property {Array.|null} [compactedBlockChanges] CompactedAddressBalanceUpdateEntries compactedBlockChanges + */ + + /** + * Constructs a new CompactedAddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a CompactedAddressBalanceUpdateEntries. + * @implements ICompactedAddressBalanceUpdateEntries + * @constructor + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries=} [properties] Properties to set + */ + function CompactedAddressBalanceUpdateEntries(properties) { + this.compactedBlockChanges = []; + 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]]; + } + + /** + * CompactedAddressBalanceUpdateEntries compactedBlockChanges. + * @member {Array.} compactedBlockChanges + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @instance + */ + CompactedAddressBalanceUpdateEntries.prototype.compactedBlockChanges = $util.emptyArray; + + /** + * Creates a new CompactedAddressBalanceUpdateEntries instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries instance + */ + CompactedAddressBalanceUpdateEntries.create = function create(properties) { + return new CompactedAddressBalanceUpdateEntries(properties); + }; + + /** + * Encodes the specified CompactedAddressBalanceUpdateEntries message. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries} message CompactedAddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedAddressBalanceUpdateEntries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compactedBlockChanges != null && message.compactedBlockChanges.length) + for (var i = 0; i < message.compactedBlockChanges.length; ++i) + $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.encode(message.compactedBlockChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompactedAddressBalanceUpdateEntries message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries} message CompactedAddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedAddressBalanceUpdateEntries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactedAddressBalanceUpdateEntries message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @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.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedAddressBalanceUpdateEntries.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.CompactedAddressBalanceUpdateEntries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compactedBlockChanges && message.compactedBlockChanges.length)) + message.compactedBlockChanges = []; + message.compactedBlockChanges.push($root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactedAddressBalanceUpdateEntries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedAddressBalanceUpdateEntries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactedAddressBalanceUpdateEntries message. + * @function verify + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactedAddressBalanceUpdateEntries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compactedBlockChanges != null && message.hasOwnProperty("compactedBlockChanges")) { + if (!Array.isArray(message.compactedBlockChanges)) + return "compactedBlockChanges: array expected"; + for (var i = 0; i < message.compactedBlockChanges.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.verify(message.compactedBlockChanges[i]); + if (error) + return "compactedBlockChanges." + error; + } + } + return null; + }; + + /** + * Creates a CompactedAddressBalanceUpdateEntries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries + */ + CompactedAddressBalanceUpdateEntries.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries) + return object; + var message = new $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries(); + if (object.compactedBlockChanges) { + if (!Array.isArray(object.compactedBlockChanges)) + throw TypeError(".org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.compactedBlockChanges: array expected"); + message.compactedBlockChanges = []; + for (var i = 0; i < object.compactedBlockChanges.length; ++i) { + if (typeof object.compactedBlockChanges[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.compactedBlockChanges: object expected"); + message.compactedBlockChanges[i] = $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.fromObject(object.compactedBlockChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompactedAddressBalanceUpdateEntries message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} message CompactedAddressBalanceUpdateEntries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactedAddressBalanceUpdateEntries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compactedBlockChanges = []; + if (message.compactedBlockChanges && message.compactedBlockChanges.length) { + object.compactedBlockChanges = []; + for (var j = 0; j < message.compactedBlockChanges.length; ++j) + object.compactedBlockChanges[j] = $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.toObject(message.compactedBlockChanges[j], options); + } + return object; + }; + + /** + * Converts this CompactedAddressBalanceUpdateEntries to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @instance + * @returns {Object.} JSON object + */ + CompactedAddressBalanceUpdateEntries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactedAddressBalanceUpdateEntries; + })(); + + v0.GetRecentCompactedAddressBalanceChangesRequest = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentCompactedAddressBalanceChangesRequest + * @property {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0|null} [v0] GetRecentCompactedAddressBalanceChangesRequest v0 + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesRequest. + * @implements IGetRecentCompactedAddressBalanceChangesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesRequest(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesRequest v0. + * @member {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @instance + */ + GetRecentCompactedAddressBalanceChangesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentCompactedAddressBalanceChangesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @instance + */ + Object.defineProperty(GetRecentCompactedAddressBalanceChangesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest instance + */ + GetRecentCompactedAddressBalanceChangesRequest.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesRequest(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} message GetRecentCompactedAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} message GetRecentCompactedAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @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.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentCompactedAddressBalanceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest + */ + GetRecentCompactedAddressBalanceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} message GetRecentCompactedAddressBalanceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentCompactedAddressBalanceChangesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @interface IGetRecentCompactedAddressBalanceChangesRequestV0 + * @property {number|Long|null} [startBlockHeight] GetRecentCompactedAddressBalanceChangesRequestV0 startBlockHeight + * @property {boolean|null} [prove] GetRecentCompactedAddressBalanceChangesRequestV0 prove + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesRequestV0. + * @implements IGetRecentCompactedAddressBalanceChangesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesRequestV0(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesRequestV0 startBlockHeight. + * @member {number|Long} startBlockHeight + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesRequestV0.prototype.startBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetRecentCompactedAddressBalanceChangesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesRequestV0.prototype.prove = false; + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 instance + */ + GetRecentCompactedAddressBalanceChangesRequestV0.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesRequestV0(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0} message GetRecentCompactedAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startBlockHeight != null && Object.hasOwnProperty.call(message, "startBlockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startBlockHeight); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0} message GetRecentCompactedAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startBlockHeight = reader.uint64(); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (!$util.isInteger(message.startBlockHeight) && !(message.startBlockHeight && $util.isInteger(message.startBlockHeight.low) && $util.isInteger(message.startBlockHeight.high))) + return "startBlockHeight: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetRecentCompactedAddressBalanceChangesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 + */ + GetRecentCompactedAddressBalanceChangesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0(); + if (object.startBlockHeight != null) + if ($util.Long) + (message.startBlockHeight = $util.Long.fromValue(object.startBlockHeight)).unsigned = true; + else if (typeof object.startBlockHeight === "string") + message.startBlockHeight = parseInt(object.startBlockHeight, 10); + else if (typeof object.startBlockHeight === "number") + message.startBlockHeight = object.startBlockHeight; + else if (typeof object.startBlockHeight === "object") + message.startBlockHeight = new $util.LongBits(object.startBlockHeight.low >>> 0, object.startBlockHeight.high >>> 0).toNumber(true); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} message GetRecentCompactedAddressBalanceChangesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesRequestV0.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.startBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startBlockHeight = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (typeof message.startBlockHeight === "number") + object.startBlockHeight = options.longs === String ? String(message.startBlockHeight) : message.startBlockHeight; + else + object.startBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startBlockHeight) : options.longs === Number ? new $util.LongBits(message.startBlockHeight.low >>> 0, message.startBlockHeight.high >>> 0).toNumber(true) : message.startBlockHeight; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetRecentCompactedAddressBalanceChangesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentCompactedAddressBalanceChangesRequestV0; + })(); + + return GetRecentCompactedAddressBalanceChangesRequest; + })(); + + v0.GetRecentCompactedAddressBalanceChangesResponse = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentCompactedAddressBalanceChangesResponse + * @property {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0|null} [v0] GetRecentCompactedAddressBalanceChangesResponse v0 + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesResponse. + * @implements IGetRecentCompactedAddressBalanceChangesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesResponse(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesResponse v0. + * @member {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentCompactedAddressBalanceChangesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @instance + */ + Object.defineProperty(GetRecentCompactedAddressBalanceChangesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse instance + */ + GetRecentCompactedAddressBalanceChangesResponse.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesResponse(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse} message GetRecentCompactedAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse} message GetRecentCompactedAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @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.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentCompactedAddressBalanceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse + */ + GetRecentCompactedAddressBalanceChangesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} message GetRecentCompactedAddressBalanceChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentCompactedAddressBalanceChangesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @interface IGetRecentCompactedAddressBalanceChangesResponseV0 + * @property {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries|null} [compactedAddressBalanceUpdateEntries] GetRecentCompactedAddressBalanceChangesResponseV0 compactedAddressBalanceUpdateEntries + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetRecentCompactedAddressBalanceChangesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetRecentCompactedAddressBalanceChangesResponseV0 metadata + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesResponseV0. + * @implements IGetRecentCompactedAddressBalanceChangesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesResponseV0(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 compactedAddressBalanceUpdateEntries. + * @member {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries|null|undefined} compactedAddressBalanceUpdateEntries + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.compactedAddressBalanceUpdateEntries = null; + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.proof = null; + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 result. + * @member {"compactedAddressBalanceUpdateEntries"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + Object.defineProperty(GetRecentCompactedAddressBalanceChangesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["compactedAddressBalanceUpdateEntries", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesResponseV0(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0} message GetRecentCompactedAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compactedAddressBalanceUpdateEntries != null && Object.hasOwnProperty.call(message, "compactedAddressBalanceUpdateEntries")) + $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.encode(message.compactedAddressBalanceUpdateEntries, 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 GetRecentCompactedAddressBalanceChangesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0} message GetRecentCompactedAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.compactedAddressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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 GetRecentCompactedAddressBalanceChangesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.compactedAddressBalanceUpdateEntries != null && message.hasOwnProperty("compactedAddressBalanceUpdateEntries")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.verify(message.compactedAddressBalanceUpdateEntries); + if (error) + return "compactedAddressBalanceUpdateEntries." + 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 GetRecentCompactedAddressBalanceChangesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 + */ + GetRecentCompactedAddressBalanceChangesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0(); + if (object.compactedAddressBalanceUpdateEntries != null) { + if (typeof object.compactedAddressBalanceUpdateEntries !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.compactedAddressBalanceUpdateEntries: object expected"); + message.compactedAddressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.fromObject(object.compactedAddressBalanceUpdateEntries); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} message GetRecentCompactedAddressBalanceChangesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.compactedAddressBalanceUpdateEntries != null && message.hasOwnProperty("compactedAddressBalanceUpdateEntries")) { + object.compactedAddressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.toObject(message.compactedAddressBalanceUpdateEntries, options); + if (options.oneofs) + object.result = "compactedAddressBalanceUpdateEntries"; + } + 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 GetRecentCompactedAddressBalanceChangesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentCompactedAddressBalanceChangesResponseV0; + })(); + + return GetRecentCompactedAddressBalanceChangesResponse; + })(); + return v0; })(); 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 cdd1b1728ed..b7cb841f8e0 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 @@ -1596,6 +1596,68 @@ org.dash.platform.dapi.v0.PlatformOuterClass.GetAddressesBranchStateResponse> ge return getGetAddressesBranchStateMethod; } + private static volatile io.grpc.MethodDescriptor getGetRecentAddressBalanceChangesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getRecentAddressBalanceChanges", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRecentAddressBalanceChangesMethod() { + io.grpc.MethodDescriptor getGetRecentAddressBalanceChangesMethod; + if ((getGetRecentAddressBalanceChangesMethod = PlatformGrpc.getGetRecentAddressBalanceChangesMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetRecentAddressBalanceChangesMethod = PlatformGrpc.getGetRecentAddressBalanceChangesMethod) == null) { + PlatformGrpc.getGetRecentAddressBalanceChangesMethod = getGetRecentAddressBalanceChangesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getRecentAddressBalanceChanges")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getRecentAddressBalanceChanges")) + .build(); + } + } + } + return getGetRecentAddressBalanceChangesMethod; + } + + private static volatile io.grpc.MethodDescriptor getGetRecentCompactedAddressBalanceChangesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "getRecentCompactedAddressBalanceChanges", + requestType = org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest.class, + responseType = org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor getGetRecentCompactedAddressBalanceChangesMethod() { + io.grpc.MethodDescriptor getGetRecentCompactedAddressBalanceChangesMethod; + if ((getGetRecentCompactedAddressBalanceChangesMethod = PlatformGrpc.getGetRecentCompactedAddressBalanceChangesMethod) == null) { + synchronized (PlatformGrpc.class) { + if ((getGetRecentCompactedAddressBalanceChangesMethod = PlatformGrpc.getGetRecentCompactedAddressBalanceChangesMethod) == null) { + PlatformGrpc.getGetRecentCompactedAddressBalanceChangesMethod = getGetRecentCompactedAddressBalanceChangesMethod = + io.grpc.MethodDescriptor.newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "getRecentCompactedAddressBalanceChanges")) + .setSampledToLocalTracing(true) + .setRequestMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest.getDefaultInstance())) + .setResponseMarshaller(io.grpc.protobuf.ProtoUtils.marshaller( + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesResponse.getDefaultInstance())) + .setSchemaDescriptor(new PlatformMethodDescriptorSupplier("getRecentCompactedAddressBalanceChanges")) + .build(); + } + } + } + return getGetRecentCompactedAddressBalanceChangesMethod; + } + /** * Creates a new async stub that supports all call types for the service */ @@ -2016,6 +2078,20 @@ public void getAddressesBranchState(org.dash.platform.dapi.v0.PlatformOuterClass io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetAddressesBranchStateMethod(), responseObserver); } + /** + */ + public void getRecentAddressBalanceChanges(org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRecentAddressBalanceChangesMethod(), responseObserver); + } + + /** + */ + public void getRecentCompactedAddressBalanceChanges(org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetRecentCompactedAddressBalanceChangesMethod(), responseObserver); + } + @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) .addMethod( @@ -2375,6 +2451,20 @@ public void getAddressesBranchState(org.dash.platform.dapi.v0.PlatformOuterClass org.dash.platform.dapi.v0.PlatformOuterClass.GetAddressesBranchStateRequest, org.dash.platform.dapi.v0.PlatformOuterClass.GetAddressesBranchStateResponse>( this, METHODID_GET_ADDRESSES_BRANCH_STATE))) + .addMethod( + getGetRecentAddressBalanceChangesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesResponse>( + this, METHODID_GET_RECENT_ADDRESS_BALANCE_CHANGES))) + .addMethod( + getGetRecentCompactedAddressBalanceChangesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest, + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesResponse>( + this, METHODID_GET_RECENT_COMPACTED_ADDRESS_BALANCE_CHANGES))) .build(); } } @@ -2815,6 +2905,22 @@ public void getAddressesBranchState(org.dash.platform.dapi.v0.PlatformOuterClass io.grpc.stub.ClientCalls.asyncUnaryCall( getChannel().newCall(getGetAddressesBranchStateMethod(), getCallOptions()), request, responseObserver); } + + /** + */ + public void getRecentAddressBalanceChanges(org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRecentAddressBalanceChangesMethod(), getCallOptions()), request, responseObserver); + } + + /** + */ + public void getRecentCompactedAddressBalanceChanges(org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getGetRecentCompactedAddressBalanceChangesMethod(), getCallOptions()), request, responseObserver); + } } /** @@ -3202,6 +3308,20 @@ public org.dash.platform.dapi.v0.PlatformOuterClass.GetAddressesBranchStateRespo return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getGetAddressesBranchStateMethod(), getCallOptions(), request); } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesResponse getRecentAddressBalanceChanges(org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRecentAddressBalanceChangesMethod(), getCallOptions(), request); + } + + /** + */ + public org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesResponse getRecentCompactedAddressBalanceChanges(org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getGetRecentCompactedAddressBalanceChangesMethod(), getCallOptions(), request); + } } /** @@ -3640,6 +3760,22 @@ public com.google.common.util.concurrent.ListenableFuture getRecentAddressBalanceChanges( + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRecentAddressBalanceChangesMethod(), getCallOptions()), request); + } + + /** + */ + public com.google.common.util.concurrent.ListenableFuture getRecentCompactedAddressBalanceChanges( + org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getGetRecentCompactedAddressBalanceChangesMethod(), getCallOptions()), request); + } } private static final int METHODID_BROADCAST_STATE_TRANSITION = 0; @@ -3693,6 +3829,8 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -3915,6 +4053,14 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv serviceImpl.getAddressesBranchState((org.dash.platform.dapi.v0.PlatformOuterClass.GetAddressesBranchStateRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_GET_RECENT_ADDRESS_BALANCE_CHANGES: + serviceImpl.getRecentAddressBalanceChanges((org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentAddressBalanceChangesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GET_RECENT_COMPACTED_ADDRESS_BALANCE_CHANGES: + serviceImpl.getRecentCompactedAddressBalanceChanges((org.dash.platform.dapi.v0.PlatformOuterClass.GetRecentCompactedAddressBalanceChangesRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; default: throw new AssertionError(); } @@ -4027,6 +4173,8 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getGetAddressesInfosMethod()) .addMethod(getGetAddressesTrunkStateMethod()) .addMethod(getGetAddressesBranchStateMethod()) + .addMethod(getGetRecentAddressBalanceChangesMethod()) + .addMethod(getGetRecentCompactedAddressBalanceChangesMethod()) .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 503b12cc507..c2f2de0957a 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_pbjs.js @@ -1769,6 +1769,72 @@ $root.org = (function() { * @variation 2 */ + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getRecentAddressBalanceChanges}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getRecentAddressBalanceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} [response] GetRecentAddressBalanceChangesResponse + */ + + /** + * Calls getRecentAddressBalanceChanges. + * @function getRecentAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} request GetRecentAddressBalanceChangesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getRecentAddressBalanceChangesCallback} callback Node-style callback called with the error, if any, and GetRecentAddressBalanceChangesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getRecentAddressBalanceChanges = function getRecentAddressBalanceChanges(request, callback) { + return this.rpcCall(getRecentAddressBalanceChanges, $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest, $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse, request, callback); + }, "name", { value: "getRecentAddressBalanceChanges" }); + + /** + * Calls getRecentAddressBalanceChanges. + * @function getRecentAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} request GetRecentAddressBalanceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link org.dash.platform.dapi.v0.Platform#getRecentCompactedAddressBalanceChanges}. + * @memberof org.dash.platform.dapi.v0.Platform + * @typedef getRecentCompactedAddressBalanceChangesCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} [response] GetRecentCompactedAddressBalanceChangesResponse + */ + + /** + * Calls getRecentCompactedAddressBalanceChanges. + * @function getRecentCompactedAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} request GetRecentCompactedAddressBalanceChangesRequest message or plain object + * @param {org.dash.platform.dapi.v0.Platform.getRecentCompactedAddressBalanceChangesCallback} callback Node-style callback called with the error, if any, and GetRecentCompactedAddressBalanceChangesResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(Platform.prototype.getRecentCompactedAddressBalanceChanges = function getRecentCompactedAddressBalanceChanges(request, callback) { + return this.rpcCall(getRecentCompactedAddressBalanceChanges, $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest, $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse, request, callback); + }, "name", { value: "getRecentCompactedAddressBalanceChanges" }); + + /** + * Calls getRecentCompactedAddressBalanceChanges. + * @function getRecentCompactedAddressBalanceChanges + * @memberof org.dash.platform.dapi.v0.Platform + * @instance + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} request GetRecentCompactedAddressBalanceChangesRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + return Platform; })(); @@ -75192,6 +75258,744 @@ $root.org = (function() { return AddressInfoEntries; })(); + v0.AddressBalanceChange = (function() { + + /** + * Properties of an AddressBalanceChange. + * @memberof org.dash.platform.dapi.v0 + * @interface IAddressBalanceChange + * @property {Uint8Array|null} [address] AddressBalanceChange address + * @property {number|Long|null} [setBalance] AddressBalanceChange setBalance + * @property {number|Long|null} [addToBalance] AddressBalanceChange addToBalance + */ + + /** + * Constructs a new AddressBalanceChange. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents an AddressBalanceChange. + * @implements IAddressBalanceChange + * @constructor + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange=} [properties] Properties to set + */ + function AddressBalanceChange(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]]; + } + + /** + * AddressBalanceChange address. + * @member {Uint8Array} address + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + AddressBalanceChange.prototype.address = $util.newBuffer([]); + + /** + * AddressBalanceChange setBalance. + * @member {number|Long} setBalance + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + AddressBalanceChange.prototype.setBalance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * AddressBalanceChange addToBalance. + * @member {number|Long} addToBalance + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + AddressBalanceChange.prototype.addToBalance = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AddressBalanceChange operation. + * @member {"setBalance"|"addToBalance"|undefined} operation + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + */ + Object.defineProperty(AddressBalanceChange.prototype, "operation", { + get: $util.oneOfGetter($oneOfFields = ["setBalance", "addToBalance"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AddressBalanceChange instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.AddressBalanceChange} AddressBalanceChange instance + */ + AddressBalanceChange.create = function create(properties) { + return new AddressBalanceChange(properties); + }; + + /** + * Encodes the specified AddressBalanceChange message. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceChange.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange} message AddressBalanceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.address != null && Object.hasOwnProperty.call(message, "address")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.address); + if (message.setBalance != null && Object.hasOwnProperty.call(message, "setBalance")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.setBalance); + if (message.addToBalance != null && Object.hasOwnProperty.call(message, "addToBalance")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.addToBalance); + return writer; + }; + + /** + * Encodes the specified AddressBalanceChange message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceChange.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceChange} message AddressBalanceChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressBalanceChange message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @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.AddressBalanceChange} AddressBalanceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceChange.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.AddressBalanceChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.address = reader.bytes(); + break; + case 2: + message.setBalance = reader.uint64(); + break; + case 3: + message.addToBalance = reader.uint64(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressBalanceChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.AddressBalanceChange} AddressBalanceChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressBalanceChange message. + * @function verify + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressBalanceChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.address != null && message.hasOwnProperty("address")) + if (!(message.address && typeof message.address.length === "number" || $util.isString(message.address))) + return "address: buffer expected"; + if (message.setBalance != null && message.hasOwnProperty("setBalance")) { + properties.operation = 1; + if (!$util.isInteger(message.setBalance) && !(message.setBalance && $util.isInteger(message.setBalance.low) && $util.isInteger(message.setBalance.high))) + return "setBalance: integer|Long expected"; + } + if (message.addToBalance != null && message.hasOwnProperty("addToBalance")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + if (!$util.isInteger(message.addToBalance) && !(message.addToBalance && $util.isInteger(message.addToBalance.low) && $util.isInteger(message.addToBalance.high))) + return "addToBalance: integer|Long expected"; + } + return null; + }; + + /** + * Creates an AddressBalanceChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.AddressBalanceChange} AddressBalanceChange + */ + AddressBalanceChange.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.AddressBalanceChange) + return object; + var message = new $root.org.dash.platform.dapi.v0.AddressBalanceChange(); + if (object.address != null) + if (typeof object.address === "string") + $util.base64.decode(object.address, message.address = $util.newBuffer($util.base64.length(object.address)), 0); + else if (object.address.length >= 0) + message.address = object.address; + if (object.setBalance != null) + if ($util.Long) + (message.setBalance = $util.Long.fromValue(object.setBalance)).unsigned = true; + else if (typeof object.setBalance === "string") + message.setBalance = parseInt(object.setBalance, 10); + else if (typeof object.setBalance === "number") + message.setBalance = object.setBalance; + else if (typeof object.setBalance === "object") + message.setBalance = new $util.LongBits(object.setBalance.low >>> 0, object.setBalance.high >>> 0).toNumber(true); + if (object.addToBalance != null) + if ($util.Long) + (message.addToBalance = $util.Long.fromValue(object.addToBalance)).unsigned = true; + else if (typeof object.addToBalance === "string") + message.addToBalance = parseInt(object.addToBalance, 10); + else if (typeof object.addToBalance === "number") + message.addToBalance = object.addToBalance; + else if (typeof object.addToBalance === "object") + message.addToBalance = new $util.LongBits(object.addToBalance.low >>> 0, object.addToBalance.high >>> 0).toNumber(true); + return message; + }; + + /** + * Creates a plain object from an AddressBalanceChange message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @static + * @param {org.dash.platform.dapi.v0.AddressBalanceChange} message AddressBalanceChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressBalanceChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + if (options.bytes === String) + object.address = ""; + else { + object.address = []; + if (options.bytes !== Array) + object.address = $util.newBuffer(object.address); + } + if (message.address != null && message.hasOwnProperty("address")) + object.address = options.bytes === String ? $util.base64.encode(message.address, 0, message.address.length) : options.bytes === Array ? Array.prototype.slice.call(message.address) : message.address; + if (message.setBalance != null && message.hasOwnProperty("setBalance")) { + if (typeof message.setBalance === "number") + object.setBalance = options.longs === String ? String(message.setBalance) : message.setBalance; + else + object.setBalance = options.longs === String ? $util.Long.prototype.toString.call(message.setBalance) : options.longs === Number ? new $util.LongBits(message.setBalance.low >>> 0, message.setBalance.high >>> 0).toNumber(true) : message.setBalance; + if (options.oneofs) + object.operation = "setBalance"; + } + if (message.addToBalance != null && message.hasOwnProperty("addToBalance")) { + if (typeof message.addToBalance === "number") + object.addToBalance = options.longs === String ? String(message.addToBalance) : message.addToBalance; + else + object.addToBalance = options.longs === String ? $util.Long.prototype.toString.call(message.addToBalance) : options.longs === Number ? new $util.LongBits(message.addToBalance.low >>> 0, message.addToBalance.high >>> 0).toNumber(true) : message.addToBalance; + if (options.oneofs) + object.operation = "addToBalance"; + } + return object; + }; + + /** + * Converts this AddressBalanceChange to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.AddressBalanceChange + * @instance + * @returns {Object.} JSON object + */ + AddressBalanceChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddressBalanceChange; + })(); + + v0.BlockAddressBalanceChanges = (function() { + + /** + * Properties of a BlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @interface IBlockAddressBalanceChanges + * @property {number|Long|null} [blockHeight] BlockAddressBalanceChanges blockHeight + * @property {Array.|null} [changes] BlockAddressBalanceChanges changes + */ + + /** + * Constructs a new BlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a BlockAddressBalanceChanges. + * @implements IBlockAddressBalanceChanges + * @constructor + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges=} [properties] Properties to set + */ + function BlockAddressBalanceChanges(properties) { + this.changes = []; + 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]]; + } + + /** + * BlockAddressBalanceChanges blockHeight. + * @member {number|Long} blockHeight + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @instance + */ + BlockAddressBalanceChanges.prototype.blockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * BlockAddressBalanceChanges changes. + * @member {Array.} changes + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @instance + */ + BlockAddressBalanceChanges.prototype.changes = $util.emptyArray; + + /** + * Creates a new BlockAddressBalanceChanges instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} BlockAddressBalanceChanges instance + */ + BlockAddressBalanceChanges.create = function create(properties) { + return new BlockAddressBalanceChanges(properties); + }; + + /** + * Encodes the specified BlockAddressBalanceChanges message. Does not implicitly {@link org.dash.platform.dapi.v0.BlockAddressBalanceChanges.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges} message BlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockAddressBalanceChanges.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockHeight != null && Object.hasOwnProperty.call(message, "blockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.blockHeight); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.org.dash.platform.dapi.v0.AddressBalanceChange.encode(message.changes[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified BlockAddressBalanceChanges message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.BlockAddressBalanceChanges.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.IBlockAddressBalanceChanges} message BlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + BlockAddressBalanceChanges.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a BlockAddressBalanceChanges message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @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.BlockAddressBalanceChanges} BlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockAddressBalanceChanges.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.BlockAddressBalanceChanges(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.blockHeight = reader.uint64(); + break; + case 2: + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.org.dash.platform.dapi.v0.AddressBalanceChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a BlockAddressBalanceChanges message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} BlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + BlockAddressBalanceChanges.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a BlockAddressBalanceChanges message. + * @function verify + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + BlockAddressBalanceChanges.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (!$util.isInteger(message.blockHeight) && !(message.blockHeight && $util.isInteger(message.blockHeight.low) && $util.isInteger(message.blockHeight.high))) + return "blockHeight: integer|Long expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.AddressBalanceChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a BlockAddressBalanceChanges message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} BlockAddressBalanceChanges + */ + BlockAddressBalanceChanges.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges) + return object; + var message = new $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges(); + if (object.blockHeight != null) + if ($util.Long) + (message.blockHeight = $util.Long.fromValue(object.blockHeight)).unsigned = true; + else if (typeof object.blockHeight === "string") + message.blockHeight = parseInt(object.blockHeight, 10); + else if (typeof object.blockHeight === "number") + message.blockHeight = object.blockHeight; + else if (typeof object.blockHeight === "object") + message.blockHeight = new $util.LongBits(object.blockHeight.low >>> 0, object.blockHeight.high >>> 0).toNumber(true); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".org.dash.platform.dapi.v0.BlockAddressBalanceChanges.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.BlockAddressBalanceChanges.changes: object expected"); + message.changes[i] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a BlockAddressBalanceChanges message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.BlockAddressBalanceChanges} message BlockAddressBalanceChanges + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + BlockAddressBalanceChanges.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.blockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.blockHeight = options.longs === String ? "0" : 0; + if (message.blockHeight != null && message.hasOwnProperty("blockHeight")) + if (typeof message.blockHeight === "number") + object.blockHeight = options.longs === String ? String(message.blockHeight) : message.blockHeight; + else + object.blockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.blockHeight) : options.longs === Number ? new $util.LongBits(message.blockHeight.low >>> 0, message.blockHeight.high >>> 0).toNumber(true) : message.blockHeight; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this BlockAddressBalanceChanges to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.BlockAddressBalanceChanges + * @instance + * @returns {Object.} JSON object + */ + BlockAddressBalanceChanges.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return BlockAddressBalanceChanges; + })(); + + v0.AddressBalanceUpdateEntries = (function() { + + /** + * Properties of an AddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @interface IAddressBalanceUpdateEntries + * @property {Array.|null} [blockChanges] AddressBalanceUpdateEntries blockChanges + */ + + /** + * Constructs a new AddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents an AddressBalanceUpdateEntries. + * @implements IAddressBalanceUpdateEntries + * @constructor + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries=} [properties] Properties to set + */ + function AddressBalanceUpdateEntries(properties) { + this.blockChanges = []; + 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]]; + } + + /** + * AddressBalanceUpdateEntries blockChanges. + * @member {Array.} blockChanges + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @instance + */ + AddressBalanceUpdateEntries.prototype.blockChanges = $util.emptyArray; + + /** + * Creates a new AddressBalanceUpdateEntries instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries instance + */ + AddressBalanceUpdateEntries.create = function create(properties) { + return new AddressBalanceUpdateEntries(properties); + }; + + /** + * Encodes the specified AddressBalanceUpdateEntries message. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries} message AddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceUpdateEntries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.blockChanges != null && message.blockChanges.length) + for (var i = 0; i < message.blockChanges.length; ++i) + $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.encode(message.blockChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AddressBalanceUpdateEntries message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries} message AddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AddressBalanceUpdateEntries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AddressBalanceUpdateEntries message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @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.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceUpdateEntries.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.AddressBalanceUpdateEntries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.blockChanges && message.blockChanges.length)) + message.blockChanges = []; + message.blockChanges.push($root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AddressBalanceUpdateEntries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AddressBalanceUpdateEntries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AddressBalanceUpdateEntries message. + * @function verify + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AddressBalanceUpdateEntries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.blockChanges != null && message.hasOwnProperty("blockChanges")) { + if (!Array.isArray(message.blockChanges)) + return "blockChanges: array expected"; + for (var i = 0; i < message.blockChanges.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.verify(message.blockChanges[i]); + if (error) + return "blockChanges." + error; + } + } + return null; + }; + + /** + * Creates an AddressBalanceUpdateEntries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} AddressBalanceUpdateEntries + */ + AddressBalanceUpdateEntries.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries) + return object; + var message = new $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries(); + if (object.blockChanges) { + if (!Array.isArray(object.blockChanges)) + throw TypeError(".org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.blockChanges: array expected"); + message.blockChanges = []; + for (var i = 0; i < object.blockChanges.length; ++i) { + if (typeof object.blockChanges[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.blockChanges: object expected"); + message.blockChanges[i] = $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.fromObject(object.blockChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from an AddressBalanceUpdateEntries message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} message AddressBalanceUpdateEntries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AddressBalanceUpdateEntries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.blockChanges = []; + if (message.blockChanges && message.blockChanges.length) { + object.blockChanges = []; + for (var j = 0; j < message.blockChanges.length; ++j) + object.blockChanges[j] = $root.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.toObject(message.blockChanges[j], options); + } + return object; + }; + + /** + * Converts this AddressBalanceUpdateEntries to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.AddressBalanceUpdateEntries + * @instance + * @returns {Object.} JSON object + */ + AddressBalanceUpdateEntries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return AddressBalanceUpdateEntries; + })(); + v0.GetAddressInfoResponse = (function() { /** @@ -77618,6 +78422,7 @@ $root.org = (function() { * @interface IGetAddressesBranchStateRequestV0 * @property {Uint8Array|null} [key] GetAddressesBranchStateRequestV0 key * @property {number|null} [depth] GetAddressesBranchStateRequestV0 depth + * @property {number|Long|null} [checkpointHeight] GetAddressesBranchStateRequestV0 checkpointHeight */ /** @@ -77651,6 +78456,14 @@ $root.org = (function() { */ GetAddressesBranchStateRequestV0.prototype.depth = 0; + /** + * GetAddressesBranchStateRequestV0 checkpointHeight. + * @member {number|Long} checkpointHeight + * @memberof org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0 + * @instance + */ + GetAddressesBranchStateRequestV0.prototype.checkpointHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + /** * Creates a new GetAddressesBranchStateRequestV0 instance using the specified properties. * @function create @@ -77679,6 +78492,8 @@ $root.org = (function() { writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.key); if (message.depth != null && Object.hasOwnProperty.call(message, "depth")) writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.depth); + if (message.checkpointHeight != null && Object.hasOwnProperty.call(message, "checkpointHeight")) + writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.checkpointHeight); return writer; }; @@ -77719,6 +78534,9 @@ $root.org = (function() { case 2: message.depth = reader.uint32(); break; + case 3: + message.checkpointHeight = reader.uint64(); + break; default: reader.skipType(tag & 7); break; @@ -77760,6 +78578,9 @@ $root.org = (function() { if (message.depth != null && message.hasOwnProperty("depth")) if (!$util.isInteger(message.depth)) return "depth: integer expected"; + if (message.checkpointHeight != null && message.hasOwnProperty("checkpointHeight")) + if (!$util.isInteger(message.checkpointHeight) && !(message.checkpointHeight && $util.isInteger(message.checkpointHeight.low) && $util.isInteger(message.checkpointHeight.high))) + return "checkpointHeight: integer|Long expected"; return null; }; @@ -77782,6 +78603,15 @@ $root.org = (function() { message.key = object.key; if (object.depth != null) message.depth = object.depth >>> 0; + if (object.checkpointHeight != null) + if ($util.Long) + (message.checkpointHeight = $util.Long.fromValue(object.checkpointHeight)).unsigned = true; + else if (typeof object.checkpointHeight === "string") + message.checkpointHeight = parseInt(object.checkpointHeight, 10); + else if (typeof object.checkpointHeight === "number") + message.checkpointHeight = object.checkpointHeight; + else if (typeof object.checkpointHeight === "object") + message.checkpointHeight = new $util.LongBits(object.checkpointHeight.low >>> 0, object.checkpointHeight.high >>> 0).toNumber(true); return message; }; @@ -77807,11 +78637,21 @@ $root.org = (function() { object.key = $util.newBuffer(object.key); } object.depth = 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.checkpointHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.checkpointHeight = options.longs === String ? "0" : 0; } if (message.key != null && message.hasOwnProperty("key")) object.key = options.bytes === String ? $util.base64.encode(message.key, 0, message.key.length) : options.bytes === Array ? Array.prototype.slice.call(message.key) : message.key; if (message.depth != null && message.hasOwnProperty("depth")) object.depth = message.depth; + if (message.checkpointHeight != null && message.hasOwnProperty("checkpointHeight")) + if (typeof message.checkpointHeight === "number") + object.checkpointHeight = options.longs === String ? String(message.checkpointHeight) : message.checkpointHeight; + else + object.checkpointHeight = options.longs === String ? $util.Long.prototype.toString.call(message.checkpointHeight) : options.longs === Number ? new $util.LongBits(message.checkpointHeight.low >>> 0, message.checkpointHeight.high >>> 0).toNumber(true) : message.checkpointHeight; return object; }; @@ -78239,6 +79079,2334 @@ $root.org = (function() { return GetAddressesBranchStateResponse; })(); + v0.GetRecentAddressBalanceChangesRequest = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentAddressBalanceChangesRequest + * @property {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0|null} [v0] GetRecentAddressBalanceChangesRequest v0 + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentAddressBalanceChangesRequest. + * @implements IGetRecentAddressBalanceChangesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesRequest(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]]; + } + + /** + * GetRecentAddressBalanceChangesRequest v0. + * @member {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @instance + */ + GetRecentAddressBalanceChangesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentAddressBalanceChangesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @instance + */ + Object.defineProperty(GetRecentAddressBalanceChangesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentAddressBalanceChangesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest instance + */ + GetRecentAddressBalanceChangesRequest.create = function create(properties) { + return new GetRecentAddressBalanceChangesRequest(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} message GetRecentAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesRequest} message GetRecentAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @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.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentAddressBalanceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} GetRecentAddressBalanceChangesRequest + */ + GetRecentAddressBalanceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} message GetRecentAddressBalanceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentAddressBalanceChangesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @interface IGetRecentAddressBalanceChangesRequestV0 + * @property {number|Long|null} [startHeight] GetRecentAddressBalanceChangesRequestV0 startHeight + * @property {boolean|null} [prove] GetRecentAddressBalanceChangesRequestV0 prove + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest + * @classdesc Represents a GetRecentAddressBalanceChangesRequestV0. + * @implements IGetRecentAddressBalanceChangesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesRequestV0(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]]; + } + + /** + * GetRecentAddressBalanceChangesRequestV0 startHeight. + * @member {number|Long} startHeight + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentAddressBalanceChangesRequestV0.prototype.startHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetRecentAddressBalanceChangesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentAddressBalanceChangesRequestV0.prototype.prove = false; + + /** + * Creates a new GetRecentAddressBalanceChangesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 instance + */ + GetRecentAddressBalanceChangesRequestV0.create = function create(properties) { + return new GetRecentAddressBalanceChangesRequestV0(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0} message GetRecentAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startHeight != null && Object.hasOwnProperty.call(message, "startHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startHeight); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.IGetRecentAddressBalanceChangesRequestV0} message GetRecentAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startHeight = reader.uint64(); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentAddressBalanceChangesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (!$util.isInteger(message.startHeight) && !(message.startHeight && $util.isInteger(message.startHeight.low) && $util.isInteger(message.startHeight.high))) + return "startHeight: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetRecentAddressBalanceChangesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} GetRecentAddressBalanceChangesRequestV0 + */ + GetRecentAddressBalanceChangesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0(); + if (object.startHeight != null) + if ($util.Long) + (message.startHeight = $util.Long.fromValue(object.startHeight)).unsigned = true; + else if (typeof object.startHeight === "string") + message.startHeight = parseInt(object.startHeight, 10); + else if (typeof object.startHeight === "number") + message.startHeight = object.startHeight; + else if (typeof object.startHeight === "object") + message.startHeight = new $util.LongBits(object.startHeight.low >>> 0, object.startHeight.high >>> 0).toNumber(true); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} message GetRecentAddressBalanceChangesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesRequestV0.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.startHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startHeight = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.startHeight != null && message.hasOwnProperty("startHeight")) + if (typeof message.startHeight === "number") + object.startHeight = options.longs === String ? String(message.startHeight) : message.startHeight; + else + object.startHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startHeight) : options.longs === Number ? new $util.LongBits(message.startHeight.low >>> 0, message.startHeight.high >>> 0).toNumber(true) : message.startHeight; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetRecentAddressBalanceChangesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentAddressBalanceChangesRequestV0; + })(); + + return GetRecentAddressBalanceChangesRequest; + })(); + + v0.GetRecentAddressBalanceChangesResponse = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentAddressBalanceChangesResponse + * @property {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0|null} [v0] GetRecentAddressBalanceChangesResponse v0 + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentAddressBalanceChangesResponse. + * @implements IGetRecentAddressBalanceChangesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesResponse(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]]; + } + + /** + * GetRecentAddressBalanceChangesResponse v0. + * @member {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @instance + */ + GetRecentAddressBalanceChangesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentAddressBalanceChangesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @instance + */ + Object.defineProperty(GetRecentAddressBalanceChangesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentAddressBalanceChangesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse instance + */ + GetRecentAddressBalanceChangesResponse.create = function create(properties) { + return new GetRecentAddressBalanceChangesResponse(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse} message GetRecentAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentAddressBalanceChangesResponse} message GetRecentAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @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.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentAddressBalanceChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentAddressBalanceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} GetRecentAddressBalanceChangesResponse + */ + GetRecentAddressBalanceChangesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} message GetRecentAddressBalanceChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentAddressBalanceChangesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 = (function() { + + /** + * Properties of a GetRecentAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @interface IGetRecentAddressBalanceChangesResponseV0 + * @property {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries|null} [addressBalanceUpdateEntries] GetRecentAddressBalanceChangesResponseV0 addressBalanceUpdateEntries + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetRecentAddressBalanceChangesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetRecentAddressBalanceChangesResponseV0 metadata + */ + + /** + * Constructs a new GetRecentAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse + * @classdesc Represents a GetRecentAddressBalanceChangesResponseV0. + * @implements IGetRecentAddressBalanceChangesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0=} [properties] Properties to set + */ + function GetRecentAddressBalanceChangesResponseV0(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]]; + } + + /** + * GetRecentAddressBalanceChangesResponseV0 addressBalanceUpdateEntries. + * @member {org.dash.platform.dapi.v0.IAddressBalanceUpdateEntries|null|undefined} addressBalanceUpdateEntries + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentAddressBalanceChangesResponseV0.prototype.addressBalanceUpdateEntries = null; + + /** + * GetRecentAddressBalanceChangesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentAddressBalanceChangesResponseV0.prototype.proof = null; + + /** + * GetRecentAddressBalanceChangesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentAddressBalanceChangesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentAddressBalanceChangesResponseV0 result. + * @member {"addressBalanceUpdateEntries"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + */ + Object.defineProperty(GetRecentAddressBalanceChangesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["addressBalanceUpdateEntries", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentAddressBalanceChangesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 instance + */ + GetRecentAddressBalanceChangesResponseV0.create = function create(properties) { + return new GetRecentAddressBalanceChangesResponseV0(properties); + }; + + /** + * Encodes the specified GetRecentAddressBalanceChangesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0} message GetRecentAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.addressBalanceUpdateEntries != null && Object.hasOwnProperty.call(message, "addressBalanceUpdateEntries")) + $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.encode(message.addressBalanceUpdateEntries, 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 GetRecentAddressBalanceChangesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.IGetRecentAddressBalanceChangesResponseV0} message GetRecentAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentAddressBalanceChangesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentAddressBalanceChangesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.addressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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 GetRecentAddressBalanceChangesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentAddressBalanceChangesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentAddressBalanceChangesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentAddressBalanceChangesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.addressBalanceUpdateEntries != null && message.hasOwnProperty("addressBalanceUpdateEntries")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.verify(message.addressBalanceUpdateEntries); + if (error) + return "addressBalanceUpdateEntries." + 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 GetRecentAddressBalanceChangesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} GetRecentAddressBalanceChangesResponseV0 + */ + GetRecentAddressBalanceChangesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0(); + if (object.addressBalanceUpdateEntries != null) { + if (typeof object.addressBalanceUpdateEntries !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.addressBalanceUpdateEntries: object expected"); + message.addressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.fromObject(object.addressBalanceUpdateEntries); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentAddressBalanceChangesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} message GetRecentAddressBalanceChangesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentAddressBalanceChangesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.addressBalanceUpdateEntries != null && message.hasOwnProperty("addressBalanceUpdateEntries")) { + object.addressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.toObject(message.addressBalanceUpdateEntries, options); + if (options.oneofs) + object.result = "addressBalanceUpdateEntries"; + } + 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 GetRecentAddressBalanceChangesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentAddressBalanceChangesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentAddressBalanceChangesResponseV0; + })(); + + return GetRecentAddressBalanceChangesResponse; + })(); + + v0.CompactedBlockAddressBalanceChanges = (function() { + + /** + * Properties of a CompactedBlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @interface ICompactedBlockAddressBalanceChanges + * @property {number|Long|null} [startBlockHeight] CompactedBlockAddressBalanceChanges startBlockHeight + * @property {number|Long|null} [endBlockHeight] CompactedBlockAddressBalanceChanges endBlockHeight + * @property {Array.|null} [changes] CompactedBlockAddressBalanceChanges changes + */ + + /** + * Constructs a new CompactedBlockAddressBalanceChanges. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a CompactedBlockAddressBalanceChanges. + * @implements ICompactedBlockAddressBalanceChanges + * @constructor + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges=} [properties] Properties to set + */ + function CompactedBlockAddressBalanceChanges(properties) { + this.changes = []; + 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]]; + } + + /** + * CompactedBlockAddressBalanceChanges startBlockHeight. + * @member {number|Long} startBlockHeight + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + */ + CompactedBlockAddressBalanceChanges.prototype.startBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CompactedBlockAddressBalanceChanges endBlockHeight. + * @member {number|Long} endBlockHeight + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + */ + CompactedBlockAddressBalanceChanges.prototype.endBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * CompactedBlockAddressBalanceChanges changes. + * @member {Array.} changes + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + */ + CompactedBlockAddressBalanceChanges.prototype.changes = $util.emptyArray; + + /** + * Creates a new CompactedBlockAddressBalanceChanges instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges instance + */ + CompactedBlockAddressBalanceChanges.create = function create(properties) { + return new CompactedBlockAddressBalanceChanges(properties); + }; + + /** + * Encodes the specified CompactedBlockAddressBalanceChanges message. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges} message CompactedBlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedBlockAddressBalanceChanges.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startBlockHeight != null && Object.hasOwnProperty.call(message, "startBlockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startBlockHeight); + if (message.endBlockHeight != null && Object.hasOwnProperty.call(message, "endBlockHeight")) + writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.endBlockHeight); + if (message.changes != null && message.changes.length) + for (var i = 0; i < message.changes.length; ++i) + $root.org.dash.platform.dapi.v0.AddressBalanceChange.encode(message.changes[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompactedBlockAddressBalanceChanges message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.ICompactedBlockAddressBalanceChanges} message CompactedBlockAddressBalanceChanges message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedBlockAddressBalanceChanges.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactedBlockAddressBalanceChanges message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @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.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedBlockAddressBalanceChanges.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.CompactedBlockAddressBalanceChanges(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startBlockHeight = reader.uint64(); + break; + case 2: + message.endBlockHeight = reader.uint64(); + break; + case 3: + if (!(message.changes && message.changes.length)) + message.changes = []; + message.changes.push($root.org.dash.platform.dapi.v0.AddressBalanceChange.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactedBlockAddressBalanceChanges message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedBlockAddressBalanceChanges.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactedBlockAddressBalanceChanges message. + * @function verify + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactedBlockAddressBalanceChanges.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (!$util.isInteger(message.startBlockHeight) && !(message.startBlockHeight && $util.isInteger(message.startBlockHeight.low) && $util.isInteger(message.startBlockHeight.high))) + return "startBlockHeight: integer|Long expected"; + if (message.endBlockHeight != null && message.hasOwnProperty("endBlockHeight")) + if (!$util.isInteger(message.endBlockHeight) && !(message.endBlockHeight && $util.isInteger(message.endBlockHeight.low) && $util.isInteger(message.endBlockHeight.high))) + return "endBlockHeight: integer|Long expected"; + if (message.changes != null && message.hasOwnProperty("changes")) { + if (!Array.isArray(message.changes)) + return "changes: array expected"; + for (var i = 0; i < message.changes.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.AddressBalanceChange.verify(message.changes[i]); + if (error) + return "changes." + error; + } + } + return null; + }; + + /** + * Creates a CompactedBlockAddressBalanceChanges message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} CompactedBlockAddressBalanceChanges + */ + CompactedBlockAddressBalanceChanges.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges) + return object; + var message = new $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges(); + if (object.startBlockHeight != null) + if ($util.Long) + (message.startBlockHeight = $util.Long.fromValue(object.startBlockHeight)).unsigned = true; + else if (typeof object.startBlockHeight === "string") + message.startBlockHeight = parseInt(object.startBlockHeight, 10); + else if (typeof object.startBlockHeight === "number") + message.startBlockHeight = object.startBlockHeight; + else if (typeof object.startBlockHeight === "object") + message.startBlockHeight = new $util.LongBits(object.startBlockHeight.low >>> 0, object.startBlockHeight.high >>> 0).toNumber(true); + if (object.endBlockHeight != null) + if ($util.Long) + (message.endBlockHeight = $util.Long.fromValue(object.endBlockHeight)).unsigned = true; + else if (typeof object.endBlockHeight === "string") + message.endBlockHeight = parseInt(object.endBlockHeight, 10); + else if (typeof object.endBlockHeight === "number") + message.endBlockHeight = object.endBlockHeight; + else if (typeof object.endBlockHeight === "object") + message.endBlockHeight = new $util.LongBits(object.endBlockHeight.low >>> 0, object.endBlockHeight.high >>> 0).toNumber(true); + if (object.changes) { + if (!Array.isArray(object.changes)) + throw TypeError(".org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.changes: array expected"); + message.changes = []; + for (var i = 0; i < object.changes.length; ++i) { + if (typeof object.changes[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.changes: object expected"); + message.changes[i] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.fromObject(object.changes[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompactedBlockAddressBalanceChanges message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @static + * @param {org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} message CompactedBlockAddressBalanceChanges + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactedBlockAddressBalanceChanges.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changes = []; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.startBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startBlockHeight = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.endBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.endBlockHeight = options.longs === String ? "0" : 0; + } + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (typeof message.startBlockHeight === "number") + object.startBlockHeight = options.longs === String ? String(message.startBlockHeight) : message.startBlockHeight; + else + object.startBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startBlockHeight) : options.longs === Number ? new $util.LongBits(message.startBlockHeight.low >>> 0, message.startBlockHeight.high >>> 0).toNumber(true) : message.startBlockHeight; + if (message.endBlockHeight != null && message.hasOwnProperty("endBlockHeight")) + if (typeof message.endBlockHeight === "number") + object.endBlockHeight = options.longs === String ? String(message.endBlockHeight) : message.endBlockHeight; + else + object.endBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.endBlockHeight) : options.longs === Number ? new $util.LongBits(message.endBlockHeight.low >>> 0, message.endBlockHeight.high >>> 0).toNumber(true) : message.endBlockHeight; + if (message.changes && message.changes.length) { + object.changes = []; + for (var j = 0; j < message.changes.length; ++j) + object.changes[j] = $root.org.dash.platform.dapi.v0.AddressBalanceChange.toObject(message.changes[j], options); + } + return object; + }; + + /** + * Converts this CompactedBlockAddressBalanceChanges to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges + * @instance + * @returns {Object.} JSON object + */ + CompactedBlockAddressBalanceChanges.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactedBlockAddressBalanceChanges; + })(); + + v0.CompactedAddressBalanceUpdateEntries = (function() { + + /** + * Properties of a CompactedAddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @interface ICompactedAddressBalanceUpdateEntries + * @property {Array.|null} [compactedBlockChanges] CompactedAddressBalanceUpdateEntries compactedBlockChanges + */ + + /** + * Constructs a new CompactedAddressBalanceUpdateEntries. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a CompactedAddressBalanceUpdateEntries. + * @implements ICompactedAddressBalanceUpdateEntries + * @constructor + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries=} [properties] Properties to set + */ + function CompactedAddressBalanceUpdateEntries(properties) { + this.compactedBlockChanges = []; + 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]]; + } + + /** + * CompactedAddressBalanceUpdateEntries compactedBlockChanges. + * @member {Array.} compactedBlockChanges + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @instance + */ + CompactedAddressBalanceUpdateEntries.prototype.compactedBlockChanges = $util.emptyArray; + + /** + * Creates a new CompactedAddressBalanceUpdateEntries instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries instance + */ + CompactedAddressBalanceUpdateEntries.create = function create(properties) { + return new CompactedAddressBalanceUpdateEntries(properties); + }; + + /** + * Encodes the specified CompactedAddressBalanceUpdateEntries message. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries} message CompactedAddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedAddressBalanceUpdateEntries.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compactedBlockChanges != null && message.compactedBlockChanges.length) + for (var i = 0; i < message.compactedBlockChanges.length; ++i) + $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.encode(message.compactedBlockChanges[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CompactedAddressBalanceUpdateEntries message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries} message CompactedAddressBalanceUpdateEntries message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CompactedAddressBalanceUpdateEntries.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CompactedAddressBalanceUpdateEntries message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @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.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedAddressBalanceUpdateEntries.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.CompactedAddressBalanceUpdateEntries(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + if (!(message.compactedBlockChanges && message.compactedBlockChanges.length)) + message.compactedBlockChanges = []; + message.compactedBlockChanges.push($root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.decode(reader, reader.uint32())); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CompactedAddressBalanceUpdateEntries message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CompactedAddressBalanceUpdateEntries.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CompactedAddressBalanceUpdateEntries message. + * @function verify + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CompactedAddressBalanceUpdateEntries.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.compactedBlockChanges != null && message.hasOwnProperty("compactedBlockChanges")) { + if (!Array.isArray(message.compactedBlockChanges)) + return "compactedBlockChanges: array expected"; + for (var i = 0; i < message.compactedBlockChanges.length; ++i) { + var error = $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.verify(message.compactedBlockChanges[i]); + if (error) + return "compactedBlockChanges." + error; + } + } + return null; + }; + + /** + * Creates a CompactedAddressBalanceUpdateEntries message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} CompactedAddressBalanceUpdateEntries + */ + CompactedAddressBalanceUpdateEntries.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries) + return object; + var message = new $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries(); + if (object.compactedBlockChanges) { + if (!Array.isArray(object.compactedBlockChanges)) + throw TypeError(".org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.compactedBlockChanges: array expected"); + message.compactedBlockChanges = []; + for (var i = 0; i < object.compactedBlockChanges.length; ++i) { + if (typeof object.compactedBlockChanges[i] !== "object") + throw TypeError(".org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.compactedBlockChanges: object expected"); + message.compactedBlockChanges[i] = $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.fromObject(object.compactedBlockChanges[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a CompactedAddressBalanceUpdateEntries message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @static + * @param {org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} message CompactedAddressBalanceUpdateEntries + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CompactedAddressBalanceUpdateEntries.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.compactedBlockChanges = []; + if (message.compactedBlockChanges && message.compactedBlockChanges.length) { + object.compactedBlockChanges = []; + for (var j = 0; j < message.compactedBlockChanges.length; ++j) + object.compactedBlockChanges[j] = $root.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.toObject(message.compactedBlockChanges[j], options); + } + return object; + }; + + /** + * Converts this CompactedAddressBalanceUpdateEntries to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries + * @instance + * @returns {Object.} JSON object + */ + CompactedAddressBalanceUpdateEntries.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return CompactedAddressBalanceUpdateEntries; + })(); + + v0.GetRecentCompactedAddressBalanceChangesRequest = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentCompactedAddressBalanceChangesRequest + * @property {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0|null} [v0] GetRecentCompactedAddressBalanceChangesRequest v0 + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesRequest. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesRequest. + * @implements IGetRecentCompactedAddressBalanceChangesRequest + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesRequest(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesRequest v0. + * @member {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @instance + */ + GetRecentCompactedAddressBalanceChangesRequest.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentCompactedAddressBalanceChangesRequest version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @instance + */ + Object.defineProperty(GetRecentCompactedAddressBalanceChangesRequest.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesRequest instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest instance + */ + GetRecentCompactedAddressBalanceChangesRequest.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesRequest(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequest message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} message GetRecentCompactedAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequest message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesRequest} message GetRecentCompactedAddressBalanceChangesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequest message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @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.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesRequest message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentCompactedAddressBalanceChangesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} GetRecentCompactedAddressBalanceChangesRequest + */ + GetRecentCompactedAddressBalanceChangesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} message GetRecentCompactedAddressBalanceChangesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentCompactedAddressBalanceChangesRequest to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @interface IGetRecentCompactedAddressBalanceChangesRequestV0 + * @property {number|Long|null} [startBlockHeight] GetRecentCompactedAddressBalanceChangesRequestV0 startBlockHeight + * @property {boolean|null} [prove] GetRecentCompactedAddressBalanceChangesRequestV0 prove + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesRequestV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesRequestV0. + * @implements IGetRecentCompactedAddressBalanceChangesRequestV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesRequestV0(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesRequestV0 startBlockHeight. + * @member {number|Long} startBlockHeight + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesRequestV0.prototype.startBlockHeight = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * GetRecentCompactedAddressBalanceChangesRequestV0 prove. + * @member {boolean} prove + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesRequestV0.prototype.prove = false; + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesRequestV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 instance + */ + GetRecentCompactedAddressBalanceChangesRequestV0.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesRequestV0(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequestV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0} message GetRecentCompactedAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequestV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.startBlockHeight != null && Object.hasOwnProperty.call(message, "startBlockHeight")) + writer.uint32(/* id 1, wireType 0 =*/8).uint64(message.startBlockHeight); + if (message.prove != null && Object.hasOwnProperty.call(message, "prove")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.prove); + return writer; + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesRequestV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.IGetRecentCompactedAddressBalanceChangesRequestV0} message GetRecentCompactedAddressBalanceChangesRequestV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesRequestV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequestV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.startBlockHeight = reader.uint64(); + break; + case 2: + message.prove = reader.bool(); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesRequestV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesRequestV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesRequestV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesRequestV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (!$util.isInteger(message.startBlockHeight) && !(message.startBlockHeight && $util.isInteger(message.startBlockHeight.low) && $util.isInteger(message.startBlockHeight.high))) + return "startBlockHeight: integer|Long expected"; + if (message.prove != null && message.hasOwnProperty("prove")) + if (typeof message.prove !== "boolean") + return "prove: boolean expected"; + return null; + }; + + /** + * Creates a GetRecentCompactedAddressBalanceChangesRequestV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} GetRecentCompactedAddressBalanceChangesRequestV0 + */ + GetRecentCompactedAddressBalanceChangesRequestV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0(); + if (object.startBlockHeight != null) + if ($util.Long) + (message.startBlockHeight = $util.Long.fromValue(object.startBlockHeight)).unsigned = true; + else if (typeof object.startBlockHeight === "string") + message.startBlockHeight = parseInt(object.startBlockHeight, 10); + else if (typeof object.startBlockHeight === "number") + message.startBlockHeight = object.startBlockHeight; + else if (typeof object.startBlockHeight === "object") + message.startBlockHeight = new $util.LongBits(object.startBlockHeight.low >>> 0, object.startBlockHeight.high >>> 0).toNumber(true); + if (object.prove != null) + message.prove = Boolean(object.prove); + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesRequestV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} message GetRecentCompactedAddressBalanceChangesRequestV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesRequestV0.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.startBlockHeight = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.startBlockHeight = options.longs === String ? "0" : 0; + object.prove = false; + } + if (message.startBlockHeight != null && message.hasOwnProperty("startBlockHeight")) + if (typeof message.startBlockHeight === "number") + object.startBlockHeight = options.longs === String ? String(message.startBlockHeight) : message.startBlockHeight; + else + object.startBlockHeight = options.longs === String ? $util.Long.prototype.toString.call(message.startBlockHeight) : options.longs === Number ? new $util.LongBits(message.startBlockHeight.low >>> 0, message.startBlockHeight.high >>> 0).toNumber(true) : message.startBlockHeight; + if (message.prove != null && message.hasOwnProperty("prove")) + object.prove = message.prove; + return object; + }; + + /** + * Converts this GetRecentCompactedAddressBalanceChangesRequestV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesRequestV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentCompactedAddressBalanceChangesRequestV0; + })(); + + return GetRecentCompactedAddressBalanceChangesRequest; + })(); + + v0.GetRecentCompactedAddressBalanceChangesResponse = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @interface IGetRecentCompactedAddressBalanceChangesResponse + * @property {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0|null} [v0] GetRecentCompactedAddressBalanceChangesResponse v0 + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesResponse. + * @memberof org.dash.platform.dapi.v0 + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesResponse. + * @implements IGetRecentCompactedAddressBalanceChangesResponse + * @constructor + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesResponse(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesResponse v0. + * @member {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0|null|undefined} v0 + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponse.prototype.v0 = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentCompactedAddressBalanceChangesResponse version. + * @member {"v0"|undefined} version + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @instance + */ + Object.defineProperty(GetRecentCompactedAddressBalanceChangesResponse.prototype, "version", { + get: $util.oneOfGetter($oneOfFields = ["v0"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesResponse instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse instance + */ + GetRecentCompactedAddressBalanceChangesResponse.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesResponse(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesResponse message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse} message GetRecentCompactedAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.encode(message.v0, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesResponse message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.IGetRecentCompactedAddressBalanceChangesResponse} message GetRecentCompactedAddressBalanceChangesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesResponse message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @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.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.decode(reader, reader.uint32()); + break; + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesResponse message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.verify(message.v0); + if (error) + return "v0." + error; + } + } + return null; + }; + + /** + * Creates a GetRecentCompactedAddressBalanceChangesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} GetRecentCompactedAddressBalanceChangesResponse + */ + GetRecentCompactedAddressBalanceChangesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse(); + if (object.v0 != null) { + if (typeof object.v0 !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.v0: object expected"); + message.v0 = $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.fromObject(object.v0); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} message GetRecentCompactedAddressBalanceChangesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.toObject(message.v0, options); + if (options.oneofs) + object.version = "v0"; + } + return object; + }; + + /** + * Converts this GetRecentCompactedAddressBalanceChangesResponse to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 = (function() { + + /** + * Properties of a GetRecentCompactedAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @interface IGetRecentCompactedAddressBalanceChangesResponseV0 + * @property {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries|null} [compactedAddressBalanceUpdateEntries] GetRecentCompactedAddressBalanceChangesResponseV0 compactedAddressBalanceUpdateEntries + * @property {org.dash.platform.dapi.v0.IProof|null} [proof] GetRecentCompactedAddressBalanceChangesResponseV0 proof + * @property {org.dash.platform.dapi.v0.IResponseMetadata|null} [metadata] GetRecentCompactedAddressBalanceChangesResponseV0 metadata + */ + + /** + * Constructs a new GetRecentCompactedAddressBalanceChangesResponseV0. + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse + * @classdesc Represents a GetRecentCompactedAddressBalanceChangesResponseV0. + * @implements IGetRecentCompactedAddressBalanceChangesResponseV0 + * @constructor + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0=} [properties] Properties to set + */ + function GetRecentCompactedAddressBalanceChangesResponseV0(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]]; + } + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 compactedAddressBalanceUpdateEntries. + * @member {org.dash.platform.dapi.v0.ICompactedAddressBalanceUpdateEntries|null|undefined} compactedAddressBalanceUpdateEntries + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.compactedAddressBalanceUpdateEntries = null; + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 proof. + * @member {org.dash.platform.dapi.v0.IProof|null|undefined} proof + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.proof = null; + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 metadata. + * @member {org.dash.platform.dapi.v0.IResponseMetadata|null|undefined} metadata + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.metadata = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GetRecentCompactedAddressBalanceChangesResponseV0 result. + * @member {"compactedAddressBalanceUpdateEntries"|"proof"|undefined} result + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + */ + Object.defineProperty(GetRecentCompactedAddressBalanceChangesResponseV0.prototype, "result", { + get: $util.oneOfGetter($oneOfFields = ["compactedAddressBalanceUpdateEntries", "proof"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new GetRecentCompactedAddressBalanceChangesResponseV0 instance using the specified properties. + * @function create + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0=} [properties] Properties to set + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 instance + */ + GetRecentCompactedAddressBalanceChangesResponseV0.create = function create(properties) { + return new GetRecentCompactedAddressBalanceChangesResponseV0(properties); + }; + + /** + * Encodes the specified GetRecentCompactedAddressBalanceChangesResponseV0 message. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0} message GetRecentCompactedAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponseV0.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.compactedAddressBalanceUpdateEntries != null && Object.hasOwnProperty.call(message, "compactedAddressBalanceUpdateEntries")) + $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.encode(message.compactedAddressBalanceUpdateEntries, 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 GetRecentCompactedAddressBalanceChangesResponseV0 message, length delimited. Does not implicitly {@link org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.verify|verify} messages. + * @function encodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.IGetRecentCompactedAddressBalanceChangesResponseV0} message GetRecentCompactedAddressBalanceChangesResponseV0 message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetRecentCompactedAddressBalanceChangesResponseV0.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetRecentCompactedAddressBalanceChangesResponseV0 message from the specified reader or buffer. + * @function decode + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: + message.compactedAddressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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 GetRecentCompactedAddressBalanceChangesResponseV0 message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetRecentCompactedAddressBalanceChangesResponseV0.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetRecentCompactedAddressBalanceChangesResponseV0 message. + * @function verify + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetRecentCompactedAddressBalanceChangesResponseV0.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.compactedAddressBalanceUpdateEntries != null && message.hasOwnProperty("compactedAddressBalanceUpdateEntries")) { + properties.result = 1; + { + var error = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.verify(message.compactedAddressBalanceUpdateEntries); + if (error) + return "compactedAddressBalanceUpdateEntries." + 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 GetRecentCompactedAddressBalanceChangesResponseV0 message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {Object.} object Plain object + * @returns {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} GetRecentCompactedAddressBalanceChangesResponseV0 + */ + GetRecentCompactedAddressBalanceChangesResponseV0.fromObject = function fromObject(object) { + if (object instanceof $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0) + return object; + var message = new $root.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0(); + if (object.compactedAddressBalanceUpdateEntries != null) { + if (typeof object.compactedAddressBalanceUpdateEntries !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.compactedAddressBalanceUpdateEntries: object expected"); + message.compactedAddressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.fromObject(object.compactedAddressBalanceUpdateEntries); + } + if (object.proof != null) { + if (typeof object.proof !== "object") + throw TypeError(".org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.metadata: object expected"); + message.metadata = $root.org.dash.platform.dapi.v0.ResponseMetadata.fromObject(object.metadata); + } + return message; + }; + + /** + * Creates a plain object from a GetRecentCompactedAddressBalanceChangesResponseV0 message. Also converts values to other types if specified. + * @function toObject + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @static + * @param {org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} message GetRecentCompactedAddressBalanceChangesResponseV0 + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetRecentCompactedAddressBalanceChangesResponseV0.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.metadata = null; + if (message.compactedAddressBalanceUpdateEntries != null && message.hasOwnProperty("compactedAddressBalanceUpdateEntries")) { + object.compactedAddressBalanceUpdateEntries = $root.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.toObject(message.compactedAddressBalanceUpdateEntries, options); + if (options.oneofs) + object.result = "compactedAddressBalanceUpdateEntries"; + } + 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 GetRecentCompactedAddressBalanceChangesResponseV0 to JSON. + * @function toJSON + * @memberof org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 + * @instance + * @returns {Object.} JSON object + */ + GetRecentCompactedAddressBalanceChangesResponseV0.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + return GetRecentCompactedAddressBalanceChangesResponseV0; + })(); + + return GetRecentCompactedAddressBalanceChangesResponse; + })(); + 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 086b9d49ba8..83a387a02c5 100644 --- a/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js +++ b/packages/dapi-grpc/clients/platform/v0/nodejs/platform_protoc.js @@ -21,12 +21,18 @@ var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_ goog.object.extend(proto, google_protobuf_struct_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressBalanceChange', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressInfoEntries', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressInfoEntry', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.AllKeys', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.BalanceAndNonce', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetAddressInfoRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetAddressInfoRequest.VersionCase', null, { proto }); @@ -394,6 +400,20 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVote goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase', null, { proto }); @@ -6950,6 +6970,69 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.AddressInfoEntries.displayName = 'proto.org.dash.platform.dapi.v0.AddressInfoEntries'; } +/** + * 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.AddressBalanceChange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.AddressBalanceChange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.AddressBalanceChange.displayName = 'proto.org.dash.platform.dapi.v0.AddressBalanceChange'; +} +/** + * 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.BlockAddressBalanceChanges = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.displayName = 'proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges'; +} +/** + * 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.AddressBalanceUpdateEntries = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.displayName = 'proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -7244,6 +7327,216 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0'; } +/** + * 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.GetRecentAddressBalanceChangesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest'; +} +/** + * 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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0'; +} +/** + * 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.GetRecentAddressBalanceChangesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse'; +} +/** + * 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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0'; +} +/** + * 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.CompactedBlockAddressBalanceChanges = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.displayName = 'proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges'; +} +/** + * 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.CompactedAddressBalanceUpdateEntries = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.displayName = 'proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0'; +} @@ -73464,21 +73757,22 @@ proto.org.dash.platform.dapi.v0.AddressInfoEntries.prototype.clearAddressInfoEnt * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_ = [[2,3]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase = { + OPERATION_NOT_SET: 0, + SET_BALANCE: 2, + ADD_TO_BALANCE: 3 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getOperationCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0])); }; @@ -73496,8 +73790,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.AddressBalanceChange.toObject(opt_includeInstance, this); }; @@ -73506,13 +73800,15 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject(includeInstance, f) + address: msg.getAddress_asB64(), + setBalance: jspb.Message.getFieldWithDefault(msg, 2, "0"), + addToBalance: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -73526,23 +73822,23 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse; - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.AddressBalanceChange; + return proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -73550,9 +73846,16 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setSetBalance(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAddToBalance(value); break; default: reader.skipField(); @@ -73567,9 +73870,9 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.AddressBalanceChange.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -73577,51 +73880,159 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse} message + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64String( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64String( + 3, + f ); } }; +/** + * optional bytes address = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + /** - * @enum {number} + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - ADDRESS_INFO_ENTRY: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * optional uint64 set_balance = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getSetBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.setSetBalance = function(value) { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.clearSetBalance = function() { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.hasSetBalance = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 add_to_balance = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddToBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.setAddToBalance = function(value) { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.clearAddToBalance = function() { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.hasAddToBalance = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.repeatedFields_ = [2]; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** @@ -73636,8 +74047,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.toObject(opt_includeInstance, this); }; @@ -73646,15 +74057,15 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.toObject = function(includeInstance, msg) { var f, obj = { - addressInfoEntry: (f = msg.getAddressInfoEntry()) && proto.org.dash.platform.dapi.v0.AddressInfoEntry.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) + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + changesList: jspb.Message.toObjectList(msg.getChangesList(), + proto.org.dash.platform.dapi.v0.AddressBalanceChange.toObject, includeInstance) }; if (includeInstance) { @@ -73668,23 +74079,23 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0; - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges; + return proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -73692,19 +74103,13 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.AddressInfoEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressInfoEntry.deserializeBinaryFromReader); - msg.setAddressInfoEntry(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setBlockHeight(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.AddressBalanceChange; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader); + msg.addChanges(value); break; default: reader.skipField(); @@ -73719,9 +74124,9 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -73729,129 +74134,643 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddressInfoEntry(); - if (f != null) { - writer.writeMessage( + f = message.getBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, - f, - proto.org.dash.platform.dapi.v0.AddressInfoEntry.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 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.AddressBalanceChange.serializeBinaryToWriter ); } }; /** - * optional AddressInfoEntry address_info_entry = 1; - * @return {?proto.org.dash.platform.dapi.v0.AddressInfoEntry} + * optional uint64 block_height = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getAddressInfoEntry = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.AddressInfoEntry} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AddressInfoEntry, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.AddressInfoEntry|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setAddressInfoEntry = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.getBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} returns this */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearAddressInfoEntry = function() { - return this.setAddressInfoEntry(undefined); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated AddressBalanceChange changes = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.hasAddressInfoEntry = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.getChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.AddressBalanceChange, 2)); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} - */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.BlockAddressBalanceChanges} returns this +*/ +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.setChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} + */ +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.addChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.AddressBalanceChange, opt_index); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} returns this */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.clearChangesList = function() { + return this.setChangesList([]); }; + /** - * Returns whether this field is set. - * @return {boolean} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; -}; +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.AddressBalanceUpdateEntries.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(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.AddressBalanceUpdateEntries} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.toObject = function(includeInstance, msg) { + var f, obj = { + blockChangesList: jspb.Message.toObjectList(msg.getBlockChangesList(), + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.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.AddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries; + return proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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.BlockAddressBalanceChanges; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinaryFromReader); + msg.addBlockChanges(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.AddressBalanceUpdateEntries.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated BlockAddressBalanceChanges block_changes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.getBlockChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} returns this +*/ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.setBlockChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.addBlockChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.clearBlockChangesList = function() { + return this.setBlockChangesList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in 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.GetAddressInfoResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse; + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse.GetAddressInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + ADDRESS_INFO_ENTRY: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + addressInfoEntry: (f = msg.getAddressInfoEntry()) && proto.org.dash.platform.dapi.v0.AddressInfoEntry.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.GetAddressInfoResponse.GetAddressInfoResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.AddressInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressInfoEntry.deserializeBinaryFromReader); + msg.setAddressInfoEntry(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.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressInfoEntry(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.AddressInfoEntry.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 AddressInfoEntry address_info_entry = 1; + * @return {?proto.org.dash.platform.dapi.v0.AddressInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getAddressInfoEntry = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.AddressInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AddressInfoEntry, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.AddressInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setAddressInfoEntry = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearAddressInfoEntry = function() { + return this.setAddressInfoEntry(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.hasAddressInfoEntry = 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.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; @@ -75578,7 +76497,8 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { key: msg.getKey_asB64(), - depth: jspb.Message.getFieldWithDefault(msg, 2, 0) + depth: jspb.Message.getFieldWithDefault(msg, 2, 0), + checkpointHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -75623,6 +76543,10 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc var value = /** @type {number} */ (reader.readUint32()); msg.setDepth(value); break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCheckpointHeight(value); + break; default: reader.skipField(); break; @@ -75666,6 +76590,13 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc f ); } + f = message.getCheckpointHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } }; @@ -75729,6 +76660,24 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc }; +/** + * optional uint64 checkpoint_height = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.prototype.getCheckpointHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.prototype.setCheckpointHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + /** * optional GetAddressesBranchStateRequestV0 v0 = 1; * @return {?proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0} @@ -76096,6 +77045,1968 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.prototype.hasV0 }; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in 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.GetRecentAddressBalanceChangesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + startHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + 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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setStartHeight(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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 start_height = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.getStartHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetRecentAddressBalanceChangesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + ADDRESS_BALANCE_UPDATE_ENTRIES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + addressBalanceUpdateEntries: (f = msg.getAddressBalanceUpdateEntries()) && proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.AddressBalanceUpdateEntries; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.deserializeBinaryFromReader); + msg.setAddressBalanceUpdateEntries(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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressBalanceUpdateEntries(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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 AddressBalanceUpdateEntries address_balance_update_entries = 1; + * @return {?proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.getAddressBalanceUpdateEntries = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.setAddressBalanceUpdateEntries = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.clearAddressBalanceUpdateEntries = function() { + return this.setAddressBalanceUpdateEntries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.hasAddressBalanceUpdateEntries = 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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetRecentAddressBalanceChangesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.toObject = function(includeInstance, msg) { + var f, obj = { + startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + endBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, "0"), + changesList: jspb.Message.toObjectList(msg.getChangesList(), + proto.org.dash.platform.dapi.v0.AddressBalanceChange.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.CompactedBlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges; + return proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setStartBlockHeight(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setEndBlockHeight(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.AddressBalanceChange; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader); + msg.addChanges(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.CompactedBlockAddressBalanceChanges.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getEndBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.AddressBalanceChange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 start_block_height = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.getStartBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.setStartBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional uint64 end_block_height = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.getEndBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.setEndBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * repeated AddressBalanceChange changes = 3; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.getChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.AddressBalanceChange, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this +*/ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.setChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.addChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.AddressBalanceChange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.clearChangesList = function() { + return this.setChangesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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.CompactedAddressBalanceUpdateEntries.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.toObject = function(includeInstance, msg) { + var f, obj = { + compactedBlockChangesList: jspb.Message.toObjectList(msg.getCompactedBlockChangesList(), + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.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.CompactedAddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries; + return proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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.CompactedBlockAddressBalanceChanges; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinaryFromReader); + msg.addCompactedBlockChanges(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.CompactedAddressBalanceUpdateEntries.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompactedBlockChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated CompactedBlockAddressBalanceChanges compacted_block_changes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.getCompactedBlockChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} returns this +*/ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.setCompactedBlockChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.addCompactedBlockChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.clearCompactedBlockChangesList = function() { + return this.setCompactedBlockChangesList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in 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.GetRecentCompactedAddressBalanceChangesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + 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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setStartBlockHeight(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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 start_block_height = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.getStartBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.setStartBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetRecentCompactedAddressBalanceChangesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + COMPACTED_ADDRESS_BALANCE_UPDATE_ENTRIES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + compactedAddressBalanceUpdateEntries: (f = msg.getCompactedAddressBalanceUpdateEntries()) && proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.CompactedAddressBalanceUpdateEntries; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.deserializeBinaryFromReader); + msg.setCompactedAddressBalanceUpdateEntries(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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompactedAddressBalanceUpdateEntries(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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 CompactedAddressBalanceUpdateEntries compacted_address_balance_update_entries = 1; + * @return {?proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.getCompactedAddressBalanceUpdateEntries = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.setCompactedAddressBalanceUpdateEntries = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.clearCompactedAddressBalanceUpdateEntries = function() { + return this.setCompactedAddressBalanceUpdateEntries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.hasCompactedAddressBalanceUpdateEntries = 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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetRecentCompactedAddressBalanceChangesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * @enum {number} */ 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 ace036d651b..4542a928b79 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 @@ -27,10 +27,15 @@ CF_EXTERN_C_BEGIN +@class AddressBalanceChange; +@class AddressBalanceUpdateEntries; @class AddressInfoEntries; @class AddressInfoEntry; @class AllKeys; @class BalanceAndNonce; +@class BlockAddressBalanceChanges; +@class CompactedAddressBalanceUpdateEntries; +@class CompactedBlockAddressBalanceChanges; @class GPBBytesValue; @class GPBUInt32Value; @class GetAddressInfoRequest_GetAddressInfoRequestV0; @@ -192,6 +197,10 @@ CF_EXTERN_C_BEGIN @class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0; @class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal; @class GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals; +@class GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0; +@class GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0; +@class GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0; +@class GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0; @class GetStatusRequest_GetStatusRequestV0; @class GetStatusResponse_GetStatusResponseV0; @class GetStatusResponse_GetStatusResponseV0_Chain; @@ -7867,6 +7876,68 @@ GPB_FINAL @interface AddressInfoEntries : GPBMessage @end +#pragma mark - AddressBalanceChange + +typedef GPB_ENUM(AddressBalanceChange_FieldNumber) { + AddressBalanceChange_FieldNumber_Address = 1, + AddressBalanceChange_FieldNumber_SetBalance = 2, + AddressBalanceChange_FieldNumber_AddToBalance = 3, +}; + +typedef GPB_ENUM(AddressBalanceChange_Operation_OneOfCase) { + AddressBalanceChange_Operation_OneOfCase_GPBUnsetOneOfCase = 0, + AddressBalanceChange_Operation_OneOfCase_SetBalance = 2, + AddressBalanceChange_Operation_OneOfCase_AddToBalance = 3, +}; + +GPB_FINAL @interface AddressBalanceChange : GPBMessage + +@property(nonatomic, readwrite, copy, null_resettable) NSData *address; + +@property(nonatomic, readonly) AddressBalanceChange_Operation_OneOfCase operationOneOfCase; + +@property(nonatomic, readwrite) uint64_t setBalance; + +@property(nonatomic, readwrite) uint64_t addToBalance; + +@end + +/** + * Clears whatever value was set for the oneof 'operation'. + **/ +void AddressBalanceChange_ClearOperationOneOfCase(AddressBalanceChange *message); + +#pragma mark - BlockAddressBalanceChanges + +typedef GPB_ENUM(BlockAddressBalanceChanges_FieldNumber) { + BlockAddressBalanceChanges_FieldNumber_BlockHeight = 1, + BlockAddressBalanceChanges_FieldNumber_ChangesArray = 2, +}; + +GPB_FINAL @interface BlockAddressBalanceChanges : GPBMessage + +@property(nonatomic, readwrite) uint64_t blockHeight; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *changesArray; +/** The number of items in @c changesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger changesArray_Count; + +@end + +#pragma mark - AddressBalanceUpdateEntries + +typedef GPB_ENUM(AddressBalanceUpdateEntries_FieldNumber) { + AddressBalanceUpdateEntries_FieldNumber_BlockChangesArray = 1, +}; + +GPB_FINAL @interface AddressBalanceUpdateEntries : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *blockChangesArray; +/** The number of items in @c blockChangesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger blockChangesArray_Count; + +@end + #pragma mark - GetAddressInfoResponse typedef GPB_ENUM(GetAddressInfoResponse_FieldNumber) { @@ -8124,6 +8195,7 @@ void GetAddressesBranchStateRequest_ClearVersionOneOfCase(GetAddressesBranchStat typedef GPB_ENUM(GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0_FieldNumber) { GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0_FieldNumber_Key = 1, GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0_FieldNumber_Depth = 2, + GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0_FieldNumber_CheckpointHeight = 3, }; GPB_FINAL @interface GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0 : GPBMessage @@ -8132,6 +8204,9 @@ GPB_FINAL @interface GetAddressesBranchStateRequest_GetAddressesBranchStateReque @property(nonatomic, readwrite) uint32_t depth; +/** Block height from trunk response metadata for consistency */ +@property(nonatomic, readwrite) uint64_t checkpointHeight; + @end #pragma mark - GetAddressesBranchStateResponse @@ -8170,6 +8245,232 @@ GPB_FINAL @interface GetAddressesBranchStateResponse_GetAddressesBranchStateResp @end +#pragma mark - GetRecentAddressBalanceChangesRequest + +typedef GPB_ENUM(GetRecentAddressBalanceChangesRequest_FieldNumber) { + GetRecentAddressBalanceChangesRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetRecentAddressBalanceChangesRequest_Version_OneOfCase) { + GetRecentAddressBalanceChangesRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetRecentAddressBalanceChangesRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetRecentAddressBalanceChangesRequest : GPBMessage + +@property(nonatomic, readonly) GetRecentAddressBalanceChangesRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetRecentAddressBalanceChangesRequest_ClearVersionOneOfCase(GetRecentAddressBalanceChangesRequest *message); + +#pragma mark - GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 + +typedef GPB_ENUM(GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0_FieldNumber) { + GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0_FieldNumber_StartHeight = 1, + GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0_FieldNumber_Prove = 2, +}; + +GPB_FINAL @interface GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 : GPBMessage + +@property(nonatomic, readwrite) uint64_t startHeight; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetRecentAddressBalanceChangesResponse + +typedef GPB_ENUM(GetRecentAddressBalanceChangesResponse_FieldNumber) { + GetRecentAddressBalanceChangesResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetRecentAddressBalanceChangesResponse_Version_OneOfCase) { + GetRecentAddressBalanceChangesResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetRecentAddressBalanceChangesResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetRecentAddressBalanceChangesResponse : GPBMessage + +@property(nonatomic, readonly) GetRecentAddressBalanceChangesResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetRecentAddressBalanceChangesResponse_ClearVersionOneOfCase(GetRecentAddressBalanceChangesResponse *message); + +#pragma mark - GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 + +typedef GPB_ENUM(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber) { + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber_AddressBalanceUpdateEntries = 1, + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber_Proof = 2, + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_Result_OneOfCase) { + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_Result_OneOfCase_AddressBalanceUpdateEntries = 1, + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) AddressBalanceUpdateEntries *addressBalanceUpdateEntries; + +@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 GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_ClearResultOneOfCase(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 *message); + +#pragma mark - CompactedBlockAddressBalanceChanges + +typedef GPB_ENUM(CompactedBlockAddressBalanceChanges_FieldNumber) { + CompactedBlockAddressBalanceChanges_FieldNumber_StartBlockHeight = 1, + CompactedBlockAddressBalanceChanges_FieldNumber_EndBlockHeight = 2, + CompactedBlockAddressBalanceChanges_FieldNumber_ChangesArray = 3, +}; + +GPB_FINAL @interface CompactedBlockAddressBalanceChanges : GPBMessage + +@property(nonatomic, readwrite) uint64_t startBlockHeight; + +@property(nonatomic, readwrite) uint64_t endBlockHeight; + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *changesArray; +/** The number of items in @c changesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger changesArray_Count; + +@end + +#pragma mark - CompactedAddressBalanceUpdateEntries + +typedef GPB_ENUM(CompactedAddressBalanceUpdateEntries_FieldNumber) { + CompactedAddressBalanceUpdateEntries_FieldNumber_CompactedBlockChangesArray = 1, +}; + +GPB_FINAL @interface CompactedAddressBalanceUpdateEntries : GPBMessage + +@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray *compactedBlockChangesArray; +/** The number of items in @c compactedBlockChangesArray without causing the array to be created. */ +@property(nonatomic, readonly) NSUInteger compactedBlockChangesArray_Count; + +@end + +#pragma mark - GetRecentCompactedAddressBalanceChangesRequest + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesRequest_FieldNumber) { + GetRecentCompactedAddressBalanceChangesRequest_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesRequest_Version_OneOfCase) { + GetRecentCompactedAddressBalanceChangesRequest_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetRecentCompactedAddressBalanceChangesRequest_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetRecentCompactedAddressBalanceChangesRequest : GPBMessage + +@property(nonatomic, readonly) GetRecentCompactedAddressBalanceChangesRequest_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetRecentCompactedAddressBalanceChangesRequest_ClearVersionOneOfCase(GetRecentCompactedAddressBalanceChangesRequest *message); + +#pragma mark - GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0_FieldNumber) { + GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0_FieldNumber_StartBlockHeight = 1, + GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0_FieldNumber_Prove = 2, +}; + +GPB_FINAL @interface GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 : GPBMessage + +@property(nonatomic, readwrite) uint64_t startBlockHeight; + +@property(nonatomic, readwrite) BOOL prove; + +@end + +#pragma mark - GetRecentCompactedAddressBalanceChangesResponse + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesResponse_FieldNumber) { + GetRecentCompactedAddressBalanceChangesResponse_FieldNumber_V0 = 1, +}; + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesResponse_Version_OneOfCase) { + GetRecentCompactedAddressBalanceChangesResponse_Version_OneOfCase_GPBUnsetOneOfCase = 0, + GetRecentCompactedAddressBalanceChangesResponse_Version_OneOfCase_V0 = 1, +}; + +GPB_FINAL @interface GetRecentCompactedAddressBalanceChangesResponse : GPBMessage + +@property(nonatomic, readonly) GetRecentCompactedAddressBalanceChangesResponse_Version_OneOfCase versionOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 *v0; + +@end + +/** + * Clears whatever value was set for the oneof 'version'. + **/ +void GetRecentCompactedAddressBalanceChangesResponse_ClearVersionOneOfCase(GetRecentCompactedAddressBalanceChangesResponse *message); + +#pragma mark - GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber) { + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber_CompactedAddressBalanceUpdateEntries = 1, + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber_Proof = 2, + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber_Metadata = 3, +}; + +typedef GPB_ENUM(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_Result_OneOfCase) { + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_Result_OneOfCase_GPBUnsetOneOfCase = 0, + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_Result_OneOfCase_CompactedAddressBalanceUpdateEntries = 1, + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_Result_OneOfCase_Proof = 2, +}; + +GPB_FINAL @interface GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 : GPBMessage + +@property(nonatomic, readonly) GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_Result_OneOfCase resultOneOfCase; + +@property(nonatomic, readwrite, strong, null_resettable) CompactedAddressBalanceUpdateEntries *compactedAddressBalanceUpdateEntries; + +@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 GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_ClearResultOneOfCase(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 *message); + 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 d69a7fed8cc..793a51acef2 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 @@ -27,10 +27,15 @@ // Forward declarations of Objective C classes that we can use as // static values in struct initializers. // We don't use [Foo class] because it is not a static value. +GPBObjCClassDeclaration(AddressBalanceChange); +GPBObjCClassDeclaration(AddressBalanceUpdateEntries); GPBObjCClassDeclaration(AddressInfoEntries); GPBObjCClassDeclaration(AddressInfoEntry); GPBObjCClassDeclaration(AllKeys); GPBObjCClassDeclaration(BalanceAndNonce); +GPBObjCClassDeclaration(BlockAddressBalanceChanges); +GPBObjCClassDeclaration(CompactedAddressBalanceUpdateEntries); +GPBObjCClassDeclaration(CompactedBlockAddressBalanceChanges); GPBObjCClassDeclaration(GPBBytesValue); GPBObjCClassDeclaration(GPBUInt32Value); GPBObjCClassDeclaration(GetAddressInfoRequest); @@ -271,6 +276,14 @@ GPBObjCClassDeclaration(GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0); GPBObjCClassDeclaration(GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignal); GPBObjCClassDeclaration(GetProtocolVersionUpgradeVoteStatusResponse_GetProtocolVersionUpgradeVoteStatusResponseV0_VersionSignals); +GPBObjCClassDeclaration(GetRecentAddressBalanceChangesRequest); +GPBObjCClassDeclaration(GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0); +GPBObjCClassDeclaration(GetRecentAddressBalanceChangesResponse); +GPBObjCClassDeclaration(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0); +GPBObjCClassDeclaration(GetRecentCompactedAddressBalanceChangesRequest); +GPBObjCClassDeclaration(GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0); +GPBObjCClassDeclaration(GetRecentCompactedAddressBalanceChangesResponse); +GPBObjCClassDeclaration(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0); GPBObjCClassDeclaration(GetStatusRequest); GPBObjCClassDeclaration(GetStatusRequest_GetStatusRequestV0); GPBObjCClassDeclaration(GetStatusResponse); @@ -20457,6 +20470,186 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - AddressBalanceChange + +@implementation AddressBalanceChange + +@dynamic operationOneOfCase; +@dynamic address; +@dynamic setBalance; +@dynamic addToBalance; + +typedef struct AddressBalanceChange__storage_ { + uint32_t _has_storage_[2]; + NSData *address; + uint64_t setBalance; + uint64_t addToBalance; +} AddressBalanceChange__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 = "address", + .dataTypeSpecific.clazz = Nil, + .number = AddressBalanceChange_FieldNumber_Address, + .hasIndex = 0, + .offset = (uint32_t)offsetof(AddressBalanceChange__storage_, address), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBytes, + }, + { + .name = "setBalance", + .dataTypeSpecific.clazz = Nil, + .number = AddressBalanceChange_FieldNumber_SetBalance, + .hasIndex = -1, + .offset = (uint32_t)offsetof(AddressBalanceChange__storage_, setBalance), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + { + .name = "addToBalance", + .dataTypeSpecific.clazz = Nil, + .number = AddressBalanceChange_FieldNumber_AddToBalance, + .hasIndex = -1, + .offset = (uint32_t)offsetof(AddressBalanceChange__storage_, addToBalance), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeUInt64, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[AddressBalanceChange class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(AddressBalanceChange__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + static const char *oneofs[] = { + "operation", + }; + [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 AddressBalanceChange_ClearOperationOneOfCase(AddressBalanceChange *message) { + GPBDescriptor *descriptor = [AddressBalanceChange descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - BlockAddressBalanceChanges + +@implementation BlockAddressBalanceChanges + +@dynamic blockHeight; +@dynamic changesArray, changesArray_Count; + +typedef struct BlockAddressBalanceChanges__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *changesArray; + uint64_t blockHeight; +} BlockAddressBalanceChanges__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 = "blockHeight", + .dataTypeSpecific.clazz = Nil, + .number = BlockAddressBalanceChanges_FieldNumber_BlockHeight, + .hasIndex = 0, + .offset = (uint32_t)offsetof(BlockAddressBalanceChanges__storage_, blockHeight), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "changesArray", + .dataTypeSpecific.clazz = GPBObjCClass(AddressBalanceChange), + .number = BlockAddressBalanceChanges_FieldNumber_ChangesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(BlockAddressBalanceChanges__storage_, changesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[BlockAddressBalanceChanges class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(BlockAddressBalanceChanges__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - AddressBalanceUpdateEntries + +@implementation AddressBalanceUpdateEntries + +@dynamic blockChangesArray, blockChangesArray_Count; + +typedef struct AddressBalanceUpdateEntries__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *blockChangesArray; +} AddressBalanceUpdateEntries__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 = "blockChangesArray", + .dataTypeSpecific.clazz = GPBObjCClass(BlockAddressBalanceChanges), + .number = AddressBalanceUpdateEntries_FieldNumber_BlockChangesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(AddressBalanceUpdateEntries__storage_, blockChangesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[AddressBalanceUpdateEntries class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(AddressBalanceUpdateEntries__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + #pragma mark - GetAddressInfoResponse @implementation GetAddressInfoResponse @@ -21111,11 +21304,13 @@ @implementation GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0 @dynamic key; @dynamic depth; +@dynamic checkpointHeight; typedef struct GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0__storage_ { uint32_t _has_storage_[1]; uint32_t depth; NSData *key; + uint64_t checkpointHeight; } GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0__storage_; // This method is threadsafe because it is initially called @@ -21142,6 +21337,15 @@ + (GPBDescriptor *)descriptor { .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), .dataType = GPBDataTypeUInt32, }, + { + .name = "checkpointHeight", + .dataTypeSpecific.clazz = Nil, + .number = GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0_FieldNumber_CheckpointHeight, + .hasIndex = 2, + .offset = (uint32_t)offsetof(GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0__storage_, checkpointHeight), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, }; GPBDescriptor *localDescriptor = [GPBDescriptor allocDescriptorForClass:[GetAddressesBranchStateRequest_GetAddressesBranchStateRequestV0 class] @@ -21265,6 +21469,618 @@ + (GPBDescriptor *)descriptor { @end +#pragma mark - GetRecentAddressBalanceChangesRequest + +@implementation GetRecentAddressBalanceChangesRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetRecentAddressBalanceChangesRequest__storage_ { + uint32_t _has_storage_[2]; + GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 *v0; +} GetRecentAddressBalanceChangesRequest__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(GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0), + .number = GetRecentAddressBalanceChangesRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentAddressBalanceChangesRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentAddressBalanceChangesRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentAddressBalanceChangesRequest__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 GetRecentAddressBalanceChangesRequest_ClearVersionOneOfCase(GetRecentAddressBalanceChangesRequest *message) { + GPBDescriptor *descriptor = [GetRecentAddressBalanceChangesRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 + +@implementation GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 + +@dynamic startHeight; +@dynamic prove; + +typedef struct GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint64_t startHeight; +} GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0__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 = "startHeight", + .dataTypeSpecific.clazz = Nil, + .number = GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0_FieldNumber_StartHeight, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0__storage_, startHeight), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentAddressBalanceChangesRequest_GetRecentAddressBalanceChangesRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetRecentAddressBalanceChangesRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetRecentAddressBalanceChangesResponse + +@implementation GetRecentAddressBalanceChangesResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetRecentAddressBalanceChangesResponse__storage_ { + uint32_t _has_storage_[2]; + GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 *v0; +} GetRecentAddressBalanceChangesResponse__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(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0), + .number = GetRecentAddressBalanceChangesResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentAddressBalanceChangesResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentAddressBalanceChangesResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentAddressBalanceChangesResponse__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 GetRecentAddressBalanceChangesResponse_ClearVersionOneOfCase(GetRecentAddressBalanceChangesResponse *message) { + GPBDescriptor *descriptor = [GetRecentAddressBalanceChangesResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 + +@implementation GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 + +@dynamic resultOneOfCase; +@dynamic addressBalanceUpdateEntries; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0__storage_ { + uint32_t _has_storage_[2]; + AddressBalanceUpdateEntries *addressBalanceUpdateEntries; + Proof *proof; + ResponseMetadata *metadata; +} GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0__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 = "addressBalanceUpdateEntries", + .dataTypeSpecific.clazz = GPBObjCClass(AddressBalanceUpdateEntries), + .number = GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber_AddressBalanceUpdateEntries, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0__storage_, addressBalanceUpdateEntries), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0__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(GetRecentAddressBalanceChangesResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0_ClearResultOneOfCase(GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 *message) { + GPBDescriptor *descriptor = [GetRecentAddressBalanceChangesResponse_GetRecentAddressBalanceChangesResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - CompactedBlockAddressBalanceChanges + +@implementation CompactedBlockAddressBalanceChanges + +@dynamic startBlockHeight; +@dynamic endBlockHeight; +@dynamic changesArray, changesArray_Count; + +typedef struct CompactedBlockAddressBalanceChanges__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *changesArray; + uint64_t startBlockHeight; + uint64_t endBlockHeight; +} CompactedBlockAddressBalanceChanges__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 = "startBlockHeight", + .dataTypeSpecific.clazz = Nil, + .number = CompactedBlockAddressBalanceChanges_FieldNumber_StartBlockHeight, + .hasIndex = 0, + .offset = (uint32_t)offsetof(CompactedBlockAddressBalanceChanges__storage_, startBlockHeight), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "endBlockHeight", + .dataTypeSpecific.clazz = Nil, + .number = CompactedBlockAddressBalanceChanges_FieldNumber_EndBlockHeight, + .hasIndex = 1, + .offset = (uint32_t)offsetof(CompactedBlockAddressBalanceChanges__storage_, endBlockHeight), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "changesArray", + .dataTypeSpecific.clazz = GPBObjCClass(AddressBalanceChange), + .number = CompactedBlockAddressBalanceChanges_FieldNumber_ChangesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(CompactedBlockAddressBalanceChanges__storage_, changesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[CompactedBlockAddressBalanceChanges class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(CompactedBlockAddressBalanceChanges__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - CompactedAddressBalanceUpdateEntries + +@implementation CompactedAddressBalanceUpdateEntries + +@dynamic compactedBlockChangesArray, compactedBlockChangesArray_Count; + +typedef struct CompactedAddressBalanceUpdateEntries__storage_ { + uint32_t _has_storage_[1]; + NSMutableArray *compactedBlockChangesArray; +} CompactedAddressBalanceUpdateEntries__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 = "compactedBlockChangesArray", + .dataTypeSpecific.clazz = GPBObjCClass(CompactedBlockAddressBalanceChanges), + .number = CompactedAddressBalanceUpdateEntries_FieldNumber_CompactedBlockChangesArray, + .hasIndex = GPBNoHasBit, + .offset = (uint32_t)offsetof(CompactedAddressBalanceUpdateEntries__storage_, compactedBlockChangesArray), + .flags = GPBFieldRepeated, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[CompactedAddressBalanceUpdateEntries class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(CompactedAddressBalanceUpdateEntries__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetRecentCompactedAddressBalanceChangesRequest + +@implementation GetRecentCompactedAddressBalanceChangesRequest + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetRecentCompactedAddressBalanceChangesRequest__storage_ { + uint32_t _has_storage_[2]; + GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 *v0; +} GetRecentCompactedAddressBalanceChangesRequest__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(GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0), + .number = GetRecentCompactedAddressBalanceChangesRequest_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentCompactedAddressBalanceChangesRequest__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentCompactedAddressBalanceChangesRequest class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentCompactedAddressBalanceChangesRequest__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 GetRecentCompactedAddressBalanceChangesRequest_ClearVersionOneOfCase(GetRecentCompactedAddressBalanceChangesRequest *message) { + GPBDescriptor *descriptor = [GetRecentCompactedAddressBalanceChangesRequest descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 + +@implementation GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 + +@dynamic startBlockHeight; +@dynamic prove; + +typedef struct GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0__storage_ { + uint32_t _has_storage_[1]; + uint64_t startBlockHeight; +} GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0__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 = "startBlockHeight", + .dataTypeSpecific.clazz = Nil, + .number = GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0_FieldNumber_StartBlockHeight, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0__storage_, startBlockHeight), + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeUInt64, + }, + { + .name = "prove", + .dataTypeSpecific.clazz = Nil, + .number = GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0_FieldNumber_Prove, + .hasIndex = 1, + .offset = 2, // Stored in _has_storage_ to save space. + .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero), + .dataType = GPBDataTypeBool, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentCompactedAddressBalanceChangesRequest_GetRecentCompactedAddressBalanceChangesRequestV0__storage_) + flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown)]; + [localDescriptor setupContainingMessageClass:GPBObjCClass(GetRecentCompactedAddressBalanceChangesRequest)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +#pragma mark - GetRecentCompactedAddressBalanceChangesResponse + +@implementation GetRecentCompactedAddressBalanceChangesResponse + +@dynamic versionOneOfCase; +@dynamic v0; + +typedef struct GetRecentCompactedAddressBalanceChangesResponse__storage_ { + uint32_t _has_storage_[2]; + GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 *v0; +} GetRecentCompactedAddressBalanceChangesResponse__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(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0), + .number = GetRecentCompactedAddressBalanceChangesResponse_FieldNumber_V0, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentCompactedAddressBalanceChangesResponse__storage_, v0), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentCompactedAddressBalanceChangesResponse class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentCompactedAddressBalanceChangesResponse__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 GetRecentCompactedAddressBalanceChangesResponse_ClearVersionOneOfCase(GetRecentCompactedAddressBalanceChangesResponse *message) { + GPBDescriptor *descriptor = [GetRecentCompactedAddressBalanceChangesResponse descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} +#pragma mark - GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 + +@implementation GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 + +@dynamic resultOneOfCase; +@dynamic compactedAddressBalanceUpdateEntries; +@dynamic proof; +@dynamic hasMetadata, metadata; + +typedef struct GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0__storage_ { + uint32_t _has_storage_[2]; + CompactedAddressBalanceUpdateEntries *compactedAddressBalanceUpdateEntries; + Proof *proof; + ResponseMetadata *metadata; +} GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0__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 = "compactedAddressBalanceUpdateEntries", + .dataTypeSpecific.clazz = GPBObjCClass(CompactedAddressBalanceUpdateEntries), + .number = GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber_CompactedAddressBalanceUpdateEntries, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0__storage_, compactedAddressBalanceUpdateEntries), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "proof", + .dataTypeSpecific.clazz = GPBObjCClass(Proof), + .number = GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber_Proof, + .hasIndex = -1, + .offset = (uint32_t)offsetof(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0__storage_, proof), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + { + .name = "metadata", + .dataTypeSpecific.clazz = GPBObjCClass(ResponseMetadata), + .number = GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_FieldNumber_Metadata, + .hasIndex = 0, + .offset = (uint32_t)offsetof(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0__storage_, metadata), + .flags = GPBFieldOptional, + .dataType = GPBDataTypeMessage, + }, + }; + GPBDescriptor *localDescriptor = + [GPBDescriptor allocDescriptorForClass:[GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 class] + rootClass:[PlatformRoot class] + file:PlatformRoot_FileDescriptor() + fields:fields + fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription)) + storageSize:sizeof(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0__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(GetRecentCompactedAddressBalanceChangesResponse)]; + #if defined(DEBUG) && DEBUG + NSAssert(descriptor == nil, @"Startup recursed!"); + #endif // DEBUG + descriptor = localDescriptor; + } + return descriptor; +} + +@end + +void GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0_ClearResultOneOfCase(GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 *message) { + GPBDescriptor *descriptor = [GetRecentCompactedAddressBalanceChangesResponse_GetRecentCompactedAddressBalanceChangesResponseV0 descriptor]; + GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0]; + GPBClearOneof(message, oneof); +} #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 c6fceabbf89..35182b472ec 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 @@ -95,6 +95,10 @@ @class GetProtocolVersionUpgradeStateResponse; @class GetProtocolVersionUpgradeVoteStatusRequest; @class GetProtocolVersionUpgradeVoteStatusResponse; +@class GetRecentAddressBalanceChangesRequest; +@class GetRecentAddressBalanceChangesResponse; +@class GetRecentCompactedAddressBalanceChangesRequest; +@class GetRecentCompactedAddressBalanceChangesResponse; @class GetStatusRequest; @class GetStatusResponse; @class GetTokenContractInfoRequest; @@ -364,6 +368,14 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCUnaryProtoCall *)getAddressesBranchStateWithMessage:(GetAddressesBranchStateRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; +#pragma mark getRecentAddressBalanceChanges(GetRecentAddressBalanceChangesRequest) returns (GetRecentAddressBalanceChangesResponse) + +- (GRPCUnaryProtoCall *)getRecentAddressBalanceChangesWithMessage:(GetRecentAddressBalanceChangesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + +#pragma mark getRecentCompactedAddressBalanceChanges(GetRecentCompactedAddressBalanceChangesRequest) returns (GetRecentCompactedAddressBalanceChangesResponse) + +- (GRPCUnaryProtoCall *)getRecentCompactedAddressBalanceChangesWithMessage:(GetRecentCompactedAddressBalanceChangesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions; + @end /** @@ -779,6 +791,20 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCProtoCall *)RPCTogetAddressesBranchStateWithRequest:(GetAddressesBranchStateRequest *)request handler:(void(^)(GetAddressesBranchStateResponse *_Nullable response, NSError *_Nullable error))handler; +#pragma mark getRecentAddressBalanceChanges(GetRecentAddressBalanceChangesRequest) returns (GetRecentAddressBalanceChangesResponse) + +- (void)getRecentAddressBalanceChangesWithRequest:(GetRecentAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetRecentAddressBalanceChangesWithRequest:(GetRecentAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler; + + +#pragma mark getRecentCompactedAddressBalanceChanges(GetRecentCompactedAddressBalanceChangesRequest) returns (GetRecentCompactedAddressBalanceChangesResponse) + +- (void)getRecentCompactedAddressBalanceChangesWithRequest:(GetRecentCompactedAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentCompactedAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler; + +- (GRPCProtoCall *)RPCTogetRecentCompactedAddressBalanceChangesWithRequest:(GetRecentCompactedAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentCompactedAddressBalanceChangesResponse *_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 a81de6a3d57..d75ccb77c60 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 @@ -1155,5 +1155,45 @@ - (GRPCUnaryProtoCall *)getAddressesBranchStateWithMessage:(GetAddressesBranchSt responseClass:[GetAddressesBranchStateResponse class]]; } +#pragma mark getRecentAddressBalanceChanges(GetRecentAddressBalanceChangesRequest) returns (GetRecentAddressBalanceChangesResponse) + +- (void)getRecentAddressBalanceChangesWithRequest:(GetRecentAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetRecentAddressBalanceChangesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetRecentAddressBalanceChangesWithRequest:(GetRecentAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getRecentAddressBalanceChanges" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetRecentAddressBalanceChangesResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getRecentAddressBalanceChangesWithMessage:(GetRecentAddressBalanceChangesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getRecentAddressBalanceChanges" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetRecentAddressBalanceChangesResponse class]]; +} + +#pragma mark getRecentCompactedAddressBalanceChanges(GetRecentCompactedAddressBalanceChangesRequest) returns (GetRecentCompactedAddressBalanceChangesResponse) + +- (void)getRecentCompactedAddressBalanceChangesWithRequest:(GetRecentCompactedAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentCompactedAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler{ + [[self RPCTogetRecentCompactedAddressBalanceChangesWithRequest:request handler:handler] start]; +} +// Returns a not-yet-started RPC object. +- (GRPCProtoCall *)RPCTogetRecentCompactedAddressBalanceChangesWithRequest:(GetRecentCompactedAddressBalanceChangesRequest *)request handler:(void(^)(GetRecentCompactedAddressBalanceChangesResponse *_Nullable response, NSError *_Nullable error))handler{ + return [self RPCToMethod:@"getRecentCompactedAddressBalanceChanges" + requestsWriter:[GRXWriter writerWithValue:request] + responseClass:[GetRecentCompactedAddressBalanceChangesResponse class] + responsesWriteable:[GRXWriteable writeableWithSingleHandler:handler]]; +} +- (GRPCUnaryProtoCall *)getRecentCompactedAddressBalanceChangesWithMessage:(GetRecentCompactedAddressBalanceChangesRequest *)message responseHandler:(id)handler callOptions:(GRPCCallOptions *_Nullable)callOptions { + return [self RPCToMethod:@"getRecentCompactedAddressBalanceChanges" + message:message + responseHandler:handler + callOptions:callOptions + responseClass:[GetRecentCompactedAddressBalanceChangesResponse 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 89aa86831de..4fd55163b08 100644 --- a/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py +++ b/packages/dapi-grpc/clients/platform/v0/python/platform_pb2.py @@ -23,7 +23,7 @@ syntax='proto3', serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x98\x01\n\x10ResponseMetadata\x12\x12\n\x06height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x13\n\x07time_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb6\x01\n\x1aGetIdentityNonceResponseV0\x12\x1c\n\x0eidentity_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe5\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc7\x01\n\"GetIdentityContractNonceResponseV0\x12%\n\x17identity_contract_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xb1\x01\n\x1cGetIdentityBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb1\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\x84\x03\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x12\x42\x61lanceAndRevision\x12\x13\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x08revision\x18\x02 \x01(\x04\x42\x02\x30\x01\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x92\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xe2\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x02 \x01(\x04\x42\x02\x30\x01\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9f\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x8a\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aL\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x18\n\x07\x62\x61lance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc5\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xb0\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0bstart_at_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xb2\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x9a\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x18\x44\x61taContractHistoryEntry\x12\x10\n\x04\x64\x61te\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xb2\x02\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05startB\t\n\x07version\"\x95\x03\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n*GetIdentityByNonUniquePublicKeyHashRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest.GetIdentityByNonUniquePublicKeyHashRequestV0H\x00\x1a\x80\x01\n,GetIdentityByNonUniquePublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\x18\n\x0bstart_after\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x0e\n\x0c_start_afterB\t\n\x07version\"\xd6\x06\n+GetIdentityByNonUniquePublicKeyHashResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0H\x00\x1a\x96\x05\n-GetIdentityByNonUniquePublicKeyHashResponseV0\x12\x9a\x01\n\x08identity\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponseH\x00\x12\x9d\x01\n\x05proof\x18\x02 \x01(\x0b\x32\x8b\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponseH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x10IdentityResponse\x12\x15\n\x08identity\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_identity\x1a\xa6\x01\n\x16IdentityProvedResponse\x12P\n&grovedb_identity_public_key_hash_proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12!\n\x14identity_proof_bytes\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x17\n\x15_identity_proof_bytesB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x99\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x9c\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\xa6\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x16\n\nstart_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xbf\x02\n\x1dGetFinalizedEpochInfosRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0H\x00\x1a\xaa\x01\n\x1fGetFinalizedEpochInfosRequestV0\x12\x19\n\x11start_epoch_index\x18\x01 \x01(\r\x12\"\n\x1astart_epoch_index_included\x18\x02 \x01(\x08\x12\x17\n\x0f\x65nd_epoch_index\x18\x03 \x01(\r\x12 \n\x18\x65nd_epoch_index_included\x18\x04 \x01(\x08\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xbd\t\n\x1eGetFinalizedEpochInfosResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0H\x00\x1a\xa5\x08\n GetFinalizedEpochInfosResponseV0\x12\x80\x01\n\x06\x65pochs\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xa4\x01\n\x13\x46inalizedEpochInfos\x12\x8c\x01\n\x15\x66inalized_epoch_infos\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo\x1a\x9f\x04\n\x12\x46inalizedEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x1c\n\x10\x66irst_block_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\r\x12!\n\x15total_blocks_in_epoch\x18\x07 \x01(\x04\x42\x02\x30\x01\x12*\n\"next_epoch_start_core_block_height\x18\x08 \x01(\r\x12!\n\x15total_processing_fees\x18\t \x01(\x04\x42\x02\x30\x01\x12*\n\x1etotal_distributed_storage_fees\x18\n \x01(\x04\x42\x02\x30\x01\x12&\n\x1atotal_created_storage_fees\x18\x0b \x01(\x04\x42\x02\x30\x01\x12\x1e\n\x12\x63ore_block_rewards\x18\x0c \x01(\x04\x42\x02\x30\x01\x12\x81\x01\n\x0f\x62lock_proposers\x18\r \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer\x1a\x39\n\rBlockProposer\x12\x13\n\x0bproposer_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x62lock_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xc0\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1aI\n\x0fStartAtTimeInfo\x12\x19\n\rstart_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a\x43\n\rEndAtTimeInfo\x12\x17\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\x83\x06\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xee\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aV\n\x1eSerializedVotePollsByTimestamp\x12\x15\n\ttimestamp\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x94\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xe7\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xda\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12$\n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x42\x02\x30\x01\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12%\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xed\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xbd\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd9\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb8\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x15\n\x07\x63redits\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\xe4\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xf3\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\x82\x05\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xcc\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a<\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x12\n\nnext_epoch\x18\x05 \x01(\r\x1a\x7f\n\x04Time\x12\x11\n\x05local\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x05\x62lock\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x12\x18\n\x07genesis\x18\x03 \x01(\x04\x42\x02\x30\x01H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xb3\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1f\n\x13latest_block_height\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12!\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15max_peer_block_height\x18\t \x01(\x04\x42\x02\x30\x01\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\x85\x02\n\tStateSync\x12\x1d\n\x11total_synced_time\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eremaining_time\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\"\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fsnapshot_height\x18\x05 \x01(\x04\x42\x02\x30\x01\x12!\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x01\n#GetTokenDirectPurchasePricesRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0H\x00\x1aI\n%GetTokenDirectPurchasePricesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x8b\t\n$GetTokenDirectPurchasePricesResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0H\x00\x1a\xe1\x07\n&GetTokenDirectPurchasePricesResponseV0\x12\xa9\x01\n\x1ctoken_direct_purchase_prices\x18\x01 \x01(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePricesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xa7\x01\n\x0fPricingSchedule\x12\x93\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PriceForQuantity\x1a\xe4\x01\n\x1dTokenDirectPurchasePriceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x15\n\x0b\x66ixed_price\x18\x02 \x01(\x04H\x00\x12\x90\x01\n\x0evariable_price\x18\x03 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingScheduleH\x00\x42\x07\n\x05price\x1a\xc8\x01\n\x19TokenDirectPurchasePrices\x12\xaa\x01\n\x1btoken_direct_purchase_price\x18\x01 \x03(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePriceEntryB\x08\n\x06resultB\t\n\x07version\"\xce\x01\n\x1bGetTokenContractInfoRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenContractInfoRequest.GetTokenContractInfoRequestV0H\x00\x1a@\n\x1dGetTokenContractInfoRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xfb\x03\n\x1cGetTokenContractInfoResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0H\x00\x1a\xe9\x02\n\x1eGetTokenContractInfoResponseV0\x12|\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0.TokenContractInfoDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aM\n\x15TokenContractInfoData\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\x82\x04\n-GetTokenPerpetualDistributionLastClaimRequest\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.GetTokenPerpetualDistributionLastClaimRequestV0H\x00\x1aI\n\x11\x43ontractTokenInfo\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\r\x1a\xf1\x01\n/GetTokenPerpetualDistributionLastClaimRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12v\n\rcontract_info\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.ContractTokenInfoH\x00\x88\x01\x01\x12\x13\n\x0bidentity_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x10\n\x0e_contract_infoB\t\n\x07version\"\x93\x05\n.GetTokenPerpetualDistributionLastClaimResponse\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0H\x00\x1a\xca\x03\n0GetTokenPerpetualDistributionLastClaimResponseV0\x12\x9f\x01\n\nlast_claim\x18\x01 \x01(\x0b\x32\x88\x01.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0.LastClaimInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\rLastClaimInfo\x12\x1a\n\x0ctimestamp_ms\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1a\n\x0c\x62lock_height\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x0f\n\x05\x65poch\x18\x03 \x01(\rH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x42\t\n\x07paid_atB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xd6\x1e\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xd3\x1d\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a[\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0c\x62urn_from_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xe6\x03\n\x1eUpdateDirectPurchasePriceEvent\x12\x15\n\x0b\x66ixed_price\x18\x01 \x01(\x04H\x00\x12\x95\x01\n\x0evariable_price\x18\x02 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PricingScheduleH\x00\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xac\x01\n\x0fPricingSchedule\x12\x98\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PriceForQuantityB\x07\n\x05priceB\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xd1\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12}\n\x10\x65mergency_action\x18\x06 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x07 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x12\x83\x01\n\x0cupdate_price\x18\x08 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x15GetAddressInfoRequest\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0H\x00\x1a\x39\n\x17GetAddressInfoRequestV0\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x85\x01\n\x10\x41\x64\x64ressInfoEntry\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12J\n\x11\x62\x61lance_and_nonce\x18\x02 \x01(\x0b\x32*.org.dash.platform.dapi.v0.BalanceAndNonceH\x00\x88\x01\x01\x42\x14\n\x12_balance_and_nonce\"1\n\x0f\x42\x61lanceAndNonce\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\r\n\x05nonce\x18\x02 \x01(\r\"_\n\x12\x41\x64\x64ressInfoEntries\x12I\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x03(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntry\"\xe1\x02\n\x16GetAddressInfoResponse\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0H\x00\x1a\xe1\x01\n\x18GetAddressInfoResponseV0\x12I\n\x12\x61\x64\x64ress_info_entry\x18\x01 \x01(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc3\x01\n\x18GetAddressesInfosRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetAddressesInfosRequest.GetAddressesInfosRequestV0H\x00\x1a>\n\x1aGetAddressesInfosRequestV0\x12\x11\n\taddresses\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf1\x02\n\x19GetAddressesInfosResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetAddressesInfosResponse.GetAddressesInfosResponseV0H\x00\x1a\xe8\x01\n\x1bGetAddressesInfosResponseV0\x12M\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x01(\x0b\x32-.org.dash.platform.dapi.v0.AddressInfoEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x1dGetAddressesTrunkStateRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest.GetAddressesTrunkStateRequestV0H\x00\x1a!\n\x1fGetAddressesTrunkStateRequestV0B\t\n\x07version\"\xaa\x02\n\x1eGetAddressesTrunkStateResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse.GetAddressesTrunkStateResponseV0H\x00\x1a\x92\x01\n GetAddressesTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xd5\x01\n\x1eGetAddressesBranchStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0H\x00\x1a>\n GetAddressesBranchStateRequestV0\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\rB\t\n\x07version\"\xd1\x01\n\x1fGetAddressesBranchStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0H\x00\x1a\x37\n!GetAddressesBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version*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\xff\x39\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\xb4\x01\n#getIdentityByNonUniquePublicKeyHash\x12\x45.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest\x1a\x46.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8d\x01\n\x16getFinalizedEpochInfos\x12\x38.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest\x1a\x39.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x9f\x01\n\x1cgetTokenDirectPurchasePrices\x12>.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest\x1a?.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse\x12\x87\x01\n\x14getTokenContractInfo\x12\x36.org.dash.platform.dapi.v0.GetTokenContractInfoRequest\x1a\x37.org.dash.platform.dapi.v0.GetTokenContractInfoResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\xbd\x01\n&getTokenPerpetualDistributionLastClaim\x12H.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest\x1aI.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponse\x12u\n\x0egetAddressInfo\x12\x30.org.dash.platform.dapi.v0.GetAddressInfoRequest\x1a\x31.org.dash.platform.dapi.v0.GetAddressInfoResponse\x12~\n\x11getAddressesInfos\x12\x33.org.dash.platform.dapi.v0.GetAddressesInfosRequest\x1a\x34.org.dash.platform.dapi.v0.GetAddressesInfosResponse\x12\x8d\x01\n\x16getAddressesTrunkState\x12\x38.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest\x1a\x39.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse\x12\x90\x01\n\x17getAddressesBranchState\x12\x39.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest\x1a:.org.dash.platform.dapi.v0.GetAddressesBranchStateResponseb\x06proto3' + serialized_pb=b'\n\x0eplatform.proto\x12\x19org.dash.platform.dapi.v0\x1a\x1egoogle/protobuf/wrappers.proto\x1a\x1cgoogle/protobuf/struct.proto\x1a\x1fgoogle/protobuf/timestamp.proto\"\x81\x01\n\x05Proof\x12\x15\n\rgrovedb_proof\x18\x01 \x01(\x0c\x12\x13\n\x0bquorum_hash\x18\x02 \x01(\x0c\x12\x11\n\tsignature\x18\x03 \x01(\x0c\x12\r\n\x05round\x18\x04 \x01(\r\x12\x15\n\rblock_id_hash\x18\x05 \x01(\x0c\x12\x13\n\x0bquorum_type\x18\x06 \x01(\r\"\x98\x01\n\x10ResponseMetadata\x12\x12\n\x06height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12 \n\x18\x63ore_chain_locked_height\x18\x02 \x01(\r\x12\r\n\x05\x65poch\x18\x03 \x01(\r\x12\x13\n\x07time_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x18\n\x10protocol_version\x18\x05 \x01(\r\x12\x10\n\x08\x63hain_id\x18\x06 \x01(\t\"L\n\x1dStateTransitionBroadcastError\x12\x0c\n\x04\x63ode\x18\x01 \x01(\r\x12\x0f\n\x07message\x18\x02 \x01(\t\x12\x0c\n\x04\x64\x61ta\x18\x03 \x01(\x0c\";\n\x1f\x42roadcastStateTransitionRequest\x12\x18\n\x10state_transition\x18\x01 \x01(\x0c\"\"\n BroadcastStateTransitionResponse\"\xa4\x01\n\x12GetIdentityRequest\x12P\n\x02v0\x18\x01 \x01(\x0b\x32\x42.org.dash.platform.dapi.v0.GetIdentityRequest.GetIdentityRequestV0H\x00\x1a\x31\n\x14GetIdentityRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xc1\x01\n\x17GetIdentityNonceRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityNonceRequest.GetIdentityNonceRequestV0H\x00\x1a?\n\x19GetIdentityNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf6\x01\n\x1fGetIdentityContractNonceRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest.GetIdentityContractNonceRequestV0H\x00\x1a\\\n!GetIdentityContractNonceRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xc0\x01\n\x19GetIdentityBalanceRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetIdentityBalanceRequest.GetIdentityBalanceRequestV0H\x00\x1a\x38\n\x1bGetIdentityBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xec\x01\n$GetIdentityBalanceAndRevisionRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest.GetIdentityBalanceAndRevisionRequestV0H\x00\x1a\x43\n&GetIdentityBalanceAndRevisionRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9e\x02\n\x13GetIdentityResponse\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetIdentityResponse.GetIdentityResponseV0H\x00\x1a\xa7\x01\n\x15GetIdentityResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbc\x02\n\x18GetIdentityNonceResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetIdentityNonceResponse.GetIdentityNonceResponseV0H\x00\x1a\xb6\x01\n\x1aGetIdentityNonceResponseV0\x12\x1c\n\x0eidentity_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xe5\x02\n GetIdentityContractNonceResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse.GetIdentityContractNonceResponseV0H\x00\x1a\xc7\x01\n\"GetIdentityContractNonceResponseV0\x12%\n\x17identity_contract_nonce\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n\x1aGetIdentityBalanceResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetIdentityBalanceResponse.GetIdentityBalanceResponseV0H\x00\x1a\xb1\x01\n\x1cGetIdentityBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb1\x04\n%GetIdentityBalanceAndRevisionResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0H\x00\x1a\x84\x03\n\'GetIdentityBalanceAndRevisionResponseV0\x12\x9b\x01\n\x14\x62\x61lance_and_revision\x18\x01 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse.GetIdentityBalanceAndRevisionResponseV0.BalanceAndRevisionH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x12\x42\x61lanceAndRevision\x12\x13\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x14\n\x08revision\x18\x02 \x01(\x04\x42\x02\x30\x01\x42\x08\n\x06resultB\t\n\x07version\"\xd1\x01\n\x0eKeyRequestType\x12\x36\n\x08\x61ll_keys\x18\x01 \x01(\x0b\x32\".org.dash.platform.dapi.v0.AllKeysH\x00\x12@\n\rspecific_keys\x18\x02 \x01(\x0b\x32\'.org.dash.platform.dapi.v0.SpecificKeysH\x00\x12:\n\nsearch_key\x18\x03 \x01(\x0b\x32$.org.dash.platform.dapi.v0.SearchKeyH\x00\x42\t\n\x07request\"\t\n\x07\x41llKeys\"\x1f\n\x0cSpecificKeys\x12\x0f\n\x07key_ids\x18\x01 \x03(\r\"\xb6\x01\n\tSearchKey\x12I\n\x0bpurpose_map\x18\x01 \x03(\x0b\x32\x34.org.dash.platform.dapi.v0.SearchKey.PurposeMapEntry\x1a^\n\x0fPurposeMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12:\n\x05value\x18\x02 \x01(\x0b\x32+.org.dash.platform.dapi.v0.SecurityLevelMap:\x02\x38\x01\"\xbf\x02\n\x10SecurityLevelMap\x12]\n\x12security_level_map\x18\x01 \x03(\x0b\x32\x41.org.dash.platform.dapi.v0.SecurityLevelMap.SecurityLevelMapEntry\x1aw\n\x15SecurityLevelMapEntry\x12\x0b\n\x03key\x18\x01 \x01(\r\x12M\n\x05value\x18\x02 \x01(\x0e\x32>.org.dash.platform.dapi.v0.SecurityLevelMap.KeyKindRequestType:\x02\x38\x01\"S\n\x12KeyKindRequestType\x12\x1f\n\x1b\x43URRENT_KEY_OF_KIND_REQUEST\x10\x00\x12\x1c\n\x18\x41LL_KEYS_OF_KIND_REQUEST\x10\x01\"\xda\x02\n\x16GetIdentityKeysRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetIdentityKeysRequest.GetIdentityKeysRequestV0H\x00\x1a\xda\x01\n\x18GetIdentityKeysRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12?\n\x0crequest_type\x18\x02 \x01(\x0b\x32).org.dash.platform.dapi.v0.KeyRequestType\x12+\n\x05limit\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x04 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\x99\x03\n\x17GetIdentityKeysResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0H\x00\x1a\x96\x02\n\x19GetIdentityKeysResponseV0\x12\x61\n\x04keys\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetIdentityKeysResponse.GetIdentityKeysResponseV0.KeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1a\n\x04Keys\x12\x12\n\nkeys_bytes\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xef\x02\n GetIdentitiesContractKeysRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest.GetIdentitiesContractKeysRequestV0H\x00\x1a\xd1\x01\n\"GetIdentitiesContractKeysRequestV0\x12\x16\n\x0eidentities_ids\x18\x01 \x03(\x0c\x12\x13\n\x0b\x63ontract_id\x18\x02 \x01(\x0c\x12\x1f\n\x12\x64ocument_type_name\x18\x03 \x01(\tH\x00\x88\x01\x01\x12\x37\n\x08purposes\x18\x04 \x03(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x15\n\x13_document_type_nameB\t\n\x07version\"\xdf\x06\n!GetIdentitiesContractKeysResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0H\x00\x1a\xbe\x05\n#GetIdentitiesContractKeysResponseV0\x12\x8a\x01\n\x0fidentities_keys\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentitiesKeysH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aY\n\x0bPurposeKeys\x12\x36\n\x07purpose\x18\x01 \x01(\x0e\x32%.org.dash.platform.dapi.v0.KeyPurpose\x12\x12\n\nkeys_bytes\x18\x02 \x03(\x0c\x1a\x9f\x01\n\x0cIdentityKeys\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12z\n\x04keys\x18\x02 \x03(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.PurposeKeys\x1a\x90\x01\n\x0eIdentitiesKeys\x12~\n\x07\x65ntries\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse.GetIdentitiesContractKeysResponseV0.IdentityKeysB\x08\n\x06resultB\t\n\x07version\"\xa4\x02\n*GetEvonodesProposedEpochBlocksByIdsRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest.GetEvonodesProposedEpochBlocksByIdsRequestV0H\x00\x1ah\n,GetEvonodesProposedEpochBlocksByIdsRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x00\x88\x01\x01\x12\x0b\n\x03ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x08\n\x06_epochB\t\n\x07version\"\x92\x06\n&GetEvonodesProposedEpochBlocksResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0H\x00\x1a\xe2\x04\n(GetEvonodesProposedEpochBlocksResponseV0\x12\xb1\x01\n#evonodes_proposed_block_counts_info\x18\x01 \x01(\x0b\x32\x81\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodesProposedBlocksH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a?\n\x15\x45vonodeProposedBlocks\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x11\n\x05\x63ount\x18\x02 \x01(\x04\x42\x02\x30\x01\x1a\xc4\x01\n\x16\x45vonodesProposedBlocks\x12\xa9\x01\n\x1e\x65vonodes_proposed_block_counts\x18\x01 \x03(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse.GetEvonodesProposedEpochBlocksResponseV0.EvonodeProposedBlocksB\x08\n\x06resultB\t\n\x07version\"\xf2\x02\n,GetEvonodesProposedEpochBlocksByRangeRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest.GetEvonodesProposedEpochBlocksByRangeRequestV0H\x00\x1a\xaf\x01\n.GetEvonodesProposedEpochBlocksByRangeRequestV0\x12\x12\n\x05\x65poch\x18\x01 \x01(\rH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x02 \x01(\rH\x02\x88\x01\x01\x12\x15\n\x0bstart_after\x18\x03 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x04 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x07\n\x05startB\x08\n\x06_epochB\x08\n\x06_limitB\t\n\x07version\"\xcd\x01\n\x1cGetIdentitiesBalancesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest.GetIdentitiesBalancesRequestV0H\x00\x1a<\n\x1eGetIdentitiesBalancesRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9f\x05\n\x1dGetIdentitiesBalancesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0H\x00\x1a\x8a\x04\n\x1fGetIdentitiesBalancesResponseV0\x12\x8a\x01\n\x13identities_balances\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentitiesBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aL\n\x0fIdentityBalance\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x18\n\x07\x62\x61lance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x8f\x01\n\x12IdentitiesBalances\x12y\n\x07\x65ntries\x18\x01 \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse.GetIdentitiesBalancesResponseV0.IdentityBalanceB\x08\n\x06resultB\t\n\x07version\"\xb4\x01\n\x16GetDataContractRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetDataContractRequest.GetDataContractRequestV0H\x00\x1a\x35\n\x18GetDataContractRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb3\x02\n\x17GetDataContractResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractResponse.GetDataContractResponseV0H\x00\x1a\xb0\x01\n\x19GetDataContractResponseV0\x12\x17\n\rdata_contract\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb9\x01\n\x17GetDataContractsRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetDataContractsRequest.GetDataContractsRequestV0H\x00\x1a\x37\n\x19GetDataContractsRequestV0\x12\x0b\n\x03ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xcf\x04\n\x18GetDataContractsResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetDataContractsResponse.GetDataContractsResponseV0H\x00\x1a[\n\x11\x44\x61taContractEntry\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x32\n\rdata_contract\x18\x02 \x01(\x0b\x32\x1b.google.protobuf.BytesValue\x1au\n\rDataContracts\x12\x64\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32\x45.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractEntry\x1a\xf5\x01\n\x1aGetDataContractsResponseV0\x12[\n\x0e\x64\x61ta_contracts\x18\x01 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetDataContractsResponse.DataContractsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc5\x02\n\x1dGetDataContractHistoryRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetDataContractHistoryRequest.GetDataContractHistoryRequestV0H\x00\x1a\xb0\x01\n\x1fGetDataContractHistoryRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0bstart_at_ms\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xb2\x05\n\x1eGetDataContractHistoryResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0H\x00\x1a\x9a\x04\n GetDataContractHistoryResponseV0\x12\x8f\x01\n\x15\x64\x61ta_contract_history\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a;\n\x18\x44\x61taContractHistoryEntry\x12\x10\n\x04\x64\x61te\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05value\x18\x02 \x01(\x0c\x1a\xaa\x01\n\x13\x44\x61taContractHistory\x12\x92\x01\n\x15\x64\x61ta_contract_entries\x18\x01 \x03(\x0b\x32s.org.dash.platform.dapi.v0.GetDataContractHistoryResponse.GetDataContractHistoryResponseV0.DataContractHistoryEntryB\x08\n\x06resultB\t\n\x07version\"\xb2\x02\n\x13GetDocumentsRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetDocumentsRequest.GetDocumentsRequestV0H\x00\x1a\xbb\x01\n\x15GetDocumentsRequestV0\x12\x18\n\x10\x64\x61ta_contract_id\x18\x01 \x01(\x0c\x12\x15\n\rdocument_type\x18\x02 \x01(\t\x12\r\n\x05where\x18\x03 \x01(\x0c\x12\x10\n\x08order_by\x18\x04 \x01(\x0c\x12\r\n\x05limit\x18\x05 \x01(\r\x12\x15\n\x0bstart_after\x18\x06 \x01(\x0cH\x00\x12\x12\n\x08start_at\x18\x07 \x01(\x0cH\x00\x12\r\n\x05prove\x18\x08 \x01(\x08\x42\x07\n\x05startB\t\n\x07version\"\x95\x03\n\x14GetDocumentsResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0H\x00\x1a\x9b\x02\n\x16GetDocumentsResponseV0\x12\x65\n\tdocuments\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetDocumentsResponse.GetDocumentsResponseV0.DocumentsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1e\n\tDocuments\x12\x11\n\tdocuments\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xed\x01\n!GetIdentityByPublicKeyHashRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest.GetIdentityByPublicKeyHashRequestV0H\x00\x1aM\n#GetIdentityByPublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xda\x02\n\"GetIdentityByPublicKeyHashResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse.GetIdentityByPublicKeyHashResponseV0H\x00\x1a\xb6\x01\n$GetIdentityByPublicKeyHashResponseV0\x12\x12\n\x08identity\x18\x01 \x01(\x0cH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xbd\x02\n*GetIdentityByNonUniquePublicKeyHashRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest.GetIdentityByNonUniquePublicKeyHashRequestV0H\x00\x1a\x80\x01\n,GetIdentityByNonUniquePublicKeyHashRequestV0\x12\x17\n\x0fpublic_key_hash\x18\x01 \x01(\x0c\x12\x18\n\x0bstart_after\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\x0e\n\x0c_start_afterB\t\n\x07version\"\xd6\x06\n+GetIdentityByNonUniquePublicKeyHashResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0H\x00\x1a\x96\x05\n-GetIdentityByNonUniquePublicKeyHashResponseV0\x12\x9a\x01\n\x08identity\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityResponseH\x00\x12\x9d\x01\n\x05proof\x18\x02 \x01(\x0b\x32\x8b\x01.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse.GetIdentityByNonUniquePublicKeyHashResponseV0.IdentityProvedResponseH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x36\n\x10IdentityResponse\x12\x15\n\x08identity\x18\x01 \x01(\x0cH\x00\x88\x01\x01\x42\x0b\n\t_identity\x1a\xa6\x01\n\x16IdentityProvedResponse\x12P\n&grovedb_identity_public_key_hash_proof\x18\x01 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12!\n\x14identity_proof_bytes\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x17\n\x15_identity_proof_bytesB\x08\n\x06resultB\t\n\x07version\"\xfb\x01\n#WaitForStateTransitionResultRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest.WaitForStateTransitionResultRequestV0H\x00\x1aU\n%WaitForStateTransitionResultRequestV0\x12\x1d\n\x15state_transition_hash\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x99\x03\n$WaitForStateTransitionResultResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse.WaitForStateTransitionResultResponseV0H\x00\x1a\xef\x01\n&WaitForStateTransitionResultResponseV0\x12I\n\x05\x65rror\x18\x01 \x01(\x0b\x32\x38.org.dash.platform.dapi.v0.StateTransitionBroadcastErrorH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x19GetConsensusParamsRequest\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetConsensusParamsRequest.GetConsensusParamsRequestV0H\x00\x1a<\n\x1bGetConsensusParamsRequestV0\x12\x0e\n\x06height\x18\x01 \x01(\x05\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x9c\x04\n\x1aGetConsensusParamsResponse\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetConsensusParamsResponse.GetConsensusParamsResponseV0H\x00\x1aP\n\x14\x43onsensusParamsBlock\x12\x11\n\tmax_bytes\x18\x01 \x01(\t\x12\x0f\n\x07max_gas\x18\x02 \x01(\t\x12\x14\n\x0ctime_iota_ms\x18\x03 \x01(\t\x1a\x62\n\x17\x43onsensusParamsEvidence\x12\x1a\n\x12max_age_num_blocks\x18\x01 \x01(\t\x12\x18\n\x10max_age_duration\x18\x02 \x01(\t\x12\x11\n\tmax_bytes\x18\x03 \x01(\t\x1a\xda\x01\n\x1cGetConsensusParamsResponseV0\x12Y\n\x05\x62lock\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsBlock\x12_\n\x08\x65vidence\x18\x02 \x01(\x0b\x32M.org.dash.platform.dapi.v0.GetConsensusParamsResponse.ConsensusParamsEvidenceB\t\n\x07version\"\xe4\x01\n%GetProtocolVersionUpgradeStateRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest.GetProtocolVersionUpgradeStateRequestV0H\x00\x1a\x38\n\'GetProtocolVersionUpgradeStateRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xb5\x05\n&GetProtocolVersionUpgradeStateResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0H\x00\x1a\x85\x04\n(GetProtocolVersionUpgradeStateResponseV0\x12\x87\x01\n\x08versions\x18\x01 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x96\x01\n\x08Versions\x12\x89\x01\n\x08versions\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse.GetProtocolVersionUpgradeStateResponseV0.VersionEntry\x1a:\n\x0cVersionEntry\x12\x16\n\x0eversion_number\x18\x01 \x01(\r\x12\x12\n\nvote_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xa3\x02\n*GetProtocolVersionUpgradeVoteStatusRequest\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest.GetProtocolVersionUpgradeVoteStatusRequestV0H\x00\x1ag\n,GetProtocolVersionUpgradeVoteStatusRequestV0\x12\x19\n\x11start_pro_tx_hash\x18\x01 \x01(\x0c\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xef\x05\n+GetProtocolVersionUpgradeVoteStatusResponse\x12\x82\x01\n\x02v0\x18\x01 \x01(\x0b\x32t.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0H\x00\x1a\xaf\x04\n-GetProtocolVersionUpgradeVoteStatusResponseV0\x12\x98\x01\n\x08versions\x18\x01 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignalsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xaf\x01\n\x0eVersionSignals\x12\x9c\x01\n\x0fversion_signals\x18\x01 \x03(\x0b\x32\x82\x01.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal\x1a\x35\n\rVersionSignal\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07version\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xf5\x01\n\x14GetEpochsInfoRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetEpochsInfoRequest.GetEpochsInfoRequestV0H\x00\x1a|\n\x16GetEpochsInfoRequestV0\x12\x31\n\x0bstart_epoch\x18\x01 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\r\n\x05\x63ount\x18\x02 \x01(\r\x12\x11\n\tascending\x18\x03 \x01(\x08\x12\r\n\x05prove\x18\x04 \x01(\x08\x42\t\n\x07version\"\x99\x05\n\x15GetEpochsInfoResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0H\x00\x1a\x9c\x04\n\x17GetEpochsInfoResponseV0\x12\x65\n\x06\x65pochs\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1au\n\nEpochInfos\x12g\n\x0b\x65poch_infos\x18\x01 \x03(\x0b\x32R.org.dash.platform.dapi.v0.GetEpochsInfoResponse.GetEpochsInfoResponseV0.EpochInfo\x1a\xa6\x01\n\tEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x16\n\nstart_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xbf\x02\n\x1dGetFinalizedEpochInfosRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest.GetFinalizedEpochInfosRequestV0H\x00\x1a\xaa\x01\n\x1fGetFinalizedEpochInfosRequestV0\x12\x19\n\x11start_epoch_index\x18\x01 \x01(\r\x12\"\n\x1astart_epoch_index_included\x18\x02 \x01(\x08\x12\x17\n\x0f\x65nd_epoch_index\x18\x03 \x01(\r\x12 \n\x18\x65nd_epoch_index_included\x18\x04 \x01(\x08\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\t\n\x07version\"\xbd\t\n\x1eGetFinalizedEpochInfosResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0H\x00\x1a\xa5\x08\n GetFinalizedEpochInfosResponseV0\x12\x80\x01\n\x06\x65pochs\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xa4\x01\n\x13\x46inalizedEpochInfos\x12\x8c\x01\n\x15\x66inalized_epoch_infos\x18\x01 \x03(\x0b\x32m.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.FinalizedEpochInfo\x1a\x9f\x04\n\x12\x46inalizedEpochInfo\x12\x0e\n\x06number\x18\x01 \x01(\r\x12\x1e\n\x12\x66irst_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x1f\n\x17\x66irst_core_block_height\x18\x03 \x01(\r\x12\x1c\n\x10\x66irst_block_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x0e\x66\x65\x65_multiplier\x18\x05 \x01(\x01\x12\x18\n\x10protocol_version\x18\x06 \x01(\r\x12!\n\x15total_blocks_in_epoch\x18\x07 \x01(\x04\x42\x02\x30\x01\x12*\n\"next_epoch_start_core_block_height\x18\x08 \x01(\r\x12!\n\x15total_processing_fees\x18\t \x01(\x04\x42\x02\x30\x01\x12*\n\x1etotal_distributed_storage_fees\x18\n \x01(\x04\x42\x02\x30\x01\x12&\n\x1atotal_created_storage_fees\x18\x0b \x01(\x04\x42\x02\x30\x01\x12\x1e\n\x12\x63ore_block_rewards\x18\x0c \x01(\x04\x42\x02\x30\x01\x12\x81\x01\n\x0f\x62lock_proposers\x18\r \x03(\x0b\x32h.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse.GetFinalizedEpochInfosResponseV0.BlockProposer\x1a\x39\n\rBlockProposer\x12\x13\n\x0bproposer_id\x18\x01 \x01(\x0c\x12\x13\n\x0b\x62lock_count\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xde\x04\n\x1cGetContestedResourcesRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0H\x00\x1a\xcc\x03\n\x1eGetContestedResourcesRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x1a\n\x12start_index_values\x18\x04 \x03(\x0c\x12\x18\n\x10\x65nd_index_values\x18\x05 \x03(\x0c\x12\x89\x01\n\x13start_at_value_info\x18\x06 \x01(\x0b\x32g.org.dash.platform.dapi.v0.GetContestedResourcesRequest.GetContestedResourcesRequestV0.StartAtValueInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1a\x45\n\x10StartAtValueInfo\x12\x13\n\x0bstart_value\x18\x01 \x01(\x0c\x12\x1c\n\x14start_value_included\x18\x02 \x01(\x08\x42\x16\n\x14_start_at_value_infoB\x08\n\x06_countB\t\n\x07version\"\x88\x04\n\x1dGetContestedResourcesResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0H\x00\x1a\xf3\x02\n\x1fGetContestedResourcesResponseV0\x12\x95\x01\n\x19\x63ontested_resource_values\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourcesResponse.GetContestedResourcesResponseV0.ContestedResourceValuesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a<\n\x17\x43ontestedResourceValues\x12!\n\x19\x63ontested_resource_values\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x05\n\x1cGetVotePollsByEndDateRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0H\x00\x1a\xc0\x04\n\x1eGetVotePollsByEndDateRequestV0\x12\x84\x01\n\x0fstart_time_info\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.StartAtTimeInfoH\x00\x88\x01\x01\x12\x80\x01\n\rend_time_info\x18\x02 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest.GetVotePollsByEndDateRequestV0.EndAtTimeInfoH\x01\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x02\x88\x01\x01\x12\x13\n\x06offset\x18\x04 \x01(\rH\x03\x88\x01\x01\x12\x11\n\tascending\x18\x05 \x01(\x08\x12\r\n\x05prove\x18\x06 \x01(\x08\x1aI\n\x0fStartAtTimeInfo\x12\x19\n\rstart_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13start_time_included\x18\x02 \x01(\x08\x1a\x43\n\rEndAtTimeInfo\x12\x17\n\x0b\x65nd_time_ms\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x65nd_time_included\x18\x02 \x01(\x08\x42\x12\n\x10_start_time_infoB\x10\n\x0e_end_time_infoB\x08\n\x06_limitB\t\n\x07_offsetB\t\n\x07version\"\x83\x06\n\x1dGetVotePollsByEndDateResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0H\x00\x1a\xee\x04\n\x1fGetVotePollsByEndDateResponseV0\x12\x9c\x01\n\x18vote_polls_by_timestamps\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestampsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aV\n\x1eSerializedVotePollsByTimestamp\x12\x15\n\ttimestamp\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x15serialized_vote_polls\x18\x02 \x03(\x0c\x1a\xd7\x01\n\x1fSerializedVotePollsByTimestamps\x12\x99\x01\n\x18vote_polls_by_timestamps\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse.GetVotePollsByEndDateResponseV0.SerializedVotePollsByTimestamp\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xff\x06\n$GetContestedResourceVoteStateRequest\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0H\x00\x1a\xd5\x05\n&GetContestedResourceVoteStateRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x86\x01\n\x0bresult_type\x18\x05 \x01(\x0e\x32q.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.ResultType\x12\x36\n.allow_include_locked_and_abstaining_vote_tally\x18\x06 \x01(\x08\x12\xa3\x01\n\x18start_at_identifier_info\x18\x07 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest.GetContestedResourceVoteStateRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x08 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\"I\n\nResultType\x12\r\n\tDOCUMENTS\x10\x00\x12\x0e\n\nVOTE_TALLY\x10\x01\x12\x1c\n\x18\x44OCUMENTS_AND_VOTE_TALLY\x10\x02\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\x94\x0c\n%GetContestedResourceVoteStateResponse\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0H\x00\x1a\xe7\n\n\'GetContestedResourceVoteStateResponseV0\x12\xae\x01\n\x1d\x63ontested_resource_contenders\x18\x01 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.ContestedResourceContendersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xda\x03\n\x10\x46inishedVoteInfo\x12\xad\x01\n\x15\x66inished_vote_outcome\x18\x01 \x01(\x0e\x32\x8d\x01.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfo.FinishedVoteOutcome\x12\x1f\n\x12won_by_identity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12$\n\x18\x66inished_at_block_height\x18\x03 \x01(\x04\x42\x02\x30\x01\x12%\n\x1d\x66inished_at_core_block_height\x18\x04 \x01(\r\x12%\n\x19\x66inished_at_block_time_ms\x18\x05 \x01(\x04\x42\x02\x30\x01\x12\x19\n\x11\x66inished_at_epoch\x18\x06 \x01(\r\"O\n\x13\x46inishedVoteOutcome\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\n\n\x06LOCKED\x10\x01\x12\x16\n\x12NO_PREVIOUS_WINNER\x10\x02\x42\x15\n\x13_won_by_identity_id\x1a\xc4\x03\n\x1b\x43ontestedResourceContenders\x12\x86\x01\n\ncontenders\x18\x01 \x03(\x0b\x32r.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.Contender\x12\x1f\n\x12\x61\x62stain_vote_tally\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x1c\n\x0flock_vote_tally\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\x9a\x01\n\x12\x66inished_vote_info\x18\x04 \x01(\x0b\x32y.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse.GetContestedResourceVoteStateResponseV0.FinishedVoteInfoH\x02\x88\x01\x01\x42\x15\n\x13_abstain_vote_tallyB\x12\n\x10_lock_vote_tallyB\x15\n\x13_finished_vote_info\x1ak\n\tContender\x12\x12\n\nidentifier\x18\x01 \x01(\x0c\x12\x17\n\nvote_count\x18\x02 \x01(\rH\x00\x88\x01\x01\x12\x15\n\x08\x64ocument\x18\x03 \x01(\x0cH\x01\x88\x01\x01\x42\r\n\x0b_vote_countB\x0b\n\t_documentB\x08\n\x06resultB\t\n\x07version\"\xd5\x05\n,GetContestedResourceVotersForIdentityRequest\x12\x84\x01\n\x02v0\x18\x01 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0H\x00\x1a\x92\x04\n.GetContestedResourceVotersForIdentityRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\x12\n\nindex_name\x18\x03 \x01(\t\x12\x14\n\x0cindex_values\x18\x04 \x03(\x0c\x12\x15\n\rcontestant_id\x18\x05 \x01(\x0c\x12\xb4\x01\n\x18start_at_identifier_info\x18\x06 \x01(\x0b\x32\x8c\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest.GetContestedResourceVotersForIdentityRequestV0.StartAtIdentifierInfoH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x07 \x01(\rH\x01\x88\x01\x01\x12\x17\n\x0forder_ascending\x18\x08 \x01(\x08\x12\r\n\x05prove\x18\t \x01(\x08\x1aT\n\x15StartAtIdentifierInfo\x12\x18\n\x10start_identifier\x18\x01 \x01(\x0c\x12!\n\x19start_identifier_included\x18\x02 \x01(\x08\x42\x1b\n\x19_start_at_identifier_infoB\x08\n\x06_countB\t\n\x07version\"\xf1\x04\n-GetContestedResourceVotersForIdentityResponse\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0H\x00\x1a\xab\x03\n/GetContestedResourceVotersForIdentityResponseV0\x12\xb6\x01\n\x19\x63ontested_resource_voters\x18\x01 \x01(\x0b\x32\x90\x01.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse.GetContestedResourceVotersForIdentityResponseV0.ContestedResourceVotersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x43\n\x17\x43ontestedResourceVoters\x12\x0e\n\x06voters\x18\x01 \x03(\x0c\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x42\x08\n\x06resultB\t\n\x07version\"\xad\x05\n(GetContestedResourceIdentityVotesRequest\x12|\n\x02v0\x18\x01 \x01(\x0b\x32n.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0H\x00\x1a\xf7\x03\n*GetContestedResourceIdentityVotesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12+\n\x05limit\x18\x02 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12,\n\x06offset\x18\x03 \x01(\x0b\x32\x1c.google.protobuf.UInt32Value\x12\x17\n\x0forder_ascending\x18\x04 \x01(\x08\x12\xae\x01\n\x1astart_at_vote_poll_id_info\x18\x05 \x01(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest.GetContestedResourceIdentityVotesRequestV0.StartAtVotePollIdInfoH\x00\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x1a\x61\n\x15StartAtVotePollIdInfo\x12 \n\x18start_at_poll_identifier\x18\x01 \x01(\x0c\x12&\n\x1estart_poll_identifier_included\x18\x02 \x01(\x08\x42\x1d\n\x1b_start_at_vote_poll_id_infoB\t\n\x07version\"\xc8\n\n)GetContestedResourceIdentityVotesResponse\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0H\x00\x1a\x8f\t\n+GetContestedResourceIdentityVotesResponseV0\x12\xa1\x01\n\x05votes\x18\x01 \x01(\x0b\x32\x8f\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVotesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\xf7\x01\n\x1e\x43ontestedResourceIdentityVotes\x12\xba\x01\n!contested_resource_identity_votes\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ContestedResourceIdentityVote\x12\x18\n\x10\x66inished_results\x18\x02 \x01(\x08\x1a\xad\x02\n\x12ResourceVoteChoice\x12\xad\x01\n\x10vote_choice_type\x18\x01 \x01(\x0e\x32\x92\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoice.VoteChoiceType\x12\x18\n\x0bidentity_id\x18\x02 \x01(\x0cH\x00\x88\x01\x01\"=\n\x0eVoteChoiceType\x12\x14\n\x10TOWARDS_IDENTITY\x10\x00\x12\x0b\n\x07\x41\x42STAIN\x10\x01\x12\x08\n\x04LOCK\x10\x02\x42\x0e\n\x0c_identity_id\x1a\x95\x02\n\x1d\x43ontestedResourceIdentityVote\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1a\n\x12\x64ocument_type_name\x18\x02 \x01(\t\x12\'\n\x1fserialized_index_storage_values\x18\x03 \x03(\x0c\x12\x99\x01\n\x0bvote_choice\x18\x04 \x01(\x0b\x32\x83\x01.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse.GetContestedResourceIdentityVotesResponseV0.ResourceVoteChoiceB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n%GetPrefundedSpecializedBalanceRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest.GetPrefundedSpecializedBalanceRequestV0H\x00\x1a\x44\n\'GetPrefundedSpecializedBalanceRequestV0\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xed\x02\n&GetPrefundedSpecializedBalanceResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse.GetPrefundedSpecializedBalanceResponseV0H\x00\x1a\xbd\x01\n(GetPrefundedSpecializedBalanceResponseV0\x12\x15\n\x07\x62\x61lance\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xd0\x01\n GetTotalCreditsInPlatformRequest\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest.GetTotalCreditsInPlatformRequestV0H\x00\x1a\x33\n\"GetTotalCreditsInPlatformRequestV0\x12\r\n\x05prove\x18\x01 \x01(\x08\x42\t\n\x07version\"\xd9\x02\n!GetTotalCreditsInPlatformResponse\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse.GetTotalCreditsInPlatformResponseV0H\x00\x1a\xb8\x01\n#GetTotalCreditsInPlatformResponseV0\x12\x15\n\x07\x63redits\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc4\x01\n\x16GetPathElementsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetPathElementsRequest.GetPathElementsRequestV0H\x00\x1a\x45\n\x18GetPathElementsRequestV0\x12\x0c\n\x04path\x18\x01 \x03(\x0c\x12\x0c\n\x04keys\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xa3\x03\n\x17GetPathElementsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0H\x00\x1a\xa0\x02\n\x19GetPathElementsResponseV0\x12i\n\x08\x65lements\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetPathElementsResponse.GetPathElementsResponseV0.ElementsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x1c\n\x08\x45lements\x12\x10\n\x08\x65lements\x18\x01 \x03(\x0c\x42\x08\n\x06resultB\t\n\x07version\"\x81\x01\n\x10GetStatusRequest\x12L\n\x02v0\x18\x01 \x01(\x0b\x32>.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0H\x00\x1a\x14\n\x12GetStatusRequestV0B\t\n\x07version\"\xe4\x10\n\x11GetStatusResponse\x12N\n\x02v0\x18\x01 \x01(\x0b\x32@.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0H\x00\x1a\xf3\x0f\n\x13GetStatusResponseV0\x12Y\n\x07version\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version\x12S\n\x04node\x18\x02 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Node\x12U\n\x05\x63hain\x18\x03 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Chain\x12Y\n\x07network\x18\x04 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Network\x12^\n\nstate_sync\x18\x05 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.StateSync\x12S\n\x04time\x18\x06 \x01(\x0b\x32\x45.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Time\x1a\x82\x05\n\x07Version\x12\x63\n\x08software\x18\x01 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Software\x12\x63\n\x08protocol\x18\x02 \x01(\x0b\x32Q.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol\x1a^\n\x08Software\x12\x0c\n\x04\x64\x61pi\x18\x01 \x01(\t\x12\x12\n\x05\x64rive\x18\x02 \x01(\tH\x00\x88\x01\x01\x12\x17\n\ntenderdash\x18\x03 \x01(\tH\x01\x88\x01\x01\x42\x08\n\x06_driveB\r\n\x0b_tenderdash\x1a\xcc\x02\n\x08Protocol\x12p\n\ntenderdash\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Tenderdash\x12\x66\n\x05\x64rive\x18\x02 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetStatusResponse.GetStatusResponseV0.Version.Protocol.Drive\x1a(\n\nTenderdash\x12\x0b\n\x03p2p\x18\x01 \x01(\r\x12\r\n\x05\x62lock\x18\x02 \x01(\r\x1a<\n\x05\x44rive\x12\x0e\n\x06latest\x18\x03 \x01(\r\x12\x0f\n\x07\x63urrent\x18\x04 \x01(\r\x12\x12\n\nnext_epoch\x18\x05 \x01(\r\x1a\x7f\n\x04Time\x12\x11\n\x05local\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x16\n\x05\x62lock\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x88\x01\x01\x12\x18\n\x07genesis\x18\x03 \x01(\x04\x42\x02\x30\x01H\x01\x88\x01\x01\x12\x12\n\x05\x65poch\x18\x04 \x01(\rH\x02\x88\x01\x01\x42\x08\n\x06_blockB\n\n\x08_genesisB\x08\n\x06_epoch\x1a<\n\x04Node\x12\n\n\x02id\x18\x01 \x01(\x0c\x12\x18\n\x0bpro_tx_hash\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x42\x0e\n\x0c_pro_tx_hash\x1a\xb3\x02\n\x05\x43hain\x12\x13\n\x0b\x63\x61tching_up\x18\x01 \x01(\x08\x12\x19\n\x11latest_block_hash\x18\x02 \x01(\x0c\x12\x17\n\x0flatest_app_hash\x18\x03 \x01(\x0c\x12\x1f\n\x13latest_block_height\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x13\x65\x61rliest_block_hash\x18\x05 \x01(\x0c\x12\x19\n\x11\x65\x61rliest_app_hash\x18\x06 \x01(\x0c\x12!\n\x15\x65\x61rliest_block_height\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15max_peer_block_height\x18\t \x01(\x04\x42\x02\x30\x01\x12%\n\x18\x63ore_chain_locked_height\x18\n \x01(\rH\x00\x88\x01\x01\x42\x1b\n\x19_core_chain_locked_height\x1a\x43\n\x07Network\x12\x10\n\x08\x63hain_id\x18\x01 \x01(\t\x12\x13\n\x0bpeers_count\x18\x02 \x01(\r\x12\x11\n\tlistening\x18\x03 \x01(\x08\x1a\x85\x02\n\tStateSync\x12\x1d\n\x11total_synced_time\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1a\n\x0eremaining_time\x18\x02 \x01(\x04\x42\x02\x30\x01\x12\x17\n\x0ftotal_snapshots\x18\x03 \x01(\r\x12\"\n\x16\x63hunk_process_avg_time\x18\x04 \x01(\x04\x42\x02\x30\x01\x12\x1b\n\x0fsnapshot_height\x18\x05 \x01(\x04\x42\x02\x30\x01\x12!\n\x15snapshot_chunks_count\x18\x06 \x01(\x04\x42\x02\x30\x01\x12\x1d\n\x11\x62\x61\x63kfilled_blocks\x18\x07 \x01(\x04\x42\x02\x30\x01\x12!\n\x15\x62\x61\x63kfill_blocks_total\x18\x08 \x01(\x04\x42\x02\x30\x01\x42\t\n\x07version\"\xb1\x01\n\x1cGetCurrentQuorumsInfoRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest.GetCurrentQuorumsInfoRequestV0H\x00\x1a \n\x1eGetCurrentQuorumsInfoRequestV0B\t\n\x07version\"\xa1\x05\n\x1dGetCurrentQuorumsInfoResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.GetCurrentQuorumsInfoResponseV0H\x00\x1a\x46\n\x0bValidatorV0\x12\x13\n\x0bpro_tx_hash\x18\x01 \x01(\x0c\x12\x0f\n\x07node_ip\x18\x02 \x01(\t\x12\x11\n\tis_banned\x18\x03 \x01(\x08\x1a\xaf\x01\n\x0eValidatorSetV0\x12\x13\n\x0bquorum_hash\x18\x01 \x01(\x0c\x12\x13\n\x0b\x63ore_height\x18\x02 \x01(\r\x12U\n\x07members\x18\x03 \x03(\x0b\x32\x44.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorV0\x12\x1c\n\x14threshold_public_key\x18\x04 \x01(\x0c\x1a\x92\x02\n\x1fGetCurrentQuorumsInfoResponseV0\x12\x15\n\rquorum_hashes\x18\x01 \x03(\x0c\x12\x1b\n\x13\x63urrent_quorum_hash\x18\x02 \x01(\x0c\x12_\n\x0evalidator_sets\x18\x03 \x03(\x0b\x32G.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse.ValidatorSetV0\x12\x1b\n\x13last_block_proposer\x18\x04 \x01(\x0c\x12=\n\x08metadata\x18\x05 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf4\x01\n\x1fGetIdentityTokenBalancesRequest\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest.GetIdentityTokenBalancesRequestV0H\x00\x1aZ\n!GetIdentityTokenBalancesRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xad\x05\n GetIdentityTokenBalancesResponse\x12l\n\x02v0\x18\x01 \x01(\x0b\x32^.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0H\x00\x1a\x8f\x04\n\"GetIdentityTokenBalancesResponseV0\x12\x86\x01\n\x0etoken_balances\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aG\n\x11TokenBalanceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\x9a\x01\n\rTokenBalances\x12\x88\x01\n\x0etoken_balances\x18\x01 \x03(\x0b\x32p.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse.GetIdentityTokenBalancesResponseV0.TokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xfc\x01\n!GetIdentitiesTokenBalancesRequest\x12n\n\x02v0\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest.GetIdentitiesTokenBalancesRequestV0H\x00\x1a\\\n#GetIdentitiesTokenBalancesRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xf2\x05\n\"GetIdentitiesTokenBalancesResponse\x12p\n\x02v0\x18\x01 \x01(\x0b\x32\x62.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0H\x00\x1a\xce\x04\n$GetIdentitiesTokenBalancesResponseV0\x12\x9b\x01\n\x17identity_token_balances\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalancesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aR\n\x19IdentityTokenBalanceEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x14\n\x07\x62\x61lance\x18\x02 \x01(\x04H\x00\x88\x01\x01\x42\n\n\x08_balance\x1a\xb7\x01\n\x15IdentityTokenBalances\x12\x9d\x01\n\x17identity_token_balances\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse.GetIdentitiesTokenBalancesResponseV0.IdentityTokenBalanceEntryB\x08\n\x06resultB\t\n\x07version\"\xe8\x01\n\x1cGetIdentityTokenInfosRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest.GetIdentityTokenInfosRequestV0H\x00\x1aW\n\x1eGetIdentityTokenInfosRequestV0\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x11\n\ttoken_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\x98\x06\n\x1dGetIdentityTokenInfosResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0H\x00\x1a\x83\x05\n\x1fGetIdentityTokenInfosResponseV0\x12z\n\x0btoken_infos\x18\x01 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb0\x01\n\x0eTokenInfoEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x82\x01\n\x04info\x18\x02 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x8a\x01\n\nTokenInfos\x12|\n\x0btoken_infos\x18\x01 \x03(\x0b\x32g.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse.GetIdentityTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xf0\x01\n\x1eGetIdentitiesTokenInfosRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest.GetIdentitiesTokenInfosRequestV0H\x00\x1aY\n GetIdentitiesTokenInfosRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x14\n\x0cidentity_ids\x18\x02 \x03(\x0c\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xca\x06\n\x1fGetIdentitiesTokenInfosResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0H\x00\x1a\xaf\x05\n!GetIdentitiesTokenInfosResponseV0\x12\x8f\x01\n\x14identity_token_infos\x18\x01 \x01(\x0b\x32o.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.IdentityTokenInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a(\n\x16TokenIdentityInfoEntry\x12\x0e\n\x06\x66rozen\x18\x01 \x01(\x08\x1a\xb7\x01\n\x0eTokenInfoEntry\x12\x13\n\x0bidentity_id\x18\x01 \x01(\x0c\x12\x86\x01\n\x04info\x18\x02 \x01(\x0b\x32s.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenIdentityInfoEntryH\x00\x88\x01\x01\x42\x07\n\x05_info\x1a\x97\x01\n\x12IdentityTokenInfos\x12\x80\x01\n\x0btoken_infos\x18\x01 \x03(\x0b\x32k.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse.GetIdentitiesTokenInfosResponseV0.TokenInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbf\x01\n\x17GetTokenStatusesRequest\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetTokenStatusesRequest.GetTokenStatusesRequestV0H\x00\x1a=\n\x19GetTokenStatusesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xe7\x04\n\x18GetTokenStatusesResponse\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0H\x00\x1a\xe1\x03\n\x1aGetTokenStatusesResponseV0\x12v\n\x0etoken_statuses\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x44\n\x10TokenStatusEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x13\n\x06paused\x18\x02 \x01(\x08H\x00\x88\x01\x01\x42\t\n\x07_paused\x1a\x88\x01\n\rTokenStatuses\x12w\n\x0etoken_statuses\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetTokenStatusesResponse.GetTokenStatusesResponseV0.TokenStatusEntryB\x08\n\x06resultB\t\n\x07version\"\xef\x01\n#GetTokenDirectPurchasePricesRequest\x12r\n\x02v0\x18\x01 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest.GetTokenDirectPurchasePricesRequestV0H\x00\x1aI\n%GetTokenDirectPurchasePricesRequestV0\x12\x11\n\ttoken_ids\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x8b\t\n$GetTokenDirectPurchasePricesResponse\x12t\n\x02v0\x18\x01 \x01(\x0b\x32\x66.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0H\x00\x1a\xe1\x07\n&GetTokenDirectPurchasePricesResponseV0\x12\xa9\x01\n\x1ctoken_direct_purchase_prices\x18\x01 \x01(\x0b\x32\x80\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePricesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xa7\x01\n\x0fPricingSchedule\x12\x93\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32w.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PriceForQuantity\x1a\xe4\x01\n\x1dTokenDirectPurchasePriceEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x15\n\x0b\x66ixed_price\x18\x02 \x01(\x04H\x00\x12\x90\x01\n\x0evariable_price\x18\x03 \x01(\x0b\x32v.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.PricingScheduleH\x00\x42\x07\n\x05price\x1a\xc8\x01\n\x19TokenDirectPurchasePrices\x12\xaa\x01\n\x1btoken_direct_purchase_price\x18\x01 \x03(\x0b\x32\x84\x01.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse.GetTokenDirectPurchasePricesResponseV0.TokenDirectPurchasePriceEntryB\x08\n\x06resultB\t\n\x07version\"\xce\x01\n\x1bGetTokenContractInfoRequest\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenContractInfoRequest.GetTokenContractInfoRequestV0H\x00\x1a@\n\x1dGetTokenContractInfoRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xfb\x03\n\x1cGetTokenContractInfoResponse\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0H\x00\x1a\xe9\x02\n\x1eGetTokenContractInfoResponseV0\x12|\n\x04\x64\x61ta\x18\x01 \x01(\x0b\x32l.org.dash.platform.dapi.v0.GetTokenContractInfoResponse.GetTokenContractInfoResponseV0.TokenContractInfoDataH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1aM\n\x15TokenContractInfoData\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\rB\x08\n\x06resultB\t\n\x07version\"\xef\x04\n)GetTokenPreProgrammedDistributionsRequest\x12~\n\x02v0\x18\x01 \x01(\x0b\x32p.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0H\x00\x1a\xb6\x03\n+GetTokenPreProgrammedDistributionsRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x98\x01\n\rstart_at_info\x18\x02 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest.GetTokenPreProgrammedDistributionsRequestV0.StartAtInfoH\x00\x88\x01\x01\x12\x12\n\x05limit\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x1a\x9a\x01\n\x0bStartAtInfo\x12\x15\n\rstart_time_ms\x18\x01 \x01(\x04\x12\x1c\n\x0fstart_recipient\x18\x02 \x01(\x0cH\x00\x88\x01\x01\x12%\n\x18start_recipient_included\x18\x03 \x01(\x08H\x01\x88\x01\x01\x42\x12\n\x10_start_recipientB\x1b\n\x19_start_recipient_includedB\x10\n\x0e_start_at_infoB\x08\n\x06_limitB\t\n\x07version\"\xec\x07\n*GetTokenPreProgrammedDistributionsResponse\x12\x80\x01\n\x02v0\x18\x01 \x01(\x0b\x32r.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0H\x00\x1a\xaf\x06\n,GetTokenPreProgrammedDistributionsResponseV0\x12\xa5\x01\n\x13token_distributions\x18\x01 \x01(\x0b\x32\x85\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a>\n\x16TokenDistributionEntry\x12\x14\n\x0crecipient_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x1a\xd4\x01\n\x1bTokenTimedDistributionEntry\x12\x11\n\ttimestamp\x18\x01 \x01(\x04\x12\xa1\x01\n\rdistributions\x18\x02 \x03(\x0b\x32\x89\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenDistributionEntry\x1a\xc3\x01\n\x12TokenDistributions\x12\xac\x01\n\x13token_distributions\x18\x01 \x03(\x0b\x32\x8e\x01.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse.GetTokenPreProgrammedDistributionsResponseV0.TokenTimedDistributionEntryB\x08\n\x06resultB\t\n\x07version\"\x82\x04\n-GetTokenPerpetualDistributionLastClaimRequest\x12\x86\x01\n\x02v0\x18\x01 \x01(\x0b\x32x.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.GetTokenPerpetualDistributionLastClaimRequestV0H\x00\x1aI\n\x11\x43ontractTokenInfo\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17token_contract_position\x18\x02 \x01(\r\x1a\xf1\x01\n/GetTokenPerpetualDistributionLastClaimRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12v\n\rcontract_info\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest.ContractTokenInfoH\x00\x88\x01\x01\x12\x13\n\x0bidentity_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\x42\x10\n\x0e_contract_infoB\t\n\x07version\"\x93\x05\n.GetTokenPerpetualDistributionLastClaimResponse\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0H\x00\x1a\xca\x03\n0GetTokenPerpetualDistributionLastClaimResponseV0\x12\x9f\x01\n\nlast_claim\x18\x01 \x01(\x0b\x32\x88\x01.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse.GetTokenPerpetualDistributionLastClaimResponseV0.LastClaimInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\rLastClaimInfo\x12\x1a\n\x0ctimestamp_ms\x18\x01 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1a\n\x0c\x62lock_height\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x0f\n\x05\x65poch\x18\x03 \x01(\rH\x00\x12\x13\n\traw_bytes\x18\x04 \x01(\x0cH\x00\x42\t\n\x07paid_atB\x08\n\x06resultB\t\n\x07version\"\xca\x01\n\x1aGetTokenTotalSupplyRequest\x12`\n\x02v0\x18\x01 \x01(\x0b\x32R.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest.GetTokenTotalSupplyRequestV0H\x00\x1a?\n\x1cGetTokenTotalSupplyRequestV0\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xaf\x04\n\x1bGetTokenTotalSupplyResponse\x12\x62\n\x02v0\x18\x01 \x01(\x0b\x32T.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0H\x00\x1a\xa0\x03\n\x1dGetTokenTotalSupplyResponseV0\x12\x88\x01\n\x12token_total_supply\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse.GetTokenTotalSupplyResponseV0.TokenTotalSupplyEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1ax\n\x15TokenTotalSupplyEntry\x12\x10\n\x08token_id\x18\x01 \x01(\x0c\x12\x30\n(total_aggregated_amount_in_user_accounts\x18\x02 \x01(\x04\x12\x1b\n\x13total_system_amount\x18\x03 \x01(\x04\x42\x08\n\x06resultB\t\n\x07version\"\xd2\x01\n\x13GetGroupInfoRequest\x12R\n\x02v0\x18\x01 \x01(\x0b\x32\x44.org.dash.platform.dapi.v0.GetGroupInfoRequest.GetGroupInfoRequestV0H\x00\x1a\\\n\x15GetGroupInfoRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12\r\n\x05prove\x18\x03 \x01(\x08\x42\t\n\x07version\"\xd4\x05\n\x14GetGroupInfoResponse\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0H\x00\x1a\xda\x04\n\x16GetGroupInfoResponseV0\x12\x66\n\ngroup_info\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x98\x01\n\x0eGroupInfoEntry\x12h\n\x07members\x18\x01 \x03(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x02 \x01(\r\x1a\x8a\x01\n\tGroupInfo\x12n\n\ngroup_info\x18\x01 \x01(\x0b\x32U.org.dash.platform.dapi.v0.GetGroupInfoResponse.GetGroupInfoResponseV0.GroupInfoEntryH\x00\x88\x01\x01\x42\r\n\x0b_group_infoB\x08\n\x06resultB\t\n\x07version\"\xed\x03\n\x14GetGroupInfosRequest\x12T\n\x02v0\x18\x01 \x01(\x0b\x32\x46.org.dash.platform.dapi.v0.GetGroupInfosRequest.GetGroupInfosRequestV0H\x00\x1au\n\x1cStartAtGroupContractPosition\x12%\n\x1dstart_group_contract_position\x18\x01 \x01(\r\x12.\n&start_group_contract_position_included\x18\x02 \x01(\x08\x1a\xfc\x01\n\x16GetGroupInfosRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12{\n start_at_group_contract_position\x18\x02 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupInfosRequest.StartAtGroupContractPositionH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x03 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x04 \x01(\x08\x42#\n!_start_at_group_contract_positionB\x08\n\x06_countB\t\n\x07version\"\xff\x05\n\x15GetGroupInfosResponse\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0H\x00\x1a\x82\x05\n\x17GetGroupInfosResponseV0\x12j\n\x0bgroup_infos\x18\x01 \x01(\x0b\x32S.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupInfosH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x04 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x34\n\x10GroupMemberEntry\x12\x11\n\tmember_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\xc3\x01\n\x16GroupPositionInfoEntry\x12\x1f\n\x17group_contract_position\x18\x01 \x01(\r\x12j\n\x07members\x18\x02 \x03(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupMemberEntry\x12\x1c\n\x14group_required_power\x18\x03 \x01(\r\x1a\x82\x01\n\nGroupInfos\x12t\n\x0bgroup_infos\x18\x01 \x03(\x0b\x32_.org.dash.platform.dapi.v0.GetGroupInfosResponse.GetGroupInfosResponseV0.GroupPositionInfoEntryB\x08\n\x06resultB\t\n\x07version\"\xbe\x04\n\x16GetGroupActionsRequest\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetGroupActionsRequest.GetGroupActionsRequestV0H\x00\x1aL\n\x0fStartAtActionId\x12\x17\n\x0fstart_action_id\x18\x01 \x01(\x0c\x12 \n\x18start_action_id_included\x18\x02 \x01(\x08\x1a\xc8\x02\n\x18GetGroupActionsRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12N\n\x06status\x18\x03 \x01(\x0e\x32>.org.dash.platform.dapi.v0.GetGroupActionsRequest.ActionStatus\x12\x62\n\x12start_at_action_id\x18\x04 \x01(\x0b\x32\x41.org.dash.platform.dapi.v0.GetGroupActionsRequest.StartAtActionIdH\x00\x88\x01\x01\x12\x12\n\x05\x63ount\x18\x05 \x01(\rH\x01\x88\x01\x01\x12\r\n\x05prove\x18\x06 \x01(\x08\x42\x15\n\x13_start_at_action_idB\x08\n\x06_count\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\xd6\x1e\n\x17GetGroupActionsResponse\x12Z\n\x02v0\x18\x01 \x01(\x0b\x32L.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0H\x00\x1a\xd3\x1d\n\x19GetGroupActionsResponseV0\x12r\n\rgroup_actions\x18\x01 \x01(\x0b\x32Y.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionsH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a[\n\tMintEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0crecipient_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a[\n\tBurnEvent\x12\x0e\n\x06\x61mount\x18\x01 \x01(\x04\x12\x14\n\x0c\x62urn_from_id\x18\x02 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aJ\n\x0b\x46reezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1aL\n\rUnfreezeEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x66\n\x17\x44\x65stroyFrozenFundsEvent\x12\x11\n\tfrozen_id\x18\x01 \x01(\x0c\x12\x0e\n\x06\x61mount\x18\x02 \x01(\x04\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x13SharedEncryptedNote\x12\x18\n\x10sender_key_index\x18\x01 \x01(\r\x12\x1b\n\x13recipient_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a{\n\x15PersonalEncryptedNote\x12!\n\x19root_encryption_key_index\x18\x01 \x01(\r\x12\'\n\x1f\x64\x65rivation_encryption_key_index\x18\x02 \x01(\r\x12\x16\n\x0e\x65ncrypted_data\x18\x03 \x01(\x0c\x1a\xe9\x01\n\x14\x45mergencyActionEvent\x12\x81\x01\n\x0b\x61\x63tion_type\x18\x01 \x01(\x0e\x32l.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEvent.ActionType\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\"#\n\nActionType\x12\t\n\x05PAUSE\x10\x00\x12\n\n\x06RESUME\x10\x01\x42\x0e\n\x0c_public_note\x1a\x64\n\x16TokenConfigUpdateEvent\x12 \n\x18token_config_update_item\x18\x01 \x01(\x0c\x12\x18\n\x0bpublic_note\x18\x02 \x01(\tH\x00\x88\x01\x01\x42\x0e\n\x0c_public_note\x1a\xe6\x03\n\x1eUpdateDirectPurchasePriceEvent\x12\x15\n\x0b\x66ixed_price\x18\x01 \x01(\x04H\x00\x12\x95\x01\n\x0evariable_price\x18\x02 \x01(\x0b\x32{.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PricingScheduleH\x00\x12\x18\n\x0bpublic_note\x18\x03 \x01(\tH\x01\x88\x01\x01\x1a\x33\n\x10PriceForQuantity\x12\x10\n\x08quantity\x18\x01 \x01(\x04\x12\r\n\x05price\x18\x02 \x01(\x04\x1a\xac\x01\n\x0fPricingSchedule\x12\x98\x01\n\x12price_for_quantity\x18\x01 \x03(\x0b\x32|.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEvent.PriceForQuantityB\x07\n\x05priceB\x0e\n\x0c_public_note\x1a\xfc\x02\n\x10GroupActionEvent\x12n\n\x0btoken_event\x18\x01 \x01(\x0b\x32W.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenEventH\x00\x12t\n\x0e\x64ocument_event\x18\x02 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentEventH\x00\x12t\n\x0e\x63ontract_event\x18\x03 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractEventH\x00\x42\x0c\n\nevent_type\x1a\x8b\x01\n\rDocumentEvent\x12r\n\x06\x63reate\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DocumentCreateEventH\x00\x42\x06\n\x04type\x1a/\n\x13\x44ocumentCreateEvent\x12\x18\n\x10\x63reated_document\x18\x01 \x01(\x0c\x1a/\n\x13\x43ontractUpdateEvent\x12\x18\n\x10updated_contract\x18\x01 \x01(\x0c\x1a\x8b\x01\n\rContractEvent\x12r\n\x06update\x18\x01 \x01(\x0b\x32`.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.ContractUpdateEventH\x00\x42\x06\n\x04type\x1a\xd1\x07\n\nTokenEvent\x12\x66\n\x04mint\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.MintEventH\x00\x12\x66\n\x04\x62urn\x18\x02 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.BurnEventH\x00\x12j\n\x06\x66reeze\x18\x03 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.FreezeEventH\x00\x12n\n\x08unfreeze\x18\x04 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UnfreezeEventH\x00\x12\x84\x01\n\x14\x64\x65stroy_frozen_funds\x18\x05 \x01(\x0b\x32\x64.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.DestroyFrozenFundsEventH\x00\x12}\n\x10\x65mergency_action\x18\x06 \x01(\x0b\x32\x61.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.EmergencyActionEventH\x00\x12\x82\x01\n\x13token_config_update\x18\x07 \x01(\x0b\x32\x63.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.TokenConfigUpdateEventH\x00\x12\x83\x01\n\x0cupdate_price\x18\x08 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.UpdateDirectPurchasePriceEventH\x00\x42\x06\n\x04type\x1a\x93\x01\n\x10GroupActionEntry\x12\x11\n\taction_id\x18\x01 \x01(\x0c\x12l\n\x05\x65vent\x18\x02 \x01(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEvent\x1a\x84\x01\n\x0cGroupActions\x12t\n\rgroup_actions\x18\x01 \x03(\x0b\x32].org.dash.platform.dapi.v0.GetGroupActionsResponse.GetGroupActionsResponseV0.GroupActionEntryB\x08\n\x06resultB\t\n\x07version\"\x88\x03\n\x1cGetGroupActionSignersRequest\x12\x64\n\x02v0\x18\x01 \x01(\x0b\x32V.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.GetGroupActionSignersRequestV0H\x00\x1a\xce\x01\n\x1eGetGroupActionSignersRequestV0\x12\x13\n\x0b\x63ontract_id\x18\x01 \x01(\x0c\x12\x1f\n\x17group_contract_position\x18\x02 \x01(\r\x12T\n\x06status\x18\x03 \x01(\x0e\x32\x44.org.dash.platform.dapi.v0.GetGroupActionSignersRequest.ActionStatus\x12\x11\n\taction_id\x18\x04 \x01(\x0c\x12\r\n\x05prove\x18\x05 \x01(\x08\"&\n\x0c\x41\x63tionStatus\x12\n\n\x06\x41\x43TIVE\x10\x00\x12\n\n\x06\x43LOSED\x10\x01\x42\t\n\x07version\"\x8b\x05\n\x1dGetGroupActionSignersResponse\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0H\x00\x1a\xf6\x03\n\x1fGetGroupActionSignersResponseV0\x12\x8b\x01\n\x14group_action_signers\x18\x01 \x01(\x0b\x32k.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignersH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadata\x1a\x35\n\x11GroupActionSigner\x12\x11\n\tsigner_id\x18\x01 \x01(\x0c\x12\r\n\x05power\x18\x02 \x01(\r\x1a\x91\x01\n\x12GroupActionSigners\x12{\n\x07signers\x18\x01 \x03(\x0b\x32j.org.dash.platform.dapi.v0.GetGroupActionSignersResponse.GetGroupActionSignersResponseV0.GroupActionSignerB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x15GetAddressInfoRequest\x12V\n\x02v0\x18\x01 \x01(\x0b\x32H.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0H\x00\x1a\x39\n\x17GetAddressInfoRequestV0\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\x85\x01\n\x10\x41\x64\x64ressInfoEntry\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12J\n\x11\x62\x61lance_and_nonce\x18\x02 \x01(\x0b\x32*.org.dash.platform.dapi.v0.BalanceAndNonceH\x00\x88\x01\x01\x42\x14\n\x12_balance_and_nonce\"1\n\x0f\x42\x61lanceAndNonce\x12\x0f\n\x07\x62\x61lance\x18\x01 \x01(\x04\x12\r\n\x05nonce\x18\x02 \x01(\r\"_\n\x12\x41\x64\x64ressInfoEntries\x12I\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x03(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntry\"m\n\x14\x41\x64\x64ressBalanceChange\x12\x0f\n\x07\x61\x64\x64ress\x18\x01 \x01(\x0c\x12\x19\n\x0bset_balance\x18\x02 \x01(\x04\x42\x02\x30\x01H\x00\x12\x1c\n\x0e\x61\x64\x64_to_balance\x18\x03 \x01(\x04\x42\x02\x30\x01H\x00\x42\x0b\n\toperation\"x\n\x1a\x42lockAddressBalanceChanges\x12\x18\n\x0c\x62lock_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12@\n\x07\x63hanges\x18\x02 \x03(\x0b\x32/.org.dash.platform.dapi.v0.AddressBalanceChange\"k\n\x1b\x41\x64\x64ressBalanceUpdateEntries\x12L\n\rblock_changes\x18\x01 \x03(\x0b\x32\x35.org.dash.platform.dapi.v0.BlockAddressBalanceChanges\"\xe1\x02\n\x16GetAddressInfoResponse\x12X\n\x02v0\x18\x01 \x01(\x0b\x32J.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0H\x00\x1a\xe1\x01\n\x18GetAddressInfoResponseV0\x12I\n\x12\x61\x64\x64ress_info_entry\x18\x01 \x01(\x0b\x32+.org.dash.platform.dapi.v0.AddressInfoEntryH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xc3\x01\n\x18GetAddressesInfosRequest\x12\\\n\x02v0\x18\x01 \x01(\x0b\x32N.org.dash.platform.dapi.v0.GetAddressesInfosRequest.GetAddressesInfosRequestV0H\x00\x1a>\n\x1aGetAddressesInfosRequestV0\x12\x11\n\taddresses\x18\x01 \x03(\x0c\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf1\x02\n\x19GetAddressesInfosResponse\x12^\n\x02v0\x18\x01 \x01(\x0b\x32P.org.dash.platform.dapi.v0.GetAddressesInfosResponse.GetAddressesInfosResponseV0H\x00\x1a\xe8\x01\n\x1bGetAddressesInfosResponseV0\x12M\n\x14\x61\x64\x64ress_info_entries\x18\x01 \x01(\x0b\x32-.org.dash.platform.dapi.v0.AddressInfoEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xb5\x01\n\x1dGetAddressesTrunkStateRequest\x12\x66\n\x02v0\x18\x01 \x01(\x0b\x32X.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest.GetAddressesTrunkStateRequestV0H\x00\x1a!\n\x1fGetAddressesTrunkStateRequestV0B\t\n\x07version\"\xaa\x02\n\x1eGetAddressesTrunkStateResponse\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse.GetAddressesTrunkStateResponseV0H\x00\x1a\x92\x01\n GetAddressesTrunkStateResponseV0\x12/\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.Proof\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\t\n\x07version\"\xf0\x01\n\x1eGetAddressesBranchStateRequest\x12h\n\x02v0\x18\x01 \x01(\x0b\x32Z.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0H\x00\x1aY\n GetAddressesBranchStateRequestV0\x12\x0b\n\x03key\x18\x01 \x01(\x0c\x12\r\n\x05\x64\x65pth\x18\x02 \x01(\r\x12\x19\n\x11\x63heckpoint_height\x18\x03 \x01(\x04\x42\t\n\x07version\"\xd1\x01\n\x1fGetAddressesBranchStateResponse\x12j\n\x02v0\x18\x01 \x01(\x0b\x32\\.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0H\x00\x1a\x37\n!GetAddressesBranchStateResponseV0\x12\x12\n\nmerk_proof\x18\x02 \x01(\x0c\x42\t\n\x07version\"\xfe\x01\n%GetRecentAddressBalanceChangesRequest\x12v\n\x02v0\x18\x01 \x01(\x0b\x32h.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0H\x00\x1aR\n\'GetRecentAddressBalanceChangesRequestV0\x12\x18\n\x0cstart_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xb8\x03\n&GetRecentAddressBalanceChangesResponse\x12x\n\x02v0\x18\x01 \x01(\x0b\x32j.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0H\x00\x1a\x88\x02\n(GetRecentAddressBalanceChangesResponseV0\x12`\n\x1e\x61\x64\x64ress_balance_update_entries\x18\x01 \x01(\x0b\x32\x36.org.dash.platform.dapi.v0.AddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version\"\xa5\x01\n#CompactedBlockAddressBalanceChanges\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\x1c\n\x10\x65nd_block_height\x18\x02 \x01(\x04\x42\x02\x30\x01\x12@\n\x07\x63hanges\x18\x03 \x03(\x0b\x32/.org.dash.platform.dapi.v0.AddressBalanceChange\"\x87\x01\n$CompactedAddressBalanceUpdateEntries\x12_\n\x17\x63ompacted_block_changes\x18\x01 \x03(\x0b\x32>.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges\"\xa9\x02\n.GetRecentCompactedAddressBalanceChangesRequest\x12\x88\x01\n\x02v0\x18\x01 \x01(\x0b\x32z.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0H\x00\x1a\x61\n0GetRecentCompactedAddressBalanceChangesRequestV0\x12\x1e\n\x12start_block_height\x18\x01 \x01(\x04\x42\x02\x30\x01\x12\r\n\x05prove\x18\x02 \x01(\x08\x42\t\n\x07version\"\xf0\x03\n/GetRecentCompactedAddressBalanceChangesResponse\x12\x8a\x01\n\x02v0\x18\x01 \x01(\x0b\x32|.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0H\x00\x1a\xa4\x02\n1GetRecentCompactedAddressBalanceChangesResponseV0\x12s\n(compacted_address_balance_update_entries\x18\x01 \x01(\x0b\x32?.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntriesH\x00\x12\x31\n\x05proof\x18\x02 \x01(\x0b\x32 .org.dash.platform.dapi.v0.ProofH\x00\x12=\n\x08metadata\x18\x03 \x01(\x0b\x32+.org.dash.platform.dapi.v0.ResponseMetadataB\x08\n\x06resultB\t\n\x07version*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\xea<\n\x08Platform\x12\x93\x01\n\x18\x62roadcastStateTransition\x12:.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest\x1a;.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse\x12l\n\x0bgetIdentity\x12-.org.dash.platform.dapi.v0.GetIdentityRequest\x1a..org.dash.platform.dapi.v0.GetIdentityResponse\x12x\n\x0fgetIdentityKeys\x12\x31.org.dash.platform.dapi.v0.GetIdentityKeysRequest\x1a\x32.org.dash.platform.dapi.v0.GetIdentityKeysResponse\x12\x96\x01\n\x19getIdentitiesContractKeys\x12;.org.dash.platform.dapi.v0.GetIdentitiesContractKeysRequest\x1a<.org.dash.platform.dapi.v0.GetIdentitiesContractKeysResponse\x12{\n\x10getIdentityNonce\x12\x32.org.dash.platform.dapi.v0.GetIdentityNonceRequest\x1a\x33.org.dash.platform.dapi.v0.GetIdentityNonceResponse\x12\x93\x01\n\x18getIdentityContractNonce\x12:.org.dash.platform.dapi.v0.GetIdentityContractNonceRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityContractNonceResponse\x12\x81\x01\n\x12getIdentityBalance\x12\x34.org.dash.platform.dapi.v0.GetIdentityBalanceRequest\x1a\x35.org.dash.platform.dapi.v0.GetIdentityBalanceResponse\x12\x8a\x01\n\x15getIdentitiesBalances\x12\x37.org.dash.platform.dapi.v0.GetIdentitiesBalancesRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentitiesBalancesResponse\x12\xa2\x01\n\x1dgetIdentityBalanceAndRevision\x12?.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionRequest\x1a@.org.dash.platform.dapi.v0.GetIdentityBalanceAndRevisionResponse\x12\xaf\x01\n#getEvonodesProposedEpochBlocksByIds\x12\x45.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByIdsRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12\xb3\x01\n%getEvonodesProposedEpochBlocksByRange\x12G.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksByRangeRequest\x1a\x41.org.dash.platform.dapi.v0.GetEvonodesProposedEpochBlocksResponse\x12x\n\x0fgetDataContract\x12\x31.org.dash.platform.dapi.v0.GetDataContractRequest\x1a\x32.org.dash.platform.dapi.v0.GetDataContractResponse\x12\x8d\x01\n\x16getDataContractHistory\x12\x38.org.dash.platform.dapi.v0.GetDataContractHistoryRequest\x1a\x39.org.dash.platform.dapi.v0.GetDataContractHistoryResponse\x12{\n\x10getDataContracts\x12\x32.org.dash.platform.dapi.v0.GetDataContractsRequest\x1a\x33.org.dash.platform.dapi.v0.GetDataContractsResponse\x12o\n\x0cgetDocuments\x12..org.dash.platform.dapi.v0.GetDocumentsRequest\x1a/.org.dash.platform.dapi.v0.GetDocumentsResponse\x12\x99\x01\n\x1agetIdentityByPublicKeyHash\x12<.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashRequest\x1a=.org.dash.platform.dapi.v0.GetIdentityByPublicKeyHashResponse\x12\xb4\x01\n#getIdentityByNonUniquePublicKeyHash\x12\x45.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashRequest\x1a\x46.org.dash.platform.dapi.v0.GetIdentityByNonUniquePublicKeyHashResponse\x12\x9f\x01\n\x1cwaitForStateTransitionResult\x12>.org.dash.platform.dapi.v0.WaitForStateTransitionResultRequest\x1a?.org.dash.platform.dapi.v0.WaitForStateTransitionResultResponse\x12\x81\x01\n\x12getConsensusParams\x12\x34.org.dash.platform.dapi.v0.GetConsensusParamsRequest\x1a\x35.org.dash.platform.dapi.v0.GetConsensusParamsResponse\x12\xa5\x01\n\x1egetProtocolVersionUpgradeState\x12@.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateRequest\x1a\x41.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeStateResponse\x12\xb4\x01\n#getProtocolVersionUpgradeVoteStatus\x12\x45.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusRequest\x1a\x46.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse\x12r\n\rgetEpochsInfo\x12/.org.dash.platform.dapi.v0.GetEpochsInfoRequest\x1a\x30.org.dash.platform.dapi.v0.GetEpochsInfoResponse\x12\x8d\x01\n\x16getFinalizedEpochInfos\x12\x38.org.dash.platform.dapi.v0.GetFinalizedEpochInfosRequest\x1a\x39.org.dash.platform.dapi.v0.GetFinalizedEpochInfosResponse\x12\x8a\x01\n\x15getContestedResources\x12\x37.org.dash.platform.dapi.v0.GetContestedResourcesRequest\x1a\x38.org.dash.platform.dapi.v0.GetContestedResourcesResponse\x12\xa2\x01\n\x1dgetContestedResourceVoteState\x12?.org.dash.platform.dapi.v0.GetContestedResourceVoteStateRequest\x1a@.org.dash.platform.dapi.v0.GetContestedResourceVoteStateResponse\x12\xba\x01\n%getContestedResourceVotersForIdentity\x12G.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityRequest\x1aH.org.dash.platform.dapi.v0.GetContestedResourceVotersForIdentityResponse\x12\xae\x01\n!getContestedResourceIdentityVotes\x12\x43.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesRequest\x1a\x44.org.dash.platform.dapi.v0.GetContestedResourceIdentityVotesResponse\x12\x8a\x01\n\x15getVotePollsByEndDate\x12\x37.org.dash.platform.dapi.v0.GetVotePollsByEndDateRequest\x1a\x38.org.dash.platform.dapi.v0.GetVotePollsByEndDateResponse\x12\xa5\x01\n\x1egetPrefundedSpecializedBalance\x12@.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceRequest\x1a\x41.org.dash.platform.dapi.v0.GetPrefundedSpecializedBalanceResponse\x12\x96\x01\n\x19getTotalCreditsInPlatform\x12;.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformRequest\x1a<.org.dash.platform.dapi.v0.GetTotalCreditsInPlatformResponse\x12x\n\x0fgetPathElements\x12\x31.org.dash.platform.dapi.v0.GetPathElementsRequest\x1a\x32.org.dash.platform.dapi.v0.GetPathElementsResponse\x12\x66\n\tgetStatus\x12+.org.dash.platform.dapi.v0.GetStatusRequest\x1a,.org.dash.platform.dapi.v0.GetStatusResponse\x12\x8a\x01\n\x15getCurrentQuorumsInfo\x12\x37.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoRequest\x1a\x38.org.dash.platform.dapi.v0.GetCurrentQuorumsInfoResponse\x12\x93\x01\n\x18getIdentityTokenBalances\x12:.org.dash.platform.dapi.v0.GetIdentityTokenBalancesRequest\x1a;.org.dash.platform.dapi.v0.GetIdentityTokenBalancesResponse\x12\x99\x01\n\x1agetIdentitiesTokenBalances\x12<.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesRequest\x1a=.org.dash.platform.dapi.v0.GetIdentitiesTokenBalancesResponse\x12\x8a\x01\n\x15getIdentityTokenInfos\x12\x37.org.dash.platform.dapi.v0.GetIdentityTokenInfosRequest\x1a\x38.org.dash.platform.dapi.v0.GetIdentityTokenInfosResponse\x12\x90\x01\n\x17getIdentitiesTokenInfos\x12\x39.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosRequest\x1a:.org.dash.platform.dapi.v0.GetIdentitiesTokenInfosResponse\x12{\n\x10getTokenStatuses\x12\x32.org.dash.platform.dapi.v0.GetTokenStatusesRequest\x1a\x33.org.dash.platform.dapi.v0.GetTokenStatusesResponse\x12\x9f\x01\n\x1cgetTokenDirectPurchasePrices\x12>.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesRequest\x1a?.org.dash.platform.dapi.v0.GetTokenDirectPurchasePricesResponse\x12\x87\x01\n\x14getTokenContractInfo\x12\x36.org.dash.platform.dapi.v0.GetTokenContractInfoRequest\x1a\x37.org.dash.platform.dapi.v0.GetTokenContractInfoResponse\x12\xb1\x01\n\"getTokenPreProgrammedDistributions\x12\x44.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsRequest\x1a\x45.org.dash.platform.dapi.v0.GetTokenPreProgrammedDistributionsResponse\x12\xbd\x01\n&getTokenPerpetualDistributionLastClaim\x12H.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimRequest\x1aI.org.dash.platform.dapi.v0.GetTokenPerpetualDistributionLastClaimResponse\x12\x84\x01\n\x13getTokenTotalSupply\x12\x35.org.dash.platform.dapi.v0.GetTokenTotalSupplyRequest\x1a\x36.org.dash.platform.dapi.v0.GetTokenTotalSupplyResponse\x12o\n\x0cgetGroupInfo\x12..org.dash.platform.dapi.v0.GetGroupInfoRequest\x1a/.org.dash.platform.dapi.v0.GetGroupInfoResponse\x12r\n\rgetGroupInfos\x12/.org.dash.platform.dapi.v0.GetGroupInfosRequest\x1a\x30.org.dash.platform.dapi.v0.GetGroupInfosResponse\x12x\n\x0fgetGroupActions\x12\x31.org.dash.platform.dapi.v0.GetGroupActionsRequest\x1a\x32.org.dash.platform.dapi.v0.GetGroupActionsResponse\x12\x8a\x01\n\x15getGroupActionSigners\x12\x37.org.dash.platform.dapi.v0.GetGroupActionSignersRequest\x1a\x38.org.dash.platform.dapi.v0.GetGroupActionSignersResponse\x12u\n\x0egetAddressInfo\x12\x30.org.dash.platform.dapi.v0.GetAddressInfoRequest\x1a\x31.org.dash.platform.dapi.v0.GetAddressInfoResponse\x12~\n\x11getAddressesInfos\x12\x33.org.dash.platform.dapi.v0.GetAddressesInfosRequest\x1a\x34.org.dash.platform.dapi.v0.GetAddressesInfosResponse\x12\x8d\x01\n\x16getAddressesTrunkState\x12\x38.org.dash.platform.dapi.v0.GetAddressesTrunkStateRequest\x1a\x39.org.dash.platform.dapi.v0.GetAddressesTrunkStateResponse\x12\x90\x01\n\x17getAddressesBranchState\x12\x39.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest\x1a:.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse\x12\xa5\x01\n\x1egetRecentAddressBalanceChanges\x12@.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest\x1a\x41.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse\x12\xc0\x01\n\'getRecentCompactedAddressBalanceChanges\x12I.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest\x1aJ.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponseb\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=53283, - serialized_end=53373, + serialized_start=55457, + serialized_end=55547, ) _sym_db.RegisterEnumDescriptor(_KEYPURPOSE) @@ -13545,6 +13545,128 @@ ) +_ADDRESSBALANCECHANGE = _descriptor.Descriptor( + name='AddressBalanceChange', + full_name='org.dash.platform.dapi.v0.AddressBalanceChange', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='address', full_name='org.dash.platform.dapi.v0.AddressBalanceChange.address', 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='set_balance', full_name='org.dash.platform.dapi.v0.AddressBalanceChange.set_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=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='add_to_balance', full_name='org.dash.platform.dapi.v0.AddressBalanceChange.add_to_balance', 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=b'0\001', 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='operation', full_name='org.dash.platform.dapi.v0.AddressBalanceChange.operation', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=51444, + serialized_end=51553, +) + + +_BLOCKADDRESSBALANCECHANGES = _descriptor.Descriptor( + name='BlockAddressBalanceChanges', + full_name='org.dash.platform.dapi.v0.BlockAddressBalanceChanges', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='block_height', full_name='org.dash.platform.dapi.v0.BlockAddressBalanceChanges.block_height', 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=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='changes', full_name='org.dash.platform.dapi.v0.BlockAddressBalanceChanges.changes', 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), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + ], + serialized_start=51555, + serialized_end=51675, +) + + +_ADDRESSBALANCEUPDATEENTRIES = _descriptor.Descriptor( + name='AddressBalanceUpdateEntries', + full_name='org.dash.platform.dapi.v0.AddressBalanceUpdateEntries', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='block_changes', full_name='org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.block_changes', 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=51677, + serialized_end=51784, +) + + _GETADDRESSINFORESPONSE_GETADDRESSINFORESPONSEV0 = _descriptor.Descriptor( name='GetAddressInfoResponseV0', full_name='org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0', @@ -13591,8 +13713,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51562, - serialized_end=51787, + serialized_start=51904, + serialized_end=52129, ) _GETADDRESSINFORESPONSE = _descriptor.Descriptor( @@ -13627,8 +13749,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51445, - serialized_end=51798, + serialized_start=51787, + serialized_end=52140, ) @@ -13666,8 +13788,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=51923, - serialized_end=51985, + serialized_start=52265, + serialized_end=52327, ) _GETADDRESSESINFOSREQUEST = _descriptor.Descriptor( @@ -13702,8 +13824,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51801, - serialized_end=51996, + serialized_start=52143, + serialized_end=52338, ) @@ -13753,8 +13875,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52125, - serialized_end=52357, + serialized_start=52467, + serialized_end=52699, ) _GETADDRESSESINFOSRESPONSE = _descriptor.Descriptor( @@ -13789,8 +13911,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=51999, - serialized_end=52368, + serialized_start=52341, + serialized_end=52710, ) @@ -13814,8 +13936,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52508, - serialized_end=52541, + serialized_start=52850, + serialized_end=52883, ) _GETADDRESSESTRUNKSTATEREQUEST = _descriptor.Descriptor( @@ -13850,8 +13972,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52371, - serialized_end=52552, + serialized_start=52713, + serialized_end=52894, ) @@ -13889,8 +14011,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52696, - serialized_end=52842, + serialized_start=53038, + serialized_end=53184, ) _GETADDRESSESTRUNKSTATERESPONSE = _descriptor.Descriptor( @@ -13925,8 +14047,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52555, - serialized_end=52853, + serialized_start=52897, + serialized_end=53195, ) @@ -13952,6 +14074,13 @@ 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='checkpoint_height', full_name='org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.checkpoint_height', 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=[ ], @@ -13964,8 +14093,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=52996, - serialized_end=53058, + serialized_start=53338, + serialized_end=53427, ) _GETADDRESSESBRANCHSTATEREQUEST = _descriptor.Descriptor( @@ -14000,8 +14129,8 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=52856, - serialized_end=53069, + serialized_start=53198, + serialized_end=53438, ) @@ -14032,8 +14161,8 @@ extension_ranges=[], oneofs=[ ], - serialized_start=53215, - serialized_end=53270, + serialized_start=53584, + serialized_end=53639, ) _GETADDRESSESBRANCHSTATERESPONSE = _descriptor.Descriptor( @@ -14068,8 +14197,410 @@ create_key=_descriptor._internal_create_key, fields=[]), ], - serialized_start=53072, - serialized_end=53281, + serialized_start=53441, + serialized_end=53650, +) + + +_GETRECENTADDRESSBALANCECHANGESREQUEST_GETRECENTADDRESSBALANCECHANGESREQUESTV0 = _descriptor.Descriptor( + name='GetRecentAddressBalanceChangesRequestV0', + full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start_height', full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.start_height', 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=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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=53814, + serialized_end=53896, +) + +_GETRECENTADDRESSBALANCECHANGESREQUEST = _descriptor.Descriptor( + name='GetRecentAddressBalanceChangesRequest', + full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest', + 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.GetRecentAddressBalanceChangesRequest.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=[_GETRECENTADDRESSBALANCECHANGESREQUEST_GETRECENTADDRESSBALANCECHANGESREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=53653, + serialized_end=53907, +) + + +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0 = _descriptor.Descriptor( + name='GetRecentAddressBalanceChangesResponseV0', + full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='address_balance_update_entries', full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.address_balance_update_entries', 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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.metadata', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=54075, + serialized_end=54339, +) + +_GETRECENTADDRESSBALANCECHANGESRESPONSE = _descriptor.Descriptor( + name='GetRecentAddressBalanceChangesResponse', + full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse', + 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.GetRecentAddressBalanceChangesResponse.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=[_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=53910, + serialized_end=54350, +) + + +_COMPACTEDBLOCKADDRESSBALANCECHANGES = _descriptor.Descriptor( + name='CompactedBlockAddressBalanceChanges', + full_name='org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start_block_height', full_name='org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.start_block_height', 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=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='end_block_height', full_name='org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.end_block_height', 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=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='changes', full_name='org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.changes', index=2, + number=3, 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=54353, + serialized_end=54518, +) + + +_COMPACTEDADDRESSBALANCEUPDATEENTRIES = _descriptor.Descriptor( + name='CompactedAddressBalanceUpdateEntries', + full_name='org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='compacted_block_changes', full_name='org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.compacted_block_changes', 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=54521, + serialized_end=54656, +) + + +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUESTV0 = _descriptor.Descriptor( + name='GetRecentCompactedAddressBalanceChangesRequestV0', + full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='start_block_height', full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.start_block_height', 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=b'0\001', file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + _descriptor.FieldDescriptor( + name='prove', full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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=54848, + serialized_end=54945, +) + +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST = _descriptor.Descriptor( + name='GetRecentCompactedAddressBalanceChangesRequest', + full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest', + 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.GetRecentCompactedAddressBalanceChangesRequest.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=[_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUESTV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=54659, + serialized_end=54956, +) + + +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0 = _descriptor.Descriptor( + name='GetRecentCompactedAddressBalanceChangesResponseV0', + full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0', + filename=None, + file=DESCRIPTOR, + containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[ + _descriptor.FieldDescriptor( + name='compacted_address_balance_update_entries', full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.compacted_address_balance_update_entries', 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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.metadata', index=2, + number=3, type=11, cpp_type=10, label=1, + has_default_value=False, default_value=None, + message_type=None, enum_type=None, containing_type=None, + is_extension=False, extension_scope=None, + serialized_options=None, file=DESCRIPTOR, create_key=_descriptor._internal_create_key), + ], + extensions=[ + ], + nested_types=[], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='result', full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.result', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=55152, + serialized_end=55444, +) + +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE = _descriptor.Descriptor( + name='GetRecentCompactedAddressBalanceChangesResponse', + full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse', + 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.GetRecentCompactedAddressBalanceChangesResponse.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=[_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0, ], + enum_types=[ + ], + serialized_options=None, + is_extendable=False, + syntax='proto3', + extension_ranges=[], + oneofs=[ + _descriptor.OneofDescriptor( + name='version', full_name='org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.version', + index=0, containing_type=None, + create_key=_descriptor._internal_create_key, + fields=[]), + ], + serialized_start=54959, + serialized_end=55455, ) _GETIDENTITYREQUEST_GETIDENTITYREQUESTV0.containing_type = _GETIDENTITYREQUEST @@ -15378,6 +15909,14 @@ _ADDRESSINFOENTRY.fields_by_name['balance_and_nonce']) _ADDRESSINFOENTRY.fields_by_name['balance_and_nonce'].containing_oneof = _ADDRESSINFOENTRY.oneofs_by_name['_balance_and_nonce'] _ADDRESSINFOENTRIES.fields_by_name['address_info_entries'].message_type = _ADDRESSINFOENTRY +_ADDRESSBALANCECHANGE.oneofs_by_name['operation'].fields.append( + _ADDRESSBALANCECHANGE.fields_by_name['set_balance']) +_ADDRESSBALANCECHANGE.fields_by_name['set_balance'].containing_oneof = _ADDRESSBALANCECHANGE.oneofs_by_name['operation'] +_ADDRESSBALANCECHANGE.oneofs_by_name['operation'].fields.append( + _ADDRESSBALANCECHANGE.fields_by_name['add_to_balance']) +_ADDRESSBALANCECHANGE.fields_by_name['add_to_balance'].containing_oneof = _ADDRESSBALANCECHANGE.oneofs_by_name['operation'] +_BLOCKADDRESSBALANCECHANGES.fields_by_name['changes'].message_type = _ADDRESSBALANCECHANGE +_ADDRESSBALANCEUPDATEENTRIES.fields_by_name['block_changes'].message_type = _BLOCKADDRESSBALANCECHANGES _GETADDRESSINFORESPONSE_GETADDRESSINFORESPONSEV0.fields_by_name['address_info_entry'].message_type = _ADDRESSINFOENTRY _GETADDRESSINFORESPONSE_GETADDRESSINFORESPONSEV0.fields_by_name['proof'].message_type = _PROOF _GETADDRESSINFORESPONSE_GETADDRESSINFORESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA @@ -15433,6 +15972,46 @@ _GETADDRESSESBRANCHSTATERESPONSE.oneofs_by_name['version'].fields.append( _GETADDRESSESBRANCHSTATERESPONSE.fields_by_name['v0']) _GETADDRESSESBRANCHSTATERESPONSE.fields_by_name['v0'].containing_oneof = _GETADDRESSESBRANCHSTATERESPONSE.oneofs_by_name['version'] +_GETRECENTADDRESSBALANCECHANGESREQUEST_GETRECENTADDRESSBALANCECHANGESREQUESTV0.containing_type = _GETRECENTADDRESSBALANCECHANGESREQUEST +_GETRECENTADDRESSBALANCECHANGESREQUEST.fields_by_name['v0'].message_type = _GETRECENTADDRESSBALANCECHANGESREQUEST_GETRECENTADDRESSBALANCECHANGESREQUESTV0 +_GETRECENTADDRESSBALANCECHANGESREQUEST.oneofs_by_name['version'].fields.append( + _GETRECENTADDRESSBALANCECHANGESREQUEST.fields_by_name['v0']) +_GETRECENTADDRESSBALANCECHANGESREQUEST.fields_by_name['v0'].containing_oneof = _GETRECENTADDRESSBALANCECHANGESREQUEST.oneofs_by_name['version'] +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['address_balance_update_entries'].message_type = _ADDRESSBALANCEUPDATEENTRIES +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.containing_type = _GETRECENTADDRESSBALANCECHANGESRESPONSE +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['address_balance_update_entries']) +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['address_balance_update_entries'].containing_oneof = _GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'] +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['proof']) +_GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'] +_GETRECENTADDRESSBALANCECHANGESRESPONSE.fields_by_name['v0'].message_type = _GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0 +_GETRECENTADDRESSBALANCECHANGESRESPONSE.oneofs_by_name['version'].fields.append( + _GETRECENTADDRESSBALANCECHANGESRESPONSE.fields_by_name['v0']) +_GETRECENTADDRESSBALANCECHANGESRESPONSE.fields_by_name['v0'].containing_oneof = _GETRECENTADDRESSBALANCECHANGESRESPONSE.oneofs_by_name['version'] +_COMPACTEDBLOCKADDRESSBALANCECHANGES.fields_by_name['changes'].message_type = _ADDRESSBALANCECHANGE +_COMPACTEDADDRESSBALANCEUPDATEENTRIES.fields_by_name['compacted_block_changes'].message_type = _COMPACTEDBLOCKADDRESSBALANCECHANGES +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUESTV0.containing_type = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST.fields_by_name['v0'].message_type = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUESTV0 +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST.oneofs_by_name['version'].fields.append( + _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST.fields_by_name['v0']) +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST.fields_by_name['v0'].containing_oneof = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST.oneofs_by_name['version'] +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['compacted_address_balance_update_entries'].message_type = _COMPACTEDADDRESSBALANCEUPDATEENTRIES +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['proof'].message_type = _PROOF +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['metadata'].message_type = _RESPONSEMETADATA +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.containing_type = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['compacted_address_balance_update_entries']) +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['compacted_address_balance_update_entries'].containing_oneof = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'] +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'].fields.append( + _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['proof']) +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.fields_by_name['proof'].containing_oneof = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0.oneofs_by_name['result'] +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE.fields_by_name['v0'].message_type = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0 +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE.oneofs_by_name['version'].fields.append( + _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE.fields_by_name['v0']) +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE.fields_by_name['v0'].containing_oneof = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE.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 @@ -15538,6 +16117,9 @@ DESCRIPTOR.message_types_by_name['AddressInfoEntry'] = _ADDRESSINFOENTRY DESCRIPTOR.message_types_by_name['BalanceAndNonce'] = _BALANCEANDNONCE DESCRIPTOR.message_types_by_name['AddressInfoEntries'] = _ADDRESSINFOENTRIES +DESCRIPTOR.message_types_by_name['AddressBalanceChange'] = _ADDRESSBALANCECHANGE +DESCRIPTOR.message_types_by_name['BlockAddressBalanceChanges'] = _BLOCKADDRESSBALANCECHANGES +DESCRIPTOR.message_types_by_name['AddressBalanceUpdateEntries'] = _ADDRESSBALANCEUPDATEENTRIES DESCRIPTOR.message_types_by_name['GetAddressInfoResponse'] = _GETADDRESSINFORESPONSE DESCRIPTOR.message_types_by_name['GetAddressesInfosRequest'] = _GETADDRESSESINFOSREQUEST DESCRIPTOR.message_types_by_name['GetAddressesInfosResponse'] = _GETADDRESSESINFOSRESPONSE @@ -15545,6 +16127,12 @@ DESCRIPTOR.message_types_by_name['GetAddressesTrunkStateResponse'] = _GETADDRESSESTRUNKSTATERESPONSE DESCRIPTOR.message_types_by_name['GetAddressesBranchStateRequest'] = _GETADDRESSESBRANCHSTATEREQUEST DESCRIPTOR.message_types_by_name['GetAddressesBranchStateResponse'] = _GETADDRESSESBRANCHSTATERESPONSE +DESCRIPTOR.message_types_by_name['GetRecentAddressBalanceChangesRequest'] = _GETRECENTADDRESSBALANCECHANGESREQUEST +DESCRIPTOR.message_types_by_name['GetRecentAddressBalanceChangesResponse'] = _GETRECENTADDRESSBALANCECHANGESRESPONSE +DESCRIPTOR.message_types_by_name['CompactedBlockAddressBalanceChanges'] = _COMPACTEDBLOCKADDRESSBALANCECHANGES +DESCRIPTOR.message_types_by_name['CompactedAddressBalanceUpdateEntries'] = _COMPACTEDADDRESSBALANCEUPDATEENTRIES +DESCRIPTOR.message_types_by_name['GetRecentCompactedAddressBalanceChangesRequest'] = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST +DESCRIPTOR.message_types_by_name['GetRecentCompactedAddressBalanceChangesResponse'] = _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE DESCRIPTOR.enum_types_by_name['KeyPurpose'] = _KEYPURPOSE _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -17915,6 +18503,27 @@ }) _sym_db.RegisterMessage(AddressInfoEntries) +AddressBalanceChange = _reflection.GeneratedProtocolMessageType('AddressBalanceChange', (_message.Message,), { + 'DESCRIPTOR' : _ADDRESSBALANCECHANGE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.AddressBalanceChange) + }) +_sym_db.RegisterMessage(AddressBalanceChange) + +BlockAddressBalanceChanges = _reflection.GeneratedProtocolMessageType('BlockAddressBalanceChanges', (_message.Message,), { + 'DESCRIPTOR' : _BLOCKADDRESSBALANCECHANGES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.BlockAddressBalanceChanges) + }) +_sym_db.RegisterMessage(BlockAddressBalanceChanges) + +AddressBalanceUpdateEntries = _reflection.GeneratedProtocolMessageType('AddressBalanceUpdateEntries', (_message.Message,), { + 'DESCRIPTOR' : _ADDRESSBALANCEUPDATEENTRIES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.AddressBalanceUpdateEntries) + }) +_sym_db.RegisterMessage(AddressBalanceUpdateEntries) + GetAddressInfoResponse = _reflection.GeneratedProtocolMessageType('GetAddressInfoResponse', (_message.Message,), { 'GetAddressInfoResponseV0' : _reflection.GeneratedProtocolMessageType('GetAddressInfoResponseV0', (_message.Message,), { @@ -18020,6 +18629,80 @@ _sym_db.RegisterMessage(GetAddressesBranchStateResponse) _sym_db.RegisterMessage(GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0) +GetRecentAddressBalanceChangesRequest = _reflection.GeneratedProtocolMessageType('GetRecentAddressBalanceChangesRequest', (_message.Message,), { + + 'GetRecentAddressBalanceChangesRequestV0' : _reflection.GeneratedProtocolMessageType('GetRecentAddressBalanceChangesRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETRECENTADDRESSBALANCECHANGESREQUEST_GETRECENTADDRESSBALANCECHANGESREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0) + }) + , + 'DESCRIPTOR' : _GETRECENTADDRESSBALANCECHANGESREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest) + }) +_sym_db.RegisterMessage(GetRecentAddressBalanceChangesRequest) +_sym_db.RegisterMessage(GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0) + +GetRecentAddressBalanceChangesResponse = _reflection.GeneratedProtocolMessageType('GetRecentAddressBalanceChangesResponse', (_message.Message,), { + + 'GetRecentAddressBalanceChangesResponseV0' : _reflection.GeneratedProtocolMessageType('GetRecentAddressBalanceChangesResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETRECENTADDRESSBALANCECHANGESRESPONSE_GETRECENTADDRESSBALANCECHANGESRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0) + }) + , + 'DESCRIPTOR' : _GETRECENTADDRESSBALANCECHANGESRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse) + }) +_sym_db.RegisterMessage(GetRecentAddressBalanceChangesResponse) +_sym_db.RegisterMessage(GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0) + +CompactedBlockAddressBalanceChanges = _reflection.GeneratedProtocolMessageType('CompactedBlockAddressBalanceChanges', (_message.Message,), { + 'DESCRIPTOR' : _COMPACTEDBLOCKADDRESSBALANCECHANGES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges) + }) +_sym_db.RegisterMessage(CompactedBlockAddressBalanceChanges) + +CompactedAddressBalanceUpdateEntries = _reflection.GeneratedProtocolMessageType('CompactedAddressBalanceUpdateEntries', (_message.Message,), { + 'DESCRIPTOR' : _COMPACTEDADDRESSBALANCEUPDATEENTRIES, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries) + }) +_sym_db.RegisterMessage(CompactedAddressBalanceUpdateEntries) + +GetRecentCompactedAddressBalanceChangesRequest = _reflection.GeneratedProtocolMessageType('GetRecentCompactedAddressBalanceChangesRequest', (_message.Message,), { + + 'GetRecentCompactedAddressBalanceChangesRequestV0' : _reflection.GeneratedProtocolMessageType('GetRecentCompactedAddressBalanceChangesRequestV0', (_message.Message,), { + 'DESCRIPTOR' : _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUESTV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0) + }) + , + 'DESCRIPTOR' : _GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest) + }) +_sym_db.RegisterMessage(GetRecentCompactedAddressBalanceChangesRequest) +_sym_db.RegisterMessage(GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0) + +GetRecentCompactedAddressBalanceChangesResponse = _reflection.GeneratedProtocolMessageType('GetRecentCompactedAddressBalanceChangesResponse', (_message.Message,), { + + 'GetRecentCompactedAddressBalanceChangesResponseV0' : _reflection.GeneratedProtocolMessageType('GetRecentCompactedAddressBalanceChangesResponseV0', (_message.Message,), { + 'DESCRIPTOR' : _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSEV0, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0) + }) + , + 'DESCRIPTOR' : _GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE, + '__module__' : 'platform_pb2' + # @@protoc_insertion_point(class_scope:org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse) + }) +_sym_db.RegisterMessage(GetRecentCompactedAddressBalanceChangesResponse) +_sym_db.RegisterMessage(GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0) + _RESPONSEMETADATA.fields_by_name['height']._options = None _RESPONSEMETADATA.fields_by_name['time_ms']._options = None @@ -18065,6 +18748,13 @@ _GETSTATUSRESPONSE_GETSTATUSRESPONSEV0_STATESYNC.fields_by_name['backfill_blocks_total']._options = None _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSEV0_LASTCLAIMINFO.fields_by_name['timestamp_ms']._options = None _GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSE_GETTOKENPERPETUALDISTRIBUTIONLASTCLAIMRESPONSEV0_LASTCLAIMINFO.fields_by_name['block_height']._options = None +_ADDRESSBALANCECHANGE.fields_by_name['set_balance']._options = None +_ADDRESSBALANCECHANGE.fields_by_name['add_to_balance']._options = None +_BLOCKADDRESSBALANCECHANGES.fields_by_name['block_height']._options = None +_GETRECENTADDRESSBALANCECHANGESREQUEST_GETRECENTADDRESSBALANCECHANGESREQUESTV0.fields_by_name['start_height']._options = None +_COMPACTEDBLOCKADDRESSBALANCECHANGES.fields_by_name['start_block_height']._options = None +_COMPACTEDBLOCKADDRESSBALANCECHANGES.fields_by_name['end_block_height']._options = None +_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUESTV0.fields_by_name['start_block_height']._options = None _PLATFORM = _descriptor.ServiceDescriptor( name='Platform', @@ -18073,8 +18763,8 @@ index=0, serialized_options=None, create_key=_descriptor._internal_create_key, - serialized_start=53376, - serialized_end=60799, + serialized_start=55550, + serialized_end=63336, methods=[ _descriptor.MethodDescriptor( name='broadcastStateTransition', @@ -18586,6 +19276,26 @@ serialized_options=None, create_key=_descriptor._internal_create_key, ), + _descriptor.MethodDescriptor( + name='getRecentAddressBalanceChanges', + full_name='org.dash.platform.dapi.v0.Platform.getRecentAddressBalanceChanges', + index=51, + containing_service=None, + input_type=_GETRECENTADDRESSBALANCECHANGESREQUEST, + output_type=_GETRECENTADDRESSBALANCECHANGESRESPONSE, + serialized_options=None, + create_key=_descriptor._internal_create_key, + ), + _descriptor.MethodDescriptor( + name='getRecentCompactedAddressBalanceChanges', + full_name='org.dash.platform.dapi.v0.Platform.getRecentCompactedAddressBalanceChanges', + index=52, + containing_service=None, + input_type=_GETRECENTCOMPACTEDADDRESSBALANCECHANGESREQUEST, + output_type=_GETRECENTCOMPACTEDADDRESSBALANCECHANGESRESPONSE, + 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 bb56b36afb4..d6e844363d0 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 @@ -269,6 +269,16 @@ def __init__(self, channel): request_serializer=platform__pb2.GetAddressesBranchStateRequest.SerializeToString, response_deserializer=platform__pb2.GetAddressesBranchStateResponse.FromString, ) + self.getRecentAddressBalanceChanges = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getRecentAddressBalanceChanges', + request_serializer=platform__pb2.GetRecentAddressBalanceChangesRequest.SerializeToString, + response_deserializer=platform__pb2.GetRecentAddressBalanceChangesResponse.FromString, + ) + self.getRecentCompactedAddressBalanceChanges = channel.unary_unary( + '/org.dash.platform.dapi.v0.Platform/getRecentCompactedAddressBalanceChanges', + request_serializer=platform__pb2.GetRecentCompactedAddressBalanceChangesRequest.SerializeToString, + response_deserializer=platform__pb2.GetRecentCompactedAddressBalanceChangesResponse.FromString, + ) class PlatformServicer(object): @@ -585,6 +595,18 @@ def getAddressesBranchState(self, request, context): context.set_details('Method not implemented!') raise NotImplementedError('Method not implemented!') + def getRecentAddressBalanceChanges(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 getRecentCompactedAddressBalanceChanges(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 = { @@ -843,6 +865,16 @@ def add_PlatformServicer_to_server(servicer, server): request_deserializer=platform__pb2.GetAddressesBranchStateRequest.FromString, response_serializer=platform__pb2.GetAddressesBranchStateResponse.SerializeToString, ), + 'getRecentAddressBalanceChanges': grpc.unary_unary_rpc_method_handler( + servicer.getRecentAddressBalanceChanges, + request_deserializer=platform__pb2.GetRecentAddressBalanceChangesRequest.FromString, + response_serializer=platform__pb2.GetRecentAddressBalanceChangesResponse.SerializeToString, + ), + 'getRecentCompactedAddressBalanceChanges': grpc.unary_unary_rpc_method_handler( + servicer.getRecentCompactedAddressBalanceChanges, + request_deserializer=platform__pb2.GetRecentCompactedAddressBalanceChangesRequest.FromString, + response_serializer=platform__pb2.GetRecentCompactedAddressBalanceChangesResponse.SerializeToString, + ), } generic_handler = grpc.method_handlers_generic_handler( 'org.dash.platform.dapi.v0.Platform', rpc_method_handlers) @@ -1719,3 +1751,37 @@ def getAddressesBranchState(request, platform__pb2.GetAddressesBranchStateResponse.FromString, options, channel_credentials, insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getRecentAddressBalanceChanges(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/getRecentAddressBalanceChanges', + platform__pb2.GetRecentAddressBalanceChangesRequest.SerializeToString, + platform__pb2.GetRecentAddressBalanceChangesResponse.FromString, + options, channel_credentials, + insecure, call_credentials, compression, wait_for_ready, timeout, metadata) + + @staticmethod + def getRecentCompactedAddressBalanceChanges(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/getRecentCompactedAddressBalanceChanges', + platform__pb2.GetRecentCompactedAddressBalanceChangesRequest.SerializeToString, + platform__pb2.GetRecentCompactedAddressBalanceChangesResponse.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 aa097b8832d..b98bb05131b 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 @@ -9630,6 +9630,95 @@ export namespace AddressInfoEntries { } } +export class AddressBalanceChange extends jspb.Message { + getAddress(): Uint8Array | string; + getAddress_asU8(): Uint8Array; + getAddress_asB64(): string; + setAddress(value: Uint8Array | string): void; + + hasSetBalance(): boolean; + clearSetBalance(): void; + getSetBalance(): string; + setSetBalance(value: string): void; + + hasAddToBalance(): boolean; + clearAddToBalance(): void; + getAddToBalance(): string; + setAddToBalance(value: string): void; + + getOperationCase(): AddressBalanceChange.OperationCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddressBalanceChange.AsObject; + static toObject(includeInstance: boolean, msg: AddressBalanceChange): AddressBalanceChange.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddressBalanceChange, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddressBalanceChange; + static deserializeBinaryFromReader(message: AddressBalanceChange, reader: jspb.BinaryReader): AddressBalanceChange; +} + +export namespace AddressBalanceChange { + export type AsObject = { + address: Uint8Array | string, + setBalance: string, + addToBalance: string, + } + + export enum OperationCase { + OPERATION_NOT_SET = 0, + SET_BALANCE = 2, + ADD_TO_BALANCE = 3, + } +} + +export class BlockAddressBalanceChanges extends jspb.Message { + getBlockHeight(): string; + setBlockHeight(value: string): void; + + clearChangesList(): void; + getChangesList(): Array; + setChangesList(value: Array): void; + addChanges(value?: AddressBalanceChange, index?: number): AddressBalanceChange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BlockAddressBalanceChanges.AsObject; + static toObject(includeInstance: boolean, msg: BlockAddressBalanceChanges): BlockAddressBalanceChanges.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BlockAddressBalanceChanges, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockAddressBalanceChanges; + static deserializeBinaryFromReader(message: BlockAddressBalanceChanges, reader: jspb.BinaryReader): BlockAddressBalanceChanges; +} + +export namespace BlockAddressBalanceChanges { + export type AsObject = { + blockHeight: string, + changesList: Array, + } +} + +export class AddressBalanceUpdateEntries extends jspb.Message { + clearBlockChangesList(): void; + getBlockChangesList(): Array; + setBlockChangesList(value: Array): void; + addBlockChanges(value?: BlockAddressBalanceChanges, index?: number): BlockAddressBalanceChanges; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): AddressBalanceUpdateEntries.AsObject; + static toObject(includeInstance: boolean, msg: AddressBalanceUpdateEntries): AddressBalanceUpdateEntries.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: AddressBalanceUpdateEntries, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): AddressBalanceUpdateEntries; + static deserializeBinaryFromReader(message: AddressBalanceUpdateEntries, reader: jspb.BinaryReader): AddressBalanceUpdateEntries; +} + +export namespace AddressBalanceUpdateEntries { + export type AsObject = { + blockChangesList: Array, + } +} + export class GetAddressInfoResponse extends jspb.Message { hasV0(): boolean; clearV0(): void; @@ -9955,6 +10044,9 @@ export namespace GetAddressesBranchStateRequest { getDepth(): number; setDepth(value: number): void; + getCheckpointHeight(): number; + setCheckpointHeight(value: number): void; + serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): GetAddressesBranchStateRequestV0.AsObject; static toObject(includeInstance: boolean, msg: GetAddressesBranchStateRequestV0): GetAddressesBranchStateRequestV0.AsObject; @@ -9969,6 +10061,7 @@ export namespace GetAddressesBranchStateRequest { export type AsObject = { key: Uint8Array | string, depth: number, + checkpointHeight: number, } } @@ -10028,6 +10121,300 @@ export namespace GetAddressesBranchStateResponse { } } +export class GetRecentAddressBalanceChangesRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 | undefined; + setV0(value?: GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0): void; + + getVersionCase(): GetRecentAddressBalanceChangesRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentAddressBalanceChangesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentAddressBalanceChangesRequest): GetRecentAddressBalanceChangesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentAddressBalanceChangesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentAddressBalanceChangesRequest; + static deserializeBinaryFromReader(message: GetRecentAddressBalanceChangesRequest, reader: jspb.BinaryReader): GetRecentAddressBalanceChangesRequest; +} + +export namespace GetRecentAddressBalanceChangesRequest { + export type AsObject = { + v0?: GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.AsObject, + } + + export class GetRecentAddressBalanceChangesRequestV0 extends jspb.Message { + getStartHeight(): string; + setStartHeight(value: string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentAddressBalanceChangesRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentAddressBalanceChangesRequestV0): GetRecentAddressBalanceChangesRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentAddressBalanceChangesRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentAddressBalanceChangesRequestV0; + static deserializeBinaryFromReader(message: GetRecentAddressBalanceChangesRequestV0, reader: jspb.BinaryReader): GetRecentAddressBalanceChangesRequestV0; + } + + export namespace GetRecentAddressBalanceChangesRequestV0 { + export type AsObject = { + startHeight: string, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetRecentAddressBalanceChangesResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 | undefined; + setV0(value?: GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0): void; + + getVersionCase(): GetRecentAddressBalanceChangesResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentAddressBalanceChangesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentAddressBalanceChangesResponse): GetRecentAddressBalanceChangesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentAddressBalanceChangesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentAddressBalanceChangesResponse; + static deserializeBinaryFromReader(message: GetRecentAddressBalanceChangesResponse, reader: jspb.BinaryReader): GetRecentAddressBalanceChangesResponse; +} + +export namespace GetRecentAddressBalanceChangesResponse { + export type AsObject = { + v0?: GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.AsObject, + } + + export class GetRecentAddressBalanceChangesResponseV0 extends jspb.Message { + hasAddressBalanceUpdateEntries(): boolean; + clearAddressBalanceUpdateEntries(): void; + getAddressBalanceUpdateEntries(): AddressBalanceUpdateEntries | undefined; + setAddressBalanceUpdateEntries(value?: AddressBalanceUpdateEntries): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetRecentAddressBalanceChangesResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentAddressBalanceChangesResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentAddressBalanceChangesResponseV0): GetRecentAddressBalanceChangesResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentAddressBalanceChangesResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentAddressBalanceChangesResponseV0; + static deserializeBinaryFromReader(message: GetRecentAddressBalanceChangesResponseV0, reader: jspb.BinaryReader): GetRecentAddressBalanceChangesResponseV0; + } + + export namespace GetRecentAddressBalanceChangesResponseV0 { + export type AsObject = { + addressBalanceUpdateEntries?: AddressBalanceUpdateEntries.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + ADDRESS_BALANCE_UPDATE_ENTRIES = 1, + PROOF = 2, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class CompactedBlockAddressBalanceChanges extends jspb.Message { + getStartBlockHeight(): string; + setStartBlockHeight(value: string): void; + + getEndBlockHeight(): string; + setEndBlockHeight(value: string): void; + + clearChangesList(): void; + getChangesList(): Array; + setChangesList(value: Array): void; + addChanges(value?: AddressBalanceChange, index?: number): AddressBalanceChange; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompactedBlockAddressBalanceChanges.AsObject; + static toObject(includeInstance: boolean, msg: CompactedBlockAddressBalanceChanges): CompactedBlockAddressBalanceChanges.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CompactedBlockAddressBalanceChanges, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompactedBlockAddressBalanceChanges; + static deserializeBinaryFromReader(message: CompactedBlockAddressBalanceChanges, reader: jspb.BinaryReader): CompactedBlockAddressBalanceChanges; +} + +export namespace CompactedBlockAddressBalanceChanges { + export type AsObject = { + startBlockHeight: string, + endBlockHeight: string, + changesList: Array, + } +} + +export class CompactedAddressBalanceUpdateEntries extends jspb.Message { + clearCompactedBlockChangesList(): void; + getCompactedBlockChangesList(): Array; + setCompactedBlockChangesList(value: Array): void; + addCompactedBlockChanges(value?: CompactedBlockAddressBalanceChanges, index?: number): CompactedBlockAddressBalanceChanges; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CompactedAddressBalanceUpdateEntries.AsObject; + static toObject(includeInstance: boolean, msg: CompactedAddressBalanceUpdateEntries): CompactedAddressBalanceUpdateEntries.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CompactedAddressBalanceUpdateEntries, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CompactedAddressBalanceUpdateEntries; + static deserializeBinaryFromReader(message: CompactedAddressBalanceUpdateEntries, reader: jspb.BinaryReader): CompactedAddressBalanceUpdateEntries; +} + +export namespace CompactedAddressBalanceUpdateEntries { + export type AsObject = { + compactedBlockChangesList: Array, + } +} + +export class GetRecentCompactedAddressBalanceChangesRequest extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 | undefined; + setV0(value?: GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0): void; + + getVersionCase(): GetRecentCompactedAddressBalanceChangesRequest.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentCompactedAddressBalanceChangesRequest.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentCompactedAddressBalanceChangesRequest): GetRecentCompactedAddressBalanceChangesRequest.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentCompactedAddressBalanceChangesRequest, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentCompactedAddressBalanceChangesRequest; + static deserializeBinaryFromReader(message: GetRecentCompactedAddressBalanceChangesRequest, reader: jspb.BinaryReader): GetRecentCompactedAddressBalanceChangesRequest; +} + +export namespace GetRecentCompactedAddressBalanceChangesRequest { + export type AsObject = { + v0?: GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.AsObject, + } + + export class GetRecentCompactedAddressBalanceChangesRequestV0 extends jspb.Message { + getStartBlockHeight(): string; + setStartBlockHeight(value: string): void; + + getProve(): boolean; + setProve(value: boolean): void; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentCompactedAddressBalanceChangesRequestV0.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentCompactedAddressBalanceChangesRequestV0): GetRecentCompactedAddressBalanceChangesRequestV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentCompactedAddressBalanceChangesRequestV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentCompactedAddressBalanceChangesRequestV0; + static deserializeBinaryFromReader(message: GetRecentCompactedAddressBalanceChangesRequestV0, reader: jspb.BinaryReader): GetRecentCompactedAddressBalanceChangesRequestV0; + } + + export namespace GetRecentCompactedAddressBalanceChangesRequestV0 { + export type AsObject = { + startBlockHeight: string, + prove: boolean, + } + } + + export enum VersionCase { + VERSION_NOT_SET = 0, + V0 = 1, + } +} + +export class GetRecentCompactedAddressBalanceChangesResponse extends jspb.Message { + hasV0(): boolean; + clearV0(): void; + getV0(): GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 | undefined; + setV0(value?: GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0): void; + + getVersionCase(): GetRecentCompactedAddressBalanceChangesResponse.VersionCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentCompactedAddressBalanceChangesResponse.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentCompactedAddressBalanceChangesResponse): GetRecentCompactedAddressBalanceChangesResponse.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentCompactedAddressBalanceChangesResponse, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentCompactedAddressBalanceChangesResponse; + static deserializeBinaryFromReader(message: GetRecentCompactedAddressBalanceChangesResponse, reader: jspb.BinaryReader): GetRecentCompactedAddressBalanceChangesResponse; +} + +export namespace GetRecentCompactedAddressBalanceChangesResponse { + export type AsObject = { + v0?: GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.AsObject, + } + + export class GetRecentCompactedAddressBalanceChangesResponseV0 extends jspb.Message { + hasCompactedAddressBalanceUpdateEntries(): boolean; + clearCompactedAddressBalanceUpdateEntries(): void; + getCompactedAddressBalanceUpdateEntries(): CompactedAddressBalanceUpdateEntries | undefined; + setCompactedAddressBalanceUpdateEntries(value?: CompactedAddressBalanceUpdateEntries): void; + + hasProof(): boolean; + clearProof(): void; + getProof(): Proof | undefined; + setProof(value?: Proof): void; + + hasMetadata(): boolean; + clearMetadata(): void; + getMetadata(): ResponseMetadata | undefined; + setMetadata(value?: ResponseMetadata): void; + + getResultCase(): GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): GetRecentCompactedAddressBalanceChangesResponseV0.AsObject; + static toObject(includeInstance: boolean, msg: GetRecentCompactedAddressBalanceChangesResponseV0): GetRecentCompactedAddressBalanceChangesResponseV0.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: GetRecentCompactedAddressBalanceChangesResponseV0, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GetRecentCompactedAddressBalanceChangesResponseV0; + static deserializeBinaryFromReader(message: GetRecentCompactedAddressBalanceChangesResponseV0, reader: jspb.BinaryReader): GetRecentCompactedAddressBalanceChangesResponseV0; + } + + export namespace GetRecentCompactedAddressBalanceChangesResponseV0 { + export type AsObject = { + compactedAddressBalanceUpdateEntries?: CompactedAddressBalanceUpdateEntries.AsObject, + proof?: Proof.AsObject, + metadata?: ResponseMetadata.AsObject, + } + + export enum ResultCase { + RESULT_NOT_SET = 0, + COMPACTED_ADDRESS_BALANCE_UPDATE_ENTRIES = 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 086b9d49ba8..83a387a02c5 100644 --- a/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js +++ b/packages/dapi-grpc/clients/platform/v0/web/platform_pb.js @@ -21,12 +21,18 @@ var google_protobuf_struct_pb = require('google-protobuf/google/protobuf/struct_ goog.object.extend(proto, google_protobuf_struct_pb); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressBalanceChange', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressInfoEntries', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.AddressInfoEntry', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.AllKeys', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.BalanceAndNonce', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.BroadcastStateTransitionResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetAddressInfoRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetAddressInfoRequest.GetAddressInfoRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetAddressInfoRequest.VersionCase', null, { proto }); @@ -394,6 +400,20 @@ goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVote goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignal', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.GetProtocolVersionUpgradeVoteStatusResponseV0.VersionSignals', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetProtocolVersionUpgradeVoteStatusResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase', null, { proto }); +goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest.GetStatusRequestV0', null, { proto }); goog.exportSymbol('proto.org.dash.platform.dapi.v0.GetStatusRequest.VersionCase', null, { proto }); @@ -6950,6 +6970,69 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.AddressInfoEntries.displayName = 'proto.org.dash.platform.dapi.v0.AddressInfoEntries'; } +/** + * 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.AddressBalanceChange = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.AddressBalanceChange, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.AddressBalanceChange.displayName = 'proto.org.dash.platform.dapi.v0.AddressBalanceChange'; +} +/** + * 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.BlockAddressBalanceChanges = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.displayName = 'proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges'; +} +/** + * 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.AddressBalanceUpdateEntries = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.displayName = 'proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -7244,6 +7327,216 @@ if (goog.DEBUG && !COMPILED) { */ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.GetAddressesBranchStateResponseV0'; } +/** + * 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.GetRecentAddressBalanceChangesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest'; +} +/** + * 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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0'; +} +/** + * 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.GetRecentAddressBalanceChangesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse'; +} +/** + * 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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0'; +} +/** + * 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.CompactedBlockAddressBalanceChanges = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.displayName = 'proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges'; +} +/** + * 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.CompactedAddressBalanceUpdateEntries = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.repeatedFields_, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.displayName = 'proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse'; +} +/** + * 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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0 = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_); +}; +goog.inherits(proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.displayName = 'proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0'; +} @@ -73464,21 +73757,22 @@ proto.org.dash.platform.dapi.v0.AddressInfoEntries.prototype.clearAddressInfoEnt * @private {!Array>} * @const */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.oneofGroups_ = [[1]]; +proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_ = [[2,3]]; /** * @enum {number} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase = { - VERSION_NOT_SET: 0, - V0: 1 +proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase = { + OPERATION_NOT_SET: 0, + SET_BALANCE: 2, + ADD_TO_BALANCE: 3 }; /** - * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} + * @return {proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.getVersionCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getOperationCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.AddressBalanceChange.OperationCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0])); }; @@ -73496,8 +73790,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.AddressBalanceChange.toObject(opt_includeInstance, this); }; @@ -73506,13 +73800,15 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.toObject = function(includeInstance, msg) { var f, obj = { - v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject(includeInstance, f) + address: msg.getAddress_asB64(), + setBalance: jspb.Message.getFieldWithDefault(msg, 2, "0"), + addToBalance: jspb.Message.getFieldWithDefault(msg, 3, "0") }; if (includeInstance) { @@ -73526,23 +73822,23 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse; - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.AddressBalanceChange; + return proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -73550,9 +73846,16 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromRead var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader); - msg.setV0(value); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setSetBalance(value); + break; + case 3: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setAddToBalance(value); break; default: reader.skipField(); @@ -73567,9 +73870,9 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromRead * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.AddressBalanceChange.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -73577,51 +73880,159 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse} message + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.AddressBalanceChange.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getV0(); - if (f != null) { - writer.writeMessage( + f = message.getAddress_asU8(); + if (f.length > 0) { + writer.writeBytes( 1, - f, - proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeUint64String( + 2, + f + ); + } + f = /** @type {string} */ (jspb.Message.getField(message, 3)); + if (f != null) { + writer.writeUint64String( + 3, + f ); } }; +/** + * optional bytes address = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} - * @const + * optional bytes address = 1; + * This is a type-conversion wrapper around `getAddress()` + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_ = [[1,2]]; +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddress_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getAddress())); +}; + /** - * @enum {number} + * optional bytes address = 1; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getAddress()` + * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase = { - RESULT_NOT_SET: 0, - ADDRESS_INFO_ENTRY: 1, - PROOF: 2 +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddress_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getAddress())); }; + /** - * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} + * @param {!(string|Uint8Array)} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getResultCase = function() { - return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0])); +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.setAddress = function(value) { + return jspb.Message.setProto3BytesField(this, 1, value); }; +/** + * optional uint64 set_balance = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getSetBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.setSetBalance = function(value) { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.clearSetBalance = function() { + return jspb.Message.setOneofField(this, 2, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.hasSetBalance = function() { + return jspb.Message.getField(this, 2) != null; +}; + + +/** + * optional uint64 add_to_balance = 3; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.getAddToBalance = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.setAddToBalance = function(value) { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], value); +}; + + +/** + * Clears the field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.clearAddToBalance = function() { + return jspb.Message.setOneofField(this, 3, proto.org.dash.platform.dapi.v0.AddressBalanceChange.oneofGroups_[0], undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceChange.prototype.hasAddToBalance = function() { + return jspb.Message.getField(this, 3) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.repeatedFields_ = [2]; + + if (jspb.Message.GENERATE_TO_OBJECT) { /** @@ -73636,8 +74047,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.toObject = function(opt_includeInstance) { - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject(opt_includeInstance, this); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.toObject(opt_includeInstance, this); }; @@ -73646,15 +74057,15 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The msg instance to transform. + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject = function(includeInstance, msg) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.toObject = function(includeInstance, msg) { var f, obj = { - addressInfoEntry: (f = msg.getAddressInfoEntry()) && proto.org.dash.platform.dapi.v0.AddressInfoEntry.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) + blockHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + changesList: jspb.Message.toObjectList(msg.getChangesList(), + proto.org.dash.platform.dapi.v0.AddressBalanceChange.toObject, includeInstance) }; if (includeInstance) { @@ -73668,23 +74079,23 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinary = function(bytes) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0; - return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader(msg, reader); + var msg = new proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges; + return proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The message object to deserialize into. + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader = function(msg, reader) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -73692,19 +74103,13 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.org.dash.platform.dapi.v0.AddressInfoEntry; - reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressInfoEntry.deserializeBinaryFromReader); - msg.setAddressInfoEntry(value); + var value = /** @type {string} */ (reader.readUint64String()); + msg.setBlockHeight(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.AddressBalanceChange; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader); + msg.addChanges(value); break; default: reader.skipField(); @@ -73719,9 +74124,9 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.serializeBinary = function() { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter(this, writer); + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -73729,129 +74134,643 @@ proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0. /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} message + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter = function(message, writer) { +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddressInfoEntry(); - if (f != null) { - writer.writeMessage( + f = message.getBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( 1, - f, - proto.org.dash.platform.dapi.v0.AddressInfoEntry.serializeBinaryToWriter + f ); } - f = message.getProof(); - if (f != null) { - writer.writeMessage( + f = message.getChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 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.AddressBalanceChange.serializeBinaryToWriter ); } }; /** - * optional AddressInfoEntry address_info_entry = 1; - * @return {?proto.org.dash.platform.dapi.v0.AddressInfoEntry} + * optional uint64 block_height = 1; + * @return {string} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getAddressInfoEntry = function() { - return /** @type{?proto.org.dash.platform.dapi.v0.AddressInfoEntry} */ ( - jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AddressInfoEntry, 1)); -}; - - -/** - * @param {?proto.org.dash.platform.dapi.v0.AddressInfoEntry|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setAddressInfoEntry = function(value) { - return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.getBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} returns this */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearAddressInfoEntry = function() { - return this.setAddressInfoEntry(undefined); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.setBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * repeated AddressBalanceChange changes = 2; + * @return {!Array} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.hasAddressInfoEntry = function() { - return jspb.Message.getField(this, 1) != null; +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.getChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.AddressBalanceChange, 2)); }; /** - * optional Proof proof = 2; - * @return {?proto.org.dash.platform.dapi.v0.Proof} - */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.BlockAddressBalanceChanges} returns this +*/ +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.setChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); }; /** - * @param {?proto.org.dash.platform.dapi.v0.Proof|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setProof = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} + */ +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.addChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.org.dash.platform.dapi.v0.AddressBalanceChange, opt_index); }; /** - * Clears the message field making it undefined. - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} returns this */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearProof = function() { - return this.setProof(undefined); +proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.prototype.clearChangesList = function() { + return this.setChangesList([]); }; + /** - * Returns whether this field is set. - * @return {boolean} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.hasProof = function() { - return jspb.Message.getField(this, 2) != null; -}; +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional ResponseMetadata metadata = 3; - * @return {?proto.org.dash.platform.dapi.v0.ResponseMetadata} + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.AddressBalanceUpdateEntries.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.toObject(opt_includeInstance, this); }; /** - * @param {?proto.org.dash.platform.dapi.v0.ResponseMetadata|undefined} value - * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this -*/ -proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setMetadata = function(value) { - return jspb.Message.setWrapperField(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.AddressBalanceUpdateEntries} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.toObject = function(includeInstance, msg) { + var f, obj = { + blockChangesList: jspb.Message.toObjectList(msg.getBlockChangesList(), + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.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.AddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries; + return proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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.BlockAddressBalanceChanges; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.deserializeBinaryFromReader); + msg.addBlockChanges(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.AddressBalanceUpdateEntries.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated BlockAddressBalanceChanges block_changes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.getBlockChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} returns this +*/ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.setBlockChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.addBlockChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.BlockAddressBalanceChanges, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} returns this + */ +proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.prototype.clearBlockChangesList = function() { + return this.setBlockChangesList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in 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.GetAddressInfoResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse; + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.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.GetAddressInfoResponse.GetAddressInfoResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + ADDRESS_INFO_ENTRY: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + addressInfoEntry: (f = msg.getAddressInfoEntry()) && proto.org.dash.platform.dapi.v0.AddressInfoEntry.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.GetAddressInfoResponse.GetAddressInfoResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0; + return proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.AddressInfoEntry; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressInfoEntry.deserializeBinaryFromReader); + msg.setAddressInfoEntry(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.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressInfoEntry(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.AddressInfoEntry.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 AddressInfoEntry address_info_entry = 1; + * @return {?proto.org.dash.platform.dapi.v0.AddressInfoEntry} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.getAddressInfoEntry = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.AddressInfoEntry} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AddressInfoEntry, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.AddressInfoEntry|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setAddressInfoEntry = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearAddressInfoEntry = function() { + return this.setAddressInfoEntry(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.hasAddressInfoEntry = 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.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0.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.GetAddressInfoResponse.GetAddressInfoResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetAddressInfoResponse.GetAddressInfoResponseV0.prototype.setMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); }; @@ -75578,7 +76497,8 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.toObject = function(includeInstance, msg) { var f, obj = { key: msg.getKey_asB64(), - depth: jspb.Message.getFieldWithDefault(msg, 2, 0) + depth: jspb.Message.getFieldWithDefault(msg, 2, 0), + checkpointHeight: jspb.Message.getFieldWithDefault(msg, 3, 0) }; if (includeInstance) { @@ -75623,6 +76543,10 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc var value = /** @type {number} */ (reader.readUint32()); msg.setDepth(value); break; + case 3: + var value = /** @type {number} */ (reader.readUint64()); + msg.setCheckpointHeight(value); + break; default: reader.skipField(); break; @@ -75666,6 +76590,13 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc f ); } + f = message.getCheckpointHeight(); + if (f !== 0) { + writer.writeUint64( + 3, + f + ); + } }; @@ -75729,6 +76660,24 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranc }; +/** + * optional uint64 checkpoint_height = 3; + * @return {number} + */ +proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.prototype.getCheckpointHeight = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0.prototype.setCheckpointHeight = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + /** * optional GetAddressesBranchStateRequestV0 v0 = 1; * @return {?proto.org.dash.platform.dapi.v0.GetAddressesBranchStateRequest.GetAddressesBranchStateRequestV0} @@ -76096,6 +77045,1968 @@ proto.org.dash.platform.dapi.v0.GetAddressesBranchStateResponse.prototype.hasV0 }; + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in 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.GetRecentAddressBalanceChangesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + startHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + 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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setStartHeight(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.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 start_height = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.getStartHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.setStartHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetRecentAddressBalanceChangesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.GetRecentAddressBalanceChangesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesRequest.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.GetRecentAddressBalanceChangesResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + ADDRESS_BALANCE_UPDATE_ENTRIES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + addressBalanceUpdateEntries: (f = msg.getAddressBalanceUpdateEntries()) && proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0; + return proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.AddressBalanceUpdateEntries; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.deserializeBinaryFromReader); + msg.setAddressBalanceUpdateEntries(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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddressBalanceUpdateEntries(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries.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 AddressBalanceUpdateEntries address_balance_update_entries = 1; + * @return {?proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.getAddressBalanceUpdateEntries = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.AddressBalanceUpdateEntries|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.setAddressBalanceUpdateEntries = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.clearAddressBalanceUpdateEntries = function() { + return this.setAddressBalanceUpdateEntries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.hasAddressBalanceUpdateEntries = 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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.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.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetRecentAddressBalanceChangesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.GetRecentAddressBalanceChangesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentAddressBalanceChangesResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.repeatedFields_ = [3]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.toObject = function(includeInstance, msg) { + var f, obj = { + startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + endBlockHeight: jspb.Message.getFieldWithDefault(msg, 2, "0"), + changesList: jspb.Message.toObjectList(msg.getChangesList(), + proto.org.dash.platform.dapi.v0.AddressBalanceChange.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.CompactedBlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges; + return proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setStartBlockHeight(value); + break; + case 2: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setEndBlockHeight(value); + break; + case 3: + var value = new proto.org.dash.platform.dapi.v0.AddressBalanceChange; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.AddressBalanceChange.deserializeBinaryFromReader); + msg.addChanges(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.CompactedBlockAddressBalanceChanges.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getEndBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 2, + f + ); + } + f = message.getChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 3, + f, + proto.org.dash.platform.dapi.v0.AddressBalanceChange.serializeBinaryToWriter + ); + } +}; + + +/** + * optional uint64 start_block_height = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.getStartBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.setStartBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional uint64 end_block_height = 2; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.getEndBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.setEndBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 2, value); +}; + + +/** + * repeated AddressBalanceChange changes = 3; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.getChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.AddressBalanceChange, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this +*/ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.setChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 3, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.AddressBalanceChange=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.AddressBalanceChange} + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.addChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 3, opt_value, proto.org.dash.platform.dapi.v0.AddressBalanceChange, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.prototype.clearChangesList = function() { + return this.setChangesList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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.CompactedAddressBalanceUpdateEntries.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.toObject = function(includeInstance, msg) { + var f, obj = { + compactedBlockChangesList: jspb.Message.toObjectList(msg.getCompactedBlockChangesList(), + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.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.CompactedAddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries; + return proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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.CompactedBlockAddressBalanceChanges; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.deserializeBinaryFromReader); + msg.addCompactedBlockChanges(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.CompactedAddressBalanceUpdateEntries.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompactedBlockChangesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated CompactedBlockAddressBalanceChanges compacted_block_changes = 1; + * @return {!Array} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.getCompactedBlockChangesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} returns this +*/ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.setCompactedBlockChangesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges=} opt_value + * @param {number=} opt_index + * @return {!proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges} + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.addCompactedBlockChanges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.org.dash.platform.dapi.v0.CompactedBlockAddressBalanceChanges, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} returns this + */ +proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.prototype.clearCompactedBlockChangesList = function() { + return this.setCompactedBlockChangesList([]); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in 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.GetRecentCompactedAddressBalanceChangesRequest.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.toObject = function(includeInstance, msg) { + var f, obj = { + startBlockHeight: jspb.Message.getFieldWithDefault(msg, 1, "0"), + 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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readUint64String()); + msg.setStartBlockHeight(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.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getStartBlockHeight(); + if (parseInt(f, 10) !== 0) { + writer.writeUint64String( + 1, + f + ); + } + f = message.getProve(); + if (f) { + writer.writeBool( + 2, + f + ); + } +}; + + +/** + * optional uint64 start_block_height = 1; + * @return {string} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.getStartBlockHeight = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "0")); +}; + + +/** + * @param {string} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.setStartBlockHeight = function(value) { + return jspb.Message.setProto3StringIntField(this, 1, value); +}; + + +/** + * optional bool prove = 2; + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.getProve = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0.prototype.setProve = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; + + +/** + * optional GetRecentCompactedAddressBalanceChangesRequestV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.GetRecentCompactedAddressBalanceChangesRequestV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesRequest.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.GetRecentCompactedAddressBalanceChangesResponse.oneofGroups_ = [[1]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase = { + VERSION_NOT_SET: 0, + V0: 1 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.getVersionCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.VersionCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.toObject = function(includeInstance, msg) { + var f, obj = { + v0: (f = msg.getV0()) && proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getV0(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_ = [[1,2]]; + +/** + * @enum {number} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase = { + RESULT_NOT_SET: 0, + COMPACTED_ADDRESS_BALANCE_UPDATE_ENTRIES: 1, + PROOF: 2 +}; + +/** + * @return {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.getResultCase = function() { + return /** @type {proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.ResultCase} */(jspb.Message.computeOneofCase(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.toObject = function(opt_includeInstance) { + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.toObject = function(includeInstance, msg) { + var f, obj = { + compactedAddressBalanceUpdateEntries: (f = msg.getCompactedAddressBalanceUpdateEntries()) && proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0; + return proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.CompactedAddressBalanceUpdateEntries; + reader.readMessage(value,proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.deserializeBinaryFromReader); + msg.setCompactedAddressBalanceUpdateEntries(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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCompactedAddressBalanceUpdateEntries(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries.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 CompactedAddressBalanceUpdateEntries compacted_address_balance_update_entries = 1; + * @return {?proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.getCompactedAddressBalanceUpdateEntries = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.CompactedAddressBalanceUpdateEntries|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.setCompactedAddressBalanceUpdateEntries = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.clearCompactedAddressBalanceUpdateEntries = function() { + return this.setCompactedAddressBalanceUpdateEntries(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.hasCompactedAddressBalanceUpdateEntries = 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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.setProof = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.clearProof = function() { + return this.setProof(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.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.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.clearMetadata = function() { + return this.setMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0.prototype.hasMetadata = function() { + return jspb.Message.getField(this, 3) != null; +}; + + +/** + * optional GetRecentCompactedAddressBalanceChangesResponseV0 v0 = 1; + * @return {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.getV0 = function() { + return /** @type{?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0} */ ( + jspb.Message.getWrapperField(this, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0, 1)); +}; + + +/** + * @param {?proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.GetRecentCompactedAddressBalanceChangesResponseV0|undefined} value + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} returns this +*/ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.setV0 = function(value) { + return jspb.Message.setOneofWrapperField(this, 1, proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse} returns this + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.clearV0 = function() { + return this.setV0(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.org.dash.platform.dapi.v0.GetRecentCompactedAddressBalanceChangesResponse.prototype.hasV0 = function() { + return jspb.Message.getField(this, 1) != null; +}; + + /** * @enum {number} */ 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 7884982aa73..99ae8d11aab 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 @@ -463,6 +463,24 @@ type PlatformgetAddressesBranchState = { readonly responseType: typeof platform_pb.GetAddressesBranchStateResponse; }; +type PlatformgetRecentAddressBalanceChanges = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetRecentAddressBalanceChangesRequest; + readonly responseType: typeof platform_pb.GetRecentAddressBalanceChangesResponse; +}; + +type PlatformgetRecentCompactedAddressBalanceChanges = { + readonly methodName: string; + readonly service: typeof Platform; + readonly requestStream: false; + readonly responseStream: false; + readonly requestType: typeof platform_pb.GetRecentCompactedAddressBalanceChangesRequest; + readonly responseType: typeof platform_pb.GetRecentCompactedAddressBalanceChangesResponse; +}; + export class Platform { static readonly serviceName: string; static readonly broadcastStateTransition: PlatformbroadcastStateTransition; @@ -516,6 +534,8 @@ export class Platform { static readonly getAddressesInfos: PlatformgetAddressesInfos; static readonly getAddressesTrunkState: PlatformgetAddressesTrunkState; static readonly getAddressesBranchState: PlatformgetAddressesBranchState; + static readonly getRecentAddressBalanceChanges: PlatformgetRecentAddressBalanceChanges; + static readonly getRecentCompactedAddressBalanceChanges: PlatformgetRecentCompactedAddressBalanceChanges; } export type ServiceError = { message: string, code: number; metadata: grpc.Metadata } @@ -1009,5 +1029,23 @@ export class PlatformClient { requestMessage: platform_pb.GetAddressesBranchStateRequest, callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesBranchStateResponse|null) => void ): UnaryResponse; + getRecentAddressBalanceChanges( + requestMessage: platform_pb.GetRecentAddressBalanceChangesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentAddressBalanceChangesResponse|null) => void + ): UnaryResponse; + getRecentAddressBalanceChanges( + requestMessage: platform_pb.GetRecentAddressBalanceChangesRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentAddressBalanceChangesResponse|null) => void + ): UnaryResponse; + getRecentCompactedAddressBalanceChanges( + requestMessage: platform_pb.GetRecentCompactedAddressBalanceChangesRequest, + metadata: grpc.Metadata, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentCompactedAddressBalanceChangesResponse|null) => void + ): UnaryResponse; + getRecentCompactedAddressBalanceChanges( + requestMessage: platform_pb.GetRecentCompactedAddressBalanceChangesRequest, + callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentCompactedAddressBalanceChangesResponse|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 ce2daddf15b..3bb9564e220 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 @@ -469,6 +469,24 @@ Platform.getAddressesBranchState = { responseType: platform_pb.GetAddressesBranchStateResponse }; +Platform.getRecentAddressBalanceChanges = { + methodName: "getRecentAddressBalanceChanges", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetRecentAddressBalanceChangesRequest, + responseType: platform_pb.GetRecentAddressBalanceChangesResponse +}; + +Platform.getRecentCompactedAddressBalanceChanges = { + methodName: "getRecentCompactedAddressBalanceChanges", + service: Platform, + requestStream: false, + responseStream: false, + requestType: platform_pb.GetRecentCompactedAddressBalanceChangesRequest, + responseType: platform_pb.GetRecentCompactedAddressBalanceChangesResponse +}; + exports.Platform = Platform; function PlatformClient(serviceHost, options) { @@ -2057,5 +2075,67 @@ PlatformClient.prototype.getAddressesBranchState = function getAddressesBranchSt }; }; +PlatformClient.prototype.getRecentAddressBalanceChanges = function getRecentAddressBalanceChanges(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getRecentAddressBalanceChanges, { + 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.getRecentCompactedAddressBalanceChanges = function getRecentCompactedAddressBalanceChanges(requestMessage, metadata, callback) { + if (arguments.length === 2) { + callback = arguments[1]; + } + var client = grpc.unary(Platform.getRecentCompactedAddressBalanceChanges, { + 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;