@dcl/protocol 1.0.0-4982452399.commit-2113622 → 1.0.0-4982615619.commit-96dba07
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.
|
@@ -33,15 +33,15 @@ export declare function nftFrameTypeToJSON(object: NftFrameType): string;
|
|
|
33
33
|
/**
|
|
34
34
|
* The NftShape component renders a framed picture from an NFT. It supports PNG, JPEG and GIF files.
|
|
35
35
|
*
|
|
36
|
-
* The `
|
|
37
|
-
*
|
|
36
|
+
* The `urn` field is the URI of the NFT, and must follow the format 'urn:decentraland:<CHAIN>:<CONTRACT_STANDARD>:<CONTRACT_ADDRESS>:<TOKEN_ID>'
|
|
37
|
+
* Example: 'urn:decentraland:ethereum:erc721:0x00000000:123'
|
|
38
38
|
*
|
|
39
39
|
* The picture frame can have several different styles, plus a background color for images that have
|
|
40
40
|
* transparent pixels.
|
|
41
41
|
*/
|
|
42
42
|
export interface PBNftShape {
|
|
43
43
|
/** the URI of the NFT */
|
|
44
|
-
|
|
44
|
+
urn: string;
|
|
45
45
|
/** the frame style (default NFT_CLASSIC) */
|
|
46
46
|
style?: NftFrameType | undefined;
|
|
47
47
|
/** RGB background (default [0.6404918, 0.611472, 0.8584906]) */
|
|
@@ -169,13 +169,13 @@ function nftFrameTypeToJSON(object) {
|
|
|
169
169
|
}
|
|
170
170
|
exports.nftFrameTypeToJSON = nftFrameTypeToJSON;
|
|
171
171
|
function createBasePBNftShape() {
|
|
172
|
-
return {
|
|
172
|
+
return { urn: "", style: undefined, color: undefined };
|
|
173
173
|
}
|
|
174
174
|
var PBNftShape;
|
|
175
175
|
(function (PBNftShape) {
|
|
176
176
|
function encode(message, writer = minimal_1.default.Writer.create()) {
|
|
177
|
-
if (message.
|
|
178
|
-
writer.uint32(10).string(message.
|
|
177
|
+
if (message.urn !== "") {
|
|
178
|
+
writer.uint32(10).string(message.urn);
|
|
179
179
|
}
|
|
180
180
|
if (message.style !== undefined) {
|
|
181
181
|
writer.uint32(16).int32(message.style);
|
|
@@ -197,7 +197,7 @@ var PBNftShape;
|
|
|
197
197
|
if (tag !== 10) {
|
|
198
198
|
break;
|
|
199
199
|
}
|
|
200
|
-
message.
|
|
200
|
+
message.urn = reader.string();
|
|
201
201
|
continue;
|
|
202
202
|
case 2:
|
|
203
203
|
if (tag !== 16) {
|
|
@@ -222,7 +222,7 @@ var PBNftShape;
|
|
|
222
222
|
PBNftShape.decode = decode;
|
|
223
223
|
function fromJSON(object) {
|
|
224
224
|
return {
|
|
225
|
-
|
|
225
|
+
urn: isSet(object.urn) ? String(object.urn) : "",
|
|
226
226
|
style: isSet(object.style) ? nftFrameTypeFromJSON(object.style) : undefined,
|
|
227
227
|
color: isSet(object.color) ? colors_gen_1.Color3.fromJSON(object.color) : undefined,
|
|
228
228
|
};
|
|
@@ -230,7 +230,7 @@ var PBNftShape;
|
|
|
230
230
|
PBNftShape.fromJSON = fromJSON;
|
|
231
231
|
function toJSON(message) {
|
|
232
232
|
const obj = {};
|
|
233
|
-
message.
|
|
233
|
+
message.urn !== undefined && (obj.urn = message.urn);
|
|
234
234
|
message.style !== undefined &&
|
|
235
235
|
(obj.style = message.style !== undefined ? nftFrameTypeToJSON(message.style) : undefined);
|
|
236
236
|
message.color !== undefined && (obj.color = message.color ? colors_gen_1.Color3.toJSON(message.color) : undefined);
|
|
@@ -244,7 +244,7 @@ var PBNftShape;
|
|
|
244
244
|
function fromPartial(object) {
|
|
245
245
|
var _a, _b;
|
|
246
246
|
const message = createBasePBNftShape();
|
|
247
|
-
message.
|
|
247
|
+
message.urn = (_a = object.urn) !== null && _a !== void 0 ? _a : "";
|
|
248
248
|
message.style = (_b = object.style) !== null && _b !== void 0 ? _b : undefined;
|
|
249
249
|
message.color = (object.color !== undefined && object.color !== null)
|
|
250
250
|
? colors_gen_1.Color3.fromPartial(object.color)
|
|
@@ -167,15 +167,15 @@ export function nftFrameTypeToJSON(object: NftFrameType): string {
|
|
|
167
167
|
/**
|
|
168
168
|
* The NftShape component renders a framed picture from an NFT. It supports PNG, JPEG and GIF files.
|
|
169
169
|
*
|
|
170
|
-
* The `
|
|
171
|
-
*
|
|
170
|
+
* The `urn` field is the URI of the NFT, and must follow the format 'urn:decentraland:<CHAIN>:<CONTRACT_STANDARD>:<CONTRACT_ADDRESS>:<TOKEN_ID>'
|
|
171
|
+
* Example: 'urn:decentraland:ethereum:erc721:0x00000000:123'
|
|
172
172
|
*
|
|
173
173
|
* The picture frame can have several different styles, plus a background color for images that have
|
|
174
174
|
* transparent pixels.
|
|
175
175
|
*/
|
|
176
176
|
export interface PBNftShape {
|
|
177
177
|
/** the URI of the NFT */
|
|
178
|
-
|
|
178
|
+
urn: string;
|
|
179
179
|
/** the frame style (default NFT_CLASSIC) */
|
|
180
180
|
style?:
|
|
181
181
|
| NftFrameType
|
|
@@ -185,13 +185,13 @@ export interface PBNftShape {
|
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
function createBasePBNftShape(): PBNftShape {
|
|
188
|
-
return {
|
|
188
|
+
return { urn: "", style: undefined, color: undefined };
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
export namespace PBNftShape {
|
|
192
192
|
export function encode(message: PBNftShape, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
193
|
-
if (message.
|
|
194
|
-
writer.uint32(10).string(message.
|
|
193
|
+
if (message.urn !== "") {
|
|
194
|
+
writer.uint32(10).string(message.urn);
|
|
195
195
|
}
|
|
196
196
|
if (message.style !== undefined) {
|
|
197
197
|
writer.uint32(16).int32(message.style);
|
|
@@ -214,7 +214,7 @@ export namespace PBNftShape {
|
|
|
214
214
|
break;
|
|
215
215
|
}
|
|
216
216
|
|
|
217
|
-
message.
|
|
217
|
+
message.urn = reader.string();
|
|
218
218
|
continue;
|
|
219
219
|
case 2:
|
|
220
220
|
if (tag !== 16) {
|
|
@@ -241,7 +241,7 @@ export namespace PBNftShape {
|
|
|
241
241
|
|
|
242
242
|
export function fromJSON(object: any): PBNftShape {
|
|
243
243
|
return {
|
|
244
|
-
|
|
244
|
+
urn: isSet(object.urn) ? String(object.urn) : "",
|
|
245
245
|
style: isSet(object.style) ? nftFrameTypeFromJSON(object.style) : undefined,
|
|
246
246
|
color: isSet(object.color) ? Color3.fromJSON(object.color) : undefined,
|
|
247
247
|
};
|
|
@@ -249,7 +249,7 @@ export namespace PBNftShape {
|
|
|
249
249
|
|
|
250
250
|
export function toJSON(message: PBNftShape): unknown {
|
|
251
251
|
const obj: any = {};
|
|
252
|
-
message.
|
|
252
|
+
message.urn !== undefined && (obj.urn = message.urn);
|
|
253
253
|
message.style !== undefined &&
|
|
254
254
|
(obj.style = message.style !== undefined ? nftFrameTypeToJSON(message.style) : undefined);
|
|
255
255
|
message.color !== undefined && (obj.color = message.color ? Color3.toJSON(message.color) : undefined);
|
|
@@ -262,7 +262,7 @@ export namespace PBNftShape {
|
|
|
262
262
|
|
|
263
263
|
export function fromPartial<I extends Exact<DeepPartial<PBNftShape>, I>>(object: I): PBNftShape {
|
|
264
264
|
const message = createBasePBNftShape();
|
|
265
|
-
message.
|
|
265
|
+
message.urn = object.urn ?? "";
|
|
266
266
|
message.style = object.style ?? undefined;
|
|
267
267
|
message.color = (object.color !== undefined && object.color !== null)
|
|
268
268
|
? Color3.fromPartial(object.color)
|
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-4982615619.commit-96dba07",
|
|
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": "96dba079e43c49ba396b15cd7c0cfefb3a268d51"
|
|
33
33
|
}
|
|
@@ -9,13 +9,13 @@ option (common.ecs_component_id) = 1040;
|
|
|
9
9
|
|
|
10
10
|
// The NftShape component renders a framed picture from an NFT. It supports PNG, JPEG and GIF files.
|
|
11
11
|
//
|
|
12
|
-
// The `
|
|
13
|
-
//
|
|
12
|
+
// The `urn` field is the URI of the NFT, and must follow the format 'urn:decentraland:<CHAIN>:<CONTRACT_STANDARD>:<CONTRACT_ADDRESS>:<TOKEN_ID>'
|
|
13
|
+
// Example: 'urn:decentraland:ethereum:erc721:0x00000000:123'
|
|
14
14
|
//
|
|
15
15
|
// The picture frame can have several different styles, plus a background color for images that have
|
|
16
16
|
// transparent pixels.
|
|
17
17
|
message PBNftShape {
|
|
18
|
-
string
|
|
18
|
+
string urn = 1; // the URI of the NFT
|
|
19
19
|
optional NftFrameType style = 2; // the frame style (default NFT_CLASSIC)
|
|
20
20
|
optional decentraland.common.Color3 color = 3; // RGB background (default [0.6404918, 0.611472, 0.8584906])
|
|
21
21
|
}
|