@dcl/protocol 1.0.0-3175139283.commit-c671437 → 1.0.0-3199325469.commit-c9bc23f
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/README.md +19 -0
- package/bff/authentication-service.proto +3 -0
- package/bff/comms-director-service.proto +33 -0
- package/bff/comms-service.proto +2 -26
- package/bff/http-endpoints.proto +9 -10
- package/bff/topics-service.proto +35 -0
- package/bff-services.proto +16 -0
- package/{kernel/apis/common → common}/ContentMapping.proto +1 -0
- package/common/Entity.proto +13 -0
- package/common/Vectors.proto +19 -0
- package/ecs/components/Animator.proto +1 -1
- package/ecs/components/AudioSource.proto +1 -1
- package/ecs/components/AudioStream.proto +1 -1
- package/ecs/components/AvatarAttach.proto +1 -1
- package/ecs/components/AvatarModifierArea.proto +2 -2
- package/ecs/components/AvatarShape.proto +2 -2
- package/ecs/components/Billboard.proto +1 -1
- package/ecs/components/BoxShape.proto +1 -1
- package/ecs/components/CameraMode.proto +2 -2
- package/ecs/components/CameraModeArea.proto +3 -3
- package/ecs/components/CylinderShape.proto +1 -1
- package/ecs/components/GltfContainer.proto +1 -1
- package/ecs/components/Material.proto +2 -2
- package/ecs/components/MeshCollider.proto +1 -1
- package/ecs/components/MeshRenderer.proto +1 -1
- package/ecs/components/NFTShape.proto +2 -2
- package/ecs/components/OnPointerDown.proto +2 -2
- package/ecs/components/OnPointerDownResult.proto +3 -3
- package/ecs/components/OnPointerUp.proto +2 -2
- package/ecs/components/OnPointerUpResult.proto +3 -3
- package/ecs/components/PlaneShape.proto +1 -1
- package/ecs/components/PointerEvents.proto +2 -2
- package/ecs/components/PointerEventsResult.proto +4 -4
- package/ecs/components/PointerLock.proto +1 -1
- package/ecs/components/README.md +1 -1
- package/ecs/components/Raycast.proto +2 -2
- package/ecs/components/RaycastResult.proto +2 -2
- package/ecs/components/SphereShape.proto +1 -1
- package/ecs/components/TextShape.proto +2 -2
- package/ecs/components/UiStyles.proto +2 -2
- package/ecs/components/UiText.proto +2 -2
- package/ecs/components/UiTransform.proto +1 -1
- package/ecs/components/VisibilityComponent.proto +1 -1
- package/ecs/components/common/ActionButton.proto +1 -1
- package/kernel/apis/EnvironmentAPI.proto +1 -1
- package/kernel/apis/ParcelIdentity.proto +1 -1
- package/kernel/apis/Players.proto +1 -1
- package/kernel/apis/UserIdentity.proto +1 -1
- package/kernel/apis/{common → common-sdk}/UserData.proto +0 -0
- package/kernel/comms/comms-rfc-4.proto +1 -0
- package/kernel/comms/v3/archipelago.proto +0 -4
- package/out-ts/bff/authentication-service.gen.ts +278 -0
- package/out-ts/bff/comms-director-service.gen.ts +225 -0
- package/out-ts/bff/comms-service.gen.ts +193 -0
- package/out-ts/bff/http-endpoints.gen.ts +662 -0
- package/out-ts/bff/topics-service.gen.ts +404 -0
- package/out-ts/bff-services.gen.ts +3 -0
- package/out-ts/common/ContentMapping.gen.ts +79 -0
- package/out-ts/common/Vectors.gen.ts +225 -0
- package/out-ts/google/api/annotations.gen.ts +3 -0
- package/out-ts/google/api/http.gen.ts +286 -0
- package/out-ts/google/protobuf/descriptor.gen.ts +2860 -0
- package/out-ts/google/protobuf/empty.gen.ts +66 -0
- package/out-ts/kernel/apis/CommunicationsController.gen.ts +128 -0
- package/out-ts/kernel/apis/DevTools.gen.ts +140 -0
- package/out-ts/kernel/apis/EngineAPI.gen.ts +2128 -0
- package/out-ts/kernel/apis/EnvironmentAPI.gen.ts +1050 -0
- package/out-ts/kernel/apis/EthereumController.gen.ts +806 -0
- package/out-ts/kernel/apis/ExperimentalAPI.gen.ts +278 -0
- package/out-ts/kernel/apis/ParcelIdentity.gen.ts +516 -0
- package/out-ts/kernel/apis/Permissions.gen.ts +332 -0
- package/out-ts/kernel/apis/Players.gen.ts +344 -0
- package/out-ts/kernel/apis/PortableExperiences.gen.ts +520 -0
- package/out-ts/kernel/apis/RestrictedActions.gen.ts +320 -0
- package/out-ts/kernel/apis/SceneStateStorageController.gen.ts +1331 -0
- package/out-ts/kernel/apis/SignedFetch.gen.ts +428 -0
- package/out-ts/kernel/apis/SocialController.gen.ts +195 -0
- package/out-ts/kernel/apis/UserActionModule.gen.ts +128 -0
- package/out-ts/kernel/apis/UserIdentity.gen.ts +230 -0
- package/out-ts/kernel/apis/common-sdk/UserData.gen.ts +298 -0
- package/out-ts/sdk-apis.gen.ts +3 -0
- package/package.json +16 -5
- package/sdk-apis.proto +22 -0
package/README.md
CHANGED
|
@@ -1 +1,20 @@
|
|
|
1
1
|
# Protocol definitions
|
|
2
|
+
|
|
3
|
+
This module is intended to be installed as a node_module via `npm install @dcl/protocol`.
|
|
4
|
+
|
|
5
|
+
It is recommended that every project compiles the needed files only as part of its build process. Some imports are required:
|
|
6
|
+
|
|
7
|
+
- `-I=$(pwd)/node_modules/protobufjs`
|
|
8
|
+
- `-I=$(pwd)/node_modules/@dcl/protocol`
|
|
9
|
+
|
|
10
|
+
An example compilation looks like this:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
protoc \
|
|
14
|
+
--plugin=./node_modules/.bin/protoc-gen-ts_proto \
|
|
15
|
+
--ts_proto_opt=esModuleInterop=true,returnObservable=false,outputServices=generic-definitions,fileSuffix=.gen \
|
|
16
|
+
--ts_proto_out="$(pwd)/out-ts" \
|
|
17
|
+
-I="$(pwd)/node_modules/protobufjs" \
|
|
18
|
+
-I="$(pwd)/node_modules/@dcl/protocol" \
|
|
19
|
+
"$(pwd)/node_modules/@dcl/protocol/bff-services.proto"
|
|
20
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
// CommsDirector are formalized at https://rfc.decentraland.org/adr/ADR-81
|
|
4
|
+
|
|
5
|
+
import "google/protobuf/empty.proto";
|
|
6
|
+
import "common/Vectors.proto";
|
|
7
|
+
|
|
8
|
+
package decentraland.bff;
|
|
9
|
+
|
|
10
|
+
message WorldCommand {
|
|
11
|
+
oneof command {
|
|
12
|
+
SetCommsAdapter set_comms_adapter = 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message SetCommsAdapter {
|
|
17
|
+
string connection_string = 1;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message Heartbeat {
|
|
21
|
+
decentraland.common.Position position = 1;
|
|
22
|
+
optional string desired_room = 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
service CommsDirectorService {
|
|
26
|
+
// every couple seconds AND at the beginning, the explorers must send a heartbeat
|
|
27
|
+
// to make the comms director aware of their location
|
|
28
|
+
rpc SendHeartbeat(Heartbeat) returns (google.protobuf.Empty) {}
|
|
29
|
+
|
|
30
|
+
// before sending the first heartbeat, it is required that the explorers subscribe
|
|
31
|
+
// to a list of comms commands
|
|
32
|
+
rpc GetCommsCommands(google.protobuf.Empty) returns (stream WorldCommand) {}
|
|
33
|
+
}
|
package/bff/comms-service.proto
CHANGED
|
@@ -1,35 +1,12 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
+
import public "bff/topics-service.proto";
|
|
3
4
|
package decentraland.bff;
|
|
4
5
|
|
|
5
6
|
message Subscription {
|
|
6
7
|
uint32 subscription_id = 1;
|
|
7
8
|
}
|
|
8
9
|
|
|
9
|
-
message SubscriptionRequest {
|
|
10
|
-
string topic = 1;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
message PeerTopicSubscriptionResultElem {
|
|
14
|
-
bytes payload = 1;
|
|
15
|
-
string topic = 2;
|
|
16
|
-
string sender = 3;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
message SystemTopicSubscriptionResultElem {
|
|
20
|
-
bytes payload = 1;
|
|
21
|
-
string topic = 2;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
message PublishToTopicRequest {
|
|
25
|
-
string topic = 1;
|
|
26
|
-
bytes payload = 2;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
message PublishToTopicResult {
|
|
30
|
-
bool ok = 1;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
10
|
message UnsubscriptionResult {
|
|
34
11
|
bool ok = 1;
|
|
35
12
|
}
|
|
@@ -43,7 +20,6 @@ service CommsService {
|
|
|
43
20
|
rpc GetSystemMessages(Subscription) returns (stream SystemTopicSubscriptionResultElem) {}
|
|
44
21
|
rpc UnsubscribeToSystemMessages(Subscription) returns (UnsubscriptionResult) {}
|
|
45
22
|
|
|
46
|
-
|
|
47
23
|
// send a peer message to a topic
|
|
48
24
|
rpc PublishToTopic(PublishToTopicRequest) returns (PublishToTopicResult) {}
|
|
49
|
-
}
|
|
25
|
+
}
|
package/bff/http-endpoints.proto
CHANGED
|
@@ -13,29 +13,26 @@ message AboutResponse {
|
|
|
13
13
|
LambdasInfo lambdas = 5;
|
|
14
14
|
BffInfo bff = 6;
|
|
15
15
|
|
|
16
|
-
message BaseService {
|
|
17
|
-
bool healthy = 1;
|
|
18
|
-
optional string version = 2;
|
|
19
|
-
optional string commit_hash = 3;
|
|
20
|
-
optional string public_url = 4;
|
|
21
|
-
}
|
|
22
|
-
|
|
23
16
|
message AboutConfiguration {
|
|
24
17
|
optional string realm_name = 1;
|
|
18
|
+
uint32 network_id = 2;
|
|
19
|
+
repeated string global_scenes_urn = 3;
|
|
20
|
+
repeated string scenes_urn = 4;
|
|
25
21
|
}
|
|
22
|
+
|
|
26
23
|
message ContentInfo {
|
|
27
24
|
// common properties
|
|
28
25
|
bool healthy = 1;
|
|
29
26
|
optional string version = 2;
|
|
30
27
|
optional string commit_hash = 3;
|
|
31
|
-
|
|
28
|
+
string public_url = 4;
|
|
32
29
|
}
|
|
33
30
|
message LambdasInfo {
|
|
34
31
|
// common properties
|
|
35
32
|
bool healthy = 1;
|
|
36
33
|
optional string version = 2;
|
|
37
34
|
optional string commit_hash = 3;
|
|
38
|
-
|
|
35
|
+
string public_url = 4;
|
|
39
36
|
}
|
|
40
37
|
message CommsInfo {
|
|
41
38
|
// common properties
|
|
@@ -46,15 +43,17 @@ message AboutResponse {
|
|
|
46
43
|
// specific properties
|
|
47
44
|
string protocol = 50;
|
|
48
45
|
optional int32 users_count = 51;
|
|
46
|
+
optional string fixed_adapter = 52;
|
|
49
47
|
}
|
|
50
48
|
message BffInfo {
|
|
51
49
|
// common properties
|
|
52
50
|
bool healthy = 1;
|
|
53
51
|
optional string version = 2;
|
|
54
52
|
optional string commit_hash = 3;
|
|
55
|
-
|
|
53
|
+
string public_url = 4;
|
|
56
54
|
// specific properties
|
|
57
55
|
optional int32 user_count = 51;
|
|
56
|
+
optional string protocol_version = 52;
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package decentraland.bff;
|
|
4
|
+
|
|
5
|
+
message SubscriptionRequest {
|
|
6
|
+
string topic = 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message PeerTopicSubscriptionResultElem {
|
|
10
|
+
bytes payload = 1;
|
|
11
|
+
string topic = 2;
|
|
12
|
+
string sender = 3;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message SystemTopicSubscriptionResultElem {
|
|
16
|
+
bytes payload = 1;
|
|
17
|
+
string topic = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message PublishToTopicRequest {
|
|
21
|
+
string topic = 1;
|
|
22
|
+
bytes payload = 2;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message PublishToTopicResult {
|
|
26
|
+
bool ok = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
service TopicsService {
|
|
30
|
+
rpc PeerSubscription(SubscriptionRequest) returns (stream PeerTopicSubscriptionResultElem) {}
|
|
31
|
+
rpc SystemSubscription(SubscriptionRequest) returns (stream SystemTopicSubscriptionResultElem) {}
|
|
32
|
+
|
|
33
|
+
// send a peer message to a topic
|
|
34
|
+
rpc PublishToTopic(PublishToTopicRequest) returns (PublishToTopicResult) {}
|
|
35
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
// This version is used to check compatibility between Kernel<>BFF
|
|
4
|
+
// Update it manually using semantic versioning. Patches may be skipped.
|
|
5
|
+
package v1_0_0;
|
|
6
|
+
|
|
7
|
+
// This file only imports all the services for the BFF to help the compiler
|
|
8
|
+
// resolve all dependencies
|
|
9
|
+
|
|
10
|
+
import public "bff/authentication-service.proto";
|
|
11
|
+
import public "bff/http-endpoints.proto";
|
|
12
|
+
import public "bff/topics-service.proto";
|
|
13
|
+
import public "bff/comms-director-service.proto";
|
|
14
|
+
|
|
15
|
+
// TO BE DELETED
|
|
16
|
+
import public "bff/comms-service.proto";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.common;
|
|
3
|
+
import "common/ContentMapping.proto";
|
|
4
|
+
|
|
5
|
+
// Entity schema compliant with https://rfc.decentraland.org/adr/ADR-80
|
|
6
|
+
|
|
7
|
+
message Entity {
|
|
8
|
+
repeated string id = 1;
|
|
9
|
+
repeated string pointers = 2;
|
|
10
|
+
string metadata = 3;
|
|
11
|
+
uint32 timestamp = 4;
|
|
12
|
+
repeated ContentMapping content = 5;
|
|
13
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.common;
|
|
3
|
+
|
|
4
|
+
message Position {
|
|
5
|
+
float x = 1;
|
|
6
|
+
float y = 2;
|
|
7
|
+
float z = 3;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message Vector3 {
|
|
11
|
+
float x = 1;
|
|
12
|
+
float y = 2;
|
|
13
|
+
float z = 3;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message Vector2 {
|
|
17
|
+
float x = 1;
|
|
18
|
+
float y = 2;
|
|
19
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1072;
|
|
5
|
-
import "common/CameraModeValue.proto";
|
|
5
|
+
import "ecs/components/common/CameraModeValue.proto";
|
|
6
6
|
|
|
7
7
|
message PBCameraMode {
|
|
8
8
|
CameraModeValue mode = 1;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1071;
|
|
5
|
-
import "common/Vector3.proto";
|
|
6
|
-
import "common/CameraModeValue.proto";
|
|
5
|
+
import "ecs/components/common/Vector3.proto";
|
|
6
|
+
import "ecs/components/common/CameraModeValue.proto";
|
|
7
7
|
|
|
8
8
|
message PBCameraModeArea {
|
|
9
9
|
Vector3 area = 1;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1040;
|
|
5
5
|
|
|
6
|
-
import "common/Color3.proto";
|
|
6
|
+
import "ecs/components/common/Color3.proto";
|
|
7
7
|
|
|
8
8
|
message PBNFTShape {
|
|
9
9
|
enum PictureFrameStyle {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1060;
|
|
5
|
-
import "common/ActionButton.proto";
|
|
5
|
+
import "ecs/components/common/ActionButton.proto";
|
|
6
6
|
|
|
7
7
|
message PBOnPointerDown {
|
|
8
8
|
optional ActionButton button = 1; // default=ActionButton.ANY
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1066;
|
|
5
|
-
import "common/Vector3.proto";
|
|
6
|
-
import "common/ActionButton.proto";
|
|
5
|
+
import "ecs/components/common/Vector3.proto";
|
|
6
|
+
import "ecs/components/common/ActionButton.proto";
|
|
7
7
|
|
|
8
8
|
message PBOnPointerDownResult {
|
|
9
9
|
ActionButton button = 2;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1061;
|
|
5
|
-
import "common/ActionButton.proto";
|
|
5
|
+
import "ecs/components/common/ActionButton.proto";
|
|
6
6
|
|
|
7
7
|
message PBOnPointerUp {
|
|
8
8
|
optional ActionButton button = 1; // default=ActionButton.ANY
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1065;
|
|
5
|
-
import "common/Vector3.proto";
|
|
6
|
-
import "common/ActionButton.proto";
|
|
5
|
+
import "ecs/components/common/Vector3.proto";
|
|
6
|
+
import "ecs/components/common/ActionButton.proto";
|
|
7
7
|
|
|
8
8
|
message PBOnPointerUpResult {
|
|
9
9
|
ActionButton button = 2;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
4
|
-
import "RaycastResult.proto";
|
|
5
|
-
import "PointerEvents.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
|
+
import "ecs/components/RaycastResult.proto";
|
|
5
|
+
import "ecs/components/PointerEvents.proto";
|
|
6
6
|
option (ecs_component_id) = 1063;
|
|
7
|
-
import "common/ActionButton.proto";
|
|
7
|
+
import "ecs/components/common/ActionButton.proto";
|
|
8
8
|
|
|
9
9
|
// the renderer will set this component to the root entity once per frame with all the events
|
|
10
10
|
message PBPointerEventsResult {
|
package/ecs/components/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
|
-
import "common/id.proto";
|
|
3
|
+
import "ecs/components/common/id.proto";
|
|
4
4
|
option (ecs_component_id) = 1053;
|
|
5
5
|
|
|
6
|
-
import "common/Color4.proto";
|
|
6
|
+
import "ecs/components/common/Color4.proto";
|
|
7
7
|
|
|
8
8
|
message PBUiStyles {
|
|
9
9
|
optional Color4 background_color = 1; // default=(0.0, 0.0, 0.0, 0.0)
|