@hirosystems/token-metadata-api-client 1.2.0 → 2.0.0

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/api.js DELETED
@@ -1,599 +0,0 @@
1
- "use strict";
2
- /// <reference path="./custom.d.ts" />
3
- // tslint:disable
4
- /**
5
- * Token Metadata API
6
- * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
7
- *
8
- * OpenAPI spec version: v0.4.0
9
- *
10
- *
11
- * NOTE: This file is auto generated by the swagger code generator program.
12
- * https://github.com/swagger-api/swagger-codegen.git
13
- * Do not edit the file manually.
14
- */
15
- var __extends = (this && this.__extends) || (function () {
16
- var extendStatics = function (d, b) {
17
- extendStatics = Object.setPrototypeOf ||
18
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
19
- function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
20
- return extendStatics(d, b);
21
- };
22
- return function (d, b) {
23
- extendStatics(d, b);
24
- function __() { this.constructor = d; }
25
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
26
- };
27
- })();
28
- Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.TokensApi = exports.TokensApiFactory = exports.TokensApiFp = exports.TokensApiFetchParamCreator = exports.StatusApi = exports.StatusApiFactory = exports.StatusApiFp = exports.StatusApiFetchParamCreator = exports.OrderBy = exports.Order = exports.RequiredError = exports.BaseAPI = exports.COLLECTION_FORMATS = void 0;
30
- var url = require("url");
31
- var isomorphicFetch = require("isomorphic-fetch");
32
- var BASE_PATH = "https://api.hiro.so/".replace(/\/+$/, "");
33
- /**
34
- *
35
- * @export
36
- */
37
- exports.COLLECTION_FORMATS = {
38
- csv: ",",
39
- ssv: " ",
40
- tsv: "\t",
41
- pipes: "|",
42
- };
43
- /**
44
- *
45
- * @export
46
- * @class BaseAPI
47
- */
48
- var BaseAPI = /** @class */ (function () {
49
- function BaseAPI(configuration, basePath, fetch) {
50
- if (basePath === void 0) { basePath = BASE_PATH; }
51
- if (fetch === void 0) { fetch = isomorphicFetch; }
52
- this.basePath = basePath;
53
- this.fetch = fetch;
54
- if (configuration) {
55
- this.configuration = configuration;
56
- this.basePath = configuration.basePath || this.basePath;
57
- }
58
- }
59
- return BaseAPI;
60
- }());
61
- exports.BaseAPI = BaseAPI;
62
- ;
63
- /**
64
- *
65
- * @export
66
- * @class RequiredError
67
- * @extends {Error}
68
- */
69
- var RequiredError = /** @class */ (function (_super) {
70
- __extends(RequiredError, _super);
71
- function RequiredError(field, msg) {
72
- var _this = _super.call(this, msg) || this;
73
- _this.field = field;
74
- return _this;
75
- }
76
- return RequiredError;
77
- }(Error));
78
- exports.RequiredError = RequiredError;
79
- /**
80
- *
81
- * @export
82
- * @interface Order
83
- */
84
- var Order;
85
- (function (Order) {
86
- Order["asc"] = "asc";
87
- Order["desc"] = "desc";
88
- })(Order = exports.Order || (exports.Order = {}));
89
- /**
90
- *
91
- * @export
92
- * @interface OrderBy
93
- */
94
- var OrderBy;
95
- (function (OrderBy) {
96
- OrderBy["name"] = "name";
97
- OrderBy["symbol"] = "symbol";
98
- })(OrderBy = exports.OrderBy || (exports.OrderBy = {}));
99
- /**
100
- * StatusApi - fetch parameter creator
101
- * @export
102
- */
103
- exports.StatusApiFetchParamCreator = function (configuration) {
104
- return {
105
- /**
106
- * Displays the status of the API and its current workload
107
- * @summary API Status
108
- * @param {*} [options] Override http request option.
109
- * @throws {RequiredError}
110
- */
111
- getApiStatus: function (options) {
112
- if (options === void 0) { options = {}; }
113
- var localVarPath = "/metadata/v1/";
114
- var localVarUrlObj = url.parse(localVarPath, true);
115
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
116
- var localVarHeaderParameter = {};
117
- var localVarQueryParameter = {};
118
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
119
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
120
- delete localVarUrlObj.search;
121
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
122
- return {
123
- url: url.format(localVarUrlObj),
124
- options: localVarRequestOptions,
125
- };
126
- },
127
- };
128
- };
129
- /**
130
- * StatusApi - functional programming interface
131
- * @export
132
- */
133
- exports.StatusApiFp = function (configuration) {
134
- return {
135
- /**
136
- * Displays the status of the API and its current workload
137
- * @summary API Status
138
- * @param {*} [options] Override http request option.
139
- * @throws {RequiredError}
140
- */
141
- getApiStatus: function (options) {
142
- var localVarFetchArgs = exports.StatusApiFetchParamCreator(configuration).getApiStatus(options);
143
- return function (fetch, basePath) {
144
- if (fetch === void 0) { fetch = isomorphicFetch; }
145
- if (basePath === void 0) { basePath = BASE_PATH; }
146
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
147
- if (response.status >= 200 && response.status < 300) {
148
- return response.json();
149
- }
150
- else {
151
- throw response;
152
- }
153
- });
154
- };
155
- },
156
- };
157
- };
158
- /**
159
- * StatusApi - factory interface
160
- * @export
161
- */
162
- exports.StatusApiFactory = function (configuration, fetch, basePath) {
163
- return {
164
- /**
165
- * Displays the status of the API and its current workload
166
- * @summary API Status
167
- * @param {*} [options] Override http request option.
168
- * @throws {RequiredError}
169
- */
170
- getApiStatus: function (options) {
171
- return exports.StatusApiFp(configuration).getApiStatus(options)(fetch, basePath);
172
- },
173
- };
174
- };
175
- /**
176
- * StatusApi - object-oriented interface
177
- * @export
178
- * @class StatusApi
179
- * @extends {BaseAPI}
180
- */
181
- var StatusApi = /** @class */ (function (_super) {
182
- __extends(StatusApi, _super);
183
- function StatusApi() {
184
- return _super !== null && _super.apply(this, arguments) || this;
185
- }
186
- /**
187
- * Displays the status of the API and its current workload
188
- * @summary API Status
189
- * @param {*} [options] Override http request option.
190
- * @throws {RequiredError}
191
- * @memberof StatusApi
192
- */
193
- StatusApi.prototype.getApiStatus = function (options) {
194
- return exports.StatusApiFp(this.configuration).getApiStatus(options)(this.fetch, this.basePath);
195
- };
196
- return StatusApi;
197
- }(BaseAPI));
198
- exports.StatusApi = StatusApi;
199
- /**
200
- * TokensApi - fetch parameter creator
201
- * @export
202
- */
203
- exports.TokensApiFetchParamCreator = function (configuration) {
204
- return {
205
- /**
206
- * Retrieves metadata for a SIP-010 Fungible Token
207
- * @summary Fungible Token Metadata
208
- * @param {string} principal Principal for the contract which owns the SIP-010 token
209
- * @param {string} [locale] Metadata localization to retrieve
210
- * @param {*} [options] Override http request option.
211
- * @throws {RequiredError}
212
- */
213
- getFtMetadata: function (principal, locale, options) {
214
- if (options === void 0) { options = {}; }
215
- // verify required parameter 'principal' is not null or undefined
216
- if (principal === null || principal === undefined) {
217
- throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getFtMetadata.');
218
- }
219
- var localVarPath = "/metadata/v1/ft/{principal}"
220
- .replace("{" + "principal" + "}", encodeURIComponent(String(principal)));
221
- var localVarUrlObj = url.parse(localVarPath, true);
222
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
223
- var localVarHeaderParameter = {};
224
- var localVarQueryParameter = {};
225
- if (locale !== undefined) {
226
- localVarQueryParameter['locale'] = locale;
227
- }
228
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
229
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
230
- delete localVarUrlObj.search;
231
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
232
- return {
233
- url: url.format(localVarUrlObj),
234
- options: localVarRequestOptions,
235
- };
236
- },
237
- /**
238
- * Retrieves a list of Fungible Tokens
239
- * @summary Fungible Tokens
240
- * @param {string} [name]
241
- * @param {string} [symbol]
242
- * @param {string} [address] Stacks Address
243
- * @param {number} [offset] Result offset
244
- * @param {number} [limit] Results per page
245
- * @param {OrderBy} [order_by] Parameter to order results by
246
- * @param {Order} [order] Results order
247
- * @param {*} [options] Override http request option.
248
- * @throws {RequiredError}
249
- */
250
- getFungibleTokens: function (name, symbol, address, offset, limit, order_by, order, options) {
251
- if (options === void 0) { options = {}; }
252
- var localVarPath = "/metadata/v1/ft";
253
- var localVarUrlObj = url.parse(localVarPath, true);
254
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
255
- var localVarHeaderParameter = {};
256
- var localVarQueryParameter = {};
257
- if (name !== undefined) {
258
- localVarQueryParameter['name'] = name;
259
- }
260
- if (symbol !== undefined) {
261
- localVarQueryParameter['symbol'] = symbol;
262
- }
263
- if (address !== undefined) {
264
- localVarQueryParameter['address'] = address;
265
- }
266
- if (offset !== undefined) {
267
- localVarQueryParameter['offset'] = offset;
268
- }
269
- if (limit !== undefined) {
270
- localVarQueryParameter['limit'] = limit;
271
- }
272
- if (order_by !== undefined) {
273
- localVarQueryParameter['order_by'] = order_by;
274
- }
275
- if (order !== undefined) {
276
- localVarQueryParameter['order'] = order;
277
- }
278
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
279
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
280
- delete localVarUrlObj.search;
281
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
282
- return {
283
- url: url.format(localVarUrlObj),
284
- options: localVarRequestOptions,
285
- };
286
- },
287
- /**
288
- * Retrieves metadata for a SIP-009 Non-Fungible Token
289
- * @summary Non-Fungible Token Metadata
290
- * @param {string} principal SIP-009 compliant smart contract principal
291
- * @param {number} token_id Token ID to retrieve
292
- * @param {string} [locale] Metadata localization to retrieve
293
- * @param {*} [options] Override http request option.
294
- * @throws {RequiredError}
295
- */
296
- getNftMetadata: function (principal, token_id, locale, options) {
297
- if (options === void 0) { options = {}; }
298
- // verify required parameter 'principal' is not null or undefined
299
- if (principal === null || principal === undefined) {
300
- throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getNftMetadata.');
301
- }
302
- // verify required parameter 'token_id' is not null or undefined
303
- if (token_id === null || token_id === undefined) {
304
- throw new RequiredError('token_id', 'Required parameter token_id was null or undefined when calling getNftMetadata.');
305
- }
306
- var localVarPath = "/metadata/v1/nft/{principal}/{token_id}"
307
- .replace("{" + "principal" + "}", encodeURIComponent(String(principal)))
308
- .replace("{" + "token_id" + "}", encodeURIComponent(String(token_id)));
309
- var localVarUrlObj = url.parse(localVarPath, true);
310
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
311
- var localVarHeaderParameter = {};
312
- var localVarQueryParameter = {};
313
- if (locale !== undefined) {
314
- localVarQueryParameter['locale'] = locale;
315
- }
316
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
317
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
318
- delete localVarUrlObj.search;
319
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
320
- return {
321
- url: url.format(localVarUrlObj),
322
- options: localVarRequestOptions,
323
- };
324
- },
325
- /**
326
- * Retrieves metadata for a SIP-013 Semi-Fungible Token
327
- * @summary Semi-Fungible Token Metadata
328
- * @param {string} principal SIP-013 compliant smart contract principal
329
- * @param {number} token_id Token ID to retrieve
330
- * @param {string} [locale] Metadata localization to retrieve
331
- * @param {*} [options] Override http request option.
332
- * @throws {RequiredError}
333
- */
334
- getSftMetadata: function (principal, token_id, locale, options) {
335
- if (options === void 0) { options = {}; }
336
- // verify required parameter 'principal' is not null or undefined
337
- if (principal === null || principal === undefined) {
338
- throw new RequiredError('principal', 'Required parameter principal was null or undefined when calling getSftMetadata.');
339
- }
340
- // verify required parameter 'token_id' is not null or undefined
341
- if (token_id === null || token_id === undefined) {
342
- throw new RequiredError('token_id', 'Required parameter token_id was null or undefined when calling getSftMetadata.');
343
- }
344
- var localVarPath = "/metadata/v1/sft/{principal}/{token_id}"
345
- .replace("{" + "principal" + "}", encodeURIComponent(String(principal)))
346
- .replace("{" + "token_id" + "}", encodeURIComponent(String(token_id)));
347
- var localVarUrlObj = url.parse(localVarPath, true);
348
- var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
349
- var localVarHeaderParameter = {};
350
- var localVarQueryParameter = {};
351
- if (locale !== undefined) {
352
- localVarQueryParameter['locale'] = locale;
353
- }
354
- localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
355
- // fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
356
- delete localVarUrlObj.search;
357
- localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
358
- return {
359
- url: url.format(localVarUrlObj),
360
- options: localVarRequestOptions,
361
- };
362
- },
363
- };
364
- };
365
- /**
366
- * TokensApi - functional programming interface
367
- * @export
368
- */
369
- exports.TokensApiFp = function (configuration) {
370
- return {
371
- /**
372
- * Retrieves metadata for a SIP-010 Fungible Token
373
- * @summary Fungible Token Metadata
374
- * @param {string} principal Principal for the contract which owns the SIP-010 token
375
- * @param {string} [locale] Metadata localization to retrieve
376
- * @param {*} [options] Override http request option.
377
- * @throws {RequiredError}
378
- */
379
- getFtMetadata: function (principal, locale, options) {
380
- var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getFtMetadata(principal, locale, options);
381
- return function (fetch, basePath) {
382
- if (fetch === void 0) { fetch = isomorphicFetch; }
383
- if (basePath === void 0) { basePath = BASE_PATH; }
384
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
385
- if (response.status >= 200 && response.status < 300) {
386
- return response.json();
387
- }
388
- else {
389
- throw response;
390
- }
391
- });
392
- };
393
- },
394
- /**
395
- * Retrieves a list of Fungible Tokens
396
- * @summary Fungible Tokens
397
- * @param {string} [name]
398
- * @param {string} [symbol]
399
- * @param {string} [address] Stacks Address
400
- * @param {number} [offset] Result offset
401
- * @param {number} [limit] Results per page
402
- * @param {OrderBy} [order_by] Parameter to order results by
403
- * @param {Order} [order] Results order
404
- * @param {*} [options] Override http request option.
405
- * @throws {RequiredError}
406
- */
407
- getFungibleTokens: function (name, symbol, address, offset, limit, order_by, order, options) {
408
- var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options);
409
- return function (fetch, basePath) {
410
- if (fetch === void 0) { fetch = isomorphicFetch; }
411
- if (basePath === void 0) { basePath = BASE_PATH; }
412
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
413
- if (response.status >= 200 && response.status < 300) {
414
- return response.json();
415
- }
416
- else {
417
- throw response;
418
- }
419
- });
420
- };
421
- },
422
- /**
423
- * Retrieves metadata for a SIP-009 Non-Fungible Token
424
- * @summary Non-Fungible Token Metadata
425
- * @param {string} principal SIP-009 compliant smart contract principal
426
- * @param {number} token_id Token ID to retrieve
427
- * @param {string} [locale] Metadata localization to retrieve
428
- * @param {*} [options] Override http request option.
429
- * @throws {RequiredError}
430
- */
431
- getNftMetadata: function (principal, token_id, locale, options) {
432
- var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getNftMetadata(principal, token_id, locale, options);
433
- return function (fetch, basePath) {
434
- if (fetch === void 0) { fetch = isomorphicFetch; }
435
- if (basePath === void 0) { basePath = BASE_PATH; }
436
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
437
- if (response.status >= 200 && response.status < 300) {
438
- return response.json();
439
- }
440
- else {
441
- throw response;
442
- }
443
- });
444
- };
445
- },
446
- /**
447
- * Retrieves metadata for a SIP-013 Semi-Fungible Token
448
- * @summary Semi-Fungible Token Metadata
449
- * @param {string} principal SIP-013 compliant smart contract principal
450
- * @param {number} token_id Token ID to retrieve
451
- * @param {string} [locale] Metadata localization to retrieve
452
- * @param {*} [options] Override http request option.
453
- * @throws {RequiredError}
454
- */
455
- getSftMetadata: function (principal, token_id, locale, options) {
456
- var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getSftMetadata(principal, token_id, locale, options);
457
- return function (fetch, basePath) {
458
- if (fetch === void 0) { fetch = isomorphicFetch; }
459
- if (basePath === void 0) { basePath = BASE_PATH; }
460
- return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
461
- if (response.status >= 200 && response.status < 300) {
462
- return response.json();
463
- }
464
- else {
465
- throw response;
466
- }
467
- });
468
- };
469
- },
470
- };
471
- };
472
- /**
473
- * TokensApi - factory interface
474
- * @export
475
- */
476
- exports.TokensApiFactory = function (configuration, fetch, basePath) {
477
- return {
478
- /**
479
- * Retrieves metadata for a SIP-010 Fungible Token
480
- * @summary Fungible Token Metadata
481
- * @param {string} principal Principal for the contract which owns the SIP-010 token
482
- * @param {string} [locale] Metadata localization to retrieve
483
- * @param {*} [options] Override http request option.
484
- * @throws {RequiredError}
485
- */
486
- getFtMetadata: function (principal, locale, options) {
487
- return exports.TokensApiFp(configuration).getFtMetadata(principal, locale, options)(fetch, basePath);
488
- },
489
- /**
490
- * Retrieves a list of Fungible Tokens
491
- * @summary Fungible Tokens
492
- * @param {string} [name]
493
- * @param {string} [symbol]
494
- * @param {string} [address] Stacks Address
495
- * @param {number} [offset] Result offset
496
- * @param {number} [limit] Results per page
497
- * @param {OrderBy} [order_by] Parameter to order results by
498
- * @param {Order} [order] Results order
499
- * @param {*} [options] Override http request option.
500
- * @throws {RequiredError}
501
- */
502
- getFungibleTokens: function (name, symbol, address, offset, limit, order_by, order, options) {
503
- return exports.TokensApiFp(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(fetch, basePath);
504
- },
505
- /**
506
- * Retrieves metadata for a SIP-009 Non-Fungible Token
507
- * @summary Non-Fungible Token Metadata
508
- * @param {string} principal SIP-009 compliant smart contract principal
509
- * @param {number} token_id Token ID to retrieve
510
- * @param {string} [locale] Metadata localization to retrieve
511
- * @param {*} [options] Override http request option.
512
- * @throws {RequiredError}
513
- */
514
- getNftMetadata: function (principal, token_id, locale, options) {
515
- return exports.TokensApiFp(configuration).getNftMetadata(principal, token_id, locale, options)(fetch, basePath);
516
- },
517
- /**
518
- * Retrieves metadata for a SIP-013 Semi-Fungible Token
519
- * @summary Semi-Fungible Token Metadata
520
- * @param {string} principal SIP-013 compliant smart contract principal
521
- * @param {number} token_id Token ID to retrieve
522
- * @param {string} [locale] Metadata localization to retrieve
523
- * @param {*} [options] Override http request option.
524
- * @throws {RequiredError}
525
- */
526
- getSftMetadata: function (principal, token_id, locale, options) {
527
- return exports.TokensApiFp(configuration).getSftMetadata(principal, token_id, locale, options)(fetch, basePath);
528
- },
529
- };
530
- };
531
- /**
532
- * TokensApi - object-oriented interface
533
- * @export
534
- * @class TokensApi
535
- * @extends {BaseAPI}
536
- */
537
- var TokensApi = /** @class */ (function (_super) {
538
- __extends(TokensApi, _super);
539
- function TokensApi() {
540
- return _super !== null && _super.apply(this, arguments) || this;
541
- }
542
- /**
543
- * Retrieves metadata for a SIP-010 Fungible Token
544
- * @summary Fungible Token Metadata
545
- * @param {string} principal Principal for the contract which owns the SIP-010 token
546
- * @param {string} [locale] Metadata localization to retrieve
547
- * @param {*} [options] Override http request option.
548
- * @throws {RequiredError}
549
- * @memberof TokensApi
550
- */
551
- TokensApi.prototype.getFtMetadata = function (principal, locale, options) {
552
- return exports.TokensApiFp(this.configuration).getFtMetadata(principal, locale, options)(this.fetch, this.basePath);
553
- };
554
- /**
555
- * Retrieves a list of Fungible Tokens
556
- * @summary Fungible Tokens
557
- * @param {string} [name]
558
- * @param {string} [symbol]
559
- * @param {string} [address] Stacks Address
560
- * @param {number} [offset] Result offset
561
- * @param {number} [limit] Results per page
562
- * @param {OrderBy} [order_by] Parameter to order results by
563
- * @param {Order} [order] Results order
564
- * @param {*} [options] Override http request option.
565
- * @throws {RequiredError}
566
- * @memberof TokensApi
567
- */
568
- TokensApi.prototype.getFungibleTokens = function (name, symbol, address, offset, limit, order_by, order, options) {
569
- return exports.TokensApiFp(this.configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(this.fetch, this.basePath);
570
- };
571
- /**
572
- * Retrieves metadata for a SIP-009 Non-Fungible Token
573
- * @summary Non-Fungible Token Metadata
574
- * @param {string} principal SIP-009 compliant smart contract principal
575
- * @param {number} token_id Token ID to retrieve
576
- * @param {string} [locale] Metadata localization to retrieve
577
- * @param {*} [options] Override http request option.
578
- * @throws {RequiredError}
579
- * @memberof TokensApi
580
- */
581
- TokensApi.prototype.getNftMetadata = function (principal, token_id, locale, options) {
582
- return exports.TokensApiFp(this.configuration).getNftMetadata(principal, token_id, locale, options)(this.fetch, this.basePath);
583
- };
584
- /**
585
- * Retrieves metadata for a SIP-013 Semi-Fungible Token
586
- * @summary Semi-Fungible Token Metadata
587
- * @param {string} principal SIP-013 compliant smart contract principal
588
- * @param {number} token_id Token ID to retrieve
589
- * @param {string} [locale] Metadata localization to retrieve
590
- * @param {*} [options] Override http request option.
591
- * @throws {RequiredError}
592
- * @memberof TokensApi
593
- */
594
- TokensApi.prototype.getSftMetadata = function (principal, token_id, locale, options) {
595
- return exports.TokensApiFp(this.configuration).getSftMetadata(principal, token_id, locale, options)(this.fetch, this.basePath);
596
- };
597
- return TokensApi;
598
- }(BaseAPI));
599
- exports.TokensApi = TokensApi;
@@ -1,55 +0,0 @@
1
- /**
2
- * Token Metadata API
3
- * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
4
- *
5
- * OpenAPI spec version: v0.4.0
6
- *
7
- *
8
- * NOTE: This file is auto generated by the swagger code generator program.
9
- * https://github.com/swagger-api/swagger-codegen.git
10
- * Do not edit the file manually.
11
- */
12
- export interface ConfigurationParameters {
13
- apiKey?: string | ((name: string) => string);
14
- username?: string;
15
- password?: string;
16
- accessToken?: string | ((name: string, scopes?: string[]) => string);
17
- basePath?: string;
18
- }
19
- export declare class Configuration {
20
- /**
21
- * parameter for apiKey security
22
- * @param name security name
23
- * @memberof Configuration
24
- */
25
- apiKey?: string | ((name: string) => string);
26
- /**
27
- * parameter for basic security
28
- *
29
- * @type {string}
30
- * @memberof Configuration
31
- */
32
- username?: string;
33
- /**
34
- * parameter for basic security
35
- *
36
- * @type {string}
37
- * @memberof Configuration
38
- */
39
- password?: string;
40
- /**
41
- * parameter for oauth2 security
42
- * @param name security name
43
- * @param scopes oauth2 scope
44
- * @memberof Configuration
45
- */
46
- accessToken?: string | ((name: string, scopes?: string[]) => string);
47
- /**
48
- * override base path
49
- *
50
- * @type {string}
51
- * @memberof Configuration
52
- */
53
- basePath?: string;
54
- constructor(param?: ConfigurationParameters);
55
- }
@@ -1,27 +0,0 @@
1
- "use strict";
2
- // tslint:disable
3
- /**
4
- * Token Metadata API
5
- * Service that indexes metadata for every SIP-009, SIP-010, and SIP-013 Token in the Stacks blockchain and exposes it via REST API endpoints.
6
- *
7
- * OpenAPI spec version: v0.4.0
8
- *
9
- *
10
- * NOTE: This file is auto generated by the swagger code generator program.
11
- * https://github.com/swagger-api/swagger-codegen.git
12
- * Do not edit the file manually.
13
- */
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.Configuration = void 0;
16
- var Configuration = /** @class */ (function () {
17
- function Configuration(param) {
18
- if (param === void 0) { param = {}; }
19
- this.apiKey = param.apiKey;
20
- this.username = param.username;
21
- this.password = param.password;
22
- this.accessToken = param.accessToken;
23
- this.basePath = param.basePath;
24
- }
25
- return Configuration;
26
- }());
27
- exports.Configuration = Configuration;