@dashevo/dapi-grpc 2.2.0-dev.2 → 3.0.0-dev.11

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.
@@ -427,6 +427,60 @@ type PlatformgetGroupActionSigners = {
427
427
  readonly responseType: typeof platform_pb.GetGroupActionSignersResponse;
428
428
  };
429
429
 
430
+ type PlatformgetAddressInfo = {
431
+ readonly methodName: string;
432
+ readonly service: typeof Platform;
433
+ readonly requestStream: false;
434
+ readonly responseStream: false;
435
+ readonly requestType: typeof platform_pb.GetAddressInfoRequest;
436
+ readonly responseType: typeof platform_pb.GetAddressInfoResponse;
437
+ };
438
+
439
+ type PlatformgetAddressesInfos = {
440
+ readonly methodName: string;
441
+ readonly service: typeof Platform;
442
+ readonly requestStream: false;
443
+ readonly responseStream: false;
444
+ readonly requestType: typeof platform_pb.GetAddressesInfosRequest;
445
+ readonly responseType: typeof platform_pb.GetAddressesInfosResponse;
446
+ };
447
+
448
+ type PlatformgetAddressesTrunkState = {
449
+ readonly methodName: string;
450
+ readonly service: typeof Platform;
451
+ readonly requestStream: false;
452
+ readonly responseStream: false;
453
+ readonly requestType: typeof platform_pb.GetAddressesTrunkStateRequest;
454
+ readonly responseType: typeof platform_pb.GetAddressesTrunkStateResponse;
455
+ };
456
+
457
+ type PlatformgetAddressesBranchState = {
458
+ readonly methodName: string;
459
+ readonly service: typeof Platform;
460
+ readonly requestStream: false;
461
+ readonly responseStream: false;
462
+ readonly requestType: typeof platform_pb.GetAddressesBranchStateRequest;
463
+ readonly responseType: typeof platform_pb.GetAddressesBranchStateResponse;
464
+ };
465
+
466
+ type PlatformgetRecentAddressBalanceChanges = {
467
+ readonly methodName: string;
468
+ readonly service: typeof Platform;
469
+ readonly requestStream: false;
470
+ readonly responseStream: false;
471
+ readonly requestType: typeof platform_pb.GetRecentAddressBalanceChangesRequest;
472
+ readonly responseType: typeof platform_pb.GetRecentAddressBalanceChangesResponse;
473
+ };
474
+
475
+ type PlatformgetRecentCompactedAddressBalanceChanges = {
476
+ readonly methodName: string;
477
+ readonly service: typeof Platform;
478
+ readonly requestStream: false;
479
+ readonly responseStream: false;
480
+ readonly requestType: typeof platform_pb.GetRecentCompactedAddressBalanceChangesRequest;
481
+ readonly responseType: typeof platform_pb.GetRecentCompactedAddressBalanceChangesResponse;
482
+ };
483
+
430
484
  export class Platform {
431
485
  static readonly serviceName: string;
432
486
  static readonly broadcastStateTransition: PlatformbroadcastStateTransition;
@@ -476,6 +530,12 @@ export class Platform {
476
530
  static readonly getGroupInfos: PlatformgetGroupInfos;
477
531
  static readonly getGroupActions: PlatformgetGroupActions;
478
532
  static readonly getGroupActionSigners: PlatformgetGroupActionSigners;
533
+ static readonly getAddressInfo: PlatformgetAddressInfo;
534
+ static readonly getAddressesInfos: PlatformgetAddressesInfos;
535
+ static readonly getAddressesTrunkState: PlatformgetAddressesTrunkState;
536
+ static readonly getAddressesBranchState: PlatformgetAddressesBranchState;
537
+ static readonly getRecentAddressBalanceChanges: PlatformgetRecentAddressBalanceChanges;
538
+ static readonly getRecentCompactedAddressBalanceChanges: PlatformgetRecentCompactedAddressBalanceChanges;
479
539
  }
480
540
 
481
541
  export type ServiceError = { message: string, code: number; metadata: grpc.Metadata }
@@ -933,5 +993,59 @@ export class PlatformClient {
933
993
  requestMessage: platform_pb.GetGroupActionSignersRequest,
934
994
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetGroupActionSignersResponse|null) => void
935
995
  ): UnaryResponse;
996
+ getAddressInfo(
997
+ requestMessage: platform_pb.GetAddressInfoRequest,
998
+ metadata: grpc.Metadata,
999
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressInfoResponse|null) => void
1000
+ ): UnaryResponse;
1001
+ getAddressInfo(
1002
+ requestMessage: platform_pb.GetAddressInfoRequest,
1003
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressInfoResponse|null) => void
1004
+ ): UnaryResponse;
1005
+ getAddressesInfos(
1006
+ requestMessage: platform_pb.GetAddressesInfosRequest,
1007
+ metadata: grpc.Metadata,
1008
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesInfosResponse|null) => void
1009
+ ): UnaryResponse;
1010
+ getAddressesInfos(
1011
+ requestMessage: platform_pb.GetAddressesInfosRequest,
1012
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesInfosResponse|null) => void
1013
+ ): UnaryResponse;
1014
+ getAddressesTrunkState(
1015
+ requestMessage: platform_pb.GetAddressesTrunkStateRequest,
1016
+ metadata: grpc.Metadata,
1017
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesTrunkStateResponse|null) => void
1018
+ ): UnaryResponse;
1019
+ getAddressesTrunkState(
1020
+ requestMessage: platform_pb.GetAddressesTrunkStateRequest,
1021
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesTrunkStateResponse|null) => void
1022
+ ): UnaryResponse;
1023
+ getAddressesBranchState(
1024
+ requestMessage: platform_pb.GetAddressesBranchStateRequest,
1025
+ metadata: grpc.Metadata,
1026
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesBranchStateResponse|null) => void
1027
+ ): UnaryResponse;
1028
+ getAddressesBranchState(
1029
+ requestMessage: platform_pb.GetAddressesBranchStateRequest,
1030
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetAddressesBranchStateResponse|null) => void
1031
+ ): UnaryResponse;
1032
+ getRecentAddressBalanceChanges(
1033
+ requestMessage: platform_pb.GetRecentAddressBalanceChangesRequest,
1034
+ metadata: grpc.Metadata,
1035
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentAddressBalanceChangesResponse|null) => void
1036
+ ): UnaryResponse;
1037
+ getRecentAddressBalanceChanges(
1038
+ requestMessage: platform_pb.GetRecentAddressBalanceChangesRequest,
1039
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentAddressBalanceChangesResponse|null) => void
1040
+ ): UnaryResponse;
1041
+ getRecentCompactedAddressBalanceChanges(
1042
+ requestMessage: platform_pb.GetRecentCompactedAddressBalanceChangesRequest,
1043
+ metadata: grpc.Metadata,
1044
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentCompactedAddressBalanceChangesResponse|null) => void
1045
+ ): UnaryResponse;
1046
+ getRecentCompactedAddressBalanceChanges(
1047
+ requestMessage: platform_pb.GetRecentCompactedAddressBalanceChangesRequest,
1048
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetRecentCompactedAddressBalanceChangesResponse|null) => void
1049
+ ): UnaryResponse;
936
1050
  }
937
1051
 
@@ -433,6 +433,60 @@ Platform.getGroupActionSigners = {
433
433
  responseType: platform_pb.GetGroupActionSignersResponse
434
434
  };
435
435
 
436
+ Platform.getAddressInfo = {
437
+ methodName: "getAddressInfo",
438
+ service: Platform,
439
+ requestStream: false,
440
+ responseStream: false,
441
+ requestType: platform_pb.GetAddressInfoRequest,
442
+ responseType: platform_pb.GetAddressInfoResponse
443
+ };
444
+
445
+ Platform.getAddressesInfos = {
446
+ methodName: "getAddressesInfos",
447
+ service: Platform,
448
+ requestStream: false,
449
+ responseStream: false,
450
+ requestType: platform_pb.GetAddressesInfosRequest,
451
+ responseType: platform_pb.GetAddressesInfosResponse
452
+ };
453
+
454
+ Platform.getAddressesTrunkState = {
455
+ methodName: "getAddressesTrunkState",
456
+ service: Platform,
457
+ requestStream: false,
458
+ responseStream: false,
459
+ requestType: platform_pb.GetAddressesTrunkStateRequest,
460
+ responseType: platform_pb.GetAddressesTrunkStateResponse
461
+ };
462
+
463
+ Platform.getAddressesBranchState = {
464
+ methodName: "getAddressesBranchState",
465
+ service: Platform,
466
+ requestStream: false,
467
+ responseStream: false,
468
+ requestType: platform_pb.GetAddressesBranchStateRequest,
469
+ responseType: platform_pb.GetAddressesBranchStateResponse
470
+ };
471
+
472
+ Platform.getRecentAddressBalanceChanges = {
473
+ methodName: "getRecentAddressBalanceChanges",
474
+ service: Platform,
475
+ requestStream: false,
476
+ responseStream: false,
477
+ requestType: platform_pb.GetRecentAddressBalanceChangesRequest,
478
+ responseType: platform_pb.GetRecentAddressBalanceChangesResponse
479
+ };
480
+
481
+ Platform.getRecentCompactedAddressBalanceChanges = {
482
+ methodName: "getRecentCompactedAddressBalanceChanges",
483
+ service: Platform,
484
+ requestStream: false,
485
+ responseStream: false,
486
+ requestType: platform_pb.GetRecentCompactedAddressBalanceChangesRequest,
487
+ responseType: platform_pb.GetRecentCompactedAddressBalanceChangesResponse
488
+ };
489
+
436
490
  exports.Platform = Platform;
437
491
 
438
492
  function PlatformClient(serviceHost, options) {
@@ -1897,5 +1951,191 @@ PlatformClient.prototype.getGroupActionSigners = function getGroupActionSigners(
1897
1951
  };
1898
1952
  };
1899
1953
 
1954
+ PlatformClient.prototype.getAddressInfo = function getAddressInfo(requestMessage, metadata, callback) {
1955
+ if (arguments.length === 2) {
1956
+ callback = arguments[1];
1957
+ }
1958
+ var client = grpc.unary(Platform.getAddressInfo, {
1959
+ request: requestMessage,
1960
+ host: this.serviceHost,
1961
+ metadata: metadata,
1962
+ transport: this.options.transport,
1963
+ debug: this.options.debug,
1964
+ onEnd: function (response) {
1965
+ if (callback) {
1966
+ if (response.status !== grpc.Code.OK) {
1967
+ var err = new Error(response.statusMessage);
1968
+ err.code = response.status;
1969
+ err.metadata = response.trailers;
1970
+ callback(err, null);
1971
+ } else {
1972
+ callback(null, response.message);
1973
+ }
1974
+ }
1975
+ }
1976
+ });
1977
+ return {
1978
+ cancel: function () {
1979
+ callback = null;
1980
+ client.close();
1981
+ }
1982
+ };
1983
+ };
1984
+
1985
+ PlatformClient.prototype.getAddressesInfos = function getAddressesInfos(requestMessage, metadata, callback) {
1986
+ if (arguments.length === 2) {
1987
+ callback = arguments[1];
1988
+ }
1989
+ var client = grpc.unary(Platform.getAddressesInfos, {
1990
+ request: requestMessage,
1991
+ host: this.serviceHost,
1992
+ metadata: metadata,
1993
+ transport: this.options.transport,
1994
+ debug: this.options.debug,
1995
+ onEnd: function (response) {
1996
+ if (callback) {
1997
+ if (response.status !== grpc.Code.OK) {
1998
+ var err = new Error(response.statusMessage);
1999
+ err.code = response.status;
2000
+ err.metadata = response.trailers;
2001
+ callback(err, null);
2002
+ } else {
2003
+ callback(null, response.message);
2004
+ }
2005
+ }
2006
+ }
2007
+ });
2008
+ return {
2009
+ cancel: function () {
2010
+ callback = null;
2011
+ client.close();
2012
+ }
2013
+ };
2014
+ };
2015
+
2016
+ PlatformClient.prototype.getAddressesTrunkState = function getAddressesTrunkState(requestMessage, metadata, callback) {
2017
+ if (arguments.length === 2) {
2018
+ callback = arguments[1];
2019
+ }
2020
+ var client = grpc.unary(Platform.getAddressesTrunkState, {
2021
+ request: requestMessage,
2022
+ host: this.serviceHost,
2023
+ metadata: metadata,
2024
+ transport: this.options.transport,
2025
+ debug: this.options.debug,
2026
+ onEnd: function (response) {
2027
+ if (callback) {
2028
+ if (response.status !== grpc.Code.OK) {
2029
+ var err = new Error(response.statusMessage);
2030
+ err.code = response.status;
2031
+ err.metadata = response.trailers;
2032
+ callback(err, null);
2033
+ } else {
2034
+ callback(null, response.message);
2035
+ }
2036
+ }
2037
+ }
2038
+ });
2039
+ return {
2040
+ cancel: function () {
2041
+ callback = null;
2042
+ client.close();
2043
+ }
2044
+ };
2045
+ };
2046
+
2047
+ PlatformClient.prototype.getAddressesBranchState = function getAddressesBranchState(requestMessage, metadata, callback) {
2048
+ if (arguments.length === 2) {
2049
+ callback = arguments[1];
2050
+ }
2051
+ var client = grpc.unary(Platform.getAddressesBranchState, {
2052
+ request: requestMessage,
2053
+ host: this.serviceHost,
2054
+ metadata: metadata,
2055
+ transport: this.options.transport,
2056
+ debug: this.options.debug,
2057
+ onEnd: function (response) {
2058
+ if (callback) {
2059
+ if (response.status !== grpc.Code.OK) {
2060
+ var err = new Error(response.statusMessage);
2061
+ err.code = response.status;
2062
+ err.metadata = response.trailers;
2063
+ callback(err, null);
2064
+ } else {
2065
+ callback(null, response.message);
2066
+ }
2067
+ }
2068
+ }
2069
+ });
2070
+ return {
2071
+ cancel: function () {
2072
+ callback = null;
2073
+ client.close();
2074
+ }
2075
+ };
2076
+ };
2077
+
2078
+ PlatformClient.prototype.getRecentAddressBalanceChanges = function getRecentAddressBalanceChanges(requestMessage, metadata, callback) {
2079
+ if (arguments.length === 2) {
2080
+ callback = arguments[1];
2081
+ }
2082
+ var client = grpc.unary(Platform.getRecentAddressBalanceChanges, {
2083
+ request: requestMessage,
2084
+ host: this.serviceHost,
2085
+ metadata: metadata,
2086
+ transport: this.options.transport,
2087
+ debug: this.options.debug,
2088
+ onEnd: function (response) {
2089
+ if (callback) {
2090
+ if (response.status !== grpc.Code.OK) {
2091
+ var err = new Error(response.statusMessage);
2092
+ err.code = response.status;
2093
+ err.metadata = response.trailers;
2094
+ callback(err, null);
2095
+ } else {
2096
+ callback(null, response.message);
2097
+ }
2098
+ }
2099
+ }
2100
+ });
2101
+ return {
2102
+ cancel: function () {
2103
+ callback = null;
2104
+ client.close();
2105
+ }
2106
+ };
2107
+ };
2108
+
2109
+ PlatformClient.prototype.getRecentCompactedAddressBalanceChanges = function getRecentCompactedAddressBalanceChanges(requestMessage, metadata, callback) {
2110
+ if (arguments.length === 2) {
2111
+ callback = arguments[1];
2112
+ }
2113
+ var client = grpc.unary(Platform.getRecentCompactedAddressBalanceChanges, {
2114
+ request: requestMessage,
2115
+ host: this.serviceHost,
2116
+ metadata: metadata,
2117
+ transport: this.options.transport,
2118
+ debug: this.options.debug,
2119
+ onEnd: function (response) {
2120
+ if (callback) {
2121
+ if (response.status !== grpc.Code.OK) {
2122
+ var err = new Error(response.statusMessage);
2123
+ err.code = response.status;
2124
+ err.metadata = response.trailers;
2125
+ callback(err, null);
2126
+ } else {
2127
+ callback(null, response.message);
2128
+ }
2129
+ }
2130
+ }
2131
+ });
2132
+ return {
2133
+ cancel: function () {
2134
+ callback = null;
2135
+ client.close();
2136
+ }
2137
+ };
2138
+ };
2139
+
1900
2140
  exports.PlatformClient = PlatformClient;
1901
2141
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "2.2.0-dev.2",
3
+ "version": "3.0.0-dev.11",
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": "2.2.0-dev.2",
48
+ "@dashevo/grpc-common": "3.0.0-dev.11",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "1.4.4",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",
@@ -104,6 +104,18 @@ service Platform {
104
104
  rpc getGroupActions(GetGroupActionsRequest) returns (GetGroupActionsResponse);
105
105
  rpc getGroupActionSigners(GetGroupActionSignersRequest)
106
106
  returns (GetGroupActionSignersResponse);
107
+ rpc getAddressInfo(GetAddressInfoRequest)
108
+ returns (GetAddressInfoResponse);
109
+ rpc getAddressesInfos(GetAddressesInfosRequest)
110
+ returns (GetAddressesInfosResponse);
111
+ rpc getAddressesTrunkState(GetAddressesTrunkStateRequest)
112
+ returns (GetAddressesTrunkStateResponse);
113
+ rpc getAddressesBranchState(GetAddressesBranchStateRequest)
114
+ returns (GetAddressesBranchStateResponse);
115
+ rpc getRecentAddressBalanceChanges(GetRecentAddressBalanceChangesRequest)
116
+ returns (GetRecentAddressBalanceChangesResponse);
117
+ rpc getRecentCompactedAddressBalanceChanges(GetRecentCompactedAddressBalanceChangesRequest)
118
+ returns (GetRecentCompactedAddressBalanceChangesResponse);
107
119
  }
108
120
 
109
121
  // Proof message includes cryptographic proofs for validating responses
@@ -1940,3 +1952,176 @@ message GetGroupActionSignersResponse {
1940
1952
 
1941
1953
  oneof version { GetGroupActionSignersResponseV0 v0 = 1; }
1942
1954
  }
1955
+
1956
+
1957
+ message GetAddressInfoRequest {
1958
+ message GetAddressInfoRequestV0 {
1959
+ bytes address = 1;
1960
+ bool prove = 2;
1961
+ }
1962
+ oneof version { GetAddressInfoRequestV0 v0 = 1; }
1963
+ }
1964
+
1965
+ message AddressInfoEntry {
1966
+ bytes address = 1;
1967
+ optional BalanceAndNonce balance_and_nonce = 2;
1968
+ }
1969
+
1970
+ message BalanceAndNonce {
1971
+ uint64 balance = 1;
1972
+ uint32 nonce = 2;
1973
+ }
1974
+
1975
+ message AddressInfoEntries {
1976
+ repeated AddressInfoEntry address_info_entries = 1;
1977
+ }
1978
+
1979
+ message AddressBalanceChange {
1980
+ bytes address = 1;
1981
+ oneof operation {
1982
+ uint64 set_balance = 2 [ jstype = JS_STRING ];
1983
+ uint64 add_to_balance = 3 [ jstype = JS_STRING ];
1984
+ }
1985
+ }
1986
+
1987
+ message BlockAddressBalanceChanges {
1988
+ uint64 block_height = 1 [ jstype = JS_STRING ];
1989
+ repeated AddressBalanceChange changes = 2;
1990
+ }
1991
+
1992
+ message AddressBalanceUpdateEntries {
1993
+ repeated BlockAddressBalanceChanges block_changes = 1;
1994
+ }
1995
+
1996
+ message GetAddressInfoResponse {
1997
+ message GetAddressInfoResponseV0 {
1998
+ oneof result {
1999
+ AddressInfoEntry address_info_entry = 1;
2000
+ Proof proof = 2;
2001
+ }
2002
+ ResponseMetadata metadata = 3;
2003
+ }
2004
+ oneof version { GetAddressInfoResponseV0 v0 = 1; }
2005
+ }
2006
+
2007
+ message GetAddressesInfosRequest {
2008
+ message GetAddressesInfosRequestV0 {
2009
+ repeated bytes addresses = 1;
2010
+ bool prove = 2;
2011
+ }
2012
+ oneof version { GetAddressesInfosRequestV0 v0 = 1; }
2013
+ }
2014
+
2015
+ message GetAddressesInfosResponse {
2016
+ message GetAddressesInfosResponseV0 {
2017
+ oneof result {
2018
+ AddressInfoEntries address_info_entries = 1;
2019
+ Proof proof = 2;
2020
+ }
2021
+ ResponseMetadata metadata = 3;
2022
+ }
2023
+ oneof version { GetAddressesInfosResponseV0 v0 = 1; }
2024
+ }
2025
+
2026
+ message GetAddressesTrunkStateRequest {
2027
+ message GetAddressesTrunkStateRequestV0 {
2028
+ }
2029
+ oneof version { GetAddressesTrunkStateRequestV0 v0 = 1; }
2030
+ }
2031
+
2032
+ message GetAddressesTrunkStateResponse {
2033
+ message GetAddressesTrunkStateResponseV0 {
2034
+ Proof proof = 2;
2035
+ ResponseMetadata metadata = 3;
2036
+ }
2037
+ oneof version { GetAddressesTrunkStateResponseV0 v0 = 1; }
2038
+ }
2039
+
2040
+ message GetAddressesBranchStateRequest {
2041
+ message GetAddressesBranchStateRequestV0 {
2042
+ bytes key = 1;
2043
+ uint32 depth = 2;
2044
+ uint64 checkpoint_height = 3; // Block height from trunk response metadata for consistency
2045
+ }
2046
+ oneof version { GetAddressesBranchStateRequestV0 v0 = 1; }
2047
+ }
2048
+
2049
+ message GetAddressesBranchStateResponse {
2050
+ message GetAddressesBranchStateResponseV0 {
2051
+ bytes merk_proof = 2;
2052
+ }
2053
+ oneof version { GetAddressesBranchStateResponseV0 v0 = 1; }
2054
+ }
2055
+
2056
+ message GetRecentAddressBalanceChangesRequest {
2057
+ message GetRecentAddressBalanceChangesRequestV0 {
2058
+ uint64 start_height = 1 [ jstype = JS_STRING ];
2059
+ bool prove = 2;
2060
+ }
2061
+ oneof version { GetRecentAddressBalanceChangesRequestV0 v0 = 1; }
2062
+ }
2063
+
2064
+ message GetRecentAddressBalanceChangesResponse {
2065
+ message GetRecentAddressBalanceChangesResponseV0 {
2066
+ oneof result {
2067
+ AddressBalanceUpdateEntries address_balance_update_entries = 1;
2068
+ Proof proof = 2;
2069
+ }
2070
+ ResponseMetadata metadata = 3;
2071
+ }
2072
+ oneof version { GetRecentAddressBalanceChangesResponseV0 v0 = 1; }
2073
+ }
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
+
2100
+ message CompactedBlockAddressBalanceChanges {
2101
+ uint64 start_block_height = 1 [ jstype = JS_STRING ];
2102
+ uint64 end_block_height = 2 [ jstype = JS_STRING ];
2103
+ repeated CompactedAddressBalanceChange changes = 3;
2104
+ }
2105
+
2106
+ message CompactedAddressBalanceUpdateEntries {
2107
+ repeated CompactedBlockAddressBalanceChanges compacted_block_changes = 1;
2108
+ }
2109
+
2110
+ message GetRecentCompactedAddressBalanceChangesRequest {
2111
+ message GetRecentCompactedAddressBalanceChangesRequestV0 {
2112
+ uint64 start_block_height = 1 [ jstype = JS_STRING ];
2113
+ bool prove = 2;
2114
+ }
2115
+ oneof version { GetRecentCompactedAddressBalanceChangesRequestV0 v0 = 1; }
2116
+ }
2117
+
2118
+ message GetRecentCompactedAddressBalanceChangesResponse {
2119
+ message GetRecentCompactedAddressBalanceChangesResponseV0 {
2120
+ oneof result {
2121
+ CompactedAddressBalanceUpdateEntries compacted_address_balance_update_entries = 1;
2122
+ Proof proof = 2;
2123
+ }
2124
+ ResponseMetadata metadata = 3;
2125
+ }
2126
+ oneof version { GetRecentCompactedAddressBalanceChangesResponseV0 v0 = 1; }
2127
+ }