@dashevo/dapi-grpc 4.2.0-beta.3 → 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.
- package/clients/drive/v0/nodejs/drive_pbjs.js +1268 -92
- package/clients/platform/v0/nodejs/platform_pbjs.js +1268 -92
- package/clients/platform/v0/nodejs/platform_protoc.js +1211 -11
- package/clients/platform/v0/web/platform_pb.d.ts +148 -0
- package/clients/platform/v0/web/platform_pb.js +1211 -11
- package/package.json +2 -2
- package/protos/platform/v0/platform.proto +64 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dashevo/dapi-grpc",
|
|
3
|
-
"version": "4.2.0-beta.
|
|
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.
|
|
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",
|
|
@@ -706,20 +706,40 @@ message GetContractGroupMembersResponse {
|
|
|
706
706
|
oneof version { GetContractGroupMembersResponseV0 v0 = 1; }
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
-
// One of the
|
|
709
|
+
// One of the moderation lists a moderated data contract may keep (protocol version 14).
|
|
710
710
|
enum ContractModerationList {
|
|
711
711
|
CONTRACT_MODERATION_LIST_UNSPECIFIED = 0; // Not a list: a request that leaves the field out is refused
|
|
712
712
|
CONTRACT_MODERATION_LIST_BANLIST = 1; // Identities barred until an unban
|
|
713
713
|
CONTRACT_MODERATION_LIST_SUSPENSIONS = 2; // Identities barred until a block time
|
|
714
|
+
CONTRACT_MODERATION_LIST_WARNINGS = 3; // Identities warned, barred from nothing
|
|
714
715
|
}
|
|
715
716
|
|
|
716
|
-
//
|
|
717
|
-
|
|
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.
|
|
718
726
|
message ContractModerationReason {
|
|
719
727
|
optional uint32 code =
|
|
720
728
|
1; // Reserved for the ban codes a contract may declare in a later
|
|
721
729
|
// protocol version; a u16, expected unset today, never checked
|
|
722
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
|
|
723
743
|
}
|
|
724
744
|
|
|
725
745
|
message GetContractModerationStatusRequest {
|
|
@@ -750,6 +770,9 @@ message GetContractModerationStatusResponse {
|
|
|
750
770
|
4; // Set when the identity is banned: why
|
|
751
771
|
optional ContractModerationReason suspension_reason =
|
|
752
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
|
|
753
776
|
}
|
|
754
777
|
|
|
755
778
|
message GetContractModerationStatusResponseV0 {
|
|
@@ -778,11 +801,17 @@ message GetContractModerationEntriesRequest {
|
|
|
778
801
|
|
|
779
802
|
message GetContractModerationEntriesResponse {
|
|
780
803
|
message ContractModerationEntry {
|
|
781
|
-
bytes identity_id = 1; // The
|
|
804
|
+
bytes identity_id = 1; // The identity on the list
|
|
782
805
|
optional uint64 until =
|
|
783
806
|
2; // For a suspension list entry: the block time, in milliseconds, at
|
|
784
807
|
// which it lapses
|
|
785
|
-
ContractModerationReason reason =
|
|
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
|
|
786
815
|
}
|
|
787
816
|
|
|
788
817
|
message ContractModerationEntries {
|
|
@@ -832,6 +861,13 @@ message GetContractDocumentRemovalsRequest {
|
|
|
832
861
|
}
|
|
833
862
|
|
|
834
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
|
+
|
|
835
871
|
message ContractDocumentRemoval {
|
|
836
872
|
bytes document_id = 1; // The id the removed document had
|
|
837
873
|
bytes document_owner_id = 2; // The identity that owned it
|
|
@@ -839,6 +875,13 @@ message GetContractDocumentRemovalsResponse {
|
|
|
839
875
|
uint64 removed_at =
|
|
840
876
|
4; // The time of the block that removed it, in milliseconds
|
|
841
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
|
|
842
885
|
}
|
|
843
886
|
|
|
844
887
|
message ContractDocumentRemovals {
|
|
@@ -2304,17 +2347,33 @@ message WaitForStateTransitionResultRequest {
|
|
|
2304
2347
|
bytes state_transition_hash =
|
|
2305
2348
|
1; // The hash of the state transition to wait for
|
|
2306
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;
|
|
2307
2357
|
}
|
|
2308
2358
|
oneof version { WaitForStateTransitionResultRequestV0 v0 = 1; }
|
|
2309
2359
|
}
|
|
2310
2360
|
|
|
2311
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
|
+
}
|
|
2312
2368
|
message WaitForStateTransitionResultResponseV0 {
|
|
2313
2369
|
oneof result {
|
|
2314
2370
|
StateTransitionBroadcastError error =
|
|
2315
2371
|
1; // Any error that occurred during the state transition broadcast
|
|
2316
2372
|
Proof proof =
|
|
2317
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;
|
|
2318
2377
|
}
|
|
2319
2378
|
ResponseMetadata metadata = 3; // Metadata about the blockchain state
|
|
2320
2379
|
}
|