@hirosystems/token-metadata-api-client 1.0.3 → 1.2.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/api.ts +254 -35
- package/configuration.ts +1 -1
- package/dist/api.d.ts +194 -34
- package/dist/api.js +130 -14
- package/dist/configuration.d.ts +1 -1
- package/dist/configuration.js +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/index.ts +1 -1
- package/package.json +1 -1
package/api.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Token Metadata API
|
|
5
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
6
|
*
|
|
7
|
-
* OpenAPI spec version: v0.
|
|
7
|
+
* OpenAPI spec version: v0.4.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This file is auto generated by the swagger code generator program.
|
|
@@ -195,6 +195,86 @@ export interface ApiTokenCount {
|
|
|
195
195
|
*/
|
|
196
196
|
sft?: number;
|
|
197
197
|
}
|
|
198
|
+
/**
|
|
199
|
+
*
|
|
200
|
+
* @export
|
|
201
|
+
* @interface ErrorResponse
|
|
202
|
+
*/
|
|
203
|
+
export interface ErrorResponse {
|
|
204
|
+
}
|
|
205
|
+
/**
|
|
206
|
+
*
|
|
207
|
+
* @export
|
|
208
|
+
* @interface FtBasicMetadataResponse
|
|
209
|
+
*/
|
|
210
|
+
export interface FtBasicMetadataResponse {
|
|
211
|
+
/**
|
|
212
|
+
*
|
|
213
|
+
* @type {string}
|
|
214
|
+
* @memberof FtBasicMetadataResponse
|
|
215
|
+
*/
|
|
216
|
+
name?: string;
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* @type {string}
|
|
220
|
+
* @memberof FtBasicMetadataResponse
|
|
221
|
+
*/
|
|
222
|
+
symbol?: string;
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* @type {number}
|
|
226
|
+
* @memberof FtBasicMetadataResponse
|
|
227
|
+
*/
|
|
228
|
+
decimals?: number;
|
|
229
|
+
/**
|
|
230
|
+
*
|
|
231
|
+
* @type {string}
|
|
232
|
+
* @memberof FtBasicMetadataResponse
|
|
233
|
+
*/
|
|
234
|
+
total_supply?: string;
|
|
235
|
+
/**
|
|
236
|
+
*
|
|
237
|
+
* @type {string}
|
|
238
|
+
* @memberof FtBasicMetadataResponse
|
|
239
|
+
*/
|
|
240
|
+
token_uri?: string;
|
|
241
|
+
/**
|
|
242
|
+
*
|
|
243
|
+
* @type {string}
|
|
244
|
+
* @memberof FtBasicMetadataResponse
|
|
245
|
+
*/
|
|
246
|
+
description?: string;
|
|
247
|
+
/**
|
|
248
|
+
*
|
|
249
|
+
* @type {string}
|
|
250
|
+
* @memberof FtBasicMetadataResponse
|
|
251
|
+
*/
|
|
252
|
+
image_uri?: string;
|
|
253
|
+
/**
|
|
254
|
+
*
|
|
255
|
+
* @type {string}
|
|
256
|
+
* @memberof FtBasicMetadataResponse
|
|
257
|
+
*/
|
|
258
|
+
image_canonical_uri?: string;
|
|
259
|
+
/**
|
|
260
|
+
*
|
|
261
|
+
* @type {string}
|
|
262
|
+
* @memberof FtBasicMetadataResponse
|
|
263
|
+
*/
|
|
264
|
+
tx_id: string;
|
|
265
|
+
/**
|
|
266
|
+
*
|
|
267
|
+
* @type {string}
|
|
268
|
+
* @memberof FtBasicMetadataResponse
|
|
269
|
+
*/
|
|
270
|
+
sender_address: string;
|
|
271
|
+
/**
|
|
272
|
+
*
|
|
273
|
+
* @type {string}
|
|
274
|
+
* @memberof FtBasicMetadataResponse
|
|
275
|
+
*/
|
|
276
|
+
contract_principal: string;
|
|
277
|
+
}
|
|
198
278
|
/**
|
|
199
279
|
*
|
|
200
280
|
* @export
|
|
@@ -392,6 +472,62 @@ export interface NftMetadataResponse {
|
|
|
392
472
|
*/
|
|
393
473
|
metadata?: Metadata;
|
|
394
474
|
}
|
|
475
|
+
/**
|
|
476
|
+
*
|
|
477
|
+
* @export
|
|
478
|
+
* @interface NotFoundErrorResponse
|
|
479
|
+
*/
|
|
480
|
+
export interface NotFoundErrorResponse {
|
|
481
|
+
}
|
|
482
|
+
/**
|
|
483
|
+
*
|
|
484
|
+
* @export
|
|
485
|
+
* @interface Order
|
|
486
|
+
*/
|
|
487
|
+
export enum Order {
|
|
488
|
+
asc = 'asc',
|
|
489
|
+
desc = 'desc',
|
|
490
|
+
}
|
|
491
|
+
/**
|
|
492
|
+
*
|
|
493
|
+
* @export
|
|
494
|
+
* @interface OrderBy
|
|
495
|
+
*/
|
|
496
|
+
export enum OrderBy {
|
|
497
|
+
name = 'name',
|
|
498
|
+
symbol = 'symbol',
|
|
499
|
+
}
|
|
500
|
+
/**
|
|
501
|
+
*
|
|
502
|
+
* @export
|
|
503
|
+
* @interface PaginatedFtBasicMetadataResponse
|
|
504
|
+
*/
|
|
505
|
+
export interface PaginatedFtBasicMetadataResponse {
|
|
506
|
+
/**
|
|
507
|
+
*
|
|
508
|
+
* @type {number}
|
|
509
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
510
|
+
*/
|
|
511
|
+
limit: number;
|
|
512
|
+
/**
|
|
513
|
+
*
|
|
514
|
+
* @type {number}
|
|
515
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
516
|
+
*/
|
|
517
|
+
offset: number;
|
|
518
|
+
/**
|
|
519
|
+
*
|
|
520
|
+
* @type {number}
|
|
521
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
522
|
+
*/
|
|
523
|
+
total: number;
|
|
524
|
+
/**
|
|
525
|
+
*
|
|
526
|
+
* @type {Array<FtBasicMetadataResponse>}
|
|
527
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
528
|
+
*/
|
|
529
|
+
results: Array<FtBasicMetadataResponse>;
|
|
530
|
+
}
|
|
395
531
|
/**
|
|
396
532
|
*
|
|
397
533
|
* @export
|
|
@@ -423,40 +559,6 @@ export interface SftMetadataResponse {
|
|
|
423
559
|
*/
|
|
424
560
|
metadata?: Metadata;
|
|
425
561
|
}
|
|
426
|
-
/**
|
|
427
|
-
*
|
|
428
|
-
* @export
|
|
429
|
-
* @interface TokenErrorResponse
|
|
430
|
-
*/
|
|
431
|
-
export interface TokenErrorResponse {
|
|
432
|
-
}
|
|
433
|
-
/**
|
|
434
|
-
*
|
|
435
|
-
* @export
|
|
436
|
-
* @interface TokenNotFoundResponse
|
|
437
|
-
*/
|
|
438
|
-
export interface TokenNotFoundResponse {
|
|
439
|
-
/**
|
|
440
|
-
*
|
|
441
|
-
* @type {string}
|
|
442
|
-
* @memberof TokenNotFoundResponse
|
|
443
|
-
*/
|
|
444
|
-
error: TokenNotFoundResponse.ErrorEnum;
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
/**
|
|
448
|
-
* @export
|
|
449
|
-
* @namespace TokenNotFoundResponse
|
|
450
|
-
*/
|
|
451
|
-
export namespace TokenNotFoundResponse {
|
|
452
|
-
/**
|
|
453
|
-
* @export
|
|
454
|
-
* @enum {string}
|
|
455
|
-
*/
|
|
456
|
-
export enum ErrorEnum {
|
|
457
|
-
TokenNotFound = <any> 'Token not found'
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
562
|
/**
|
|
461
563
|
* StatusApi - fetch parameter creator
|
|
462
564
|
* @export
|
|
@@ -593,6 +695,64 @@ export const TokensApiFetchParamCreator = function (configuration?: Configuratio
|
|
|
593
695
|
options: localVarRequestOptions,
|
|
594
696
|
};
|
|
595
697
|
},
|
|
698
|
+
/**
|
|
699
|
+
* Retrieves a list of Fungible Tokens
|
|
700
|
+
* @summary Fungible Tokens
|
|
701
|
+
* @param {string} [name]
|
|
702
|
+
* @param {string} [symbol]
|
|
703
|
+
* @param {string} [address] Stacks Address
|
|
704
|
+
* @param {number} [offset] Result offset
|
|
705
|
+
* @param {number} [limit] Results per page
|
|
706
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
707
|
+
* @param {Order} [order] Results order
|
|
708
|
+
* @param {*} [options] Override http request option.
|
|
709
|
+
* @throws {RequiredError}
|
|
710
|
+
*/
|
|
711
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options: any = {}): FetchArgs {
|
|
712
|
+
const localVarPath = `/metadata/v1/ft`;
|
|
713
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
714
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
715
|
+
const localVarHeaderParameter = {} as any;
|
|
716
|
+
const localVarQueryParameter = {} as any;
|
|
717
|
+
|
|
718
|
+
if (name !== undefined) {
|
|
719
|
+
localVarQueryParameter['name'] = name;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
if (symbol !== undefined) {
|
|
723
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
if (address !== undefined) {
|
|
727
|
+
localVarQueryParameter['address'] = address;
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
if (offset !== undefined) {
|
|
731
|
+
localVarQueryParameter['offset'] = offset;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
if (limit !== undefined) {
|
|
735
|
+
localVarQueryParameter['limit'] = limit;
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
if (order_by !== undefined) {
|
|
739
|
+
localVarQueryParameter['order_by'] = order_by;
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
if (order !== undefined) {
|
|
743
|
+
localVarQueryParameter['order'] = order;
|
|
744
|
+
}
|
|
745
|
+
|
|
746
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
747
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
748
|
+
delete localVarUrlObj.search;
|
|
749
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
750
|
+
|
|
751
|
+
return {
|
|
752
|
+
url: url.format(localVarUrlObj),
|
|
753
|
+
options: localVarRequestOptions,
|
|
754
|
+
};
|
|
755
|
+
},
|
|
596
756
|
/**
|
|
597
757
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
598
758
|
* @summary Non-Fungible Token Metadata
|
|
@@ -702,6 +862,31 @@ export const TokensApiFp = function(configuration?: Configuration) {
|
|
|
702
862
|
});
|
|
703
863
|
};
|
|
704
864
|
},
|
|
865
|
+
/**
|
|
866
|
+
* Retrieves a list of Fungible Tokens
|
|
867
|
+
* @summary Fungible Tokens
|
|
868
|
+
* @param {string} [name]
|
|
869
|
+
* @param {string} [symbol]
|
|
870
|
+
* @param {string} [address] Stacks Address
|
|
871
|
+
* @param {number} [offset] Result offset
|
|
872
|
+
* @param {number} [limit] Results per page
|
|
873
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
874
|
+
* @param {Order} [order] Results order
|
|
875
|
+
* @param {*} [options] Override http request option.
|
|
876
|
+
* @throws {RequiredError}
|
|
877
|
+
*/
|
|
878
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<PaginatedFtBasicMetadataResponse> {
|
|
879
|
+
const localVarFetchArgs = TokensApiFetchParamCreator(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options);
|
|
880
|
+
return (fetch: FetchAPI = isomorphicFetch, basePath: string = BASE_PATH) => {
|
|
881
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
882
|
+
if (response.status >= 200 && response.status < 300) {
|
|
883
|
+
return response.json();
|
|
884
|
+
} else {
|
|
885
|
+
throw response;
|
|
886
|
+
}
|
|
887
|
+
});
|
|
888
|
+
};
|
|
889
|
+
},
|
|
705
890
|
/**
|
|
706
891
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
707
892
|
* @summary Non-Fungible Token Metadata
|
|
@@ -764,6 +949,22 @@ export const TokensApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
764
949
|
getFtMetadata(principal: string, locale?: string, options?: any) {
|
|
765
950
|
return TokensApiFp(configuration).getFtMetadata(principal, locale, options)(fetch, basePath);
|
|
766
951
|
},
|
|
952
|
+
/**
|
|
953
|
+
* Retrieves a list of Fungible Tokens
|
|
954
|
+
* @summary Fungible Tokens
|
|
955
|
+
* @param {string} [name]
|
|
956
|
+
* @param {string} [symbol]
|
|
957
|
+
* @param {string} [address] Stacks Address
|
|
958
|
+
* @param {number} [offset] Result offset
|
|
959
|
+
* @param {number} [limit] Results per page
|
|
960
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
961
|
+
* @param {Order} [order] Results order
|
|
962
|
+
* @param {*} [options] Override http request option.
|
|
963
|
+
* @throws {RequiredError}
|
|
964
|
+
*/
|
|
965
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any) {
|
|
966
|
+
return TokensApiFp(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(fetch, basePath);
|
|
967
|
+
},
|
|
767
968
|
/**
|
|
768
969
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
769
970
|
* @summary Non-Fungible Token Metadata
|
|
@@ -811,6 +1012,24 @@ export class TokensApi extends BaseAPI {
|
|
|
811
1012
|
return TokensApiFp(this.configuration).getFtMetadata(principal, locale, options)(this.fetch, this.basePath);
|
|
812
1013
|
}
|
|
813
1014
|
|
|
1015
|
+
/**
|
|
1016
|
+
* Retrieves a list of Fungible Tokens
|
|
1017
|
+
* @summary Fungible Tokens
|
|
1018
|
+
* @param {string} [name]
|
|
1019
|
+
* @param {string} [symbol]
|
|
1020
|
+
* @param {string} [address] Stacks Address
|
|
1021
|
+
* @param {number} [offset] Result offset
|
|
1022
|
+
* @param {number} [limit] Results per page
|
|
1023
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
1024
|
+
* @param {Order} [order] Results order
|
|
1025
|
+
* @param {*} [options] Override http request option.
|
|
1026
|
+
* @throws {RequiredError}
|
|
1027
|
+
* @memberof TokensApi
|
|
1028
|
+
*/
|
|
1029
|
+
public getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any) {
|
|
1030
|
+
return TokensApiFp(this.configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(this.fetch, this.basePath);
|
|
1031
|
+
}
|
|
1032
|
+
|
|
814
1033
|
/**
|
|
815
1034
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
816
1035
|
* @summary Non-Fungible Token Metadata
|
package/configuration.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Token Metadata API
|
|
4
4
|
* 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.
|
|
5
5
|
*
|
|
6
|
-
* OpenAPI spec version: v0.
|
|
6
|
+
* OpenAPI spec version: v0.4.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/dist/api.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Token Metadata API
|
|
3
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
4
|
*
|
|
5
|
-
* OpenAPI spec version: v0.
|
|
5
|
+
* OpenAPI spec version: v0.4.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto generated by the swagger code generator program.
|
|
@@ -178,6 +178,86 @@ export interface ApiTokenCount {
|
|
|
178
178
|
*/
|
|
179
179
|
sft?: number;
|
|
180
180
|
}
|
|
181
|
+
/**
|
|
182
|
+
*
|
|
183
|
+
* @export
|
|
184
|
+
* @interface ErrorResponse
|
|
185
|
+
*/
|
|
186
|
+
export interface ErrorResponse {
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
*
|
|
190
|
+
* @export
|
|
191
|
+
* @interface FtBasicMetadataResponse
|
|
192
|
+
*/
|
|
193
|
+
export interface FtBasicMetadataResponse {
|
|
194
|
+
/**
|
|
195
|
+
*
|
|
196
|
+
* @type {string}
|
|
197
|
+
* @memberof FtBasicMetadataResponse
|
|
198
|
+
*/
|
|
199
|
+
name?: string;
|
|
200
|
+
/**
|
|
201
|
+
*
|
|
202
|
+
* @type {string}
|
|
203
|
+
* @memberof FtBasicMetadataResponse
|
|
204
|
+
*/
|
|
205
|
+
symbol?: string;
|
|
206
|
+
/**
|
|
207
|
+
*
|
|
208
|
+
* @type {number}
|
|
209
|
+
* @memberof FtBasicMetadataResponse
|
|
210
|
+
*/
|
|
211
|
+
decimals?: number;
|
|
212
|
+
/**
|
|
213
|
+
*
|
|
214
|
+
* @type {string}
|
|
215
|
+
* @memberof FtBasicMetadataResponse
|
|
216
|
+
*/
|
|
217
|
+
total_supply?: string;
|
|
218
|
+
/**
|
|
219
|
+
*
|
|
220
|
+
* @type {string}
|
|
221
|
+
* @memberof FtBasicMetadataResponse
|
|
222
|
+
*/
|
|
223
|
+
token_uri?: string;
|
|
224
|
+
/**
|
|
225
|
+
*
|
|
226
|
+
* @type {string}
|
|
227
|
+
* @memberof FtBasicMetadataResponse
|
|
228
|
+
*/
|
|
229
|
+
description?: string;
|
|
230
|
+
/**
|
|
231
|
+
*
|
|
232
|
+
* @type {string}
|
|
233
|
+
* @memberof FtBasicMetadataResponse
|
|
234
|
+
*/
|
|
235
|
+
image_uri?: string;
|
|
236
|
+
/**
|
|
237
|
+
*
|
|
238
|
+
* @type {string}
|
|
239
|
+
* @memberof FtBasicMetadataResponse
|
|
240
|
+
*/
|
|
241
|
+
image_canonical_uri?: string;
|
|
242
|
+
/**
|
|
243
|
+
*
|
|
244
|
+
* @type {string}
|
|
245
|
+
* @memberof FtBasicMetadataResponse
|
|
246
|
+
*/
|
|
247
|
+
tx_id: string;
|
|
248
|
+
/**
|
|
249
|
+
*
|
|
250
|
+
* @type {string}
|
|
251
|
+
* @memberof FtBasicMetadataResponse
|
|
252
|
+
*/
|
|
253
|
+
sender_address: string;
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
* @type {string}
|
|
257
|
+
* @memberof FtBasicMetadataResponse
|
|
258
|
+
*/
|
|
259
|
+
contract_principal: string;
|
|
260
|
+
}
|
|
181
261
|
/**
|
|
182
262
|
*
|
|
183
263
|
* @export
|
|
@@ -377,6 +457,62 @@ export interface NftMetadataResponse {
|
|
|
377
457
|
*/
|
|
378
458
|
metadata?: Metadata;
|
|
379
459
|
}
|
|
460
|
+
/**
|
|
461
|
+
*
|
|
462
|
+
* @export
|
|
463
|
+
* @interface NotFoundErrorResponse
|
|
464
|
+
*/
|
|
465
|
+
export interface NotFoundErrorResponse {
|
|
466
|
+
}
|
|
467
|
+
/**
|
|
468
|
+
*
|
|
469
|
+
* @export
|
|
470
|
+
* @interface Order
|
|
471
|
+
*/
|
|
472
|
+
export declare enum Order {
|
|
473
|
+
asc = "asc",
|
|
474
|
+
desc = "desc"
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
*
|
|
478
|
+
* @export
|
|
479
|
+
* @interface OrderBy
|
|
480
|
+
*/
|
|
481
|
+
export declare enum OrderBy {
|
|
482
|
+
name = "name",
|
|
483
|
+
symbol = "symbol"
|
|
484
|
+
}
|
|
485
|
+
/**
|
|
486
|
+
*
|
|
487
|
+
* @export
|
|
488
|
+
* @interface PaginatedFtBasicMetadataResponse
|
|
489
|
+
*/
|
|
490
|
+
export interface PaginatedFtBasicMetadataResponse {
|
|
491
|
+
/**
|
|
492
|
+
*
|
|
493
|
+
* @type {number}
|
|
494
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
495
|
+
*/
|
|
496
|
+
limit: number;
|
|
497
|
+
/**
|
|
498
|
+
*
|
|
499
|
+
* @type {number}
|
|
500
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
501
|
+
*/
|
|
502
|
+
offset: number;
|
|
503
|
+
/**
|
|
504
|
+
*
|
|
505
|
+
* @type {number}
|
|
506
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
507
|
+
*/
|
|
508
|
+
total: number;
|
|
509
|
+
/**
|
|
510
|
+
*
|
|
511
|
+
* @type {Array<FtBasicMetadataResponse>}
|
|
512
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
513
|
+
*/
|
|
514
|
+
results: Array<FtBasicMetadataResponse>;
|
|
515
|
+
}
|
|
380
516
|
/**
|
|
381
517
|
*
|
|
382
518
|
* @export
|
|
@@ -408,39 +544,6 @@ export interface SftMetadataResponse {
|
|
|
408
544
|
*/
|
|
409
545
|
metadata?: Metadata;
|
|
410
546
|
}
|
|
411
|
-
/**
|
|
412
|
-
*
|
|
413
|
-
* @export
|
|
414
|
-
* @interface TokenErrorResponse
|
|
415
|
-
*/
|
|
416
|
-
export interface TokenErrorResponse {
|
|
417
|
-
}
|
|
418
|
-
/**
|
|
419
|
-
*
|
|
420
|
-
* @export
|
|
421
|
-
* @interface TokenNotFoundResponse
|
|
422
|
-
*/
|
|
423
|
-
export interface TokenNotFoundResponse {
|
|
424
|
-
/**
|
|
425
|
-
*
|
|
426
|
-
* @type {string}
|
|
427
|
-
* @memberof TokenNotFoundResponse
|
|
428
|
-
*/
|
|
429
|
-
error: TokenNotFoundResponse.ErrorEnum;
|
|
430
|
-
}
|
|
431
|
-
/**
|
|
432
|
-
* @export
|
|
433
|
-
* @namespace TokenNotFoundResponse
|
|
434
|
-
*/
|
|
435
|
-
export declare namespace TokenNotFoundResponse {
|
|
436
|
-
/**
|
|
437
|
-
* @export
|
|
438
|
-
* @enum {string}
|
|
439
|
-
*/
|
|
440
|
-
enum ErrorEnum {
|
|
441
|
-
TokenNotFound
|
|
442
|
-
}
|
|
443
|
-
}
|
|
444
547
|
/**
|
|
445
548
|
* StatusApi - fetch parameter creator
|
|
446
549
|
* @export
|
|
@@ -510,6 +613,20 @@ export declare const TokensApiFetchParamCreator: (configuration?: Configuration)
|
|
|
510
613
|
* @throws {RequiredError}
|
|
511
614
|
*/
|
|
512
615
|
getFtMetadata(principal: string, locale?: string, options?: any): FetchArgs;
|
|
616
|
+
/**
|
|
617
|
+
* Retrieves a list of Fungible Tokens
|
|
618
|
+
* @summary Fungible Tokens
|
|
619
|
+
* @param {string} [name]
|
|
620
|
+
* @param {string} [symbol]
|
|
621
|
+
* @param {string} [address] Stacks Address
|
|
622
|
+
* @param {number} [offset] Result offset
|
|
623
|
+
* @param {number} [limit] Results per page
|
|
624
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
625
|
+
* @param {Order} [order] Results order
|
|
626
|
+
* @param {*} [options] Override http request option.
|
|
627
|
+
* @throws {RequiredError}
|
|
628
|
+
*/
|
|
629
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): FetchArgs;
|
|
513
630
|
/**
|
|
514
631
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
515
632
|
* @summary Non-Fungible Token Metadata
|
|
@@ -545,6 +662,20 @@ export declare const TokensApiFp: (configuration?: Configuration) => {
|
|
|
545
662
|
* @throws {RequiredError}
|
|
546
663
|
*/
|
|
547
664
|
getFtMetadata(principal: string, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<FtMetadataResponse>;
|
|
665
|
+
/**
|
|
666
|
+
* Retrieves a list of Fungible Tokens
|
|
667
|
+
* @summary Fungible Tokens
|
|
668
|
+
* @param {string} [name]
|
|
669
|
+
* @param {string} [symbol]
|
|
670
|
+
* @param {string} [address] Stacks Address
|
|
671
|
+
* @param {number} [offset] Result offset
|
|
672
|
+
* @param {number} [limit] Results per page
|
|
673
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
674
|
+
* @param {Order} [order] Results order
|
|
675
|
+
* @param {*} [options] Override http request option.
|
|
676
|
+
* @throws {RequiredError}
|
|
677
|
+
*/
|
|
678
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<PaginatedFtBasicMetadataResponse>;
|
|
548
679
|
/**
|
|
549
680
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
550
681
|
* @summary Non-Fungible Token Metadata
|
|
@@ -580,6 +711,20 @@ export declare const TokensApiFactory: (configuration?: Configuration, fetch?: F
|
|
|
580
711
|
* @throws {RequiredError}
|
|
581
712
|
*/
|
|
582
713
|
getFtMetadata(principal: string, locale?: string, options?: any): Promise<FtMetadataResponse>;
|
|
714
|
+
/**
|
|
715
|
+
* Retrieves a list of Fungible Tokens
|
|
716
|
+
* @summary Fungible Tokens
|
|
717
|
+
* @param {string} [name]
|
|
718
|
+
* @param {string} [symbol]
|
|
719
|
+
* @param {string} [address] Stacks Address
|
|
720
|
+
* @param {number} [offset] Result offset
|
|
721
|
+
* @param {number} [limit] Results per page
|
|
722
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
723
|
+
* @param {Order} [order] Results order
|
|
724
|
+
* @param {*} [options] Override http request option.
|
|
725
|
+
* @throws {RequiredError}
|
|
726
|
+
*/
|
|
727
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): Promise<PaginatedFtBasicMetadataResponse>;
|
|
583
728
|
/**
|
|
584
729
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
585
730
|
* @summary Non-Fungible Token Metadata
|
|
@@ -618,6 +763,21 @@ export declare class TokensApi extends BaseAPI {
|
|
|
618
763
|
* @memberof TokensApi
|
|
619
764
|
*/
|
|
620
765
|
getFtMetadata(principal: string, locale?: string, options?: any): Promise<FtMetadataResponse>;
|
|
766
|
+
/**
|
|
767
|
+
* Retrieves a list of Fungible Tokens
|
|
768
|
+
* @summary Fungible Tokens
|
|
769
|
+
* @param {string} [name]
|
|
770
|
+
* @param {string} [symbol]
|
|
771
|
+
* @param {string} [address] Stacks Address
|
|
772
|
+
* @param {number} [offset] Result offset
|
|
773
|
+
* @param {number} [limit] Results per page
|
|
774
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
775
|
+
* @param {Order} [order] Results order
|
|
776
|
+
* @param {*} [options] Override http request option.
|
|
777
|
+
* @throws {RequiredError}
|
|
778
|
+
* @memberof TokensApi
|
|
779
|
+
*/
|
|
780
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): Promise<PaginatedFtBasicMetadataResponse>;
|
|
621
781
|
/**
|
|
622
782
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
623
783
|
* @summary Non-Fungible Token Metadata
|
package/dist/api.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Token Metadata API
|
|
6
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
7
|
*
|
|
8
|
-
* OpenAPI spec version: v0.
|
|
8
|
+
* OpenAPI spec version: v0.4.0
|
|
9
9
|
*
|
|
10
10
|
*
|
|
11
11
|
* NOTE: This file is auto generated by the swagger code generator program.
|
|
@@ -26,7 +26,7 @@ var __extends = (this && this.__extends) || (function () {
|
|
|
26
26
|
};
|
|
27
27
|
})();
|
|
28
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.
|
|
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
30
|
var url = require("url");
|
|
31
31
|
var isomorphicFetch = require("isomorphic-fetch");
|
|
32
32
|
var BASE_PATH = "https://api.hiro.so/".replace(/\/+$/, "");
|
|
@@ -77,20 +77,25 @@ var RequiredError = /** @class */ (function (_super) {
|
|
|
77
77
|
}(Error));
|
|
78
78
|
exports.RequiredError = RequiredError;
|
|
79
79
|
/**
|
|
80
|
+
*
|
|
80
81
|
* @export
|
|
81
|
-
* @
|
|
82
|
+
* @interface Order
|
|
82
83
|
*/
|
|
83
|
-
var
|
|
84
|
-
(function (
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
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 = {}));
|
|
94
99
|
/**
|
|
95
100
|
* StatusApi - fetch parameter creator
|
|
96
101
|
* @export
|
|
@@ -229,6 +234,56 @@ exports.TokensApiFetchParamCreator = function (configuration) {
|
|
|
229
234
|
options: localVarRequestOptions,
|
|
230
235
|
};
|
|
231
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
|
+
},
|
|
232
287
|
/**
|
|
233
288
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
234
289
|
* @summary Non-Fungible Token Metadata
|
|
@@ -336,6 +391,34 @@ exports.TokensApiFp = function (configuration) {
|
|
|
336
391
|
});
|
|
337
392
|
};
|
|
338
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
|
+
},
|
|
339
422
|
/**
|
|
340
423
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
341
424
|
* @summary Non-Fungible Token Metadata
|
|
@@ -403,6 +486,22 @@ exports.TokensApiFactory = function (configuration, fetch, basePath) {
|
|
|
403
486
|
getFtMetadata: function (principal, locale, options) {
|
|
404
487
|
return exports.TokensApiFp(configuration).getFtMetadata(principal, locale, options)(fetch, basePath);
|
|
405
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
|
+
},
|
|
406
505
|
/**
|
|
407
506
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
408
507
|
* @summary Non-Fungible Token Metadata
|
|
@@ -452,6 +551,23 @@ var TokensApi = /** @class */ (function (_super) {
|
|
|
452
551
|
TokensApi.prototype.getFtMetadata = function (principal, locale, options) {
|
|
453
552
|
return exports.TokensApiFp(this.configuration).getFtMetadata(principal, locale, options)(this.fetch, this.basePath);
|
|
454
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
|
+
};
|
|
455
571
|
/**
|
|
456
572
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
457
573
|
* @summary Non-Fungible Token Metadata
|
package/dist/configuration.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Token Metadata API
|
|
3
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
4
|
*
|
|
5
|
-
* OpenAPI spec version: v0.
|
|
5
|
+
* OpenAPI spec version: v0.4.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/dist/configuration.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Token Metadata API
|
|
5
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
6
|
*
|
|
7
|
-
* OpenAPI spec version: v0.
|
|
7
|
+
* OpenAPI spec version: v0.4.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Token Metadata API
|
|
3
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
4
|
*
|
|
5
|
-
* OpenAPI spec version: v0.
|
|
5
|
+
* OpenAPI spec version: v0.4.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* Token Metadata API
|
|
5
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
6
|
*
|
|
7
|
-
* OpenAPI spec version: v0.
|
|
7
|
+
* OpenAPI spec version: v0.4.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/index.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Token Metadata API
|
|
4
4
|
* 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.
|
|
5
5
|
*
|
|
6
|
-
* OpenAPI spec version: v0.
|
|
6
|
+
* OpenAPI spec version: v0.4.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/package.json
CHANGED