@dashevo/dapi-grpc 3.0.0-dev.8 → 3.0.0-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "3.0.0-dev.8",
3
+ "version": "3.0.0-rc.1",
4
4
  "description": "DAPI GRPC definition file and generated clients",
5
5
  "browser": "browser.js",
6
6
  "main": "node.js",
@@ -45,7 +45,7 @@
45
45
  },
46
46
  "homepage": "https://github.com/dashevo/dapi-grpc#readme",
47
47
  "dependencies": {
48
- "@dashevo/grpc-common": "3.0.0-dev.8",
48
+ "@dashevo/grpc-common": "3.0.0-rc.1",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "1.4.4",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",
@@ -2072,10 +2072,35 @@ message GetRecentAddressBalanceChangesResponse {
2072
2072
  oneof version { GetRecentAddressBalanceChangesResponseV0 v0 = 1; }
2073
2073
  }
2074
2074
 
2075
+ // Entry for block height to credits mapping in AddToCreditsOperations
2076
+ message BlockHeightCreditEntry {
2077
+ uint64 block_height = 1 [ jstype = JS_STRING ];
2078
+ uint64 credits = 2 [ jstype = JS_STRING ];
2079
+ }
2080
+
2081
+ // Compacted address balance change supporting block-aware credit operations
2082
+ // For SetCredits: the final balance value
2083
+ // For AddToCreditsOperations: preserves individual adds with their block heights
2084
+ message CompactedAddressBalanceChange {
2085
+ bytes address = 1;
2086
+ oneof operation {
2087
+ // The address balance was set to this value (overwrites previous)
2088
+ uint64 set_credits = 2 [ jstype = JS_STRING ];
2089
+ // Individual add-to-credits operations by block height (preserved for partial sync)
2090
+ AddToCreditsOperations add_to_credits_operations = 3;
2091
+ }
2092
+ }
2093
+
2094
+ // A collection of add-to-credits operations, each tagged with block height
2095
+ // This allows clients to determine which adds to apply based on their sync height
2096
+ message AddToCreditsOperations {
2097
+ repeated BlockHeightCreditEntry entries = 1;
2098
+ }
2099
+
2075
2100
  message CompactedBlockAddressBalanceChanges {
2076
2101
  uint64 start_block_height = 1 [ jstype = JS_STRING ];
2077
2102
  uint64 end_block_height = 2 [ jstype = JS_STRING ];
2078
- repeated AddressBalanceChange changes = 3;
2103
+ repeated CompactedAddressBalanceChange changes = 3;
2079
2104
  }
2080
2105
 
2081
2106
  message CompactedAddressBalanceUpdateEntries {
@@ -5916,6 +5916,54 @@ pub mod get_recent_address_balance_changes_response {
5916
5916
  V0(GetRecentAddressBalanceChangesResponseV0),
5917
5917
  }
5918
5918
  }
5919
+ /// Entry for block height to credits mapping in AddToCreditsOperations
5920
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5921
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5922
+ #[derive(::dash_platform_macros::Mockable)]
5923
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5924
+ pub struct BlockHeightCreditEntry {
5925
+ #[prost(uint64, tag = "1")]
5926
+ pub block_height: u64,
5927
+ #[prost(uint64, tag = "2")]
5928
+ pub credits: u64,
5929
+ }
5930
+ /// Compacted address balance change supporting block-aware credit operations
5931
+ /// For SetCredits: the final balance value
5932
+ /// For AddToCreditsOperations: preserves individual adds with their block heights
5933
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5934
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5935
+ #[derive(::dash_platform_macros::Mockable)]
5936
+ #[derive(Clone, PartialEq, ::prost::Message)]
5937
+ pub struct CompactedAddressBalanceChange {
5938
+ #[prost(bytes = "vec", tag = "1")]
5939
+ pub address: ::prost::alloc::vec::Vec<u8>,
5940
+ #[prost(oneof = "compacted_address_balance_change::Operation", tags = "2, 3")]
5941
+ pub operation: ::core::option::Option<compacted_address_balance_change::Operation>,
5942
+ }
5943
+ /// Nested message and enum types in `CompactedAddressBalanceChange`.
5944
+ pub mod compacted_address_balance_change {
5945
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5946
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5947
+ #[derive(Clone, PartialEq, ::prost::Oneof)]
5948
+ pub enum Operation {
5949
+ /// The address balance was set to this value (overwrites previous)
5950
+ #[prost(uint64, tag = "2")]
5951
+ SetCredits(u64),
5952
+ /// Individual add-to-credits operations by block height (preserved for partial sync)
5953
+ #[prost(message, tag = "3")]
5954
+ AddToCreditsOperations(super::AddToCreditsOperations),
5955
+ }
5956
+ }
5957
+ /// A collection of add-to-credits operations, each tagged with block height
5958
+ /// This allows clients to determine which adds to apply based on their sync height
5959
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5960
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5961
+ #[derive(::dash_platform_macros::Mockable)]
5962
+ #[derive(Clone, PartialEq, ::prost::Message)]
5963
+ pub struct AddToCreditsOperations {
5964
+ #[prost(message, repeated, tag = "1")]
5965
+ pub entries: ::prost::alloc::vec::Vec<BlockHeightCreditEntry>,
5966
+ }
5919
5967
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5920
5968
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5921
5969
  #[derive(::dash_platform_macros::Mockable)]
@@ -5926,7 +5974,7 @@ pub struct CompactedBlockAddressBalanceChanges {
5926
5974
  #[prost(uint64, tag = "2")]
5927
5975
  pub end_block_height: u64,
5928
5976
  #[prost(message, repeated, tag = "3")]
5929
- pub changes: ::prost::alloc::vec::Vec<AddressBalanceChange>,
5977
+ pub changes: ::prost::alloc::vec::Vec<CompactedAddressBalanceChange>,
5930
5978
  }
5931
5979
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5932
5980
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
@@ -5916,6 +5916,54 @@ pub mod get_recent_address_balance_changes_response {
5916
5916
  V0(GetRecentAddressBalanceChangesResponseV0),
5917
5917
  }
5918
5918
  }
5919
+ /// Entry for block height to credits mapping in AddToCreditsOperations
5920
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5921
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5922
+ #[derive(::dash_platform_macros::Mockable)]
5923
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
5924
+ pub struct BlockHeightCreditEntry {
5925
+ #[prost(uint64, tag = "1")]
5926
+ pub block_height: u64,
5927
+ #[prost(uint64, tag = "2")]
5928
+ pub credits: u64,
5929
+ }
5930
+ /// Compacted address balance change supporting block-aware credit operations
5931
+ /// For SetCredits: the final balance value
5932
+ /// For AddToCreditsOperations: preserves individual adds with their block heights
5933
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5934
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5935
+ #[derive(::dash_platform_macros::Mockable)]
5936
+ #[derive(Clone, PartialEq, ::prost::Message)]
5937
+ pub struct CompactedAddressBalanceChange {
5938
+ #[prost(bytes = "vec", tag = "1")]
5939
+ pub address: ::prost::alloc::vec::Vec<u8>,
5940
+ #[prost(oneof = "compacted_address_balance_change::Operation", tags = "2, 3")]
5941
+ pub operation: ::core::option::Option<compacted_address_balance_change::Operation>,
5942
+ }
5943
+ /// Nested message and enum types in `CompactedAddressBalanceChange`.
5944
+ pub mod compacted_address_balance_change {
5945
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5946
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5947
+ #[derive(Clone, PartialEq, ::prost::Oneof)]
5948
+ pub enum Operation {
5949
+ /// The address balance was set to this value (overwrites previous)
5950
+ #[prost(uint64, tag = "2")]
5951
+ SetCredits(u64),
5952
+ /// Individual add-to-credits operations by block height (preserved for partial sync)
5953
+ #[prost(message, tag = "3")]
5954
+ AddToCreditsOperations(super::AddToCreditsOperations),
5955
+ }
5956
+ }
5957
+ /// A collection of add-to-credits operations, each tagged with block height
5958
+ /// This allows clients to determine which adds to apply based on their sync height
5959
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5960
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5961
+ #[derive(::dash_platform_macros::Mockable)]
5962
+ #[derive(Clone, PartialEq, ::prost::Message)]
5963
+ pub struct AddToCreditsOperations {
5964
+ #[prost(message, repeated, tag = "1")]
5965
+ pub entries: ::prost::alloc::vec::Vec<BlockHeightCreditEntry>,
5966
+ }
5919
5967
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5920
5968
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
5921
5969
  #[derive(::dash_platform_macros::Mockable)]
@@ -5926,7 +5974,7 @@ pub struct CompactedBlockAddressBalanceChanges {
5926
5974
  #[prost(uint64, tag = "2")]
5927
5975
  pub end_block_height: u64,
5928
5976
  #[prost(message, repeated, tag = "3")]
5929
- pub changes: ::prost::alloc::vec::Vec<AddressBalanceChange>,
5977
+ pub changes: ::prost::alloc::vec::Vec<CompactedAddressBalanceChange>,
5930
5978
  }
5931
5979
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
5932
5980
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
@@ -6287,6 +6287,54 @@ pub mod get_recent_address_balance_changes_response {
6287
6287
  V0(GetRecentAddressBalanceChangesResponseV0),
6288
6288
  }
6289
6289
  }
6290
+ /// Entry for block height to credits mapping in AddToCreditsOperations
6291
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6292
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6293
+ #[derive(::dash_platform_macros::Mockable)]
6294
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6295
+ pub struct BlockHeightCreditEntry {
6296
+ #[prost(uint64, tag = "1")]
6297
+ pub block_height: u64,
6298
+ #[prost(uint64, tag = "2")]
6299
+ pub credits: u64,
6300
+ }
6301
+ /// Compacted address balance change supporting block-aware credit operations
6302
+ /// For SetCredits: the final balance value
6303
+ /// For AddToCreditsOperations: preserves individual adds with their block heights
6304
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6305
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6306
+ #[derive(::dash_platform_macros::Mockable)]
6307
+ #[derive(Clone, PartialEq, ::prost::Message)]
6308
+ pub struct CompactedAddressBalanceChange {
6309
+ #[prost(bytes = "vec", tag = "1")]
6310
+ pub address: ::prost::alloc::vec::Vec<u8>,
6311
+ #[prost(oneof = "compacted_address_balance_change::Operation", tags = "2, 3")]
6312
+ pub operation: ::core::option::Option<compacted_address_balance_change::Operation>,
6313
+ }
6314
+ /// Nested message and enum types in `CompactedAddressBalanceChange`.
6315
+ pub mod compacted_address_balance_change {
6316
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6317
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6318
+ #[derive(Clone, PartialEq, ::prost::Oneof)]
6319
+ pub enum Operation {
6320
+ /// The address balance was set to this value (overwrites previous)
6321
+ #[prost(uint64, tag = "2")]
6322
+ SetCredits(u64),
6323
+ /// Individual add-to-credits operations by block height (preserved for partial sync)
6324
+ #[prost(message, tag = "3")]
6325
+ AddToCreditsOperations(super::AddToCreditsOperations),
6326
+ }
6327
+ }
6328
+ /// A collection of add-to-credits operations, each tagged with block height
6329
+ /// This allows clients to determine which adds to apply based on their sync height
6330
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6331
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6332
+ #[derive(::dash_platform_macros::Mockable)]
6333
+ #[derive(Clone, PartialEq, ::prost::Message)]
6334
+ pub struct AddToCreditsOperations {
6335
+ #[prost(message, repeated, tag = "1")]
6336
+ pub entries: ::prost::alloc::vec::Vec<BlockHeightCreditEntry>,
6337
+ }
6290
6338
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6291
6339
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6292
6340
  #[derive(::dash_platform_macros::Mockable)]
@@ -6297,7 +6345,7 @@ pub struct CompactedBlockAddressBalanceChanges {
6297
6345
  #[prost(uint64, tag = "2")]
6298
6346
  pub end_block_height: u64,
6299
6347
  #[prost(message, repeated, tag = "3")]
6300
- pub changes: ::prost::alloc::vec::Vec<AddressBalanceChange>,
6348
+ pub changes: ::prost::alloc::vec::Vec<CompactedAddressBalanceChange>,
6301
6349
  }
6302
6350
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6303
6351
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
@@ -6287,6 +6287,54 @@ pub mod get_recent_address_balance_changes_response {
6287
6287
  V0(GetRecentAddressBalanceChangesResponseV0),
6288
6288
  }
6289
6289
  }
6290
+ /// Entry for block height to credits mapping in AddToCreditsOperations
6291
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6292
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6293
+ #[derive(::dash_platform_macros::Mockable)]
6294
+ #[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
6295
+ pub struct BlockHeightCreditEntry {
6296
+ #[prost(uint64, tag = "1")]
6297
+ pub block_height: u64,
6298
+ #[prost(uint64, tag = "2")]
6299
+ pub credits: u64,
6300
+ }
6301
+ /// Compacted address balance change supporting block-aware credit operations
6302
+ /// For SetCredits: the final balance value
6303
+ /// For AddToCreditsOperations: preserves individual adds with their block heights
6304
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6305
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6306
+ #[derive(::dash_platform_macros::Mockable)]
6307
+ #[derive(Clone, PartialEq, ::prost::Message)]
6308
+ pub struct CompactedAddressBalanceChange {
6309
+ #[prost(bytes = "vec", tag = "1")]
6310
+ pub address: ::prost::alloc::vec::Vec<u8>,
6311
+ #[prost(oneof = "compacted_address_balance_change::Operation", tags = "2, 3")]
6312
+ pub operation: ::core::option::Option<compacted_address_balance_change::Operation>,
6313
+ }
6314
+ /// Nested message and enum types in `CompactedAddressBalanceChange`.
6315
+ pub mod compacted_address_balance_change {
6316
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6317
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6318
+ #[derive(Clone, PartialEq, ::prost::Oneof)]
6319
+ pub enum Operation {
6320
+ /// The address balance was set to this value (overwrites previous)
6321
+ #[prost(uint64, tag = "2")]
6322
+ SetCredits(u64),
6323
+ /// Individual add-to-credits operations by block height (preserved for partial sync)
6324
+ #[prost(message, tag = "3")]
6325
+ AddToCreditsOperations(super::AddToCreditsOperations),
6326
+ }
6327
+ }
6328
+ /// A collection of add-to-credits operations, each tagged with block height
6329
+ /// This allows clients to determine which adds to apply based on their sync height
6330
+ #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6331
+ #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6332
+ #[derive(::dash_platform_macros::Mockable)]
6333
+ #[derive(Clone, PartialEq, ::prost::Message)]
6334
+ pub struct AddToCreditsOperations {
6335
+ #[prost(message, repeated, tag = "1")]
6336
+ pub entries: ::prost::alloc::vec::Vec<BlockHeightCreditEntry>,
6337
+ }
6290
6338
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6291
6339
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]
6292
6340
  #[derive(::dash_platform_macros::Mockable)]
@@ -6297,7 +6345,7 @@ pub struct CompactedBlockAddressBalanceChanges {
6297
6345
  #[prost(uint64, tag = "2")]
6298
6346
  pub end_block_height: u64,
6299
6347
  #[prost(message, repeated, tag = "3")]
6300
- pub changes: ::prost::alloc::vec::Vec<AddressBalanceChange>,
6348
+ pub changes: ::prost::alloc::vec::Vec<CompactedAddressBalanceChange>,
6301
6349
  }
6302
6350
  #[cfg_attr(feature = "serde", derive(::serde::Serialize, ::serde::Deserialize))]
6303
6351
  #[cfg_attr(feature = "serde", serde(rename_all = "snake_case"))]