@dashevo/dapi-grpc 4.2.0-beta.2 → 4.2.0-beta.4

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.
@@ -184,6 +184,42 @@ type PlatformgetContractGroupsForContract = {
184
184
  readonly responseType: typeof platform_pb.GetContractGroupsForContractResponse;
185
185
  };
186
186
 
187
+ type PlatformgetContractModerationStatus = {
188
+ readonly methodName: string;
189
+ readonly service: typeof Platform;
190
+ readonly requestStream: false;
191
+ readonly responseStream: false;
192
+ readonly requestType: typeof platform_pb.GetContractModerationStatusRequest;
193
+ readonly responseType: typeof platform_pb.GetContractModerationStatusResponse;
194
+ };
195
+
196
+ type PlatformgetContractModerationEntries = {
197
+ readonly methodName: string;
198
+ readonly service: typeof Platform;
199
+ readonly requestStream: false;
200
+ readonly responseStream: false;
201
+ readonly requestType: typeof platform_pb.GetContractModerationEntriesRequest;
202
+ readonly responseType: typeof platform_pb.GetContractModerationEntriesResponse;
203
+ };
204
+
205
+ type PlatformgetContractDocumentRemovals = {
206
+ readonly methodName: string;
207
+ readonly service: typeof Platform;
208
+ readonly requestStream: false;
209
+ readonly responseStream: false;
210
+ readonly requestType: typeof platform_pb.GetContractDocumentRemovalsRequest;
211
+ readonly responseType: typeof platform_pb.GetContractDocumentRemovalsResponse;
212
+ };
213
+
214
+ type PlatformgetContractFeePots = {
215
+ readonly methodName: string;
216
+ readonly service: typeof Platform;
217
+ readonly requestStream: false;
218
+ readonly responseStream: false;
219
+ readonly requestType: typeof platform_pb.GetContractFeePotsRequest;
220
+ readonly responseType: typeof platform_pb.GetContractFeePotsResponse;
221
+ };
222
+
187
223
  type PlatformgetDocumentHistory = {
188
224
  readonly methodName: string;
189
225
  readonly service: typeof Platform;
@@ -620,6 +656,10 @@ export class Platform {
620
656
  static readonly getContractGroupInfo: PlatformgetContractGroupInfo;
621
657
  static readonly getContractGroupMembers: PlatformgetContractGroupMembers;
622
658
  static readonly getContractGroupsForContract: PlatformgetContractGroupsForContract;
659
+ static readonly getContractModerationStatus: PlatformgetContractModerationStatus;
660
+ static readonly getContractModerationEntries: PlatformgetContractModerationEntries;
661
+ static readonly getContractDocumentRemovals: PlatformgetContractDocumentRemovals;
662
+ static readonly getContractFeePots: PlatformgetContractFeePots;
623
663
  static readonly getDocumentHistory: PlatformgetDocumentHistory;
624
664
  static readonly getDocuments: PlatformgetDocuments;
625
665
  static readonly getIdentityByPublicKeyHash: PlatformgetIdentityByPublicKeyHash;
@@ -880,6 +920,42 @@ export class PlatformClient {
880
920
  requestMessage: platform_pb.GetContractGroupsForContractRequest,
881
921
  callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractGroupsForContractResponse|null) => void
882
922
  ): UnaryResponse;
923
+ getContractModerationStatus(
924
+ requestMessage: platform_pb.GetContractModerationStatusRequest,
925
+ metadata: grpc.Metadata,
926
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractModerationStatusResponse|null) => void
927
+ ): UnaryResponse;
928
+ getContractModerationStatus(
929
+ requestMessage: platform_pb.GetContractModerationStatusRequest,
930
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractModerationStatusResponse|null) => void
931
+ ): UnaryResponse;
932
+ getContractModerationEntries(
933
+ requestMessage: platform_pb.GetContractModerationEntriesRequest,
934
+ metadata: grpc.Metadata,
935
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractModerationEntriesResponse|null) => void
936
+ ): UnaryResponse;
937
+ getContractModerationEntries(
938
+ requestMessage: platform_pb.GetContractModerationEntriesRequest,
939
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractModerationEntriesResponse|null) => void
940
+ ): UnaryResponse;
941
+ getContractDocumentRemovals(
942
+ requestMessage: platform_pb.GetContractDocumentRemovalsRequest,
943
+ metadata: grpc.Metadata,
944
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractDocumentRemovalsResponse|null) => void
945
+ ): UnaryResponse;
946
+ getContractDocumentRemovals(
947
+ requestMessage: platform_pb.GetContractDocumentRemovalsRequest,
948
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractDocumentRemovalsResponse|null) => void
949
+ ): UnaryResponse;
950
+ getContractFeePots(
951
+ requestMessage: platform_pb.GetContractFeePotsRequest,
952
+ metadata: grpc.Metadata,
953
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractFeePotsResponse|null) => void
954
+ ): UnaryResponse;
955
+ getContractFeePots(
956
+ requestMessage: platform_pb.GetContractFeePotsRequest,
957
+ callback: (error: ServiceError|null, responseMessage: platform_pb.GetContractFeePotsResponse|null) => void
958
+ ): UnaryResponse;
883
959
  getDocumentHistory(
884
960
  requestMessage: platform_pb.GetDocumentHistoryRequest,
885
961
  metadata: grpc.Metadata,
@@ -190,6 +190,42 @@ Platform.getContractGroupsForContract = {
190
190
  responseType: platform_pb.GetContractGroupsForContractResponse
191
191
  };
192
192
 
193
+ Platform.getContractModerationStatus = {
194
+ methodName: "getContractModerationStatus",
195
+ service: Platform,
196
+ requestStream: false,
197
+ responseStream: false,
198
+ requestType: platform_pb.GetContractModerationStatusRequest,
199
+ responseType: platform_pb.GetContractModerationStatusResponse
200
+ };
201
+
202
+ Platform.getContractModerationEntries = {
203
+ methodName: "getContractModerationEntries",
204
+ service: Platform,
205
+ requestStream: false,
206
+ responseStream: false,
207
+ requestType: platform_pb.GetContractModerationEntriesRequest,
208
+ responseType: platform_pb.GetContractModerationEntriesResponse
209
+ };
210
+
211
+ Platform.getContractDocumentRemovals = {
212
+ methodName: "getContractDocumentRemovals",
213
+ service: Platform,
214
+ requestStream: false,
215
+ responseStream: false,
216
+ requestType: platform_pb.GetContractDocumentRemovalsRequest,
217
+ responseType: platform_pb.GetContractDocumentRemovalsResponse
218
+ };
219
+
220
+ Platform.getContractFeePots = {
221
+ methodName: "getContractFeePots",
222
+ service: Platform,
223
+ requestStream: false,
224
+ responseStream: false,
225
+ requestType: platform_pb.GetContractFeePotsRequest,
226
+ responseType: platform_pb.GetContractFeePotsResponse
227
+ };
228
+
193
229
  Platform.getDocumentHistory = {
194
230
  methodName: "getDocumentHistory",
195
231
  service: Platform,
@@ -1231,6 +1267,130 @@ PlatformClient.prototype.getContractGroupsForContract = function getContractGrou
1231
1267
  };
1232
1268
  };
1233
1269
 
1270
+ PlatformClient.prototype.getContractModerationStatus = function getContractModerationStatus(requestMessage, metadata, callback) {
1271
+ if (arguments.length === 2) {
1272
+ callback = arguments[1];
1273
+ }
1274
+ var client = grpc.unary(Platform.getContractModerationStatus, {
1275
+ request: requestMessage,
1276
+ host: this.serviceHost,
1277
+ metadata: metadata,
1278
+ transport: this.options.transport,
1279
+ debug: this.options.debug,
1280
+ onEnd: function (response) {
1281
+ if (callback) {
1282
+ if (response.status !== grpc.Code.OK) {
1283
+ var err = new Error(response.statusMessage);
1284
+ err.code = response.status;
1285
+ err.metadata = response.trailers;
1286
+ callback(err, null);
1287
+ } else {
1288
+ callback(null, response.message);
1289
+ }
1290
+ }
1291
+ }
1292
+ });
1293
+ return {
1294
+ cancel: function () {
1295
+ callback = null;
1296
+ client.close();
1297
+ }
1298
+ };
1299
+ };
1300
+
1301
+ PlatformClient.prototype.getContractModerationEntries = function getContractModerationEntries(requestMessage, metadata, callback) {
1302
+ if (arguments.length === 2) {
1303
+ callback = arguments[1];
1304
+ }
1305
+ var client = grpc.unary(Platform.getContractModerationEntries, {
1306
+ request: requestMessage,
1307
+ host: this.serviceHost,
1308
+ metadata: metadata,
1309
+ transport: this.options.transport,
1310
+ debug: this.options.debug,
1311
+ onEnd: function (response) {
1312
+ if (callback) {
1313
+ if (response.status !== grpc.Code.OK) {
1314
+ var err = new Error(response.statusMessage);
1315
+ err.code = response.status;
1316
+ err.metadata = response.trailers;
1317
+ callback(err, null);
1318
+ } else {
1319
+ callback(null, response.message);
1320
+ }
1321
+ }
1322
+ }
1323
+ });
1324
+ return {
1325
+ cancel: function () {
1326
+ callback = null;
1327
+ client.close();
1328
+ }
1329
+ };
1330
+ };
1331
+
1332
+ PlatformClient.prototype.getContractDocumentRemovals = function getContractDocumentRemovals(requestMessage, metadata, callback) {
1333
+ if (arguments.length === 2) {
1334
+ callback = arguments[1];
1335
+ }
1336
+ var client = grpc.unary(Platform.getContractDocumentRemovals, {
1337
+ request: requestMessage,
1338
+ host: this.serviceHost,
1339
+ metadata: metadata,
1340
+ transport: this.options.transport,
1341
+ debug: this.options.debug,
1342
+ onEnd: function (response) {
1343
+ if (callback) {
1344
+ if (response.status !== grpc.Code.OK) {
1345
+ var err = new Error(response.statusMessage);
1346
+ err.code = response.status;
1347
+ err.metadata = response.trailers;
1348
+ callback(err, null);
1349
+ } else {
1350
+ callback(null, response.message);
1351
+ }
1352
+ }
1353
+ }
1354
+ });
1355
+ return {
1356
+ cancel: function () {
1357
+ callback = null;
1358
+ client.close();
1359
+ }
1360
+ };
1361
+ };
1362
+
1363
+ PlatformClient.prototype.getContractFeePots = function getContractFeePots(requestMessage, metadata, callback) {
1364
+ if (arguments.length === 2) {
1365
+ callback = arguments[1];
1366
+ }
1367
+ var client = grpc.unary(Platform.getContractFeePots, {
1368
+ request: requestMessage,
1369
+ host: this.serviceHost,
1370
+ metadata: metadata,
1371
+ transport: this.options.transport,
1372
+ debug: this.options.debug,
1373
+ onEnd: function (response) {
1374
+ if (callback) {
1375
+ if (response.status !== grpc.Code.OK) {
1376
+ var err = new Error(response.statusMessage);
1377
+ err.code = response.status;
1378
+ err.metadata = response.trailers;
1379
+ callback(err, null);
1380
+ } else {
1381
+ callback(null, response.message);
1382
+ }
1383
+ }
1384
+ }
1385
+ });
1386
+ return {
1387
+ cancel: function () {
1388
+ callback = null;
1389
+ client.close();
1390
+ }
1391
+ };
1392
+ };
1393
+
1234
1394
  PlatformClient.prototype.getDocumentHistory = function getDocumentHistory(requestMessage, metadata, callback) {
1235
1395
  if (arguments.length === 2) {
1236
1396
  callback = arguments[1];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dashevo/dapi-grpc",
3
- "version": "4.2.0-beta.2",
3
+ "version": "4.2.0-beta.4",
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": "4.2.0-beta.2",
48
+ "@dashevo/grpc-common": "4.2.0-beta.4",
49
49
  "@dashevo/protobufjs": "6.10.5",
50
50
  "@grpc/grpc-js": "^1.14.3",
51
51
  "@improbable-eng/grpc-web": "^0.15.0",
@@ -47,6 +47,14 @@ service Platform {
47
47
  returns (GetContractGroupMembersResponse);
48
48
  rpc getContractGroupsForContract(GetContractGroupsForContractRequest)
49
49
  returns (GetContractGroupsForContractResponse);
50
+ rpc getContractModerationStatus(GetContractModerationStatusRequest)
51
+ returns (GetContractModerationStatusResponse);
52
+ rpc getContractModerationEntries(GetContractModerationEntriesRequest)
53
+ returns (GetContractModerationEntriesResponse);
54
+ rpc getContractDocumentRemovals(GetContractDocumentRemovalsRequest)
55
+ returns (GetContractDocumentRemovalsResponse);
56
+ rpc getContractFeePots(GetContractFeePotsRequest)
57
+ returns (GetContractFeePotsResponse);
50
58
  rpc getDocumentHistory(GetDocumentHistoryRequest)
51
59
  returns (GetDocumentHistoryResponse);
52
60
  rpc getDocuments(GetDocumentsRequest) returns (GetDocumentsResponse);
@@ -698,6 +706,241 @@ message GetContractGroupMembersResponse {
698
706
  oneof version { GetContractGroupMembersResponseV0 v0 = 1; }
699
707
  }
700
708
 
709
+ // One of the moderation lists a moderated data contract may keep (protocol version 14).
710
+ enum ContractModerationList {
711
+ CONTRACT_MODERATION_LIST_UNSPECIFIED = 0; // Not a list: a request that leaves the field out is refused
712
+ CONTRACT_MODERATION_LIST_BANLIST = 1; // Identities barred until an unban
713
+ CONTRACT_MODERATION_LIST_SUSPENSIONS = 2; // Identities barred until a block time
714
+ CONTRACT_MODERATION_LIST_WARNINGS = 3; // Identities warned, barred from nothing
715
+ }
716
+
717
+ // A document a moderation reason is about.
718
+ message ContractModerationDocument {
719
+ string document_type_name = 1; // The document type, on the moderated contract
720
+ bytes document_id = 2; // The 32-byte id of the document
721
+ }
722
+
723
+ // Why a moderator banned, suspended or warned an identity, or deleted a
724
+ // document. Nothing checks what a moderator writes, and the documents cited
725
+ // are not looked up, except the reason document a seated elected team names.
726
+ message ContractModerationReason {
727
+ optional uint32 code =
728
+ 1; // Reserved for the ban codes a contract may declare in a later
729
+ // protocol version; a u16, expected unset today, never checked
730
+ string text = 2; // Free text, at most 1024 bytes of UTF-8, may be empty
731
+ repeated ContractModerationDocument documents =
732
+ 3; // The documents the reason is about, at most 16, none twice
733
+ optional bytes reason_document_id =
734
+ 4; // The 32-byte id of the moderation charters contract's `reason`
735
+ // document the action is taken on; one the seated team's proposal
736
+ // lists for a seated elected team's action, unchecked otherwise
737
+ }
738
+
739
+ // One warning an identity carries on a contract's warning list.
740
+ message ContractWarning {
741
+ uint64 warned_at = 1; // The time of the block that issued it, in milliseconds
742
+ ContractModerationReason reason = 2; // Why
743
+ }
744
+
745
+ message GetContractModerationStatusRequest {
746
+ message GetContractModerationStatusRequestV0 {
747
+ bytes contract_id = 1; // The 32-byte id of the moderated contract
748
+ bytes identity_id = 2; // The 32-byte id of the identity
749
+ repeated ContractModerationList lists =
750
+ 3; // The lists to read, which the contract's config must declare; at
751
+ // least one, no repeats
752
+ bool prove = 4; // Flag to request a proof as the response
753
+ }
754
+ oneof version { GetContractModerationStatusRequestV0 v0 = 1; }
755
+ }
756
+
757
+ message GetContractModerationStatusResponse {
758
+ // The identity's status on the lists the request named, and on no other: a
759
+ // list that was not read says nothing, so its field is left unset.
760
+ message ContractModerationStatus {
761
+ optional bool banned =
762
+ 1; // Set only when the banlist was read: the identity is on it
763
+ optional uint64 suspended_until =
764
+ 2; // The block time, in milliseconds, until which the identity is
765
+ // suspended; a lapsed suspension stays until it is swept. Unset
766
+ // when the identity is not suspended or the list was not read
767
+ repeated ContractModerationList lists =
768
+ 3; // The lists this status covers, as the request named them
769
+ optional ContractModerationReason ban_reason =
770
+ 4; // Set when the identity is banned: why
771
+ optional ContractModerationReason suspension_reason =
772
+ 5; // Set when the identity is suspended: why
773
+ repeated ContractWarning warnings =
774
+ 6; // When the warning list was read: the identity's warnings, oldest
775
+ // first; empty when it carries none
776
+ }
777
+
778
+ message GetContractModerationStatusResponseV0 {
779
+ oneof result {
780
+ ContractModerationStatus status = 1; // The identity's status on the lists read
781
+ Proof proof = 2; // Cryptographic proof of the status, if requested
782
+ }
783
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
784
+ }
785
+ oneof version { GetContractModerationStatusResponseV0 v0 = 1; }
786
+ }
787
+
788
+ message GetContractModerationEntriesRequest {
789
+ message GetContractModerationEntriesRequestV0 {
790
+ bytes contract_id = 1; // The 32-byte id of the moderated contract
791
+ ContractModerationList list = 2; // The list to read, which the contract's config must declare
792
+ optional bytes start_after =
793
+ 3; // 32-byte identity id; the page starts after it
794
+ optional uint32 limit =
795
+ 4; // Maximum number of entries to return, from 1 to the protocol's
796
+ // max_returned_elements (100); absent means that maximum
797
+ bool prove = 5; // Flag to request a proof as the response
798
+ }
799
+ oneof version { GetContractModerationEntriesRequestV0 v0 = 1; }
800
+ }
801
+
802
+ message GetContractModerationEntriesResponse {
803
+ message ContractModerationEntry {
804
+ bytes identity_id = 1; // The identity on the list
805
+ optional uint64 until =
806
+ 2; // For a suspension list entry: the block time, in milliseconds, at
807
+ // which it lapses
808
+ ContractModerationReason reason =
809
+ 3; // Why the identity is on the list: the ban's reason or the
810
+ // suspension's. Unset for a warning list entry, whose reasons
811
+ // are its warnings'
812
+ repeated ContractWarning warnings =
813
+ 4; // For a warning list entry: every warning the identity carries,
814
+ // oldest first; the latest is why it is on the list
815
+ }
816
+
817
+ message ContractModerationEntries {
818
+ repeated ContractModerationEntry entries = 1; // The page, in identity id order
819
+ }
820
+
821
+ message GetContractModerationEntriesResponseV0 {
822
+ oneof result {
823
+ ContractModerationEntries entries = 1; // One page of the list
824
+ Proof proof = 2; // Cryptographic proof of the page, if requested
825
+ }
826
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
827
+ }
828
+ oneof version { GetContractModerationEntriesResponseV0 v0 = 1; }
829
+ }
830
+
831
+ // The records of the documents a contract's moderators deleted, within one
832
+ // document type whose documents they may delete (`canBeDeletedByModerators`):
833
+ // the ones of the document ids named, or one page in document id order.
834
+ message GetContractDocumentRemovalsRequest {
835
+ message DocumentIds {
836
+ repeated bytes document_ids =
837
+ 1; // 32-byte document ids, from 1 to the protocol's
838
+ // max_returned_elements (100), none twice; an id with no record is
839
+ // left out of the response, and proved absent when a proof is asked
840
+ }
841
+
842
+ message Page {
843
+ optional bytes start_after =
844
+ 1; // 32-byte document id; the page starts after it
845
+ optional uint32 limit =
846
+ 2; // Maximum number of records to return, from 1 to the protocol's
847
+ // max_returned_elements (100); absent means that maximum
848
+ }
849
+
850
+ message GetContractDocumentRemovalsRequestV0 {
851
+ bytes contract_id = 1; // The 32-byte id of the moderated contract
852
+ string document_type_name =
853
+ 2; // The document type, which must let moderators delete its documents
854
+ oneof selection {
855
+ DocumentIds document_ids = 3; // The records of these documents
856
+ Page page = 4; // One page of the type's records
857
+ }
858
+ bool prove = 5; // Flag to request a proof as the response
859
+ }
860
+ oneof version { GetContractDocumentRemovalsRequestV0 v0 = 1; }
861
+ }
862
+
863
+ message GetContractDocumentRemovalsResponse {
864
+ message ContractDocumentRestoration {
865
+ bytes moderator_id =
866
+ 1; // The contract owner or moderator that restored the document
867
+ uint64 restored_at =
868
+ 2; // The time of the block that restored it, in milliseconds
869
+ }
870
+
871
+ message ContractDocumentRemoval {
872
+ bytes document_id = 1; // The id the removed document had
873
+ bytes document_owner_id = 2; // The identity that owned it
874
+ bytes moderator_id = 3; // The contract owner or moderator that removed it
875
+ uint64 removed_at =
876
+ 4; // The time of the block that removed it, in milliseconds
877
+ ContractModerationReason reason = 5; // Why the moderator removed it
878
+ bytes document_hash =
879
+ 6; // A 32-byte double SHA-256 of the document as it was serialized
880
+ // under its document type when it was removed: what a restore must
881
+ // bring back byte for byte
882
+ ContractDocumentRestoration restoration =
883
+ 7; // Set once a moderator restored the document, which is then live
884
+ // again as it was; absent while the removal stands
885
+ }
886
+
887
+ message ContractDocumentRemovals {
888
+ repeated ContractDocumentRemoval removals =
889
+ 1; // The records, in document id order
890
+ }
891
+
892
+ message GetContractDocumentRemovalsResponseV0 {
893
+ oneof result {
894
+ ContractDocumentRemovals removals = 1; // The records read
895
+ Proof proof = 2; // Cryptographic proof of the records, if requested
896
+ }
897
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
898
+ }
899
+ oneof version { GetContractDocumentRemovalsResponseV0 v0 = 1; }
900
+ }
901
+
902
+ message GetContractFeePotsRequest {
903
+ message GetContractFeePotsRequestV0 {
904
+ bytes contract_id = 1; // The 32-byte id of the data contract
905
+ bool prove = 2; // Flag to request a proof as the response
906
+ }
907
+ oneof version { GetContractFeePotsRequestV0 v0 = 1; }
908
+ }
909
+
910
+ message GetContractFeePotsResponse {
911
+ // The last payout of a pot, which the claim that made it left in state
912
+ message ContractFeePotLastClaim {
913
+ uint32 epoch = 1; // The epoch (u16) the pot was paid out in; a pot is paid
914
+ // out at most once per epoch
915
+ uint64 time_ms = 2
916
+ [ jstype = JS_STRING ]; // The time of the block that paid the pot out
917
+ bytes claimant_id = 3; // The identity that signed the claim: the contract
918
+ // owner for the owner pot, the member of the
919
+ // moderation team that claimed for the moderators pot
920
+ }
921
+
922
+ // One of the two pots a contract's document action fees collect in
923
+ message ContractFeePot {
924
+ uint64 credits = 1 [ jstype = JS_STRING ]; // What the pot holds
925
+ ContractFeePotLastClaim last_claim =
926
+ 2; // Unset when the pot was never paid out
927
+ }
928
+
929
+ message ContractFeePots {
930
+ ContractFeePot owner = 1; // The pot the contract owner claims
931
+ ContractFeePot moderators = 2; // The pot the moderation team shares
932
+ }
933
+
934
+ message GetContractFeePotsResponseV0 {
935
+ oneof result {
936
+ ContractFeePots pots = 1; // Both pots of the contract
937
+ Proof proof = 2; // Cryptographic proof of the pots, if requested
938
+ }
939
+ ResponseMetadata metadata = 3; // Metadata about the blockchain state
940
+ }
941
+ oneof version { GetContractFeePotsResponseV0 v0 = 1; }
942
+ }
943
+
701
944
  message GetContractGroupsForContractRequest {
702
945
  message GetContractGroupsForContractRequestV0 {
703
946
  bytes contract_id = 1; // The 32-byte id of the contract
@@ -1960,6 +2203,13 @@ message GetDocumentsResponse {
1960
2203
  message ChainedDocuments {
1961
2204
  repeated bytes inner_documents = 1;
1962
2205
  repeated bytes outer_documents = 2;
2206
+ // The join values that have NO outer document, in first
2207
+ // appearance order: referenced documents deleted after the
2208
+ // inner document was written. Only a join property declaring
2209
+ // `refersTo: deletableDocument` can report any; under
2210
+ // `refersTo: permanentDocument` a missing document fails the
2211
+ // query instead.
2212
+ repeated bytes missing_outer_ids = 3;
1963
2213
  }
1964
2214
 
1965
2215
  // A composite query's page and per-sub-query results, documents
@@ -1977,6 +2227,11 @@ message GetDocumentsResponse {
1977
2227
  // value's index-key bytes.
1978
2228
  CountEntries counts = 2;
1979
2229
  }
2230
+ // DOCUMENTS by-id join only: the derived ids that have NO
2231
+ // document, in first appearance order (referenced documents
2232
+ // deleted since). Only a source property declaring
2233
+ // `refersTo: deletableDocument` can report any.
2234
+ repeated bytes missing_ids = 3;
1980
2235
  }
1981
2236
  repeated SubQueryResult sub_results = 2;
1982
2237
  }
@@ -2092,17 +2347,33 @@ message WaitForStateTransitionResultRequest {
2092
2347
  bytes state_transition_hash =
2093
2348
  1; // The hash of the state transition to wait for
2094
2349
  bool prove = 2; // Flag to request a proof as the response
2350
+ // Flag to request, without a proof, the credit balance of the identity
2351
+ // that owns the transition after it executed. Ignored when a proof is
2352
+ // requested: from protocol version 14 the proof of an owned, fee-paying
2353
+ // transition (document and token batches, contract creates and updates,
2354
+ // identity updates and key limit updates, contract moderation) carries
2355
+ // the owner's balance itself.
2356
+ bool request_user_balance = 3;
2095
2357
  }
2096
2358
  oneof version { WaitForStateTransitionResultRequestV0 v0 = 1; }
2097
2359
  }
2098
2360
 
2099
2361
  message WaitForStateTransitionResultResponse {
2362
+ // The result of a successful wait that asked for the owner's balance and for no proof
2363
+ message SuccessWithOwnerBalance {
2364
+ // The credit balance of the identity that owns the transition after it
2365
+ // executed, read from a Drive state at or past the block that executed it
2366
+ uint64 owner_balance = 1 [ jstype = JS_STRING ];
2367
+ }
2100
2368
  message WaitForStateTransitionResultResponseV0 {
2101
2369
  oneof result {
2102
2370
  StateTransitionBroadcastError error =
2103
2371
  1; // Any error that occurred during the state transition broadcast
2104
2372
  Proof proof =
2105
2373
  2; // Cryptographic proof for the state transition, if requested
2374
+ // Success with the owner's balance, unproved, when the request asked
2375
+ // for it and for no proof
2376
+ SuccessWithOwnerBalance success_with_owner_balance = 4;
2106
2377
  }
2107
2378
  ResponseMetadata metadata = 3; // Metadata about the blockchain state
2108
2379
  }