@dcl/protocol 1.0.0-4640552468.commit-8851f19 → 1.0.0-4671230683.commit-a8d74c3
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/kernel/apis/environment_api.gen.d.ts +1 -1
- package/out-js/decentraland/kernel/apis/environment_api.gen.js +1 -1
- package/out-js/decentraland/kernel/apis/environment_api.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/players.gen.d.ts +9 -9
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.d.ts +1 -29
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js +22 -96
- package/out-js/decentraland/kernel/apis/restricted_actions.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/runtime.gen.d.ts +246 -0
- package/out-js/decentraland/kernel/apis/runtime.gen.js +307 -1
- package/out-js/decentraland/kernel/apis/runtime.gen.js.map +1 -1
- package/out-js/decentraland/kernel/apis/user_identity.gen.d.ts +9 -9
- package/out-ts/decentraland/kernel/apis/environment_api.gen.ts +1 -1
- package/out-ts/decentraland/kernel/apis/restricted_actions.gen.ts +1 -90
- package/out-ts/decentraland/kernel/apis/runtime.gen.ts +367 -0
- package/package.json +5 -5
- package/proto/decentraland/kernel/apis/environment_api.proto +1 -1
- package/proto/decentraland/kernel/apis/restricted_actions.proto +5 -9
- package/proto/decentraland/kernel/apis/runtime.proto +32 -0
|
@@ -304,10 +304,10 @@ export declare const UserIdentityServiceDefinition: {
|
|
|
304
304
|
} & {
|
|
305
305
|
face256?: string | undefined;
|
|
306
306
|
body?: string | undefined;
|
|
307
|
-
} & { [
|
|
308
|
-
} & { [
|
|
309
|
-
} & { [
|
|
310
|
-
} & { [
|
|
307
|
+
} & { [K in Exclude<keyof I_6["data"]["avatar"]["snapshots"], keyof import("../../common/sdk/user_data.gen").Snapshots>]: never; }) | undefined;
|
|
308
|
+
} & { [K_1 in Exclude<keyof I_6["data"]["avatar"], keyof import("../../common/sdk/user_data.gen").AvatarForUserData>]: never; }) | undefined;
|
|
309
|
+
} & { [K_2 in Exclude<keyof I_6["data"], keyof UserData>]: never; }) | undefined;
|
|
310
|
+
} & { [K_3 in Exclude<keyof I_6, "data">]: never; }>(base?: I_6 | undefined): GetUserDataResponse;
|
|
311
311
|
fromPartial<I_7 extends {
|
|
312
312
|
data?: {
|
|
313
313
|
displayName?: string | undefined;
|
|
@@ -366,17 +366,17 @@ export declare const UserIdentityServiceDefinition: {
|
|
|
366
366
|
skinColor?: string | undefined;
|
|
367
367
|
hairColor?: string | undefined;
|
|
368
368
|
eyeColor?: string | undefined;
|
|
369
|
-
wearables?: (string[] & string[] & { [
|
|
369
|
+
wearables?: (string[] & string[] & { [K_4 in Exclude<keyof I_7["data"]["avatar"]["wearables"], keyof string[]>]: never; }) | undefined;
|
|
370
370
|
snapshots?: ({
|
|
371
371
|
face256?: string | undefined;
|
|
372
372
|
body?: string | undefined;
|
|
373
373
|
} & {
|
|
374
374
|
face256?: string | undefined;
|
|
375
375
|
body?: string | undefined;
|
|
376
|
-
} & { [
|
|
377
|
-
} & { [
|
|
378
|
-
} & { [
|
|
379
|
-
} & { [
|
|
376
|
+
} & { [K_5 in Exclude<keyof I_7["data"]["avatar"]["snapshots"], keyof import("../../common/sdk/user_data.gen").Snapshots>]: never; }) | undefined;
|
|
377
|
+
} & { [K_6 in Exclude<keyof I_7["data"]["avatar"], keyof import("../../common/sdk/user_data.gen").AvatarForUserData>]: never; }) | undefined;
|
|
378
|
+
} & { [K_7 in Exclude<keyof I_7["data"], keyof UserData>]: never; }) | undefined;
|
|
379
|
+
} & { [K_8 in Exclude<keyof I_7, "data">]: never; }>(object: I_7): GetUserDataResponse;
|
|
380
380
|
};
|
|
381
381
|
readonly responseStream: false;
|
|
382
382
|
readonly options: {};
|
|
@@ -1144,7 +1144,7 @@ export const EnvironmentApiServiceDefinition = {
|
|
|
1144
1144
|
name: "EnvironmentApiService",
|
|
1145
1145
|
fullName: "decentraland.kernel.apis.EnvironmentApiService",
|
|
1146
1146
|
methods: {
|
|
1147
|
-
/** @deprecated, only available for SDK6 compatibility */
|
|
1147
|
+
/** @deprecated, only available for SDK6 compatibility. Use runtime_api instead */
|
|
1148
1148
|
getBootstrapData: {
|
|
1149
1149
|
name: "GetBootstrapData",
|
|
1150
1150
|
requestType: GetBootstrapDataRequest,
|
|
@@ -1,14 +1,9 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Vector3 } from "../../common/vectors.gen";
|
|
3
4
|
|
|
4
5
|
export const protobufPackage = "decentraland.kernel.apis";
|
|
5
6
|
|
|
6
|
-
export interface Vector3 {
|
|
7
|
-
x: number;
|
|
8
|
-
y: number;
|
|
9
|
-
z: number;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
7
|
export interface MovePlayerToResponse {
|
|
13
8
|
}
|
|
14
9
|
|
|
@@ -53,90 +48,6 @@ export interface SuccessResponse {
|
|
|
53
48
|
success: boolean;
|
|
54
49
|
}
|
|
55
50
|
|
|
56
|
-
function createBaseVector3(): Vector3 {
|
|
57
|
-
return { x: 0, y: 0, z: 0 };
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export const Vector3 = {
|
|
61
|
-
encode(message: Vector3, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
62
|
-
if (message.x !== 0) {
|
|
63
|
-
writer.uint32(13).float(message.x);
|
|
64
|
-
}
|
|
65
|
-
if (message.y !== 0) {
|
|
66
|
-
writer.uint32(21).float(message.y);
|
|
67
|
-
}
|
|
68
|
-
if (message.z !== 0) {
|
|
69
|
-
writer.uint32(29).float(message.z);
|
|
70
|
-
}
|
|
71
|
-
return writer;
|
|
72
|
-
},
|
|
73
|
-
|
|
74
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Vector3 {
|
|
75
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
76
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
77
|
-
const message = createBaseVector3();
|
|
78
|
-
while (reader.pos < end) {
|
|
79
|
-
const tag = reader.uint32();
|
|
80
|
-
switch (tag >>> 3) {
|
|
81
|
-
case 1:
|
|
82
|
-
if (tag != 13) {
|
|
83
|
-
break;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
message.x = reader.float();
|
|
87
|
-
continue;
|
|
88
|
-
case 2:
|
|
89
|
-
if (tag != 21) {
|
|
90
|
-
break;
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
message.y = reader.float();
|
|
94
|
-
continue;
|
|
95
|
-
case 3:
|
|
96
|
-
if (tag != 29) {
|
|
97
|
-
break;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
message.z = reader.float();
|
|
101
|
-
continue;
|
|
102
|
-
}
|
|
103
|
-
if ((tag & 7) == 4 || tag == 0) {
|
|
104
|
-
break;
|
|
105
|
-
}
|
|
106
|
-
reader.skipType(tag & 7);
|
|
107
|
-
}
|
|
108
|
-
return message;
|
|
109
|
-
},
|
|
110
|
-
|
|
111
|
-
fromJSON(object: any): Vector3 {
|
|
112
|
-
return {
|
|
113
|
-
x: isSet(object.x) ? Number(object.x) : 0,
|
|
114
|
-
y: isSet(object.y) ? Number(object.y) : 0,
|
|
115
|
-
z: isSet(object.z) ? Number(object.z) : 0,
|
|
116
|
-
};
|
|
117
|
-
},
|
|
118
|
-
|
|
119
|
-
toJSON(message: Vector3): unknown {
|
|
120
|
-
const obj: any = {};
|
|
121
|
-
message.x !== undefined && (obj.x = message.x);
|
|
122
|
-
message.y !== undefined && (obj.y = message.y);
|
|
123
|
-
message.z !== undefined && (obj.z = message.z);
|
|
124
|
-
return obj;
|
|
125
|
-
},
|
|
126
|
-
|
|
127
|
-
create<I extends Exact<DeepPartial<Vector3>, I>>(base?: I): Vector3 {
|
|
128
|
-
return Vector3.fromPartial(base ?? {});
|
|
129
|
-
},
|
|
130
|
-
|
|
131
|
-
fromPartial<I extends Exact<DeepPartial<Vector3>, I>>(object: I): Vector3 {
|
|
132
|
-
const message = createBaseVector3();
|
|
133
|
-
message.x = object.x ?? 0;
|
|
134
|
-
message.y = object.y ?? 0;
|
|
135
|
-
message.z = object.z ?? 0;
|
|
136
|
-
return message;
|
|
137
|
-
},
|
|
138
|
-
};
|
|
139
|
-
|
|
140
51
|
function createBaseMovePlayerToResponse(): MovePlayerToResponse {
|
|
141
52
|
return {};
|
|
142
53
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { ContentMapping } from "../../common/content_mapping.gen";
|
|
3
4
|
|
|
4
5
|
export const protobufPackage = "decentraland.kernel.apis";
|
|
5
6
|
|
|
@@ -25,6 +26,32 @@ export interface GetRealmRequest {
|
|
|
25
26
|
export interface GetWorldTimeRequest {
|
|
26
27
|
}
|
|
27
28
|
|
|
29
|
+
export interface ReadFileRequest {
|
|
30
|
+
/** name of the deployed file */
|
|
31
|
+
fileName: string;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface ReadFileResponse {
|
|
35
|
+
/** contents of the file */
|
|
36
|
+
content: Uint8Array;
|
|
37
|
+
/** deployed hash/CID */
|
|
38
|
+
hash: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export interface CurrentSceneEntityRequest {
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface CurrentSceneEntityResponse {
|
|
45
|
+
/** this is either the entityId or the full URN of the scene that is running */
|
|
46
|
+
urn: string;
|
|
47
|
+
/** contents of the deployed entities */
|
|
48
|
+
content: ContentMapping[];
|
|
49
|
+
/** JSON serialization of the entity.metadata field */
|
|
50
|
+
metadataJson: string;
|
|
51
|
+
/** baseUrl used to resolve all content files */
|
|
52
|
+
baseUrl: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
28
55
|
function createBaseRealmInfo(): RealmInfo {
|
|
29
56
|
return { baseUrl: "", realmName: "", networkId: 0, commsAdapter: "", isPreview: false };
|
|
30
57
|
}
|
|
@@ -338,6 +365,279 @@ export const GetWorldTimeRequest = {
|
|
|
338
365
|
},
|
|
339
366
|
};
|
|
340
367
|
|
|
368
|
+
function createBaseReadFileRequest(): ReadFileRequest {
|
|
369
|
+
return { fileName: "" };
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
export const ReadFileRequest = {
|
|
373
|
+
encode(message: ReadFileRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
374
|
+
if (message.fileName !== "") {
|
|
375
|
+
writer.uint32(10).string(message.fileName);
|
|
376
|
+
}
|
|
377
|
+
return writer;
|
|
378
|
+
},
|
|
379
|
+
|
|
380
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ReadFileRequest {
|
|
381
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
382
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
383
|
+
const message = createBaseReadFileRequest();
|
|
384
|
+
while (reader.pos < end) {
|
|
385
|
+
const tag = reader.uint32();
|
|
386
|
+
switch (tag >>> 3) {
|
|
387
|
+
case 1:
|
|
388
|
+
if (tag != 10) {
|
|
389
|
+
break;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
message.fileName = reader.string();
|
|
393
|
+
continue;
|
|
394
|
+
}
|
|
395
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
396
|
+
break;
|
|
397
|
+
}
|
|
398
|
+
reader.skipType(tag & 7);
|
|
399
|
+
}
|
|
400
|
+
return message;
|
|
401
|
+
},
|
|
402
|
+
|
|
403
|
+
fromJSON(object: any): ReadFileRequest {
|
|
404
|
+
return { fileName: isSet(object.fileName) ? String(object.fileName) : "" };
|
|
405
|
+
},
|
|
406
|
+
|
|
407
|
+
toJSON(message: ReadFileRequest): unknown {
|
|
408
|
+
const obj: any = {};
|
|
409
|
+
message.fileName !== undefined && (obj.fileName = message.fileName);
|
|
410
|
+
return obj;
|
|
411
|
+
},
|
|
412
|
+
|
|
413
|
+
create<I extends Exact<DeepPartial<ReadFileRequest>, I>>(base?: I): ReadFileRequest {
|
|
414
|
+
return ReadFileRequest.fromPartial(base ?? {});
|
|
415
|
+
},
|
|
416
|
+
|
|
417
|
+
fromPartial<I extends Exact<DeepPartial<ReadFileRequest>, I>>(object: I): ReadFileRequest {
|
|
418
|
+
const message = createBaseReadFileRequest();
|
|
419
|
+
message.fileName = object.fileName ?? "";
|
|
420
|
+
return message;
|
|
421
|
+
},
|
|
422
|
+
};
|
|
423
|
+
|
|
424
|
+
function createBaseReadFileResponse(): ReadFileResponse {
|
|
425
|
+
return { content: new Uint8Array(), hash: "" };
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
export const ReadFileResponse = {
|
|
429
|
+
encode(message: ReadFileResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
430
|
+
if (message.content.length !== 0) {
|
|
431
|
+
writer.uint32(10).bytes(message.content);
|
|
432
|
+
}
|
|
433
|
+
if (message.hash !== "") {
|
|
434
|
+
writer.uint32(18).string(message.hash);
|
|
435
|
+
}
|
|
436
|
+
return writer;
|
|
437
|
+
},
|
|
438
|
+
|
|
439
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): ReadFileResponse {
|
|
440
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
441
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
442
|
+
const message = createBaseReadFileResponse();
|
|
443
|
+
while (reader.pos < end) {
|
|
444
|
+
const tag = reader.uint32();
|
|
445
|
+
switch (tag >>> 3) {
|
|
446
|
+
case 1:
|
|
447
|
+
if (tag != 10) {
|
|
448
|
+
break;
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
message.content = reader.bytes();
|
|
452
|
+
continue;
|
|
453
|
+
case 2:
|
|
454
|
+
if (tag != 18) {
|
|
455
|
+
break;
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
message.hash = reader.string();
|
|
459
|
+
continue;
|
|
460
|
+
}
|
|
461
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
462
|
+
break;
|
|
463
|
+
}
|
|
464
|
+
reader.skipType(tag & 7);
|
|
465
|
+
}
|
|
466
|
+
return message;
|
|
467
|
+
},
|
|
468
|
+
|
|
469
|
+
fromJSON(object: any): ReadFileResponse {
|
|
470
|
+
return {
|
|
471
|
+
content: isSet(object.content) ? bytesFromBase64(object.content) : new Uint8Array(),
|
|
472
|
+
hash: isSet(object.hash) ? String(object.hash) : "",
|
|
473
|
+
};
|
|
474
|
+
},
|
|
475
|
+
|
|
476
|
+
toJSON(message: ReadFileResponse): unknown {
|
|
477
|
+
const obj: any = {};
|
|
478
|
+
message.content !== undefined &&
|
|
479
|
+
(obj.content = base64FromBytes(message.content !== undefined ? message.content : new Uint8Array()));
|
|
480
|
+
message.hash !== undefined && (obj.hash = message.hash);
|
|
481
|
+
return obj;
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
create<I extends Exact<DeepPartial<ReadFileResponse>, I>>(base?: I): ReadFileResponse {
|
|
485
|
+
return ReadFileResponse.fromPartial(base ?? {});
|
|
486
|
+
},
|
|
487
|
+
|
|
488
|
+
fromPartial<I extends Exact<DeepPartial<ReadFileResponse>, I>>(object: I): ReadFileResponse {
|
|
489
|
+
const message = createBaseReadFileResponse();
|
|
490
|
+
message.content = object.content ?? new Uint8Array();
|
|
491
|
+
message.hash = object.hash ?? "";
|
|
492
|
+
return message;
|
|
493
|
+
},
|
|
494
|
+
};
|
|
495
|
+
|
|
496
|
+
function createBaseCurrentSceneEntityRequest(): CurrentSceneEntityRequest {
|
|
497
|
+
return {};
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export const CurrentSceneEntityRequest = {
|
|
501
|
+
encode(_: CurrentSceneEntityRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
502
|
+
return writer;
|
|
503
|
+
},
|
|
504
|
+
|
|
505
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CurrentSceneEntityRequest {
|
|
506
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
507
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
508
|
+
const message = createBaseCurrentSceneEntityRequest();
|
|
509
|
+
while (reader.pos < end) {
|
|
510
|
+
const tag = reader.uint32();
|
|
511
|
+
switch (tag >>> 3) {
|
|
512
|
+
}
|
|
513
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
514
|
+
break;
|
|
515
|
+
}
|
|
516
|
+
reader.skipType(tag & 7);
|
|
517
|
+
}
|
|
518
|
+
return message;
|
|
519
|
+
},
|
|
520
|
+
|
|
521
|
+
fromJSON(_: any): CurrentSceneEntityRequest {
|
|
522
|
+
return {};
|
|
523
|
+
},
|
|
524
|
+
|
|
525
|
+
toJSON(_: CurrentSceneEntityRequest): unknown {
|
|
526
|
+
const obj: any = {};
|
|
527
|
+
return obj;
|
|
528
|
+
},
|
|
529
|
+
|
|
530
|
+
create<I extends Exact<DeepPartial<CurrentSceneEntityRequest>, I>>(base?: I): CurrentSceneEntityRequest {
|
|
531
|
+
return CurrentSceneEntityRequest.fromPartial(base ?? {});
|
|
532
|
+
},
|
|
533
|
+
|
|
534
|
+
fromPartial<I extends Exact<DeepPartial<CurrentSceneEntityRequest>, I>>(_: I): CurrentSceneEntityRequest {
|
|
535
|
+
const message = createBaseCurrentSceneEntityRequest();
|
|
536
|
+
return message;
|
|
537
|
+
},
|
|
538
|
+
};
|
|
539
|
+
|
|
540
|
+
function createBaseCurrentSceneEntityResponse(): CurrentSceneEntityResponse {
|
|
541
|
+
return { urn: "", content: [], metadataJson: "", baseUrl: "" };
|
|
542
|
+
}
|
|
543
|
+
|
|
544
|
+
export const CurrentSceneEntityResponse = {
|
|
545
|
+
encode(message: CurrentSceneEntityResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
546
|
+
if (message.urn !== "") {
|
|
547
|
+
writer.uint32(10).string(message.urn);
|
|
548
|
+
}
|
|
549
|
+
for (const v of message.content) {
|
|
550
|
+
ContentMapping.encode(v!, writer.uint32(18).fork()).ldelim();
|
|
551
|
+
}
|
|
552
|
+
if (message.metadataJson !== "") {
|
|
553
|
+
writer.uint32(26).string(message.metadataJson);
|
|
554
|
+
}
|
|
555
|
+
if (message.baseUrl !== "") {
|
|
556
|
+
writer.uint32(34).string(message.baseUrl);
|
|
557
|
+
}
|
|
558
|
+
return writer;
|
|
559
|
+
},
|
|
560
|
+
|
|
561
|
+
decode(input: _m0.Reader | Uint8Array, length?: number): CurrentSceneEntityResponse {
|
|
562
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
563
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
564
|
+
const message = createBaseCurrentSceneEntityResponse();
|
|
565
|
+
while (reader.pos < end) {
|
|
566
|
+
const tag = reader.uint32();
|
|
567
|
+
switch (tag >>> 3) {
|
|
568
|
+
case 1:
|
|
569
|
+
if (tag != 10) {
|
|
570
|
+
break;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
message.urn = reader.string();
|
|
574
|
+
continue;
|
|
575
|
+
case 2:
|
|
576
|
+
if (tag != 18) {
|
|
577
|
+
break;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
message.content.push(ContentMapping.decode(reader, reader.uint32()));
|
|
581
|
+
continue;
|
|
582
|
+
case 3:
|
|
583
|
+
if (tag != 26) {
|
|
584
|
+
break;
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
message.metadataJson = reader.string();
|
|
588
|
+
continue;
|
|
589
|
+
case 4:
|
|
590
|
+
if (tag != 34) {
|
|
591
|
+
break;
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
message.baseUrl = reader.string();
|
|
595
|
+
continue;
|
|
596
|
+
}
|
|
597
|
+
if ((tag & 7) == 4 || tag == 0) {
|
|
598
|
+
break;
|
|
599
|
+
}
|
|
600
|
+
reader.skipType(tag & 7);
|
|
601
|
+
}
|
|
602
|
+
return message;
|
|
603
|
+
},
|
|
604
|
+
|
|
605
|
+
fromJSON(object: any): CurrentSceneEntityResponse {
|
|
606
|
+
return {
|
|
607
|
+
urn: isSet(object.urn) ? String(object.urn) : "",
|
|
608
|
+
content: Array.isArray(object?.content) ? object.content.map((e: any) => ContentMapping.fromJSON(e)) : [],
|
|
609
|
+
metadataJson: isSet(object.metadataJson) ? String(object.metadataJson) : "",
|
|
610
|
+
baseUrl: isSet(object.baseUrl) ? String(object.baseUrl) : "",
|
|
611
|
+
};
|
|
612
|
+
},
|
|
613
|
+
|
|
614
|
+
toJSON(message: CurrentSceneEntityResponse): unknown {
|
|
615
|
+
const obj: any = {};
|
|
616
|
+
message.urn !== undefined && (obj.urn = message.urn);
|
|
617
|
+
if (message.content) {
|
|
618
|
+
obj.content = message.content.map((e) => e ? ContentMapping.toJSON(e) : undefined);
|
|
619
|
+
} else {
|
|
620
|
+
obj.content = [];
|
|
621
|
+
}
|
|
622
|
+
message.metadataJson !== undefined && (obj.metadataJson = message.metadataJson);
|
|
623
|
+
message.baseUrl !== undefined && (obj.baseUrl = message.baseUrl);
|
|
624
|
+
return obj;
|
|
625
|
+
},
|
|
626
|
+
|
|
627
|
+
create<I extends Exact<DeepPartial<CurrentSceneEntityResponse>, I>>(base?: I): CurrentSceneEntityResponse {
|
|
628
|
+
return CurrentSceneEntityResponse.fromPartial(base ?? {});
|
|
629
|
+
},
|
|
630
|
+
|
|
631
|
+
fromPartial<I extends Exact<DeepPartial<CurrentSceneEntityResponse>, I>>(object: I): CurrentSceneEntityResponse {
|
|
632
|
+
const message = createBaseCurrentSceneEntityResponse();
|
|
633
|
+
message.urn = object.urn ?? "";
|
|
634
|
+
message.content = object.content?.map((e) => ContentMapping.fromPartial(e)) || [];
|
|
635
|
+
message.metadataJson = object.metadataJson ?? "";
|
|
636
|
+
message.baseUrl = object.baseUrl ?? "";
|
|
637
|
+
return message;
|
|
638
|
+
},
|
|
639
|
+
};
|
|
640
|
+
|
|
341
641
|
export type RuntimeServiceDefinition = typeof RuntimeServiceDefinition;
|
|
342
642
|
export const RuntimeServiceDefinition = {
|
|
343
643
|
name: "RuntimeService",
|
|
@@ -364,9 +664,76 @@ export const RuntimeServiceDefinition = {
|
|
|
364
664
|
responseStream: false,
|
|
365
665
|
options: {},
|
|
366
666
|
},
|
|
667
|
+
/**
|
|
668
|
+
* Returns the file content of a deployed asset. If the file doesn't
|
|
669
|
+
* exist or cannot be retrieved, the RPC call throws an error.
|
|
670
|
+
* This method is called to load any assets deployed among the scene,
|
|
671
|
+
* runtime may cache this response much more than the provided "fetch" function.
|
|
672
|
+
*/
|
|
673
|
+
readFile: {
|
|
674
|
+
name: "ReadFile",
|
|
675
|
+
requestType: ReadFileRequest,
|
|
676
|
+
requestStream: false,
|
|
677
|
+
responseType: ReadFileResponse,
|
|
678
|
+
responseStream: false,
|
|
679
|
+
options: {},
|
|
680
|
+
},
|
|
681
|
+
/** Returns information about the current scene. This is the replacement of GetBootstrapData */
|
|
682
|
+
getSceneInformation: {
|
|
683
|
+
name: "GetSceneInformation",
|
|
684
|
+
requestType: CurrentSceneEntityRequest,
|
|
685
|
+
requestStream: false,
|
|
686
|
+
responseType: CurrentSceneEntityResponse,
|
|
687
|
+
responseStream: false,
|
|
688
|
+
options: {},
|
|
689
|
+
},
|
|
367
690
|
},
|
|
368
691
|
} as const;
|
|
369
692
|
|
|
693
|
+
declare var self: any | undefined;
|
|
694
|
+
declare var window: any | undefined;
|
|
695
|
+
declare var global: any | undefined;
|
|
696
|
+
var tsProtoGlobalThis: any = (() => {
|
|
697
|
+
if (typeof globalThis !== "undefined") {
|
|
698
|
+
return globalThis;
|
|
699
|
+
}
|
|
700
|
+
if (typeof self !== "undefined") {
|
|
701
|
+
return self;
|
|
702
|
+
}
|
|
703
|
+
if (typeof window !== "undefined") {
|
|
704
|
+
return window;
|
|
705
|
+
}
|
|
706
|
+
if (typeof global !== "undefined") {
|
|
707
|
+
return global;
|
|
708
|
+
}
|
|
709
|
+
throw "Unable to locate global object";
|
|
710
|
+
})();
|
|
711
|
+
|
|
712
|
+
function bytesFromBase64(b64: string): Uint8Array {
|
|
713
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
714
|
+
return Uint8Array.from(tsProtoGlobalThis.Buffer.from(b64, "base64"));
|
|
715
|
+
} else {
|
|
716
|
+
const bin = tsProtoGlobalThis.atob(b64);
|
|
717
|
+
const arr = new Uint8Array(bin.length);
|
|
718
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
719
|
+
arr[i] = bin.charCodeAt(i);
|
|
720
|
+
}
|
|
721
|
+
return arr;
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
|
|
725
|
+
function base64FromBytes(arr: Uint8Array): string {
|
|
726
|
+
if (tsProtoGlobalThis.Buffer) {
|
|
727
|
+
return tsProtoGlobalThis.Buffer.from(arr).toString("base64");
|
|
728
|
+
} else {
|
|
729
|
+
const bin: string[] = [];
|
|
730
|
+
arr.forEach((byte) => {
|
|
731
|
+
bin.push(String.fromCharCode(byte));
|
|
732
|
+
});
|
|
733
|
+
return tsProtoGlobalThis.btoa(bin.join(""));
|
|
734
|
+
}
|
|
735
|
+
}
|
|
736
|
+
|
|
370
737
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
371
738
|
|
|
372
739
|
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-4671230683.commit-a8d74c3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,13 +12,13 @@
|
|
|
12
12
|
"devDependencies": {
|
|
13
13
|
"@protobuf-ts/protoc": "^2.8.1",
|
|
14
14
|
"proto-compatibility-tool": "^1.1.2-20220925163655.commit-25bd040",
|
|
15
|
-
"typescript": "^
|
|
15
|
+
"typescript": "^5.0.4"
|
|
16
16
|
},
|
|
17
17
|
"config": {
|
|
18
|
-
"protocVersion": "
|
|
18
|
+
"protocVersion": "22.2"
|
|
19
19
|
},
|
|
20
20
|
"dependencies": {
|
|
21
|
-
"ts-proto": "^1.
|
|
21
|
+
"ts-proto": "^1.146.0"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"proto",
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"out-js",
|
|
27
27
|
"public"
|
|
28
28
|
],
|
|
29
|
-
"commit": "
|
|
29
|
+
"commit": "a8d74c3545b254f2a6359e0924b3e8e1ab5ea537"
|
|
30
30
|
}
|
|
@@ -59,7 +59,7 @@ message GetExplorerConfigurationRequest {}
|
|
|
59
59
|
message GetDecentralandTimeRequest {}
|
|
60
60
|
|
|
61
61
|
service EnvironmentApiService {
|
|
62
|
-
// @deprecated, only available for SDK6 compatibility
|
|
62
|
+
// @deprecated, only available for SDK6 compatibility. Use runtime_api instead
|
|
63
63
|
rpc GetBootstrapData(GetBootstrapDataRequest) returns (BootstrapDataResponse) {}
|
|
64
64
|
// @deprecated, only available for SDK6 compatibility. Needs migration
|
|
65
65
|
rpc IsPreviewMode(IsPreviewModeRequest) returns (PreviewModeResponse) {}
|
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
package decentraland.kernel.apis;
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
float x = 1;
|
|
6
|
-
float y = 2;
|
|
7
|
-
float z = 3;
|
|
8
|
-
}
|
|
4
|
+
import "decentraland/common/vectors.proto";
|
|
9
5
|
|
|
10
6
|
message MovePlayerToResponse { }
|
|
11
7
|
|
|
12
8
|
message MovePlayerToRequest {
|
|
13
|
-
Vector3 new_relative_position = 1;
|
|
14
|
-
optional Vector3 camera_target = 2;
|
|
9
|
+
decentraland.common.Vector3 new_relative_position = 1;
|
|
10
|
+
optional decentraland.common.Vector3 camera_target = 2;
|
|
15
11
|
}
|
|
16
12
|
|
|
17
13
|
message TeleportToRequest {
|
|
18
|
-
Vector3 world_position = 1;
|
|
19
|
-
optional Vector3 camera_target = 2;
|
|
14
|
+
decentraland.common.Vector3 world_position = 1;
|
|
15
|
+
optional decentraland.common.Vector3 camera_target = 2;
|
|
20
16
|
}
|
|
21
17
|
|
|
22
18
|
message TriggerEmoteResponse { }
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
package decentraland.kernel.apis;
|
|
3
3
|
|
|
4
|
+
import "decentraland/common/content_mapping.proto";
|
|
5
|
+
|
|
4
6
|
// This API will contain all the information related to the world runtime.
|
|
5
7
|
// Things related to the user, players or the scene itself has they own api, and
|
|
6
8
|
// won't live here. (UserIdentity, Players, ParcelIdentity)
|
|
@@ -24,10 +26,40 @@ message GetWorldTimeResponse {
|
|
|
24
26
|
message GetRealmRequest {}
|
|
25
27
|
message GetWorldTimeRequest {}
|
|
26
28
|
|
|
29
|
+
message ReadFileRequest {
|
|
30
|
+
// name of the deployed file
|
|
31
|
+
string file_name = 1;
|
|
32
|
+
}
|
|
33
|
+
message ReadFileResponse {
|
|
34
|
+
// contents of the file
|
|
35
|
+
bytes content = 1;
|
|
36
|
+
// deployed hash/CID
|
|
37
|
+
string hash = 2;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
message CurrentSceneEntityRequest {}
|
|
41
|
+
message CurrentSceneEntityResponse {
|
|
42
|
+
// this is either the entityId or the full URN of the scene that is running
|
|
43
|
+
string urn = 1;
|
|
44
|
+
// contents of the deployed entities
|
|
45
|
+
repeated decentraland.common.ContentMapping content = 2;
|
|
46
|
+
// JSON serialization of the entity.metadata field
|
|
47
|
+
string metadata_json = 3;
|
|
48
|
+
// baseUrl used to resolve all content files
|
|
49
|
+
string base_url = 4;
|
|
50
|
+
}
|
|
51
|
+
|
|
27
52
|
service RuntimeService {
|
|
28
53
|
// Provides information about the current realm
|
|
29
54
|
rpc GetRealm(GetRealmRequest) returns (GetRealmResponse) {}
|
|
30
55
|
// Provides information about the Decentraland Time, which is coordinated
|
|
31
56
|
// across players.
|
|
32
57
|
rpc GetWorldTime(GetWorldTimeRequest) returns (GetWorldTimeResponse) {}
|
|
58
|
+
// Returns the file content of a deployed asset. If the file doesn't
|
|
59
|
+
// exist or cannot be retrieved, the RPC call throws an error.
|
|
60
|
+
// This method is called to load any assets deployed among the scene,
|
|
61
|
+
// runtime may cache this response much more than the provided "fetch" function.
|
|
62
|
+
rpc ReadFile(ReadFileRequest) returns (ReadFileResponse) {}
|
|
63
|
+
// Returns information about the current scene. This is the replacement of GetBootstrapData
|
|
64
|
+
rpc GetSceneInformation(CurrentSceneEntityRequest) returns (CurrentSceneEntityResponse) {}
|
|
33
65
|
}
|