@dcl/protocol 1.0.0-5812097343.commit-8025576 → 1.0.0-6160718705.commit-03626d7
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/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/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/quests/definitions.proto +185 -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,149 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
import { Color3 } from "../../common/colors.gen";
|
|
4
|
+
|
|
5
|
+
export const protobufPackage = "decentraland.sdk.components";
|
|
6
|
+
|
|
7
|
+
/** AvatarBase sets all modifiers over the avatar's apparence. */
|
|
8
|
+
export interface PBAvatarBase {
|
|
9
|
+
skinColor: Color3 | undefined;
|
|
10
|
+
eyesColor: Color3 | undefined;
|
|
11
|
+
hairColor: Color3 | undefined;
|
|
12
|
+
bodyShapeUrn: string;
|
|
13
|
+
name: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function createBasePBAvatarBase(): PBAvatarBase {
|
|
17
|
+
return { skinColor: undefined, eyesColor: undefined, hairColor: undefined, bodyShapeUrn: "", name: "" };
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export namespace PBAvatarBase {
|
|
21
|
+
export function encode(message: PBAvatarBase, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
22
|
+
if (message.skinColor !== undefined) {
|
|
23
|
+
Color3.encode(message.skinColor, writer.uint32(10).fork()).ldelim();
|
|
24
|
+
}
|
|
25
|
+
if (message.eyesColor !== undefined) {
|
|
26
|
+
Color3.encode(message.eyesColor, writer.uint32(18).fork()).ldelim();
|
|
27
|
+
}
|
|
28
|
+
if (message.hairColor !== undefined) {
|
|
29
|
+
Color3.encode(message.hairColor, writer.uint32(26).fork()).ldelim();
|
|
30
|
+
}
|
|
31
|
+
if (message.bodyShapeUrn !== "") {
|
|
32
|
+
writer.uint32(34).string(message.bodyShapeUrn);
|
|
33
|
+
}
|
|
34
|
+
if (message.name !== "") {
|
|
35
|
+
writer.uint32(42).string(message.name);
|
|
36
|
+
}
|
|
37
|
+
return writer;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarBase {
|
|
41
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
42
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
43
|
+
const message = createBasePBAvatarBase();
|
|
44
|
+
while (reader.pos < end) {
|
|
45
|
+
const tag = reader.uint32();
|
|
46
|
+
switch (tag >>> 3) {
|
|
47
|
+
case 1:
|
|
48
|
+
if (tag !== 10) {
|
|
49
|
+
break;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
message.skinColor = Color3.decode(reader, reader.uint32());
|
|
53
|
+
continue;
|
|
54
|
+
case 2:
|
|
55
|
+
if (tag !== 18) {
|
|
56
|
+
break;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
message.eyesColor = Color3.decode(reader, reader.uint32());
|
|
60
|
+
continue;
|
|
61
|
+
case 3:
|
|
62
|
+
if (tag !== 26) {
|
|
63
|
+
break;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
message.hairColor = Color3.decode(reader, reader.uint32());
|
|
67
|
+
continue;
|
|
68
|
+
case 4:
|
|
69
|
+
if (tag !== 34) {
|
|
70
|
+
break;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
message.bodyShapeUrn = reader.string();
|
|
74
|
+
continue;
|
|
75
|
+
case 5:
|
|
76
|
+
if (tag !== 42) {
|
|
77
|
+
break;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
message.name = reader.string();
|
|
81
|
+
continue;
|
|
82
|
+
}
|
|
83
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
reader.skipType(tag & 7);
|
|
87
|
+
}
|
|
88
|
+
return message;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function fromJSON(object: any): PBAvatarBase {
|
|
92
|
+
return {
|
|
93
|
+
skinColor: isSet(object.skinColor) ? Color3.fromJSON(object.skinColor) : undefined,
|
|
94
|
+
eyesColor: isSet(object.eyesColor) ? Color3.fromJSON(object.eyesColor) : undefined,
|
|
95
|
+
hairColor: isSet(object.hairColor) ? Color3.fromJSON(object.hairColor) : undefined,
|
|
96
|
+
bodyShapeUrn: isSet(object.bodyShapeUrn) ? String(object.bodyShapeUrn) : "",
|
|
97
|
+
name: isSet(object.name) ? String(object.name) : "",
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function toJSON(message: PBAvatarBase): unknown {
|
|
102
|
+
const obj: any = {};
|
|
103
|
+
message.skinColor !== undefined &&
|
|
104
|
+
(obj.skinColor = message.skinColor ? Color3.toJSON(message.skinColor) : undefined);
|
|
105
|
+
message.eyesColor !== undefined &&
|
|
106
|
+
(obj.eyesColor = message.eyesColor ? Color3.toJSON(message.eyesColor) : undefined);
|
|
107
|
+
message.hairColor !== undefined &&
|
|
108
|
+
(obj.hairColor = message.hairColor ? Color3.toJSON(message.hairColor) : undefined);
|
|
109
|
+
message.bodyShapeUrn !== undefined && (obj.bodyShapeUrn = message.bodyShapeUrn);
|
|
110
|
+
message.name !== undefined && (obj.name = message.name);
|
|
111
|
+
return obj;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function create<I extends Exact<DeepPartial<PBAvatarBase>, I>>(base?: I): PBAvatarBase {
|
|
115
|
+
return PBAvatarBase.fromPartial(base ?? {});
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarBase>, I>>(object: I): PBAvatarBase {
|
|
119
|
+
const message = createBasePBAvatarBase();
|
|
120
|
+
message.skinColor = (object.skinColor !== undefined && object.skinColor !== null)
|
|
121
|
+
? Color3.fromPartial(object.skinColor)
|
|
122
|
+
: undefined;
|
|
123
|
+
message.eyesColor = (object.eyesColor !== undefined && object.eyesColor !== null)
|
|
124
|
+
? Color3.fromPartial(object.eyesColor)
|
|
125
|
+
: undefined;
|
|
126
|
+
message.hairColor = (object.hairColor !== undefined && object.hairColor !== null)
|
|
127
|
+
? Color3.fromPartial(object.hairColor)
|
|
128
|
+
: undefined;
|
|
129
|
+
message.bodyShapeUrn = object.bodyShapeUrn ?? "";
|
|
130
|
+
message.name = object.name ?? "";
|
|
131
|
+
return message;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
136
|
+
|
|
137
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
138
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
139
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
140
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
141
|
+
: Partial<T>;
|
|
142
|
+
|
|
143
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
144
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
145
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
146
|
+
|
|
147
|
+
function isSet(value: any): boolean {
|
|
148
|
+
return value !== null && value !== undefined;
|
|
149
|
+
}
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
/* eslint-disable */
|
|
2
|
+
import _m0 from "protobufjs/minimal";
|
|
3
|
+
|
|
4
|
+
export const protobufPackage = "decentraland.sdk.components";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* AvatarEmoteCommand is a grow only value set, used to signal the renderer about
|
|
8
|
+
* avatar emotes playback.
|
|
9
|
+
*/
|
|
10
|
+
export interface PBAvatarEmoteCommand {
|
|
11
|
+
emoteCommand: PBAvatarEmoteCommand_EmoteCommand | undefined;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface PBAvatarEmoteCommand_EmoteCommand {
|
|
15
|
+
emoteUrn: string;
|
|
16
|
+
loop: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function createBasePBAvatarEmoteCommand(): PBAvatarEmoteCommand {
|
|
20
|
+
return { emoteCommand: undefined };
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export namespace PBAvatarEmoteCommand {
|
|
24
|
+
export function encode(message: PBAvatarEmoteCommand, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
25
|
+
if (message.emoteCommand !== undefined) {
|
|
26
|
+
PBAvatarEmoteCommand_EmoteCommand.encode(message.emoteCommand, writer.uint32(10).fork()).ldelim();
|
|
27
|
+
}
|
|
28
|
+
return writer;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand {
|
|
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 = createBasePBAvatarEmoteCommand();
|
|
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.emoteCommand = PBAvatarEmoteCommand_EmoteCommand.decode(reader, reader.uint32());
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
47
|
+
break;
|
|
48
|
+
}
|
|
49
|
+
reader.skipType(tag & 7);
|
|
50
|
+
}
|
|
51
|
+
return message;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export function fromJSON(object: any): PBAvatarEmoteCommand {
|
|
55
|
+
return {
|
|
56
|
+
emoteCommand: isSet(object.emoteCommand)
|
|
57
|
+
? PBAvatarEmoteCommand_EmoteCommand.fromJSON(object.emoteCommand)
|
|
58
|
+
: undefined,
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export function toJSON(message: PBAvatarEmoteCommand): unknown {
|
|
63
|
+
const obj: any = {};
|
|
64
|
+
message.emoteCommand !== undefined &&
|
|
65
|
+
(obj.emoteCommand = message.emoteCommand
|
|
66
|
+
? PBAvatarEmoteCommand_EmoteCommand.toJSON(message.emoteCommand)
|
|
67
|
+
: undefined);
|
|
68
|
+
return obj;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function create<I extends Exact<DeepPartial<PBAvatarEmoteCommand>, I>>(base?: I): PBAvatarEmoteCommand {
|
|
72
|
+
return PBAvatarEmoteCommand.fromPartial(base ?? {});
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarEmoteCommand>, I>>(object: I): PBAvatarEmoteCommand {
|
|
76
|
+
const message = createBasePBAvatarEmoteCommand();
|
|
77
|
+
message.emoteCommand = (object.emoteCommand !== undefined && object.emoteCommand !== null)
|
|
78
|
+
? PBAvatarEmoteCommand_EmoteCommand.fromPartial(object.emoteCommand)
|
|
79
|
+
: undefined;
|
|
80
|
+
return message;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
function createBasePBAvatarEmoteCommand_EmoteCommand(): PBAvatarEmoteCommand_EmoteCommand {
|
|
85
|
+
return { emoteUrn: "", loop: false };
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export namespace PBAvatarEmoteCommand_EmoteCommand {
|
|
89
|
+
export function encode(
|
|
90
|
+
message: PBAvatarEmoteCommand_EmoteCommand,
|
|
91
|
+
writer: _m0.Writer = _m0.Writer.create(),
|
|
92
|
+
): _m0.Writer {
|
|
93
|
+
if (message.emoteUrn !== "") {
|
|
94
|
+
writer.uint32(10).string(message.emoteUrn);
|
|
95
|
+
}
|
|
96
|
+
if (message.loop === true) {
|
|
97
|
+
writer.uint32(16).bool(message.loop);
|
|
98
|
+
}
|
|
99
|
+
return writer;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function decode(input: _m0.Reader | Uint8Array, length?: number): PBAvatarEmoteCommand_EmoteCommand {
|
|
103
|
+
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
104
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
105
|
+
const message = createBasePBAvatarEmoteCommand_EmoteCommand();
|
|
106
|
+
while (reader.pos < end) {
|
|
107
|
+
const tag = reader.uint32();
|
|
108
|
+
switch (tag >>> 3) {
|
|
109
|
+
case 1:
|
|
110
|
+
if (tag !== 10) {
|
|
111
|
+
break;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
message.emoteUrn = reader.string();
|
|
115
|
+
continue;
|
|
116
|
+
case 2:
|
|
117
|
+
if (tag !== 16) {
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
message.loop = reader.bool();
|
|
122
|
+
continue;
|
|
123
|
+
}
|
|
124
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
125
|
+
break;
|
|
126
|
+
}
|
|
127
|
+
reader.skipType(tag & 7);
|
|
128
|
+
}
|
|
129
|
+
return message;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function fromJSON(object: any): PBAvatarEmoteCommand_EmoteCommand {
|
|
133
|
+
return {
|
|
134
|
+
emoteUrn: isSet(object.emoteUrn) ? String(object.emoteUrn) : "",
|
|
135
|
+
loop: isSet(object.loop) ? Boolean(object.loop) : false,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export function toJSON(message: PBAvatarEmoteCommand_EmoteCommand): unknown {
|
|
140
|
+
const obj: any = {};
|
|
141
|
+
message.emoteUrn !== undefined && (obj.emoteUrn = message.emoteUrn);
|
|
142
|
+
message.loop !== undefined && (obj.loop = message.loop);
|
|
143
|
+
return obj;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export function create<I extends Exact<DeepPartial<PBAvatarEmoteCommand_EmoteCommand>, I>>(
|
|
147
|
+
base?: I,
|
|
148
|
+
): PBAvatarEmoteCommand_EmoteCommand {
|
|
149
|
+
return PBAvatarEmoteCommand_EmoteCommand.fromPartial(base ?? {});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export function fromPartial<I extends Exact<DeepPartial<PBAvatarEmoteCommand_EmoteCommand>, I>>(
|
|
153
|
+
object: I,
|
|
154
|
+
): PBAvatarEmoteCommand_EmoteCommand {
|
|
155
|
+
const message = createBasePBAvatarEmoteCommand_EmoteCommand();
|
|
156
|
+
message.emoteUrn = object.emoteUrn ?? "";
|
|
157
|
+
message.loop = object.loop ?? false;
|
|
158
|
+
return message;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
163
|
+
|
|
164
|
+
export type DeepPartial<T> = T extends Builtin ? T
|
|
165
|
+
: T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
166
|
+
: T extends { $case: string } ? { [K in keyof Omit<T, "$case">]?: DeepPartial<T[K]> } & { $case: T["$case"] }
|
|
167
|
+
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
168
|
+
: Partial<T>;
|
|
169
|
+
|
|
170
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
171
|
+
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
172
|
+
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
173
|
+
|
|
174
|
+
function isSet(value: any): boolean {
|
|
175
|
+
return value !== null && value !== undefined;
|
|
176
|
+
}
|
|
@@ -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-6160718705.commit-03626d7",
|
|
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": "03626d76db879afcdfd4fbcdc0342a04e5b4f663"
|
|
33
33
|
}
|