@dcl/protocol 1.0.0-6725457366.commit-d6b2b77 → 1.0.0-7117237552.commit-82dc93b
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/out-js/decentraland/common/border_rect.gen.js.map +1 -1
- package/out-js/decentraland/common/colors.gen.js.map +1 -1
- package/out-js/decentraland/common/content_mapping.gen.js.map +1 -1
- package/out-js/decentraland/common/sdk/user_data.gen.js.map +1 -1
- package/out-js/decentraland/common/texture.gen.js.map +1 -1
- package/out-js/decentraland/common/vectors.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/comms_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/communications_controller.gen.d.ts +30 -0
- package/out-js/decentraland/kernel/apis/communications_controller.gen.js +171 -1
- package/out-js/decentraland/kernel/apis/communications_controller.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/dev_tools.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/engine_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/environment_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/ethereum_controller.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/parcel_identity.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/permissions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/players.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/portable_experiences.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/runtime.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/scene.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/signed_fetch.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/social_controller.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/testing.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/user_action_module.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/user_identity.gen.js.map +1 -1
- package/out-js/decentraland/kernel/comms/rfc4/comms.gen.js.map +1 -1
- package/out-js/decentraland/kernel/comms/rfc5/ws_comms.gen.js.map +1 -1
- package/out-js/decentraland/kernel/comms/v3/archipelago.gen.js.map +1 -1
- package/out-js/decentraland/quests/definitions.gen.js.map +1 -1
- package/out-js/decentraland/realm/about.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/animator.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/audio_source.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/audio_stream.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_attach.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_base.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_modifier_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_shape.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/billboard.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_mode.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/camera_mode_area.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/camera_type.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/input_action.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/loading_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/raycast_hit.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/common/texts.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/engine_info.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_container.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/gltf_container_loading_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/material.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_collider.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/mesh_renderer.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/nft_shape.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/player_identity_data.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_events.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_events_result.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/pointer_lock.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/raycast.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/raycast_result.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/text_shape.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/tween.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/tween_sequence.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/tween_state.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_background.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_dropdown.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_dropdown_result.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_input.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_input_result.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_text.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/ui_transform.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/video_player.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/visibility_component.gen.js.map +1 -1
- package/out-js/decentraland/sdk/ecs6/components_ecs6.gen.js.map +1 -1
- package/out-js/decentraland/sdk/ecs6/engine_interface_ecs6.gen.js.map +1 -1
- package/out-js/decentraland/social/friendships/friendships.gen.js.map +1 -1
- package/out-js/google/protobuf/descriptor.gen.js.map +1 -1
- package/out-js/google/protobuf/empty.gen.js.map +1 -1
- package/out-ts/decentraland/kernel/apis/communications_controller.gen.ts +180 -0
- package/package.json +2 -2
- package/proto/decentraland/kernel/apis/communications_controller.proto +13 -4
|
@@ -10,6 +10,14 @@ export interface RealSendRequest {
|
|
|
10
10
|
export interface RealSendResponse {
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
export interface SendBinaryRequest {
|
|
14
|
+
data: Uint8Array[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface SendBinaryResponse {
|
|
18
|
+
data: Uint8Array[];
|
|
19
|
+
}
|
|
20
|
+
|
|
13
21
|
function createBaseRealSendRequest(): RealSendRequest {
|
|
14
22
|
return { message: "" };
|
|
15
23
|
}
|
|
@@ -110,6 +118,126 @@ export namespace RealSendResponse {
|
|
|
110
118
|
}
|
|
111
119
|
}
|
|
112
120
|
|
|
121
|
+
function createBaseSendBinaryRequest(): SendBinaryRequest {
|
|
122
|
+
return { data: [] };
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export namespace SendBinaryRequest {
|
|
126
|
+
export function encode(message: SendBinaryRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
127
|
+
for (const v of message.data) {
|
|
128
|
+
writer.uint32(10).bytes(v!);
|
|
129
|
+
}
|
|
130
|
+
return writer;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): SendBinaryRequest {
|
|
134
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
135
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
136
|
+
const message = createBaseSendBinaryRequest();
|
|
137
|
+
while (reader.pos < end) {
|
|
138
|
+
const tag = reader.uint32();
|
|
139
|
+
switch (tag >>> 3) {
|
|
140
|
+
case 1:
|
|
141
|
+
if (tag !== 10) {
|
|
142
|
+
break;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
message.data.push(reader.bytes());
|
|
146
|
+
continue;
|
|
147
|
+
}
|
|
148
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
149
|
+
break;
|
|
150
|
+
}
|
|
151
|
+
reader.skipType(tag & 7);
|
|
152
|
+
}
|
|
153
|
+
return message;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function fromJSON(object: any): SendBinaryRequest {
|
|
157
|
+
return { data: Array.isArray(object?.data) ? object.data.map((e: any) => bytesFromBase64(e)) : [] };
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
export function toJSON(message: SendBinaryRequest): unknown {
|
|
161
|
+
const obj: any = {};
|
|
162
|
+
if (message.data) {
|
|
163
|
+
obj.data = message.data.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array(0)));
|
|
164
|
+
} else {
|
|
165
|
+
obj.data = [];
|
|
166
|
+
}
|
|
167
|
+
return obj;
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
export function create<I extends Exact<DeepPartial<SendBinaryRequest>, I>>(base?: I): SendBinaryRequest {
|
|
171
|
+
return SendBinaryRequest.fromPartial(base ?? {});
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
export function fromPartial<I extends Exact<DeepPartial<SendBinaryRequest>, I>>(object: I): SendBinaryRequest {
|
|
175
|
+
const message = createBaseSendBinaryRequest();
|
|
176
|
+
message.data = object.data?.map((e) => e) || [];
|
|
177
|
+
return message;
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function createBaseSendBinaryResponse(): SendBinaryResponse {
|
|
182
|
+
return { data: [] };
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
export namespace SendBinaryResponse {
|
|
186
|
+
export function encode(message: SendBinaryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
187
|
+
for (const v of message.data) {
|
|
188
|
+
writer.uint32(10).bytes(v!);
|
|
189
|
+
}
|
|
190
|
+
return writer;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): SendBinaryResponse {
|
|
194
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
195
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
196
|
+
const message = createBaseSendBinaryResponse();
|
|
197
|
+
while (reader.pos < end) {
|
|
198
|
+
const tag = reader.uint32();
|
|
199
|
+
switch (tag >>> 3) {
|
|
200
|
+
case 1:
|
|
201
|
+
if (tag !== 10) {
|
|
202
|
+
break;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
message.data.push(reader.bytes());
|
|
206
|
+
continue;
|
|
207
|
+
}
|
|
208
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
209
|
+
break;
|
|
210
|
+
}
|
|
211
|
+
reader.skipType(tag & 7);
|
|
212
|
+
}
|
|
213
|
+
return message;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export function fromJSON(object: any): SendBinaryResponse {
|
|
217
|
+
return { data: Array.isArray(object?.data) ? object.data.map((e: any) => bytesFromBase64(e)) : [] };
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
export function toJSON(message: SendBinaryResponse): unknown {
|
|
221
|
+
const obj: any = {};
|
|
222
|
+
if (message.data) {
|
|
223
|
+
obj.data = message.data.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array(0)));
|
|
224
|
+
} else {
|
|
225
|
+
obj.data = [];
|
|
226
|
+
}
|
|
227
|
+
return obj;
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
export function create<I extends Exact<DeepPartial<SendBinaryResponse>, I>>(base?: I): SendBinaryResponse {
|
|
231
|
+
return SendBinaryResponse.fromPartial(base ?? {});
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export function fromPartial<I extends Exact<DeepPartial<SendBinaryResponse>, I>>(object: I): SendBinaryResponse {
|
|
235
|
+
const message = createBaseSendBinaryResponse();
|
|
236
|
+
message.data = object.data?.map((e) => e) || [];
|
|
237
|
+
return message;
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
113
241
|
export type CommunicationsControllerServiceDefinition = typeof CommunicationsControllerServiceDefinition;
|
|
114
242
|
export const CommunicationsControllerServiceDefinition = {
|
|
115
243
|
name: "CommunicationsControllerService",
|
|
@@ -127,9 +255,61 @@ export const CommunicationsControllerServiceDefinition = {
|
|
|
127
255
|
responseStream: false,
|
|
128
256
|
options: {},
|
|
129
257
|
},
|
|
258
|
+
sendBinary: {
|
|
259
|
+
name: "SendBinary",
|
|
260
|
+
requestType: SendBinaryRequest,
|
|
261
|
+
requestStream: false,
|
|
262
|
+
responseType: SendBinaryResponse,
|
|
263
|
+
responseStream: false,
|
|
264
|
+
options: {},
|
|
265
|
+
},
|
|
130
266
|
},
|
|
131
267
|
} as const;
|
|
132
268
|
|
|
269
|
+
declare const self: any | undefined;
|
|
270
|
+
declare const window: any | undefined;
|
|
271
|
+
declare const global: any | undefined;
|
|
272
|
+
const tsProtoGlobalThis: any = (() => {
|
|
273
|
+
if (typeof globalThis !== "undefined") {
|
|
274
|
+
return globalThis;
|
|
275
|
+
}
|
|
276
|
+
if (typeof self !== "undefined") {
|
|
277
|
+
return self;
|
|
278
|
+
}
|
|
279
|
+
if (typeof window !== "undefined") {
|
|
280
|
+
return window;
|
|
281
|
+
}
|
|
282
|
+
if (typeof global !== "undefined") {
|
|
283
|
+
return global;
|
|
284
|
+
}
|
|
285
|
+
throw "Unable to locate global object";
|
|
286
|
+
})();
|
|
287
|
+
|
|
288
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
289
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
290
|
+
return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
|
|
291
|
+
} else {
|
|
292
|
+
const bin = tsProtoGlobalThis.atob(b64);
|
|
293
|
+
const arr = new Uint8Array(bin.length);
|
|
294
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
295
|
+
arr[i] = bin.charCodeAt(i);
|
|
296
|
+
}
|
|
297
|
+
return arr;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
302
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
303
|
+
return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
|
|
304
|
+
} else {
|
|
305
|
+
const bin: string[] = [];
|
|
306
|
+
arr.forEach((byte) => {
|
|
307
|
+
bin.push(String.fromCharCode(byte));
|
|
308
|
+
});
|
|
309
|
+
return tsProtoGlobalThis.btoa(bin.join(""));
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
|
|
133
313
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
134
314
|
|
|
135
315
|
export type DeepPartial<T> = T extends Builtin ? T
|
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-7117237552.commit-82dc93b",
|
|
4
4
|
"description": "",
|
|
5
5
|
"repository": "decentraland/protocol.git",
|
|
6
6
|
"homepage": "https://github.com/decentraland/protocol#readme",
|
|
@@ -29,5 +29,5 @@
|
|
|
29
29
|
"out-js",
|
|
30
30
|
"public"
|
|
31
31
|
],
|
|
32
|
-
"commit": "
|
|
32
|
+
"commit": "82dc93b03ed77a4fb15e62655e97bd1f74ad8170"
|
|
33
33
|
}
|
|
@@ -2,13 +2,22 @@ syntax = "proto3";
|
|
|
2
2
|
package decentraland.kernel.apis;
|
|
3
3
|
|
|
4
4
|
message RealSendRequest {
|
|
5
|
-
|
|
5
|
+
string message = 1;
|
|
6
6
|
}
|
|
7
7
|
|
|
8
8
|
message RealSendResponse {}
|
|
9
9
|
|
|
10
|
+
message SendBinaryRequest {
|
|
11
|
+
repeated bytes data = 1;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
message SendBinaryResponse {
|
|
15
|
+
repeated bytes data = 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
10
18
|
service CommunicationsControllerService {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
19
|
+
// @deprecated - This API should use a bidirectional binary stream in sdk7
|
|
20
|
+
// https://github.com/decentraland/sdk/issues/582
|
|
21
|
+
rpc Send(RealSendRequest) returns (RealSendResponse) {}
|
|
22
|
+
rpc SendBinary(SendBinaryRequest) returns (SendBinaryResponse) {}
|
|
14
23
|
}
|