@dcl/protocol 1.0.0-5810343446.commit-4ee6d08 → 1.0.0-5824184720.commit-b3b5ebf
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/comms_api.gen.d.ts +9 -0
- package/out-js/decentraland/kernel/apis/comms_api.gen.js +54 -3
- package/out-js/decentraland/kernel/apis/comms_api.gen.js.map +1 -1
- package/out-js/decentraland/sdk/components/avatar_base.gen.d.ts +36 -0
- package/out-js/decentraland/sdk/components/avatar_base.gen.js +129 -0
- package/out-js/decentraland/sdk/components/avatar_base.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/avatar_emote_command.gen.d.ts +46 -0
- package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js +147 -0
- package/out-js/decentraland/sdk/components/avatar_emote_command.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.d.ts +36 -0
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js +90 -0
- package/out-js/decentraland/sdk/components/avatar_equipped_data.gen.js.map +1 -0
- package/out-js/decentraland/sdk/components/player_identity_data.gen.d.ts +37 -0
- package/out-js/decentraland/sdk/components/player_identity_data.gen.js +83 -0
- package/out-js/decentraland/sdk/components/player_identity_data.gen.js.map +1 -0
- package/out-ts/decentraland/kernel/apis/comms_api.gen.ts +54 -1
- package/out-ts/decentraland/sdk/components/avatar_base.gen.ts +149 -0
- package/out-ts/decentraland/sdk/components/avatar_emote_command.gen.ts +176 -0
- package/out-ts/decentraland/sdk/components/avatar_equipped_data.gen.ts +105 -0
- package/out-ts/decentraland/sdk/components/player_identity_data.gen.ts +102 -0
- package/package.json +2 -2
- package/proto/decentraland/kernel/apis/comms_api.proto +7 -0
- package/proto/decentraland/sdk/components/avatar_base.proto +15 -0
- package/proto/decentraland/sdk/components/avatar_emote_command.proto +16 -0
- package/proto/decentraland/sdk/components/avatar_equipped_data.proto +13 -0
- package/proto/decentraland/sdk/components/player_identity_data.proto +13 -0
- package/public/sdk-components.proto +4 -1
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
|
|
4
|
+
export const protobufPackage = "decentraland.sdk.components";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AvatarEquipData is used to read the information about the avatar's owneables.
|
|
8
|
+
* this component is written by the engine using the communications transports'
|
|
9
|
+
* data.
|
|
10
|
+
*/
|
|
11
|
+
export interface PBAvatarEquippedData {
|
|
12
|
+
wearableUrns: string[];
|
|
13
|
+
emotesUrns: string[];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createBasePBAvatarEquippedData(): PBAvatarEquippedData {
|
|
17
|
+
return { wearableUrns: [], emotesUrns: [] };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace PBAvatarEquippedData {
|
|
21
|
+
export function encode(message: PBAvatarEquippedData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
22
|
+
for (const v of message.wearableUrns) {
|
|
23
|
+
writer.uint32(10).string(v!);
|
|
24
|
+
}
|
|
25
|
+
for (const v of message.emotesUrns) {
|
|
26
|
+
writer.uint32(18).string(v!);
|
|
27
|
+
}
|
|
28
|
+
return writer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEquippedData {
|
|
32
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
33
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
34
|
+
const message = createBasePBAvatarEquippedData();
|
|
35
|
+
while (reader.pos < end) {
|
|
36
|
+
const tag = reader.uint32();
|
|
37
|
+
switch (tag >>> 3) {
|
|
38
|
+
case 1:
|
|
39
|
+
if (tag !== 10) {
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
message.wearableUrns.push(reader.string());
|
|
44
|
+
continue;
|
|
45
|
+
case 2:
|
|
46
|
+
if (tag !== 18) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message.emotesUrns.push(reader.string());
|
|
51
|
+
continue;
|
|
52
|
+
}
|
|
53
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
54
|
+
break;
|
|
55
|
+
}
|
|
56
|
+
reader.skipType(tag & 7);
|
|
57
|
+
}
|
|
58
|
+
return message;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function fromJSON(object: any): PBAvatarEquippedData {
|
|
62
|
+
return {
|
|
63
|
+
wearableUrns: Array.isArray(object?.wearableUrns) ? object.wearableUrns.map((e: any) => String(e)) : [],
|
|
64
|
+
emotesUrns: Array.isArray(object?.emotesUrns) ? object.emotesUrns.map((e: any) => String(e)) : [],
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function toJSON(message: PBAvatarEquippedData): unknown {
|
|
69
|
+
const obj: any = {};
|
|
70
|
+
if (message.wearableUrns) {
|
|
71
|
+
obj.wearableUrns = message.wearableUrns.map((e) => e);
|
|
72
|
+
} else {
|
|
73
|
+
obj.wearableUrns = [];
|
|
74
|
+
}
|
|
75
|
+
if (message.emotesUrns) {
|
|
76
|
+
obj.emotesUrns = message.emotesUrns.map((e) => e);
|
|
77
|
+
} else {
|
|
78
|
+
obj.emotesUrns = [];
|
|
79
|
+
}
|
|
80
|
+
return obj;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function create<I extends Exact<DeepPartial<PBAvatarEquippedData>, I>>(base?: I): PBAvatarEquippedData {
|
|
84
|
+
return PBAvatarEquippedData.fromPartial(base ?? {});
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarEquippedData>, I>>(object: I): PBAvatarEquippedData {
|
|
88
|
+
const message = createBasePBAvatarEquippedData();
|
|
89
|
+
message.wearableUrns = object.wearableUrns?.map((e) => e) || [];
|
|
90
|
+
message.emotesUrns = object.emotesUrns?.map((e) => e) || [];
|
|
91
|
+
return message;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
96
|
+
|
|
97
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
98
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
99
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
100
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
101
|
+
: Partial<T>;
|
|
102
|
+
|
|
103
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
104
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
105
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
|
|
4
|
+
export const protobufPackage = "decentraland.sdk.components";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* PlayerIdentityData is used to read the information about the avatar's
|
|
8
|
+
* identity. this component is written by the engine using the communications
|
|
9
|
+
* transports' data.
|
|
10
|
+
*/
|
|
11
|
+
export interface PBPlayerIdentityData {
|
|
12
|
+
/** ethereum address of this player */
|
|
13
|
+
address: string;
|
|
14
|
+
isGuest: boolean;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function createBasePBPlayerIdentityData(): PBPlayerIdentityData {
|
|
18
|
+
return { address: "", isGuest: false };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export namespace PBPlayerIdentityData {
|
|
22
|
+
export function encode(message: PBPlayerIdentityData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
23
|
+
if (message.address !== "") {
|
|
24
|
+
writer.uint32(10).string(message.address);
|
|
25
|
+
}
|
|
26
|
+
if (message.isGuest === true) {
|
|
27
|
+
writer.uint32(24).bool(message.isGuest);
|
|
28
|
+
}
|
|
29
|
+
return writer;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBPlayerIdentityData {
|
|
33
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
34
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
35
|
+
const message = createBasePBPlayerIdentityData();
|
|
36
|
+
while (reader.pos < end) {
|
|
37
|
+
const tag = reader.uint32();
|
|
38
|
+
switch (tag >>> 3) {
|
|
39
|
+
case 1:
|
|
40
|
+
if (tag !== 10) {
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
message.address = reader.string();
|
|
45
|
+
continue;
|
|
46
|
+
case 3:
|
|
47
|
+
if (tag !== 24) {
|
|
48
|
+
break;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
message.isGuest = reader.bool();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
55
|
+
break;
|
|
56
|
+
}
|
|
57
|
+
reader.skipType(tag & 7);
|
|
58
|
+
}
|
|
59
|
+
return message;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function fromJSON(object: any): PBPlayerIdentityData {
|
|
63
|
+
return {
|
|
64
|
+
address: isSet(object.address) ? String(object.address) : "",
|
|
65
|
+
isGuest: isSet(object.isGuest) ? Boolean(object.isGuest) : false,
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function toJSON(message: PBPlayerIdentityData): unknown {
|
|
70
|
+
const obj: any = {};
|
|
71
|
+
message.address !== undefined && (obj.address = message.address);
|
|
72
|
+
message.isGuest !== undefined && (obj.isGuest = message.isGuest);
|
|
73
|
+
return obj;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function create<I extends Exact<DeepPartial<PBPlayerIdentityData>, I>>(base?: I): PBPlayerIdentityData {
|
|
77
|
+
return PBPlayerIdentityData.fromPartial(base ?? {});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
export function fromPartial<I extends Exact<DeepPartial<PBPlayerIdentityData>, I>>(object: I): PBPlayerIdentityData {
|
|
81
|
+
const message = createBasePBPlayerIdentityData();
|
|
82
|
+
message.address = object.address ?? "";
|
|
83
|
+
message.isGuest = object.isGuest ?? false;
|
|
84
|
+
return message;
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
89
|
+
|
|
90
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
91
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
92
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
93
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
94
|
+
: Partial<T>;
|
|
95
|
+
|
|
96
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
97
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
98
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
99
|
+
|
|
100
|
+
function isSet(value: any): boolean {
|
|
101
|
+
return value !== null && value !== undefined;
|
|
102
|
+
}
|
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-5824184720.commit-b3b5ebf",
|
|
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": "b3b5ebfeb9468854c4d492df514113421a572916"
|
|
33
33
|
}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
package decentraland.kernel.apis;
|
|
3
3
|
|
|
4
|
+
enum VideoTrackSourceType {
|
|
5
|
+
VTST_UNKNOWN = 0;
|
|
6
|
+
VTST_CAMERA = 1;
|
|
7
|
+
VTST_SCREEN_SHARE = 2;
|
|
8
|
+
}
|
|
9
|
+
|
|
4
10
|
message VideoTracksActiveStreamsRequest {
|
|
5
11
|
}
|
|
6
12
|
|
|
@@ -11,6 +17,7 @@ message VideoTracksActiveStreamsResponse {
|
|
|
11
17
|
message VideoTracksActiveStreamsData {
|
|
12
18
|
string identity = 1;
|
|
13
19
|
string track_sid = 2;
|
|
20
|
+
VideoTrackSourceType source_type = 3;
|
|
14
21
|
}
|
|
15
22
|
|
|
16
23
|
service CommsApiService {
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
|
|
2
|
+
syntax = "proto3";
|
|
3
|
+
package decentraland.sdk.components;
|
|
4
|
+
import "decentraland/common/colors.proto";
|
|
5
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
6
|
+
option (common.ecs_component_id) = 1087;
|
|
7
|
+
|
|
8
|
+
// AvatarBase sets all modifiers over the avatar's apparence.
|
|
9
|
+
message PBAvatarBase {
|
|
10
|
+
decentraland.common.Color3 skin_color = 1;
|
|
11
|
+
decentraland.common.Color3 eyes_color = 2;
|
|
12
|
+
decentraland.common.Color3 hair_color = 3;
|
|
13
|
+
string body_shape_urn = 4;
|
|
14
|
+
string name = 5;
|
|
15
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1088;
|
|
6
|
+
|
|
7
|
+
// AvatarEmoteCommand is a grow only value set, used to signal the renderer about
|
|
8
|
+
// avatar emotes playback.
|
|
9
|
+
message PBAvatarEmoteCommand {
|
|
10
|
+
message EmoteCommand {
|
|
11
|
+
string emote_urn = 1;
|
|
12
|
+
bool loop = 2;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
EmoteCommand emote_command = 1;
|
|
16
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1091;
|
|
6
|
+
|
|
7
|
+
// AvatarEquipData is used to read the information about the avatar's owneables.
|
|
8
|
+
// this component is written by the engine using the communications transports'
|
|
9
|
+
// data.
|
|
10
|
+
message PBAvatarEquippedData {
|
|
11
|
+
repeated string wearable_urns = 1;
|
|
12
|
+
repeated string emotes_urns = 2;
|
|
13
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
syntax = "proto3";
|
|
2
|
+
package decentraland.sdk.components;
|
|
3
|
+
|
|
4
|
+
import "decentraland/sdk/components/common/id.proto";
|
|
5
|
+
option (common.ecs_component_id) = 1089;
|
|
6
|
+
|
|
7
|
+
// PlayerIdentityData is used to read the information about the avatar's
|
|
8
|
+
// identity. this component is written by the engine using the communications
|
|
9
|
+
// transports' data.
|
|
10
|
+
message PBPlayerIdentityData {
|
|
11
|
+
string address = 1; // ethereum address of this player
|
|
12
|
+
bool is_guest = 3;
|
|
13
|
+
}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
syntax = "proto3";
|
|
2
2
|
|
|
3
3
|
package decentraland.sdk.components;
|
|
4
|
-
|
|
5
4
|
import public "decentraland/sdk/components/animator.proto";
|
|
6
5
|
import public "decentraland/sdk/components/audio_source.proto";
|
|
7
6
|
import public "decentraland/sdk/components/audio_stream.proto";
|
|
8
7
|
import public "decentraland/sdk/components/avatar_attach.proto";
|
|
8
|
+
import public "decentraland/sdk/components/avatar_base.proto";
|
|
9
|
+
import public "decentraland/sdk/components/avatar_emote_command.proto";
|
|
10
|
+
import public "decentraland/sdk/components/avatar_equipped_data.proto";
|
|
9
11
|
import public "decentraland/sdk/components/avatar_modifier_area.proto";
|
|
10
12
|
import public "decentraland/sdk/components/avatar_shape.proto";
|
|
11
13
|
import public "decentraland/sdk/components/billboard.proto";
|
|
@@ -18,6 +20,7 @@ import public "decentraland/sdk/components/material.proto";
|
|
|
18
20
|
import public "decentraland/sdk/components/mesh_collider.proto";
|
|
19
21
|
import public "decentraland/sdk/components/mesh_renderer.proto";
|
|
20
22
|
import public "decentraland/sdk/components/nft_shape.proto";
|
|
23
|
+
import public "decentraland/sdk/components/player_identity_data.proto";
|
|
21
24
|
import public "decentraland/sdk/components/pointer_events_result.proto";
|
|
22
25
|
import public "decentraland/sdk/components/pointer_events.proto";
|
|
23
26
|
import public "decentraland/sdk/components/pointer_lock.proto";
|