@0xsequence/metadata 1.9.6 → 1.9.7
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/dist/0xsequence-metadata.cjs.dev.js +172 -17
- package/dist/0xsequence-metadata.cjs.prod.js +172 -17
- package/dist/0xsequence-metadata.esm.js +172 -17
- package/dist/declarations/src/metadata.gen.d.ts +237 -27
- package/package.json +1 -1
- package/src/metadata.gen.ts +421 -36
|
@@ -18,7 +18,7 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-metadata v0.4.0
|
|
21
|
+
// sequence-metadata v0.4.0 ae7e843bd6e50f2634c3f663d49c5c7d1678c2b2
|
|
22
22
|
// --
|
|
23
23
|
// Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
|
|
|
31
31
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
32
|
|
|
33
33
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = '
|
|
34
|
+
const WebRPCSchemaHash = 'ae7e843bd6e50f2634c3f663d49c5c7d1678c2b2';
|
|
35
35
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
@@ -57,11 +57,6 @@ let SwapType = /*#__PURE__*/function (SwapType) {
|
|
|
57
57
|
SwapType["SELL"] = "SELL";
|
|
58
58
|
return SwapType;
|
|
59
59
|
}({});
|
|
60
|
-
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
61
|
-
SortOrder["DESC"] = "DESC";
|
|
62
|
-
SortOrder["ASC"] = "ASC";
|
|
63
|
-
return SortOrder;
|
|
64
|
-
}({});
|
|
65
60
|
let TaskStatus = /*#__PURE__*/function (TaskStatus) {
|
|
66
61
|
TaskStatus["PENDING"] = "PENDING";
|
|
67
62
|
TaskStatus["PAUSED"] = "PAUSED";
|
|
@@ -114,6 +109,15 @@ class Metadata {
|
|
|
114
109
|
});
|
|
115
110
|
});
|
|
116
111
|
};
|
|
112
|
+
this.refreshTokenMetadata = (args, headers) => {
|
|
113
|
+
return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
114
|
+
return buildResponse(res).then(_data => {
|
|
115
|
+
return {
|
|
116
|
+
taskId: _data.taskId
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
117
121
|
this.enqueueTokensForRefresh = (args, headers) => {
|
|
118
122
|
return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
|
|
119
123
|
return buildResponse(res).then(_data => {
|
|
@@ -236,15 +240,6 @@ class Metadata {
|
|
|
236
240
|
});
|
|
237
241
|
});
|
|
238
242
|
};
|
|
239
|
-
this.projectSetTokenMetadata = (args, headers) => {
|
|
240
|
-
return this.fetch(this.url('ProjectSetTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
241
|
-
return buildResponse(res).then(_data => {
|
|
242
|
-
return {
|
|
243
|
-
ok: _data.ok
|
|
244
|
-
};
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
};
|
|
248
243
|
this.getNiftyswapTokenQuantity = (args, headers) => {
|
|
249
244
|
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers)).then(res => {
|
|
250
245
|
return buildResponse(res).then(_data => {
|
|
@@ -315,6 +310,166 @@ class Metadata {
|
|
|
315
310
|
return this.hostname + this.path + name;
|
|
316
311
|
}
|
|
317
312
|
}
|
|
313
|
+
class Collections {
|
|
314
|
+
constructor(hostname, fetch) {
|
|
315
|
+
this.hostname = void 0;
|
|
316
|
+
this.fetch = void 0;
|
|
317
|
+
this.path = '/rpc/Collections/';
|
|
318
|
+
this.createCollection = (args, headers) => {
|
|
319
|
+
return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
320
|
+
return buildResponse(res).then(_data => {
|
|
321
|
+
return {
|
|
322
|
+
collection: _data.collection
|
|
323
|
+
};
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
this.getCollection = (args, headers) => {
|
|
328
|
+
return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
329
|
+
return buildResponse(res).then(_data => {
|
|
330
|
+
return {
|
|
331
|
+
collection: _data.collection
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
this.listCollections = (args, headers) => {
|
|
337
|
+
return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers)).then(res => {
|
|
338
|
+
return buildResponse(res).then(_data => {
|
|
339
|
+
return {
|
|
340
|
+
page: _data.page,
|
|
341
|
+
collections: _data.collections
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
this.updateCollection = (args, headers) => {
|
|
347
|
+
return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
348
|
+
return buildResponse(res).then(_data => {
|
|
349
|
+
return {
|
|
350
|
+
collection: _data.collection
|
|
351
|
+
};
|
|
352
|
+
});
|
|
353
|
+
});
|
|
354
|
+
};
|
|
355
|
+
this.deleteCollection = (args, headers) => {
|
|
356
|
+
return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
357
|
+
return buildResponse(res).then(_data => {
|
|
358
|
+
return {
|
|
359
|
+
status: _data.status
|
|
360
|
+
};
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
};
|
|
364
|
+
this.publishCollection = (args, headers) => {
|
|
365
|
+
return this.fetch(this.url('PublishCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
366
|
+
return buildResponse(res).then(_data => {
|
|
367
|
+
return {
|
|
368
|
+
collection: _data.collection
|
|
369
|
+
};
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
};
|
|
373
|
+
this.unpublishCollection = (args, headers) => {
|
|
374
|
+
return this.fetch(this.url('UnpublishCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
375
|
+
return buildResponse(res).then(_data => {
|
|
376
|
+
return {
|
|
377
|
+
collection: _data.collection
|
|
378
|
+
};
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
this.createToken = (args, headers) => {
|
|
383
|
+
return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers)).then(res => {
|
|
384
|
+
return buildResponse(res).then(_data => {
|
|
385
|
+
return {
|
|
386
|
+
token: _data.token,
|
|
387
|
+
assets: _data.assets
|
|
388
|
+
};
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
this.getToken = (args, headers) => {
|
|
393
|
+
return this.fetch(this.url('GetToken'), createHTTPRequest(args, headers)).then(res => {
|
|
394
|
+
return buildResponse(res).then(_data => {
|
|
395
|
+
return {
|
|
396
|
+
token: _data.token,
|
|
397
|
+
assets: _data.assets
|
|
398
|
+
};
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
this.listTokens = (args, headers) => {
|
|
403
|
+
return this.fetch(this.url('ListTokens'), createHTTPRequest(args, headers)).then(res => {
|
|
404
|
+
return buildResponse(res).then(_data => {
|
|
405
|
+
return {
|
|
406
|
+
page: _data.page,
|
|
407
|
+
tokens: _data.tokens
|
|
408
|
+
};
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
this.updateToken = (args, headers) => {
|
|
413
|
+
return this.fetch(this.url('UpdateToken'), createHTTPRequest(args, headers)).then(res => {
|
|
414
|
+
return buildResponse(res).then(_data => {
|
|
415
|
+
return {
|
|
416
|
+
token: _data.token
|
|
417
|
+
};
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
};
|
|
421
|
+
this.deleteToken = (args, headers) => {
|
|
422
|
+
return this.fetch(this.url('DeleteToken'), createHTTPRequest(args, headers)).then(res => {
|
|
423
|
+
return buildResponse(res).then(_data => {
|
|
424
|
+
return {
|
|
425
|
+
status: _data.status
|
|
426
|
+
};
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
};
|
|
430
|
+
this.createAsset = (args, headers) => {
|
|
431
|
+
return this.fetch(this.url('CreateAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
432
|
+
return buildResponse(res).then(_data => {
|
|
433
|
+
return {
|
|
434
|
+
asset: _data.asset
|
|
435
|
+
};
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
this.getAsset = (args, headers) => {
|
|
440
|
+
return this.fetch(this.url('GetAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
441
|
+
return buildResponse(res).then(_data => {
|
|
442
|
+
return {
|
|
443
|
+
asset: _data.asset
|
|
444
|
+
};
|
|
445
|
+
});
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
this.updateAsset = (args, headers) => {
|
|
449
|
+
return this.fetch(this.url('UpdateAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
450
|
+
return buildResponse(res).then(_data => {
|
|
451
|
+
return {
|
|
452
|
+
asset: _data.asset
|
|
453
|
+
};
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
};
|
|
457
|
+
this.deleteAsset = (args, headers) => {
|
|
458
|
+
return this.fetch(this.url('DeleteAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
459
|
+
return buildResponse(res).then(_data => {
|
|
460
|
+
return {
|
|
461
|
+
status: _data.status
|
|
462
|
+
};
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
this.hostname = hostname;
|
|
467
|
+
this.fetch = (input, init) => fetch(input, init);
|
|
468
|
+
}
|
|
469
|
+
url(name) {
|
|
470
|
+
return this.hostname + this.path + name;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
318
473
|
const createHTTPRequest = (body = {}, headers = {}) => {
|
|
319
474
|
return {
|
|
320
475
|
method: 'POST',
|
|
@@ -370,11 +525,11 @@ class SequenceMetadata extends Metadata {
|
|
|
370
525
|
}
|
|
371
526
|
}
|
|
372
527
|
|
|
528
|
+
exports.Collections = Collections;
|
|
373
529
|
exports.ContractType = ContractType;
|
|
374
530
|
exports.Metadata = Metadata;
|
|
375
531
|
exports.PropertyType = PropertyType;
|
|
376
532
|
exports.SequenceMetadata = SequenceMetadata;
|
|
377
|
-
exports.SortOrder = SortOrder;
|
|
378
533
|
exports.SwapType = SwapType;
|
|
379
534
|
exports.TaskStatus = TaskStatus;
|
|
380
535
|
exports.WebRPCSchemaHash = WebRPCSchemaHash;
|
|
@@ -18,7 +18,7 @@ function _extends() {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/* eslint-disable */
|
|
21
|
-
// sequence-metadata v0.4.0
|
|
21
|
+
// sequence-metadata v0.4.0 ae7e843bd6e50f2634c3f663d49c5c7d1678c2b2
|
|
22
22
|
// --
|
|
23
23
|
// Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
|
|
24
24
|
//
|
|
@@ -31,7 +31,7 @@ const WebRPCVersion = 'v1';
|
|
|
31
31
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
32
32
|
|
|
33
33
|
// Schema hash generated from your RIDL schema
|
|
34
|
-
const WebRPCSchemaHash = '
|
|
34
|
+
const WebRPCSchemaHash = 'ae7e843bd6e50f2634c3f663d49c5c7d1678c2b2';
|
|
35
35
|
|
|
36
36
|
//
|
|
37
37
|
// Types
|
|
@@ -57,11 +57,6 @@ let SwapType = /*#__PURE__*/function (SwapType) {
|
|
|
57
57
|
SwapType["SELL"] = "SELL";
|
|
58
58
|
return SwapType;
|
|
59
59
|
}({});
|
|
60
|
-
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
61
|
-
SortOrder["DESC"] = "DESC";
|
|
62
|
-
SortOrder["ASC"] = "ASC";
|
|
63
|
-
return SortOrder;
|
|
64
|
-
}({});
|
|
65
60
|
let TaskStatus = /*#__PURE__*/function (TaskStatus) {
|
|
66
61
|
TaskStatus["PENDING"] = "PENDING";
|
|
67
62
|
TaskStatus["PAUSED"] = "PAUSED";
|
|
@@ -114,6 +109,15 @@ class Metadata {
|
|
|
114
109
|
});
|
|
115
110
|
});
|
|
116
111
|
};
|
|
112
|
+
this.refreshTokenMetadata = (args, headers) => {
|
|
113
|
+
return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
114
|
+
return buildResponse(res).then(_data => {
|
|
115
|
+
return {
|
|
116
|
+
taskId: _data.taskId
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
});
|
|
120
|
+
};
|
|
117
121
|
this.enqueueTokensForRefresh = (args, headers) => {
|
|
118
122
|
return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
|
|
119
123
|
return buildResponse(res).then(_data => {
|
|
@@ -236,15 +240,6 @@ class Metadata {
|
|
|
236
240
|
});
|
|
237
241
|
});
|
|
238
242
|
};
|
|
239
|
-
this.projectSetTokenMetadata = (args, headers) => {
|
|
240
|
-
return this.fetch(this.url('ProjectSetTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
241
|
-
return buildResponse(res).then(_data => {
|
|
242
|
-
return {
|
|
243
|
-
ok: _data.ok
|
|
244
|
-
};
|
|
245
|
-
});
|
|
246
|
-
});
|
|
247
|
-
};
|
|
248
243
|
this.getNiftyswapTokenQuantity = (args, headers) => {
|
|
249
244
|
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers)).then(res => {
|
|
250
245
|
return buildResponse(res).then(_data => {
|
|
@@ -315,6 +310,166 @@ class Metadata {
|
|
|
315
310
|
return this.hostname + this.path + name;
|
|
316
311
|
}
|
|
317
312
|
}
|
|
313
|
+
class Collections {
|
|
314
|
+
constructor(hostname, fetch) {
|
|
315
|
+
this.hostname = void 0;
|
|
316
|
+
this.fetch = void 0;
|
|
317
|
+
this.path = '/rpc/Collections/';
|
|
318
|
+
this.createCollection = (args, headers) => {
|
|
319
|
+
return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
320
|
+
return buildResponse(res).then(_data => {
|
|
321
|
+
return {
|
|
322
|
+
collection: _data.collection
|
|
323
|
+
};
|
|
324
|
+
});
|
|
325
|
+
});
|
|
326
|
+
};
|
|
327
|
+
this.getCollection = (args, headers) => {
|
|
328
|
+
return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
329
|
+
return buildResponse(res).then(_data => {
|
|
330
|
+
return {
|
|
331
|
+
collection: _data.collection
|
|
332
|
+
};
|
|
333
|
+
});
|
|
334
|
+
});
|
|
335
|
+
};
|
|
336
|
+
this.listCollections = (args, headers) => {
|
|
337
|
+
return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers)).then(res => {
|
|
338
|
+
return buildResponse(res).then(_data => {
|
|
339
|
+
return {
|
|
340
|
+
page: _data.page,
|
|
341
|
+
collections: _data.collections
|
|
342
|
+
};
|
|
343
|
+
});
|
|
344
|
+
});
|
|
345
|
+
};
|
|
346
|
+
this.updateCollection = (args, headers) => {
|
|
347
|
+
return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
348
|
+
return buildResponse(res).then(_data => {
|
|
349
|
+
return {
|
|
350
|
+
collection: _data.collection
|
|
351
|
+
};
|
|
352
|
+
});
|
|
353
|
+
});
|
|
354
|
+
};
|
|
355
|
+
this.deleteCollection = (args, headers) => {
|
|
356
|
+
return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
357
|
+
return buildResponse(res).then(_data => {
|
|
358
|
+
return {
|
|
359
|
+
status: _data.status
|
|
360
|
+
};
|
|
361
|
+
});
|
|
362
|
+
});
|
|
363
|
+
};
|
|
364
|
+
this.publishCollection = (args, headers) => {
|
|
365
|
+
return this.fetch(this.url('PublishCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
366
|
+
return buildResponse(res).then(_data => {
|
|
367
|
+
return {
|
|
368
|
+
collection: _data.collection
|
|
369
|
+
};
|
|
370
|
+
});
|
|
371
|
+
});
|
|
372
|
+
};
|
|
373
|
+
this.unpublishCollection = (args, headers) => {
|
|
374
|
+
return this.fetch(this.url('UnpublishCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
375
|
+
return buildResponse(res).then(_data => {
|
|
376
|
+
return {
|
|
377
|
+
collection: _data.collection
|
|
378
|
+
};
|
|
379
|
+
});
|
|
380
|
+
});
|
|
381
|
+
};
|
|
382
|
+
this.createToken = (args, headers) => {
|
|
383
|
+
return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers)).then(res => {
|
|
384
|
+
return buildResponse(res).then(_data => {
|
|
385
|
+
return {
|
|
386
|
+
token: _data.token,
|
|
387
|
+
assets: _data.assets
|
|
388
|
+
};
|
|
389
|
+
});
|
|
390
|
+
});
|
|
391
|
+
};
|
|
392
|
+
this.getToken = (args, headers) => {
|
|
393
|
+
return this.fetch(this.url('GetToken'), createHTTPRequest(args, headers)).then(res => {
|
|
394
|
+
return buildResponse(res).then(_data => {
|
|
395
|
+
return {
|
|
396
|
+
token: _data.token,
|
|
397
|
+
assets: _data.assets
|
|
398
|
+
};
|
|
399
|
+
});
|
|
400
|
+
});
|
|
401
|
+
};
|
|
402
|
+
this.listTokens = (args, headers) => {
|
|
403
|
+
return this.fetch(this.url('ListTokens'), createHTTPRequest(args, headers)).then(res => {
|
|
404
|
+
return buildResponse(res).then(_data => {
|
|
405
|
+
return {
|
|
406
|
+
page: _data.page,
|
|
407
|
+
tokens: _data.tokens
|
|
408
|
+
};
|
|
409
|
+
});
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
this.updateToken = (args, headers) => {
|
|
413
|
+
return this.fetch(this.url('UpdateToken'), createHTTPRequest(args, headers)).then(res => {
|
|
414
|
+
return buildResponse(res).then(_data => {
|
|
415
|
+
return {
|
|
416
|
+
token: _data.token
|
|
417
|
+
};
|
|
418
|
+
});
|
|
419
|
+
});
|
|
420
|
+
};
|
|
421
|
+
this.deleteToken = (args, headers) => {
|
|
422
|
+
return this.fetch(this.url('DeleteToken'), createHTTPRequest(args, headers)).then(res => {
|
|
423
|
+
return buildResponse(res).then(_data => {
|
|
424
|
+
return {
|
|
425
|
+
status: _data.status
|
|
426
|
+
};
|
|
427
|
+
});
|
|
428
|
+
});
|
|
429
|
+
};
|
|
430
|
+
this.createAsset = (args, headers) => {
|
|
431
|
+
return this.fetch(this.url('CreateAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
432
|
+
return buildResponse(res).then(_data => {
|
|
433
|
+
return {
|
|
434
|
+
asset: _data.asset
|
|
435
|
+
};
|
|
436
|
+
});
|
|
437
|
+
});
|
|
438
|
+
};
|
|
439
|
+
this.getAsset = (args, headers) => {
|
|
440
|
+
return this.fetch(this.url('GetAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
441
|
+
return buildResponse(res).then(_data => {
|
|
442
|
+
return {
|
|
443
|
+
asset: _data.asset
|
|
444
|
+
};
|
|
445
|
+
});
|
|
446
|
+
});
|
|
447
|
+
};
|
|
448
|
+
this.updateAsset = (args, headers) => {
|
|
449
|
+
return this.fetch(this.url('UpdateAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
450
|
+
return buildResponse(res).then(_data => {
|
|
451
|
+
return {
|
|
452
|
+
asset: _data.asset
|
|
453
|
+
};
|
|
454
|
+
});
|
|
455
|
+
});
|
|
456
|
+
};
|
|
457
|
+
this.deleteAsset = (args, headers) => {
|
|
458
|
+
return this.fetch(this.url('DeleteAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
459
|
+
return buildResponse(res).then(_data => {
|
|
460
|
+
return {
|
|
461
|
+
status: _data.status
|
|
462
|
+
};
|
|
463
|
+
});
|
|
464
|
+
});
|
|
465
|
+
};
|
|
466
|
+
this.hostname = hostname;
|
|
467
|
+
this.fetch = (input, init) => fetch(input, init);
|
|
468
|
+
}
|
|
469
|
+
url(name) {
|
|
470
|
+
return this.hostname + this.path + name;
|
|
471
|
+
}
|
|
472
|
+
}
|
|
318
473
|
const createHTTPRequest = (body = {}, headers = {}) => {
|
|
319
474
|
return {
|
|
320
475
|
method: 'POST',
|
|
@@ -370,11 +525,11 @@ class SequenceMetadata extends Metadata {
|
|
|
370
525
|
}
|
|
371
526
|
}
|
|
372
527
|
|
|
528
|
+
exports.Collections = Collections;
|
|
373
529
|
exports.ContractType = ContractType;
|
|
374
530
|
exports.Metadata = Metadata;
|
|
375
531
|
exports.PropertyType = PropertyType;
|
|
376
532
|
exports.SequenceMetadata = SequenceMetadata;
|
|
377
|
-
exports.SortOrder = SortOrder;
|
|
378
533
|
exports.SwapType = SwapType;
|
|
379
534
|
exports.TaskStatus = TaskStatus;
|
|
380
535
|
exports.WebRPCSchemaHash = WebRPCSchemaHash;
|
|
@@ -14,7 +14,7 @@ function _extends() {
|
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
/* eslint-disable */
|
|
17
|
-
// sequence-metadata v0.4.0
|
|
17
|
+
// sequence-metadata v0.4.0 ae7e843bd6e50f2634c3f663d49c5c7d1678c2b2
|
|
18
18
|
// --
|
|
19
19
|
// Code generated by webrpc-gen@v0.14.0-dev with typescript@v0.10.0 generator. DO NOT EDIT.
|
|
20
20
|
//
|
|
@@ -27,7 +27,7 @@ const WebRPCVersion = 'v1';
|
|
|
27
27
|
const WebRPCSchemaVersion = 'v0.4.0';
|
|
28
28
|
|
|
29
29
|
// Schema hash generated from your RIDL schema
|
|
30
|
-
const WebRPCSchemaHash = '
|
|
30
|
+
const WebRPCSchemaHash = 'ae7e843bd6e50f2634c3f663d49c5c7d1678c2b2';
|
|
31
31
|
|
|
32
32
|
//
|
|
33
33
|
// Types
|
|
@@ -53,11 +53,6 @@ let SwapType = /*#__PURE__*/function (SwapType) {
|
|
|
53
53
|
SwapType["SELL"] = "SELL";
|
|
54
54
|
return SwapType;
|
|
55
55
|
}({});
|
|
56
|
-
let SortOrder = /*#__PURE__*/function (SortOrder) {
|
|
57
|
-
SortOrder["DESC"] = "DESC";
|
|
58
|
-
SortOrder["ASC"] = "ASC";
|
|
59
|
-
return SortOrder;
|
|
60
|
-
}({});
|
|
61
56
|
let TaskStatus = /*#__PURE__*/function (TaskStatus) {
|
|
62
57
|
TaskStatus["PENDING"] = "PENDING";
|
|
63
58
|
TaskStatus["PAUSED"] = "PAUSED";
|
|
@@ -110,6 +105,15 @@ class Metadata {
|
|
|
110
105
|
});
|
|
111
106
|
});
|
|
112
107
|
};
|
|
108
|
+
this.refreshTokenMetadata = (args, headers) => {
|
|
109
|
+
return this.fetch(this.url('RefreshTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
110
|
+
return buildResponse(res).then(_data => {
|
|
111
|
+
return {
|
|
112
|
+
taskId: _data.taskId
|
|
113
|
+
};
|
|
114
|
+
});
|
|
115
|
+
});
|
|
116
|
+
};
|
|
113
117
|
this.enqueueTokensForRefresh = (args, headers) => {
|
|
114
118
|
return this.fetch(this.url('EnqueueTokensForRefresh'), createHTTPRequest(args, headers)).then(res => {
|
|
115
119
|
return buildResponse(res).then(_data => {
|
|
@@ -232,15 +236,6 @@ class Metadata {
|
|
|
232
236
|
});
|
|
233
237
|
});
|
|
234
238
|
};
|
|
235
|
-
this.projectSetTokenMetadata = (args, headers) => {
|
|
236
|
-
return this.fetch(this.url('ProjectSetTokenMetadata'), createHTTPRequest(args, headers)).then(res => {
|
|
237
|
-
return buildResponse(res).then(_data => {
|
|
238
|
-
return {
|
|
239
|
-
ok: _data.ok
|
|
240
|
-
};
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
239
|
this.getNiftyswapTokenQuantity = (args, headers) => {
|
|
245
240
|
return this.fetch(this.url('GetNiftyswapTokenQuantity'), createHTTPRequest(args, headers)).then(res => {
|
|
246
241
|
return buildResponse(res).then(_data => {
|
|
@@ -311,6 +306,166 @@ class Metadata {
|
|
|
311
306
|
return this.hostname + this.path + name;
|
|
312
307
|
}
|
|
313
308
|
}
|
|
309
|
+
class Collections {
|
|
310
|
+
constructor(hostname, fetch) {
|
|
311
|
+
this.hostname = void 0;
|
|
312
|
+
this.fetch = void 0;
|
|
313
|
+
this.path = '/rpc/Collections/';
|
|
314
|
+
this.createCollection = (args, headers) => {
|
|
315
|
+
return this.fetch(this.url('CreateCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
316
|
+
return buildResponse(res).then(_data => {
|
|
317
|
+
return {
|
|
318
|
+
collection: _data.collection
|
|
319
|
+
};
|
|
320
|
+
});
|
|
321
|
+
});
|
|
322
|
+
};
|
|
323
|
+
this.getCollection = (args, headers) => {
|
|
324
|
+
return this.fetch(this.url('GetCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
325
|
+
return buildResponse(res).then(_data => {
|
|
326
|
+
return {
|
|
327
|
+
collection: _data.collection
|
|
328
|
+
};
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
};
|
|
332
|
+
this.listCollections = (args, headers) => {
|
|
333
|
+
return this.fetch(this.url('ListCollections'), createHTTPRequest(args, headers)).then(res => {
|
|
334
|
+
return buildResponse(res).then(_data => {
|
|
335
|
+
return {
|
|
336
|
+
page: _data.page,
|
|
337
|
+
collections: _data.collections
|
|
338
|
+
};
|
|
339
|
+
});
|
|
340
|
+
});
|
|
341
|
+
};
|
|
342
|
+
this.updateCollection = (args, headers) => {
|
|
343
|
+
return this.fetch(this.url('UpdateCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
344
|
+
return buildResponse(res).then(_data => {
|
|
345
|
+
return {
|
|
346
|
+
collection: _data.collection
|
|
347
|
+
};
|
|
348
|
+
});
|
|
349
|
+
});
|
|
350
|
+
};
|
|
351
|
+
this.deleteCollection = (args, headers) => {
|
|
352
|
+
return this.fetch(this.url('DeleteCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
353
|
+
return buildResponse(res).then(_data => {
|
|
354
|
+
return {
|
|
355
|
+
status: _data.status
|
|
356
|
+
};
|
|
357
|
+
});
|
|
358
|
+
});
|
|
359
|
+
};
|
|
360
|
+
this.publishCollection = (args, headers) => {
|
|
361
|
+
return this.fetch(this.url('PublishCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
362
|
+
return buildResponse(res).then(_data => {
|
|
363
|
+
return {
|
|
364
|
+
collection: _data.collection
|
|
365
|
+
};
|
|
366
|
+
});
|
|
367
|
+
});
|
|
368
|
+
};
|
|
369
|
+
this.unpublishCollection = (args, headers) => {
|
|
370
|
+
return this.fetch(this.url('UnpublishCollection'), createHTTPRequest(args, headers)).then(res => {
|
|
371
|
+
return buildResponse(res).then(_data => {
|
|
372
|
+
return {
|
|
373
|
+
collection: _data.collection
|
|
374
|
+
};
|
|
375
|
+
});
|
|
376
|
+
});
|
|
377
|
+
};
|
|
378
|
+
this.createToken = (args, headers) => {
|
|
379
|
+
return this.fetch(this.url('CreateToken'), createHTTPRequest(args, headers)).then(res => {
|
|
380
|
+
return buildResponse(res).then(_data => {
|
|
381
|
+
return {
|
|
382
|
+
token: _data.token,
|
|
383
|
+
assets: _data.assets
|
|
384
|
+
};
|
|
385
|
+
});
|
|
386
|
+
});
|
|
387
|
+
};
|
|
388
|
+
this.getToken = (args, headers) => {
|
|
389
|
+
return this.fetch(this.url('GetToken'), createHTTPRequest(args, headers)).then(res => {
|
|
390
|
+
return buildResponse(res).then(_data => {
|
|
391
|
+
return {
|
|
392
|
+
token: _data.token,
|
|
393
|
+
assets: _data.assets
|
|
394
|
+
};
|
|
395
|
+
});
|
|
396
|
+
});
|
|
397
|
+
};
|
|
398
|
+
this.listTokens = (args, headers) => {
|
|
399
|
+
return this.fetch(this.url('ListTokens'), createHTTPRequest(args, headers)).then(res => {
|
|
400
|
+
return buildResponse(res).then(_data => {
|
|
401
|
+
return {
|
|
402
|
+
page: _data.page,
|
|
403
|
+
tokens: _data.tokens
|
|
404
|
+
};
|
|
405
|
+
});
|
|
406
|
+
});
|
|
407
|
+
};
|
|
408
|
+
this.updateToken = (args, headers) => {
|
|
409
|
+
return this.fetch(this.url('UpdateToken'), createHTTPRequest(args, headers)).then(res => {
|
|
410
|
+
return buildResponse(res).then(_data => {
|
|
411
|
+
return {
|
|
412
|
+
token: _data.token
|
|
413
|
+
};
|
|
414
|
+
});
|
|
415
|
+
});
|
|
416
|
+
};
|
|
417
|
+
this.deleteToken = (args, headers) => {
|
|
418
|
+
return this.fetch(this.url('DeleteToken'), createHTTPRequest(args, headers)).then(res => {
|
|
419
|
+
return buildResponse(res).then(_data => {
|
|
420
|
+
return {
|
|
421
|
+
status: _data.status
|
|
422
|
+
};
|
|
423
|
+
});
|
|
424
|
+
});
|
|
425
|
+
};
|
|
426
|
+
this.createAsset = (args, headers) => {
|
|
427
|
+
return this.fetch(this.url('CreateAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
428
|
+
return buildResponse(res).then(_data => {
|
|
429
|
+
return {
|
|
430
|
+
asset: _data.asset
|
|
431
|
+
};
|
|
432
|
+
});
|
|
433
|
+
});
|
|
434
|
+
};
|
|
435
|
+
this.getAsset = (args, headers) => {
|
|
436
|
+
return this.fetch(this.url('GetAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
437
|
+
return buildResponse(res).then(_data => {
|
|
438
|
+
return {
|
|
439
|
+
asset: _data.asset
|
|
440
|
+
};
|
|
441
|
+
});
|
|
442
|
+
});
|
|
443
|
+
};
|
|
444
|
+
this.updateAsset = (args, headers) => {
|
|
445
|
+
return this.fetch(this.url('UpdateAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
446
|
+
return buildResponse(res).then(_data => {
|
|
447
|
+
return {
|
|
448
|
+
asset: _data.asset
|
|
449
|
+
};
|
|
450
|
+
});
|
|
451
|
+
});
|
|
452
|
+
};
|
|
453
|
+
this.deleteAsset = (args, headers) => {
|
|
454
|
+
return this.fetch(this.url('DeleteAsset'), createHTTPRequest(args, headers)).then(res => {
|
|
455
|
+
return buildResponse(res).then(_data => {
|
|
456
|
+
return {
|
|
457
|
+
status: _data.status
|
|
458
|
+
};
|
|
459
|
+
});
|
|
460
|
+
});
|
|
461
|
+
};
|
|
462
|
+
this.hostname = hostname;
|
|
463
|
+
this.fetch = (input, init) => fetch(input, init);
|
|
464
|
+
}
|
|
465
|
+
url(name) {
|
|
466
|
+
return this.hostname + this.path + name;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
314
469
|
const createHTTPRequest = (body = {}, headers = {}) => {
|
|
315
470
|
return {
|
|
316
471
|
method: 'POST',
|
|
@@ -366,4 +521,4 @@ class SequenceMetadata extends Metadata {
|
|
|
366
521
|
}
|
|
367
522
|
}
|
|
368
523
|
|
|
369
|
-
export { ContractType, Metadata, PropertyType, SequenceMetadata,
|
|
524
|
+
export { Collections, ContractType, Metadata, PropertyType, SequenceMetadata, SwapType, TaskStatus, WebRPCSchemaHash, WebRPCSchemaVersion, WebRPCVersion };
|