@dcl/protocol 1.0.0-2569677750.commit-6ce832a → 1.0.0-2611638033.commit-43db446
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/ecs/components/Animator.proto +18 -0
- package/ecs/components/AudioSource.proto +13 -0
- package/ecs/components/AudioStream.proto +10 -0
- package/ecs/components/AvatarModifierArea.proto +15 -0
- package/ecs/components/BoxShape.proto +11 -0
- package/ecs/components/CameraModeArea.proto +14 -0
- package/ecs/components/CylinderShape.proto +12 -0
- package/ecs/components/GLTFShape.proto +11 -0
- package/ecs/components/NFTShape.proto +16 -0
- package/ecs/components/OnPointerDown.proto +11 -0
- package/ecs/components/OnPointerDownResult.proto +16 -0
- package/ecs/components/OnPointerUp.proto +11 -0
- package/ecs/components/OnPointerUpResult.proto +16 -0
- package/ecs/components/PlaneShape.proto +11 -0
- package/ecs/components/README.md +32 -0
- package/ecs/components/SphereShape.proto +10 -0
- package/ecs/components/TextShape.proto +33 -0
- package/ecs/components/Transform.md +25 -0
- package/ecs/components/common/Color3.proto +8 -0
- package/ecs/components/common/Vector3.proto +7 -0
- package/ecs/components/common/id.md +2 -0
- package/kernel/apis/CommunicationsController.proto +11 -0
- package/kernel/apis/DevTools.proto +12 -0
- package/kernel/apis/EngineAPI.proto +184 -0
- package/kernel/apis/EnvironmentAPI.proto +68 -0
- package/kernel/apis/EthereumController.proto +53 -0
- package/kernel/apis/ExperimentalAPI.proto +16 -0
- package/kernel/apis/ParcelIdentity.proto +42 -0
- package/kernel/apis/Permissions.proto +30 -0
- package/kernel/apis/Players.proto +28 -0
- package/kernel/apis/PortableExperiences.proto +40 -0
- package/kernel/apis/RestrictedActions.proto +25 -0
- package/kernel/apis/SceneStateStorageController.proto +114 -0
- package/kernel/apis/SignedFetch.proto +24 -0
- package/kernel/apis/SocialController.proto +15 -0
- package/kernel/apis/UserActionModule.proto +11 -0
- package/kernel/apis/UserIdentity.proto +41 -0
- package/kernel/comms/v1/broker.proto +114 -0
- package/kernel/comms/v1/comms.proto +68 -0
- package/kernel/comms/v2/comms.proto +59 -0
- package/package.json +4 -4
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1042;
|
|
5
|
+
|
|
6
|
+
message PBAnimator {
|
|
7
|
+
repeated PBAnimationState states = 1;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
message PBAnimationState {
|
|
11
|
+
string name = 1;
|
|
12
|
+
string clip = 2;
|
|
13
|
+
bool playing = 3;
|
|
14
|
+
float weight = 4;
|
|
15
|
+
float speed = 5;
|
|
16
|
+
bool loop = 6;
|
|
17
|
+
bool should_reset = 7;
|
|
18
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1020;
|
|
5
|
+
|
|
6
|
+
message PBAudioSource {
|
|
7
|
+
bool playing = 1;
|
|
8
|
+
float volume = 2;
|
|
9
|
+
bool loop = 3;
|
|
10
|
+
float pitch = 4;
|
|
11
|
+
int32 played_at_timestamp = 5;
|
|
12
|
+
string audio_clip_url = 6;
|
|
13
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1070;
|
|
5
|
+
import "common/Vector3.proto";
|
|
6
|
+
|
|
7
|
+
message PBAvatarModifierArea {
|
|
8
|
+
Vector3 area = 1;
|
|
9
|
+
repeated string exclude_ids = 2;
|
|
10
|
+
repeated Modifier modifiers = 3;
|
|
11
|
+
enum Modifier {
|
|
12
|
+
HIDE_AVATARS = 0;
|
|
13
|
+
DISABLE_PASSPORTS = 1;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1071;
|
|
5
|
+
import "common/Vector3.proto";
|
|
6
|
+
|
|
7
|
+
message PBCameraModeArea {
|
|
8
|
+
Vector3 area = 1;
|
|
9
|
+
CameraMode mode = 2;
|
|
10
|
+
enum CameraMode {
|
|
11
|
+
FIRST_PERSON = 0;
|
|
12
|
+
THIRD_PERSON = 1;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1040;
|
|
5
|
+
|
|
6
|
+
import "common/Color3.proto";
|
|
7
|
+
|
|
8
|
+
message PBNFTShape {
|
|
9
|
+
bool with_collisions = 1;
|
|
10
|
+
bool is_pointer_blocker = 2;
|
|
11
|
+
bool visible = 3;
|
|
12
|
+
string src = 4;
|
|
13
|
+
string asset_id = 5;
|
|
14
|
+
int32 style = 6;
|
|
15
|
+
Color3 color = 7;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1066;
|
|
5
|
+
import "common/Vector3.proto";
|
|
6
|
+
|
|
7
|
+
message PBOnPointerDownResult {
|
|
8
|
+
int32 button = 2;
|
|
9
|
+
string meshName = 3;
|
|
10
|
+
Vector3 origin = 4;
|
|
11
|
+
Vector3 direction = 5;
|
|
12
|
+
Vector3 point = 6;
|
|
13
|
+
Vector3 normal = 7;
|
|
14
|
+
float distance = 8;
|
|
15
|
+
int32 timestamp = 9;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1065;
|
|
5
|
+
import "common/Vector3.proto";
|
|
6
|
+
|
|
7
|
+
message PBOnPointerUpResult {
|
|
8
|
+
int32 button = 2;
|
|
9
|
+
string meshName = 3;
|
|
10
|
+
Vector3 origin = 4;
|
|
11
|
+
Vector3 direction = 5;
|
|
12
|
+
Vector3 point = 6;
|
|
13
|
+
Vector3 normal = 7;
|
|
14
|
+
float distance = 8;
|
|
15
|
+
int32 timestamp = 9;
|
|
16
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# How to add a new ECS Component with Protocol-Buffers
|
|
2
|
+
|
|
3
|
+
In this directory, we have all the components with the schema `ComponentName.proto`. `ComponentName` has to be PascalCase, and the `.proto` is the extension that is recognized as protocol-buffer schema.
|
|
4
|
+
|
|
5
|
+
Inside each proto, we need to have at least this template:
|
|
6
|
+
```proto
|
|
7
|
+
syntax = "proto3";
|
|
8
|
+
|
|
9
|
+
import "common/id.proto";
|
|
10
|
+
option (ecs_component_id) = XXXX;
|
|
11
|
+
|
|
12
|
+
message PBComponentName {
|
|
13
|
+
float one_parameter = 1;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Some points that must be well-defined:
|
|
19
|
+
- `XXXX` the component ID is a super important property of the component, and it has to be unique at least between proto, otherwise, the code generation will fail.
|
|
20
|
+
- `PBComponentName` the root message has to be the same as the file name with the prefix `PB`
|
|
21
|
+
- `one_parameter` each parameter name has to be snake_case.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
## Common directory
|
|
25
|
+
The common directory only has to have unambiguous structures like Vector3, Color3, Quaternion, etc. These messages will never change.
|
|
26
|
+
|
|
27
|
+
## About specific options with other languages
|
|
28
|
+
The definition must be the minimal proto code, and it shouldn't have a specific option to compile on some platform. So if you have to add additional information to the proto, you will be able to run a post-process after the protocol schemas acquisition.
|
|
29
|
+
For example, in the unity-renderer repo, it'll be necessary to add the `csharp_namespace` option but it's the responsibility of this particular implementation. This code option doesn't define how the component is.
|
|
30
|
+
|
|
31
|
+
# Test component
|
|
32
|
+
If you write a proto and then push, CI will fail because the tests will fail. All the components need to be tested. `@dcl/ecs/test/components` has some examples!
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "common/id.proto";
|
|
4
|
+
option (ecs_component_id) = 1030;
|
|
5
|
+
|
|
6
|
+
import "common/Color3.proto";
|
|
7
|
+
|
|
8
|
+
message PBTextShape {
|
|
9
|
+
string text = 1;
|
|
10
|
+
bool visible = 2;
|
|
11
|
+
string font = 3;
|
|
12
|
+
float opacity = 4;
|
|
13
|
+
float font_Size = 5;
|
|
14
|
+
bool font_autoSize = 6;
|
|
15
|
+
string h_text_align = 7;
|
|
16
|
+
string v_text_align = 8;
|
|
17
|
+
float width = 9;
|
|
18
|
+
float height = 10;
|
|
19
|
+
float padding_top = 11;
|
|
20
|
+
float padding_right = 12;
|
|
21
|
+
float padding_bottom = 13;
|
|
22
|
+
float padding_left = 14;
|
|
23
|
+
float line_spacing = 15;
|
|
24
|
+
int32 line_count = 16;
|
|
25
|
+
bool text_wrapping = 17;
|
|
26
|
+
float shadow_blur = 18;
|
|
27
|
+
float shadow_offsetX = 19;
|
|
28
|
+
float shadow_offsetY = 20;
|
|
29
|
+
float outline_width = 21;
|
|
30
|
+
Color3 shadow_color = 22;
|
|
31
|
+
Color3 outline_color = 23;
|
|
32
|
+
Color3 text_color = 24;
|
|
33
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
|
|
2
|
+
# Transform
|
|
3
|
+
|
|
4
|
+
Transform is not a protocol-buffer definition, because it uses the native byte-buffer to write directly on the wire. This allows the consumer to copy the message directly on memory and the component be serialized a little bit faster.
|
|
5
|
+
|
|
6
|
+
```cpp
|
|
7
|
+
// Transform length = 44
|
|
8
|
+
struct Transform {
|
|
9
|
+
float positionX;
|
|
10
|
+
float positionY;
|
|
11
|
+
float positionZ;
|
|
12
|
+
|
|
13
|
+
float rotationX;
|
|
14
|
+
float rotationY;
|
|
15
|
+
float rotationZ;
|
|
16
|
+
float rotationW;
|
|
17
|
+
|
|
18
|
+
float scaleX;
|
|
19
|
+
float scaleY;
|
|
20
|
+
float scaleZ;
|
|
21
|
+
|
|
22
|
+
uint32_t parentEntity;
|
|
23
|
+
};
|
|
24
|
+
```
|
|
25
|
+
- Serialized in big-endian
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message OpenExternalUrlBody {
|
|
4
|
+
string url = 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
message OpenNFTDialogBody {
|
|
8
|
+
string asset_contract_address = 1;
|
|
9
|
+
string token_id = 2;
|
|
10
|
+
optional string comment = 3;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message CreateEntityBody {
|
|
14
|
+
string id = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message RemoveEntityBody {
|
|
18
|
+
string id = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message UpdateEntityComponentBody {
|
|
22
|
+
string entity_id = 1;
|
|
23
|
+
int32 class_id = 2;
|
|
24
|
+
string name = 3;
|
|
25
|
+
string json = 4;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message AttachEntityComponentBody {
|
|
29
|
+
string entity_id = 1;
|
|
30
|
+
string name = 2;
|
|
31
|
+
string id = 3;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
message ComponentRemovedBody {
|
|
35
|
+
string entity_id = 1;
|
|
36
|
+
string name = 2;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message SetEntityParentBody {
|
|
40
|
+
string entity_id = 1;
|
|
41
|
+
string parent_id = 2;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
enum QueryType {
|
|
45
|
+
InvalidQueryType = 0;
|
|
46
|
+
HitFirst = 1;
|
|
47
|
+
HitAll = 2;
|
|
48
|
+
HitFirstAvatar = 3;
|
|
49
|
+
HitAllAvatars = 4;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message QueryBody {
|
|
53
|
+
QueryType query_id = 1;
|
|
54
|
+
string payload = 2;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message ComponentCreatedBody {
|
|
58
|
+
string id = 1;
|
|
59
|
+
int32 class_id = 2;
|
|
60
|
+
string name = 3;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message ComponentDisposedBody {
|
|
64
|
+
string id = 1;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
message ComponentUpdatedBody {
|
|
68
|
+
string id = 1;
|
|
69
|
+
string json = 2;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
message InitMessagesFinishedBody {
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
message Payload {
|
|
77
|
+
optional OpenExternalUrlBody open_external_url = 1;
|
|
78
|
+
optional OpenNFTDialogBody open_nft_dialog = 2;
|
|
79
|
+
optional CreateEntityBody create_entity = 3;
|
|
80
|
+
optional RemoveEntityBody remove_entity = 4;
|
|
81
|
+
optional UpdateEntityComponentBody update_entity_component = 5;
|
|
82
|
+
optional AttachEntityComponentBody attach_entity_component = 6;
|
|
83
|
+
optional ComponentRemovedBody component_removed = 7;
|
|
84
|
+
optional SetEntityParentBody set_entity_parent = 8;
|
|
85
|
+
optional QueryBody query = 9;
|
|
86
|
+
optional ComponentCreatedBody component_created = 10;
|
|
87
|
+
optional ComponentDisposedBody component_disposed = 11;
|
|
88
|
+
optional ComponentUpdatedBody component_updated = 12;
|
|
89
|
+
optional InitMessagesFinishedBody init_messages_finished = 13;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
enum EAType {
|
|
93
|
+
InvalidEAType = 0;
|
|
94
|
+
OpenExternalUrl = 1;
|
|
95
|
+
OpenNFTDialog = 2;
|
|
96
|
+
CreateEntity = 3;
|
|
97
|
+
RemoveEntity = 4;
|
|
98
|
+
UpdateEntityComponent = 5;
|
|
99
|
+
AttachEntityComponent = 6;
|
|
100
|
+
ComponentRemoved = 7;
|
|
101
|
+
SetEntityParent = 8;
|
|
102
|
+
Query = 9;
|
|
103
|
+
ComponentCreated = 10;
|
|
104
|
+
ComponentDisposed = 11;
|
|
105
|
+
ComponentUpdated = 12;
|
|
106
|
+
InitMessagesFinished = 13;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
message EntityAction {
|
|
110
|
+
EAType type = 1;
|
|
111
|
+
optional string tag = 2;
|
|
112
|
+
Payload payload = 3;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
message ManyEntityAction {
|
|
116
|
+
repeated EntityAction actions = 1;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
message SendBatchResponse {}
|
|
120
|
+
|
|
121
|
+
message UnsubscribeRequest {
|
|
122
|
+
string event_id = 1;
|
|
123
|
+
}
|
|
124
|
+
message SubscribeRequest {
|
|
125
|
+
string event_id = 1;
|
|
126
|
+
}
|
|
127
|
+
message SubscribeResponse {}
|
|
128
|
+
message UnsubscribeResponse {}
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
// Events
|
|
132
|
+
enum EventDataType {
|
|
133
|
+
Generic = 0;
|
|
134
|
+
PositionChanged = 1;
|
|
135
|
+
RotationChanged = 2;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
message GenericPayload {
|
|
139
|
+
string event_id = 3;
|
|
140
|
+
string event_data = 4;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
message ReadOnlyVector3 {
|
|
144
|
+
float x = 1;
|
|
145
|
+
float y = 2;
|
|
146
|
+
float z = 3;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
message ReadOnlyQuaternion {
|
|
150
|
+
float x = 1;
|
|
151
|
+
float y = 2;
|
|
152
|
+
float z = 3;
|
|
153
|
+
float w = 4;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
message PositionChangedPayload {
|
|
157
|
+
ReadOnlyVector3 position = 1;
|
|
158
|
+
ReadOnlyVector3 camera_position = 2;
|
|
159
|
+
float player_height = 3;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
message RotationChangedPayload {
|
|
163
|
+
ReadOnlyVector3 rotation = 1;
|
|
164
|
+
ReadOnlyQuaternion quaternion = 2;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
message EventData {
|
|
168
|
+
EventDataType type = 1;
|
|
169
|
+
optional GenericPayload generic = 2;
|
|
170
|
+
optional PositionChangedPayload position_changed = 3;
|
|
171
|
+
optional RotationChangedPayload rotation_changed = 4;
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
message PullEventsRequest {}
|
|
175
|
+
message PullEventsResponse {
|
|
176
|
+
repeated EventData events = 1;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
service EngineAPIService {
|
|
180
|
+
rpc SendBatch(ManyEntityAction) returns (SendBatchResponse) {}
|
|
181
|
+
rpc Subscribe(SubscribeRequest) returns (SubscribeResponse) {}
|
|
182
|
+
rpc Unsubscribe(UnsubscribeRequest) returns (UnsubscribeResponse) {}
|
|
183
|
+
rpc PullEvents(PullEventsRequest) returns (PullEventsResponse) {}
|
|
184
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message ContentMapping {
|
|
4
|
+
string file = 1;
|
|
5
|
+
string hash = 2;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
message BootstrapDataResponse {
|
|
9
|
+
string scene_id = 1;
|
|
10
|
+
string name = 2;
|
|
11
|
+
string main = 3;
|
|
12
|
+
string base_url = 4;
|
|
13
|
+
bool use_f_p_s_throttling = 5;
|
|
14
|
+
repeated ContentMapping mappings = 6;
|
|
15
|
+
string json_payload = 7;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
message PreviewModeResponse {
|
|
19
|
+
bool is_preview = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message AreUnsafeRequestAllowedResponse {
|
|
23
|
+
bool status = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetPlatformResponse {
|
|
27
|
+
string platform = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message EnvironmentRealm {
|
|
31
|
+
string domain = 1;
|
|
32
|
+
string layer = 2;
|
|
33
|
+
string room = 3;
|
|
34
|
+
string server_name = 4;
|
|
35
|
+
string display_name = 5;
|
|
36
|
+
string protocol = 6;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message GetCurrentRealmResponse {
|
|
40
|
+
optional EnvironmentRealm current_realm = 1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message GetExplorerConfigurationResponse {
|
|
44
|
+
string clientUri = 1;
|
|
45
|
+
map<string, string> configurations = 2;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
message GetDecentralandTimeResponse {
|
|
49
|
+
int32 seconds = 1;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message GetBootstrapDataRequest {}
|
|
53
|
+
message IsPreviewModeRequest {}
|
|
54
|
+
message GetPlatformRequest {}
|
|
55
|
+
message AreUnsafeRequestAllowedRequest {}
|
|
56
|
+
message GetCurrentRealmRequest {}
|
|
57
|
+
message GetExplorerConfigurationRequest {}
|
|
58
|
+
message GetDecentralandTimeRequest {}
|
|
59
|
+
|
|
60
|
+
service EnvironmentAPIService {
|
|
61
|
+
rpc GetBootstrapData(GetBootstrapDataRequest) returns (BootstrapDataResponse) {}
|
|
62
|
+
rpc IsPreviewMode(IsPreviewModeRequest) returns (PreviewModeResponse) {}
|
|
63
|
+
rpc GetPlatform(GetPlatformRequest) returns (GetPlatformResponse) {}
|
|
64
|
+
rpc AreUnsafeRequestAllowed(AreUnsafeRequestAllowedRequest) returns (AreUnsafeRequestAllowedResponse) {}
|
|
65
|
+
rpc GetCurrentRealm(GetCurrentRealmRequest) returns (GetCurrentRealmResponse) {}
|
|
66
|
+
rpc GetExplorerConfiguration(GetExplorerConfigurationRequest) returns (GetExplorerConfigurationResponse) {}
|
|
67
|
+
rpc GetDecentralandTime(GetDecentralandTimeRequest) returns (GetDecentralandTimeResponse) {}
|
|
68
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message RequirePaymentRequest {
|
|
4
|
+
string to_address = 1;
|
|
5
|
+
float amount = 2;
|
|
6
|
+
string currency = 3;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message RequirePaymentResponse {
|
|
10
|
+
string json_any_response = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message SignMessageRequest {
|
|
14
|
+
map<string, string> message = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message SignMessageResponse {
|
|
18
|
+
string message = 1;
|
|
19
|
+
string hexEncodedMessage = 2;
|
|
20
|
+
string signature = 3;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message ConvertMessageToObjectRequest {
|
|
24
|
+
string message = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message ConvertMessageToObjectResponse {
|
|
28
|
+
map<string, string> dict = 1;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
message SendAsyncRequest {
|
|
32
|
+
int32 id = 1;
|
|
33
|
+
string method = 2;
|
|
34
|
+
string json_params = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message SendAsyncResponse {
|
|
38
|
+
string json_any_response = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message GetUserAccountRequest {}
|
|
42
|
+
|
|
43
|
+
message GetUserAccountResponse {
|
|
44
|
+
optional string address = 1;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
service EthereumControllerService {
|
|
48
|
+
rpc RequirePayment(RequirePaymentRequest) returns (RequirePaymentResponse) {}
|
|
49
|
+
rpc SignMessage(SignMessageRequest) returns (SignMessageResponse) {}
|
|
50
|
+
rpc ConvertMessageToObject(ConvertMessageToObjectRequest) returns (ConvertMessageToObjectResponse) {}
|
|
51
|
+
rpc SendAsync(SendAsyncRequest) returns (SendAsyncResponse) {}
|
|
52
|
+
rpc GetUserAccount(GetUserAccountRequest) returns (GetUserAccountResponse) {}
|
|
53
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message SendToRendererRequest {
|
|
4
|
+
bytes data = 1;
|
|
5
|
+
}
|
|
6
|
+
message SendToResponse {}
|
|
7
|
+
|
|
8
|
+
message MessageFromRendererRequest {}
|
|
9
|
+
message MessageFromRendererResponse {
|
|
10
|
+
bytes data = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
service ExperimentalAPIService {
|
|
14
|
+
rpc SendToRenderer(SendToRendererRequest) returns (SendToResponse) {}
|
|
15
|
+
rpc MessageFromRenderer(MessageFromRendererRequest) returns (stream MessageFromRendererResponse) {}
|
|
16
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message ContentMapping {
|
|
4
|
+
string file = 1;
|
|
5
|
+
string hash = 2;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
message MappingsResponse {
|
|
9
|
+
string parcel_id = 1;
|
|
10
|
+
string root_cid = 2;
|
|
11
|
+
repeated ContentMapping contents = 3;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message Land {
|
|
15
|
+
string scene_id = 1;
|
|
16
|
+
string scene_json_data = 2;
|
|
17
|
+
string base_url = 3;
|
|
18
|
+
string base_url_bundles = 4;
|
|
19
|
+
MappingsResponse mappings_response = 5;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message GetParcelRequest {}
|
|
23
|
+
message GetParcelResponse {
|
|
24
|
+
Land land = 1;
|
|
25
|
+
string cid = 2;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
message GetSceneIdRequest {}
|
|
29
|
+
message GetSceneIdResponse {
|
|
30
|
+
string scene_id = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message GetIsEmptyRequest {}
|
|
34
|
+
message GetIsEmptyResponse {
|
|
35
|
+
bool is_empty = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
service ParcelIdentityService {
|
|
39
|
+
rpc GetParcel(GetParcelRequest) returns (GetParcelResponse) {}
|
|
40
|
+
rpc GetSceneId(GetSceneIdRequest) returns (GetSceneIdResponse) {}
|
|
41
|
+
rpc GetIsEmpty(GetIsEmptyRequest) returns (GetIsEmptyResponse) {}
|
|
42
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
enum PermissionItem {
|
|
4
|
+
ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE = 0;
|
|
5
|
+
ALLOW_TO_TRIGGER_AVATAR_EMOTE = 1;
|
|
6
|
+
USE_WEB3_API = 2;
|
|
7
|
+
USE_WEBSOCKET = 3;
|
|
8
|
+
USE_FETCH = 4;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message PermissionResponse {
|
|
12
|
+
bool has_permission = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message HasPermissionRequest {
|
|
16
|
+
PermissionItem permission = 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
message HasManyPermissionRequest {
|
|
20
|
+
repeated PermissionItem permissions = 1;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
message HasManyPermissionResponse {
|
|
24
|
+
repeated bool has_many_permission = 1;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
service PermissionsService {
|
|
28
|
+
rpc HasPermission(HasPermissionRequest) returns (PermissionResponse) {}
|
|
29
|
+
rpc HasManyPermissions(HasManyPermissionRequest) returns (HasManyPermissionResponse) {}
|
|
30
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
import "UserIdentity.proto";
|
|
4
|
+
|
|
5
|
+
message Player {
|
|
6
|
+
string user_id = 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message PlayersGetUserDataResponse {
|
|
10
|
+
optional UserData data = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
message PlayerListResponse {
|
|
14
|
+
repeated Player players = 1;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message GetPlayerDataRequest {
|
|
18
|
+
string user_id = 1;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
message GetPlayersInSceneRequest {}
|
|
22
|
+
message GetConnectedPlayersRequest {}
|
|
23
|
+
|
|
24
|
+
service PlayersService {
|
|
25
|
+
rpc GetPlayerData(GetPlayerDataRequest) returns (PlayersGetUserDataResponse) {}
|
|
26
|
+
rpc GetPlayersInScene(GetPlayersInSceneRequest) returns (PlayerListResponse) {}
|
|
27
|
+
rpc GetConnectedPlayers(GetConnectedPlayersRequest) returns (PlayerListResponse) {}
|
|
28
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message KillRequest {
|
|
4
|
+
string pid = 1;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
message KillResponse {
|
|
8
|
+
bool status = 1;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
message SpawnRequest {
|
|
12
|
+
string pid = 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
message SpawnResponse {
|
|
16
|
+
string pid = 1;
|
|
17
|
+
string parent_cid = 2;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
message PxRequest {
|
|
21
|
+
string pid = 1;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
message GetPortableExperiencesLoadedRequest {}
|
|
25
|
+
|
|
26
|
+
message GetPortableExperiencesLoadedResponse {
|
|
27
|
+
repeated SpawnResponse loaded = 1;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
message ExitRequest {}
|
|
31
|
+
message ExitResponse {
|
|
32
|
+
bool status = 1;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
service PortableExperiencesService {
|
|
36
|
+
rpc Spawn(SpawnRequest) returns (SpawnResponse) {}
|
|
37
|
+
rpc Kill(KillRequest) returns (KillResponse) {}
|
|
38
|
+
rpc Exit(ExitRequest) returns (ExitResponse) {}
|
|
39
|
+
rpc GetPortableExperiencesLoaded(GetPortableExperiencesLoadedRequest) returns (GetPortableExperiencesLoadedResponse) {}
|
|
40
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message Vector3 {
|
|
4
|
+
float x = 1;
|
|
5
|
+
float y = 2;
|
|
6
|
+
float z = 3;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message MovePlayerToResponse { }
|
|
10
|
+
|
|
11
|
+
message MovePlayerToRequest {
|
|
12
|
+
Vector3 new_relative_position = 1;
|
|
13
|
+
optional Vector3 camera_target = 2;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message TriggerEmoteResponse { }
|
|
17
|
+
|
|
18
|
+
message TriggerEmoteRequest {
|
|
19
|
+
string predefined_emote = 1;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
service RestrictedActionsService {
|
|
23
|
+
rpc MovePlayerTo(MovePlayerToRequest) returns (MovePlayerToResponse) {}
|
|
24
|
+
rpc TriggerEmote(TriggerEmoteRequest) returns (TriggerEmoteResponse) {}
|
|
25
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
// Auxiliary types
|
|
4
|
+
|
|
5
|
+
message SerializedSceneState {
|
|
6
|
+
repeated SerializedEntity entities = 1;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message SerializedComponent {
|
|
10
|
+
int32 type = 1;
|
|
11
|
+
string value_json = 2;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message SerializedEntity {
|
|
15
|
+
string id = 1;
|
|
16
|
+
repeated SerializedComponent components = 2;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// RPC Request and Response Messages
|
|
20
|
+
|
|
21
|
+
message GetProjectManifestRequest {
|
|
22
|
+
string project_id = 1;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
message GetProjectManifestResponse {
|
|
26
|
+
optional SerializedSceneState state = 1;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
message GetProjectManifestByCoordinatesRequest {
|
|
30
|
+
string land = 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
message GetProjectManifestByCoordinatesResponse {
|
|
34
|
+
optional SerializedSceneState state = 1;
|
|
35
|
+
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message CreateProjectWithCoordsRequest {
|
|
39
|
+
string coordinates = 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message CreateProjectWithCoordsResponse {
|
|
43
|
+
bool ok = 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message SaveSceneStateRequest {
|
|
47
|
+
SerializedSceneState serialized_scene_state = 1;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message SaveSceneStateResponse {
|
|
51
|
+
bool ok = 1;
|
|
52
|
+
optional string error = 2;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
message SaveProjectInfoRequest {
|
|
56
|
+
SerializedSceneState scene_state = 1;
|
|
57
|
+
string project_name = 2;
|
|
58
|
+
string project_description = 3;
|
|
59
|
+
string project_screenshot = 4;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message SaveProjectInfoResponse {
|
|
63
|
+
bool ok = 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message PublishSceneStateRequest {
|
|
67
|
+
string scene_id = 1;
|
|
68
|
+
string scene_name = 2;
|
|
69
|
+
string scene_description = 3;
|
|
70
|
+
string scene_screenshot = 4;
|
|
71
|
+
SerializedSceneState scene_state = 5;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
message PublishSceneStateResponse {
|
|
75
|
+
bool ok = 1;
|
|
76
|
+
optional string error = 2;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
message GetStoredStateRequest {
|
|
80
|
+
string scene_id = 1;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
message GetStoredStateResponse {
|
|
84
|
+
optional SerializedSceneState state = 1;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
|
|
88
|
+
message CreateProjectFromStateDefinitionRequest {}
|
|
89
|
+
|
|
90
|
+
message CreateProjectFromStateDefinitionResponse {
|
|
91
|
+
optional SerializedSceneState state = 1;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
message SendAssetsToRendererRequest {
|
|
96
|
+
SerializedSceneState state = 1;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message SendAssetsToRendererResponse {
|
|
100
|
+
string state = 1;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
|
|
104
|
+
service SceneStateStorageControllerService {
|
|
105
|
+
rpc GetProjectManifest(GetProjectManifestRequest) returns (GetProjectManifestResponse) {}
|
|
106
|
+
rpc GetProjectManifestByCoordinates(GetProjectManifestByCoordinatesRequest) returns (GetProjectManifestByCoordinatesResponse) {}
|
|
107
|
+
rpc CreateProjectWithCoords(CreateProjectWithCoordsRequest) returns (CreateProjectWithCoordsResponse) {}
|
|
108
|
+
rpc SaveSceneState(SaveSceneStateRequest) returns (SaveSceneStateResponse) {}
|
|
109
|
+
rpc SaveProjectInfo(SaveProjectInfoRequest) returns (SaveProjectInfoResponse) {}
|
|
110
|
+
rpc PublishSceneState(PublishSceneStateRequest) returns (PublishSceneStateResponse) {}
|
|
111
|
+
rpc GetStoredState(GetStoredStateRequest) returns (GetStoredStateResponse) {}
|
|
112
|
+
rpc CreateProjectFromStateDefinition(CreateProjectFromStateDefinitionRequest) returns (CreateProjectFromStateDefinitionResponse) {}
|
|
113
|
+
rpc SendAssetsToRenderer(SendAssetsToRendererRequest) returns (SendAssetsToRendererResponse) {}
|
|
114
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message FlatFetchInit {
|
|
4
|
+
optional string method = 1;
|
|
5
|
+
optional string body = 2;
|
|
6
|
+
map<string, string> headers = 3;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message FlatFetchResponse {
|
|
10
|
+
bool ok = 1;
|
|
11
|
+
int32 status = 2;
|
|
12
|
+
string status_text = 3;
|
|
13
|
+
map<string, string> headers = 4;
|
|
14
|
+
string body = 5;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message SignedFetchRequest {
|
|
18
|
+
string url = 1;
|
|
19
|
+
optional FlatFetchInit init = 2;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
service SignedFetchService {
|
|
23
|
+
rpc SignedFetch(SignedFetchRequest) returns (FlatFetchResponse) {}
|
|
24
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message InitRequest {}
|
|
4
|
+
message SocialEvent {
|
|
5
|
+
string event = 1;
|
|
6
|
+
string payload = 2;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
message GetAvatarEventsResponse {
|
|
10
|
+
repeated SocialEvent events = 1;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
service SocialControllerService {
|
|
14
|
+
rpc PullAvatarEvents(InitRequest) returns (GetAvatarEventsResponse) {}
|
|
15
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message Snapshots {
|
|
4
|
+
string face256 = 1;
|
|
5
|
+
string body = 2;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
message AvatarForUserData {
|
|
9
|
+
string body_shape = 1;
|
|
10
|
+
string skin_color = 2;
|
|
11
|
+
string hair_color = 3;
|
|
12
|
+
string eye_color = 4;
|
|
13
|
+
repeated string wearables = 5;
|
|
14
|
+
Snapshots snapshots = 6;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
message UserData {
|
|
18
|
+
string display_name = 1;
|
|
19
|
+
optional string public_key = 2;
|
|
20
|
+
bool has_connected_web3 = 3;
|
|
21
|
+
string user_id = 4;
|
|
22
|
+
int32 version = 5;
|
|
23
|
+
AvatarForUserData avatar = 6;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message GetUserDataRequest {}
|
|
27
|
+
|
|
28
|
+
message GetUserDataResponse {
|
|
29
|
+
optional UserData data = 1;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
message GetUserPublicKeyRequest {}
|
|
33
|
+
|
|
34
|
+
message GetUserPublicKeyResponse {
|
|
35
|
+
optional string address = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
service UserIdentityService {
|
|
39
|
+
rpc GetUserPublicKey(GetUserPublicKeyRequest) returns (GetUserPublicKeyResponse) {}
|
|
40
|
+
rpc GetUserData(GetUserDataRequest) returns (GetUserDataResponse) {}
|
|
41
|
+
}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package protocol;
|
|
4
|
+
|
|
5
|
+
enum MessageType {
|
|
6
|
+
UNKNOWN_MESSAGE_TYPE = 0;
|
|
7
|
+
WELCOME = 1;
|
|
8
|
+
CONNECT = 2;
|
|
9
|
+
WEBRTC_OFFER = 3;
|
|
10
|
+
WEBRTC_ANSWER = 4;
|
|
11
|
+
WEBRTC_ICE_CANDIDATE = 5;
|
|
12
|
+
PING = 6;
|
|
13
|
+
SUBSCRIPTION = 7;
|
|
14
|
+
AUTH = 8;
|
|
15
|
+
|
|
16
|
+
TOPIC = 9;
|
|
17
|
+
TOPIC_FW = 10;
|
|
18
|
+
|
|
19
|
+
TOPIC_IDENTITY = 11;
|
|
20
|
+
TOPIC_IDENTITY_FW = 12;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
enum Role {
|
|
24
|
+
UNKNOWN_ROLE = 0;
|
|
25
|
+
CLIENT = 1;
|
|
26
|
+
COMMUNICATION_SERVER = 2;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
enum Format {
|
|
30
|
+
UNKNOWN_FORMAT = 0;
|
|
31
|
+
PLAIN = 1;
|
|
32
|
+
GZIP = 2;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
// NOTE: coordination messsages
|
|
36
|
+
|
|
37
|
+
message CoordinatorMessage {
|
|
38
|
+
MessageType type = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
message WelcomeMessage {
|
|
42
|
+
MessageType type = 1;
|
|
43
|
+
uint64 alias = 2;
|
|
44
|
+
repeated uint64 available_servers = 3;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
message ConnectMessage {
|
|
48
|
+
MessageType type = 1;
|
|
49
|
+
uint64 from_alias = 2;
|
|
50
|
+
uint64 to_alias = 3;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
message WebRtcMessage {
|
|
54
|
+
MessageType type = 1;
|
|
55
|
+
uint64 from_alias = 2;
|
|
56
|
+
uint64 to_alias = 3;
|
|
57
|
+
bytes data = 4;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// NOTE: comm server messsages
|
|
61
|
+
|
|
62
|
+
message MessageHeader {
|
|
63
|
+
MessageType type = 1;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message PingMessage {
|
|
67
|
+
MessageType type = 1;
|
|
68
|
+
double time = 2;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
// NOTE: topics is a space separated string in the format specified by Format
|
|
72
|
+
message SubscriptionMessage {
|
|
73
|
+
MessageType type = 1;
|
|
74
|
+
Format format = 2;
|
|
75
|
+
bytes topics = 3;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
// NOTE: comm server messsages
|
|
79
|
+
|
|
80
|
+
message AuthMessage {
|
|
81
|
+
MessageType type = 1;
|
|
82
|
+
Role role = 2;
|
|
83
|
+
bytes body = 3;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
message TopicMessage {
|
|
87
|
+
MessageType type = 1;
|
|
88
|
+
uint64 from_alias = 2;
|
|
89
|
+
string topic = 3;
|
|
90
|
+
bytes body = 4;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
message TopicFWMessage {
|
|
94
|
+
MessageType type = 1;
|
|
95
|
+
uint64 from_alias = 2;
|
|
96
|
+
bytes body = 3;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
message TopicIdentityMessage {
|
|
100
|
+
MessageType type = 1;
|
|
101
|
+
uint64 from_alias = 2;
|
|
102
|
+
string topic = 3;
|
|
103
|
+
bytes identity = 4;
|
|
104
|
+
Role role = 5;
|
|
105
|
+
bytes body = 6;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
message TopicIdentityFWMessage {
|
|
109
|
+
MessageType type = 1;
|
|
110
|
+
uint64 from_alias = 2;
|
|
111
|
+
bytes identity = 3;
|
|
112
|
+
Role role = 4;
|
|
113
|
+
bytes body = 5;
|
|
114
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
package protocol;
|
|
4
|
+
|
|
5
|
+
message AuthData {
|
|
6
|
+
string signature = 1;
|
|
7
|
+
string identity = 2;
|
|
8
|
+
string timestamp = 3;
|
|
9
|
+
string access_token = 4;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
enum Category {
|
|
13
|
+
UNKNOWN = 0;
|
|
14
|
+
POSITION = 1;
|
|
15
|
+
PROFILE = 2;
|
|
16
|
+
CHAT = 3;
|
|
17
|
+
SCENE_MESSAGE = 4;
|
|
18
|
+
PROF_REQ = 5;
|
|
19
|
+
PROF_RES = 6;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
message DataHeader {
|
|
23
|
+
Category category = 1;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message PositionData {
|
|
27
|
+
Category category = 1;
|
|
28
|
+
double time = 2;
|
|
29
|
+
float position_x = 3;
|
|
30
|
+
float position_y = 4;
|
|
31
|
+
float position_z = 5;
|
|
32
|
+
float rotation_x = 6;
|
|
33
|
+
float rotation_y = 7;
|
|
34
|
+
float rotation_z = 8;
|
|
35
|
+
float rotation_w = 9;
|
|
36
|
+
bool immediate = 10;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
message ProfileData {
|
|
40
|
+
Category category = 1;
|
|
41
|
+
double time = 2;
|
|
42
|
+
string profile_version = 3;
|
|
43
|
+
enum ProfileType {
|
|
44
|
+
LOCAL = 0;
|
|
45
|
+
DEPLOYED = 1;
|
|
46
|
+
}
|
|
47
|
+
ProfileType profile_type = 4;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message ProfileRequestData {
|
|
51
|
+
Category category = 1;
|
|
52
|
+
double time = 2;
|
|
53
|
+
string profile_version = 3;
|
|
54
|
+
string user_id = 4;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
message ProfileResponseData {
|
|
58
|
+
Category category = 1;
|
|
59
|
+
double time = 2;
|
|
60
|
+
string serialized_profile = 3;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
message ChatData {
|
|
64
|
+
Category category = 1;
|
|
65
|
+
double time = 2;
|
|
66
|
+
string message_id = 3;
|
|
67
|
+
string text = 4;
|
|
68
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
|
|
3
|
+
message CommsMessage {
|
|
4
|
+
double time = 1;
|
|
5
|
+
oneof data {
|
|
6
|
+
PositionData position_data = 2;
|
|
7
|
+
ProfileData profile_data = 3;
|
|
8
|
+
ChatData chat_data = 4;
|
|
9
|
+
SceneData scene_data = 5;
|
|
10
|
+
VoiceData voice_data = 6;
|
|
11
|
+
ProfileRequestData profile_request_data = 7;
|
|
12
|
+
ProfileResponseData profile_response_data = 8;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
message PositionData {
|
|
17
|
+
float position_x = 1;
|
|
18
|
+
float position_y = 2;
|
|
19
|
+
float position_z = 3;
|
|
20
|
+
float rotation_x = 4;
|
|
21
|
+
float rotation_y = 5;
|
|
22
|
+
float rotation_z = 6;
|
|
23
|
+
float rotation_w = 7;
|
|
24
|
+
bool immediate = 8;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
message ProfileData {
|
|
28
|
+
string profile_version = 1;
|
|
29
|
+
string user_id = 2;
|
|
30
|
+
enum ProfileType {
|
|
31
|
+
DEPLOYED = 0;
|
|
32
|
+
LOCAL = 1;
|
|
33
|
+
}
|
|
34
|
+
ProfileType profile_type = 3;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
message ProfileRequestData {
|
|
38
|
+
string profile_version = 1;
|
|
39
|
+
string user_id = 2;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
message ProfileResponseData {
|
|
43
|
+
string serialized_profile = 1;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
message ChatData {
|
|
47
|
+
string message_id = 1;
|
|
48
|
+
string text = 2;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message SceneData {
|
|
52
|
+
string scene_id = 1;
|
|
53
|
+
string text = 2;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
message VoiceData {
|
|
57
|
+
bytes encoded_samples = 1;
|
|
58
|
+
uint32 index = 2;
|
|
59
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dcl/protocol",
|
|
3
|
-
"version": "1.0.0-
|
|
3
|
+
"version": "1.0.0-2611638033.commit-43db446",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
"proto-compatibility-tool": "^1.0.0"
|
|
14
14
|
},
|
|
15
15
|
"files": [
|
|
16
|
-
"
|
|
16
|
+
"kernel",
|
|
17
17
|
"renderer-protocol",
|
|
18
|
-
"
|
|
18
|
+
"ecs"
|
|
19
19
|
],
|
|
20
|
-
"commit": "
|
|
20
|
+
"commit": "43db446598860356d3f3e4affb58e34d75881841"
|
|
21
21
|
}
|