@hirosystems/token-metadata-api-client 1.0.3 → 1.1.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 +244 -35
- package/configuration.ts +1 -1
- package/dist/api.d.ts +184 -34
- package/dist/api.js +113 -17
- 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.3.0
|
|
8
8
|
*
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This file is auto generated by the swagger code generator program.
|
|
@@ -195,6 +195,80 @@ 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
|
+
}
|
|
198
272
|
/**
|
|
199
273
|
*
|
|
200
274
|
* @export
|
|
@@ -392,6 +466,58 @@ export interface NftMetadataResponse {
|
|
|
392
466
|
*/
|
|
393
467
|
metadata?: Metadata;
|
|
394
468
|
}
|
|
469
|
+
/**
|
|
470
|
+
*
|
|
471
|
+
* @export
|
|
472
|
+
* @interface NotFoundErrorResponse
|
|
473
|
+
*/
|
|
474
|
+
export interface NotFoundErrorResponse {
|
|
475
|
+
}
|
|
476
|
+
/**
|
|
477
|
+
*
|
|
478
|
+
* @export
|
|
479
|
+
* @interface Order
|
|
480
|
+
*/
|
|
481
|
+
export interface Order {
|
|
482
|
+
}
|
|
483
|
+
/**
|
|
484
|
+
*
|
|
485
|
+
* @export
|
|
486
|
+
* @interface OrderBy
|
|
487
|
+
*/
|
|
488
|
+
export interface OrderBy {
|
|
489
|
+
}
|
|
490
|
+
/**
|
|
491
|
+
*
|
|
492
|
+
* @export
|
|
493
|
+
* @interface PaginatedFtBasicMetadataResponse
|
|
494
|
+
*/
|
|
495
|
+
export interface PaginatedFtBasicMetadataResponse {
|
|
496
|
+
/**
|
|
497
|
+
*
|
|
498
|
+
* @type {number}
|
|
499
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
500
|
+
*/
|
|
501
|
+
limit: number;
|
|
502
|
+
/**
|
|
503
|
+
*
|
|
504
|
+
* @type {number}
|
|
505
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
506
|
+
*/
|
|
507
|
+
offset: number;
|
|
508
|
+
/**
|
|
509
|
+
*
|
|
510
|
+
* @type {number}
|
|
511
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
512
|
+
*/
|
|
513
|
+
total: number;
|
|
514
|
+
/**
|
|
515
|
+
*
|
|
516
|
+
* @type {Array<FtBasicMetadataResponse>}
|
|
517
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
518
|
+
*/
|
|
519
|
+
results: Array<FtBasicMetadataResponse>;
|
|
520
|
+
}
|
|
395
521
|
/**
|
|
396
522
|
*
|
|
397
523
|
* @export
|
|
@@ -423,40 +549,6 @@ export interface SftMetadataResponse {
|
|
|
423
549
|
*/
|
|
424
550
|
metadata?: Metadata;
|
|
425
551
|
}
|
|
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
552
|
/**
|
|
461
553
|
* StatusApi - fetch parameter creator
|
|
462
554
|
* @export
|
|
@@ -593,6 +685,64 @@ export const TokensApiFetchParamCreator = function (configuration?: Configuratio
|
|
|
593
685
|
options: localVarRequestOptions,
|
|
594
686
|
};
|
|
595
687
|
},
|
|
688
|
+
/**
|
|
689
|
+
* Retrieves a list of Fungible Tokens
|
|
690
|
+
* @summary Fungible Tokens
|
|
691
|
+
* @param {string} [name]
|
|
692
|
+
* @param {string} [symbol]
|
|
693
|
+
* @param {string} [address] Stacks Address
|
|
694
|
+
* @param {number} [offset] Result offset
|
|
695
|
+
* @param {number} [limit] Results per page
|
|
696
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
697
|
+
* @param {Order} [order] Results order
|
|
698
|
+
* @param {*} [options] Override http request option.
|
|
699
|
+
* @throws {RequiredError}
|
|
700
|
+
*/
|
|
701
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options: any = {}): FetchArgs {
|
|
702
|
+
const localVarPath = `/metadata/v1/ft`;
|
|
703
|
+
const localVarUrlObj = url.parse(localVarPath, true);
|
|
704
|
+
const localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
705
|
+
const localVarHeaderParameter = {} as any;
|
|
706
|
+
const localVarQueryParameter = {} as any;
|
|
707
|
+
|
|
708
|
+
if (name !== undefined) {
|
|
709
|
+
localVarQueryParameter['name'] = name;
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
if (symbol !== undefined) {
|
|
713
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (address !== undefined) {
|
|
717
|
+
localVarQueryParameter['address'] = address;
|
|
718
|
+
}
|
|
719
|
+
|
|
720
|
+
if (offset !== undefined) {
|
|
721
|
+
localVarQueryParameter['offset'] = offset;
|
|
722
|
+
}
|
|
723
|
+
|
|
724
|
+
if (limit !== undefined) {
|
|
725
|
+
localVarQueryParameter['limit'] = limit;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
if (order_by !== undefined) {
|
|
729
|
+
localVarQueryParameter['order_by'] = order_by;
|
|
730
|
+
}
|
|
731
|
+
|
|
732
|
+
if (order !== undefined) {
|
|
733
|
+
localVarQueryParameter['order'] = order;
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
737
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
738
|
+
delete localVarUrlObj.search;
|
|
739
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
740
|
+
|
|
741
|
+
return {
|
|
742
|
+
url: url.format(localVarUrlObj),
|
|
743
|
+
options: localVarRequestOptions,
|
|
744
|
+
};
|
|
745
|
+
},
|
|
596
746
|
/**
|
|
597
747
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
598
748
|
* @summary Non-Fungible Token Metadata
|
|
@@ -702,6 +852,31 @@ export const TokensApiFp = function(configuration?: Configuration) {
|
|
|
702
852
|
});
|
|
703
853
|
};
|
|
704
854
|
},
|
|
855
|
+
/**
|
|
856
|
+
* Retrieves a list of Fungible Tokens
|
|
857
|
+
* @summary Fungible Tokens
|
|
858
|
+
* @param {string} [name]
|
|
859
|
+
* @param {string} [symbol]
|
|
860
|
+
* @param {string} [address] Stacks Address
|
|
861
|
+
* @param {number} [offset] Result offset
|
|
862
|
+
* @param {number} [limit] Results per page
|
|
863
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
864
|
+
* @param {Order} [order] Results order
|
|
865
|
+
* @param {*} [options] Override http request option.
|
|
866
|
+
* @throws {RequiredError}
|
|
867
|
+
*/
|
|
868
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<PaginatedFtBasicMetadataResponse> {
|
|
869
|
+
const localVarFetchArgs = TokensApiFetchParamCreator(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options);
|
|
870
|
+
return (fetch: FetchAPI = isomorphicFetch, basePath: string = BASE_PATH) => {
|
|
871
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then((response) => {
|
|
872
|
+
if (response.status >= 200 && response.status < 300) {
|
|
873
|
+
return response.json();
|
|
874
|
+
} else {
|
|
875
|
+
throw response;
|
|
876
|
+
}
|
|
877
|
+
});
|
|
878
|
+
};
|
|
879
|
+
},
|
|
705
880
|
/**
|
|
706
881
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
707
882
|
* @summary Non-Fungible Token Metadata
|
|
@@ -764,6 +939,22 @@ export const TokensApiFactory = function (configuration?: Configuration, fetch?:
|
|
|
764
939
|
getFtMetadata(principal: string, locale?: string, options?: any) {
|
|
765
940
|
return TokensApiFp(configuration).getFtMetadata(principal, locale, options)(fetch, basePath);
|
|
766
941
|
},
|
|
942
|
+
/**
|
|
943
|
+
* Retrieves a list of Fungible Tokens
|
|
944
|
+
* @summary Fungible Tokens
|
|
945
|
+
* @param {string} [name]
|
|
946
|
+
* @param {string} [symbol]
|
|
947
|
+
* @param {string} [address] Stacks Address
|
|
948
|
+
* @param {number} [offset] Result offset
|
|
949
|
+
* @param {number} [limit] Results per page
|
|
950
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
951
|
+
* @param {Order} [order] Results order
|
|
952
|
+
* @param {*} [options] Override http request option.
|
|
953
|
+
* @throws {RequiredError}
|
|
954
|
+
*/
|
|
955
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any) {
|
|
956
|
+
return TokensApiFp(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(fetch, basePath);
|
|
957
|
+
},
|
|
767
958
|
/**
|
|
768
959
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
769
960
|
* @summary Non-Fungible Token Metadata
|
|
@@ -811,6 +1002,24 @@ export class TokensApi extends BaseAPI {
|
|
|
811
1002
|
return TokensApiFp(this.configuration).getFtMetadata(principal, locale, options)(this.fetch, this.basePath);
|
|
812
1003
|
}
|
|
813
1004
|
|
|
1005
|
+
/**
|
|
1006
|
+
* Retrieves a list of Fungible Tokens
|
|
1007
|
+
* @summary Fungible Tokens
|
|
1008
|
+
* @param {string} [name]
|
|
1009
|
+
* @param {string} [symbol]
|
|
1010
|
+
* @param {string} [address] Stacks Address
|
|
1011
|
+
* @param {number} [offset] Result offset
|
|
1012
|
+
* @param {number} [limit] Results per page
|
|
1013
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
1014
|
+
* @param {Order} [order] Results order
|
|
1015
|
+
* @param {*} [options] Override http request option.
|
|
1016
|
+
* @throws {RequiredError}
|
|
1017
|
+
* @memberof TokensApi
|
|
1018
|
+
*/
|
|
1019
|
+
public getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any) {
|
|
1020
|
+
return TokensApiFp(this.configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(this.fetch, this.basePath);
|
|
1021
|
+
}
|
|
1022
|
+
|
|
814
1023
|
/**
|
|
815
1024
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
816
1025
|
* @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.3.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.3.0
|
|
6
6
|
*
|
|
7
7
|
*
|
|
8
8
|
* NOTE: This file is auto generated by the swagger code generator program.
|
|
@@ -178,6 +178,80 @@ 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
|
+
}
|
|
181
255
|
/**
|
|
182
256
|
*
|
|
183
257
|
* @export
|
|
@@ -377,6 +451,58 @@ export interface NftMetadataResponse {
|
|
|
377
451
|
*/
|
|
378
452
|
metadata?: Metadata;
|
|
379
453
|
}
|
|
454
|
+
/**
|
|
455
|
+
*
|
|
456
|
+
* @export
|
|
457
|
+
* @interface NotFoundErrorResponse
|
|
458
|
+
*/
|
|
459
|
+
export interface NotFoundErrorResponse {
|
|
460
|
+
}
|
|
461
|
+
/**
|
|
462
|
+
*
|
|
463
|
+
* @export
|
|
464
|
+
* @interface Order
|
|
465
|
+
*/
|
|
466
|
+
export interface Order {
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
*
|
|
470
|
+
* @export
|
|
471
|
+
* @interface OrderBy
|
|
472
|
+
*/
|
|
473
|
+
export interface OrderBy {
|
|
474
|
+
}
|
|
475
|
+
/**
|
|
476
|
+
*
|
|
477
|
+
* @export
|
|
478
|
+
* @interface PaginatedFtBasicMetadataResponse
|
|
479
|
+
*/
|
|
480
|
+
export interface PaginatedFtBasicMetadataResponse {
|
|
481
|
+
/**
|
|
482
|
+
*
|
|
483
|
+
* @type {number}
|
|
484
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
485
|
+
*/
|
|
486
|
+
limit: number;
|
|
487
|
+
/**
|
|
488
|
+
*
|
|
489
|
+
* @type {number}
|
|
490
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
491
|
+
*/
|
|
492
|
+
offset: number;
|
|
493
|
+
/**
|
|
494
|
+
*
|
|
495
|
+
* @type {number}
|
|
496
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
497
|
+
*/
|
|
498
|
+
total: number;
|
|
499
|
+
/**
|
|
500
|
+
*
|
|
501
|
+
* @type {Array<FtBasicMetadataResponse>}
|
|
502
|
+
* @memberof PaginatedFtBasicMetadataResponse
|
|
503
|
+
*/
|
|
504
|
+
results: Array<FtBasicMetadataResponse>;
|
|
505
|
+
}
|
|
380
506
|
/**
|
|
381
507
|
*
|
|
382
508
|
* @export
|
|
@@ -408,39 +534,6 @@ export interface SftMetadataResponse {
|
|
|
408
534
|
*/
|
|
409
535
|
metadata?: Metadata;
|
|
410
536
|
}
|
|
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
537
|
/**
|
|
445
538
|
* StatusApi - fetch parameter creator
|
|
446
539
|
* @export
|
|
@@ -510,6 +603,20 @@ export declare const TokensApiFetchParamCreator: (configuration?: Configuration)
|
|
|
510
603
|
* @throws {RequiredError}
|
|
511
604
|
*/
|
|
512
605
|
getFtMetadata(principal: string, locale?: string, options?: any): FetchArgs;
|
|
606
|
+
/**
|
|
607
|
+
* Retrieves a list of Fungible Tokens
|
|
608
|
+
* @summary Fungible Tokens
|
|
609
|
+
* @param {string} [name]
|
|
610
|
+
* @param {string} [symbol]
|
|
611
|
+
* @param {string} [address] Stacks Address
|
|
612
|
+
* @param {number} [offset] Result offset
|
|
613
|
+
* @param {number} [limit] Results per page
|
|
614
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
615
|
+
* @param {Order} [order] Results order
|
|
616
|
+
* @param {*} [options] Override http request option.
|
|
617
|
+
* @throws {RequiredError}
|
|
618
|
+
*/
|
|
619
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): FetchArgs;
|
|
513
620
|
/**
|
|
514
621
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
515
622
|
* @summary Non-Fungible Token Metadata
|
|
@@ -545,6 +652,20 @@ export declare const TokensApiFp: (configuration?: Configuration) => {
|
|
|
545
652
|
* @throws {RequiredError}
|
|
546
653
|
*/
|
|
547
654
|
getFtMetadata(principal: string, locale?: string, options?: any): (fetch?: FetchAPI, basePath?: string) => Promise<FtMetadataResponse>;
|
|
655
|
+
/**
|
|
656
|
+
* Retrieves a list of Fungible Tokens
|
|
657
|
+
* @summary Fungible Tokens
|
|
658
|
+
* @param {string} [name]
|
|
659
|
+
* @param {string} [symbol]
|
|
660
|
+
* @param {string} [address] Stacks Address
|
|
661
|
+
* @param {number} [offset] Result offset
|
|
662
|
+
* @param {number} [limit] Results per page
|
|
663
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
664
|
+
* @param {Order} [order] Results order
|
|
665
|
+
* @param {*} [options] Override http request option.
|
|
666
|
+
* @throws {RequiredError}
|
|
667
|
+
*/
|
|
668
|
+
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
669
|
/**
|
|
549
670
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
550
671
|
* @summary Non-Fungible Token Metadata
|
|
@@ -580,6 +701,20 @@ export declare const TokensApiFactory: (configuration?: Configuration, fetch?: F
|
|
|
580
701
|
* @throws {RequiredError}
|
|
581
702
|
*/
|
|
582
703
|
getFtMetadata(principal: string, locale?: string, options?: any): Promise<FtMetadataResponse>;
|
|
704
|
+
/**
|
|
705
|
+
* Retrieves a list of Fungible Tokens
|
|
706
|
+
* @summary Fungible Tokens
|
|
707
|
+
* @param {string} [name]
|
|
708
|
+
* @param {string} [symbol]
|
|
709
|
+
* @param {string} [address] Stacks Address
|
|
710
|
+
* @param {number} [offset] Result offset
|
|
711
|
+
* @param {number} [limit] Results per page
|
|
712
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
713
|
+
* @param {Order} [order] Results order
|
|
714
|
+
* @param {*} [options] Override http request option.
|
|
715
|
+
* @throws {RequiredError}
|
|
716
|
+
*/
|
|
717
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): Promise<PaginatedFtBasicMetadataResponse>;
|
|
583
718
|
/**
|
|
584
719
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
585
720
|
* @summary Non-Fungible Token Metadata
|
|
@@ -618,6 +753,21 @@ export declare class TokensApi extends BaseAPI {
|
|
|
618
753
|
* @memberof TokensApi
|
|
619
754
|
*/
|
|
620
755
|
getFtMetadata(principal: string, locale?: string, options?: any): Promise<FtMetadataResponse>;
|
|
756
|
+
/**
|
|
757
|
+
* Retrieves a list of Fungible Tokens
|
|
758
|
+
* @summary Fungible Tokens
|
|
759
|
+
* @param {string} [name]
|
|
760
|
+
* @param {string} [symbol]
|
|
761
|
+
* @param {string} [address] Stacks Address
|
|
762
|
+
* @param {number} [offset] Result offset
|
|
763
|
+
* @param {number} [limit] Results per page
|
|
764
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
765
|
+
* @param {Order} [order] Results order
|
|
766
|
+
* @param {*} [options] Override http request option.
|
|
767
|
+
* @throws {RequiredError}
|
|
768
|
+
* @memberof TokensApi
|
|
769
|
+
*/
|
|
770
|
+
getFungibleTokens(name?: string, symbol?: string, address?: string, offset?: number, limit?: number, order_by?: OrderBy, order?: Order, options?: any): Promise<PaginatedFtBasicMetadataResponse>;
|
|
621
771
|
/**
|
|
622
772
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
623
773
|
* @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.3.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.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(/\/+$/, "");
|
|
@@ -76,21 +76,6 @@ var RequiredError = /** @class */ (function (_super) {
|
|
|
76
76
|
return RequiredError;
|
|
77
77
|
}(Error));
|
|
78
78
|
exports.RequiredError = RequiredError;
|
|
79
|
-
/**
|
|
80
|
-
* @export
|
|
81
|
-
* @namespace TokenNotFoundResponse
|
|
82
|
-
*/
|
|
83
|
-
var TokenNotFoundResponse;
|
|
84
|
-
(function (TokenNotFoundResponse) {
|
|
85
|
-
/**
|
|
86
|
-
* @export
|
|
87
|
-
* @enum {string}
|
|
88
|
-
*/
|
|
89
|
-
var ErrorEnum;
|
|
90
|
-
(function (ErrorEnum) {
|
|
91
|
-
ErrorEnum[ErrorEnum["TokenNotFound"] = 'Token not found'] = "TokenNotFound";
|
|
92
|
-
})(ErrorEnum = TokenNotFoundResponse.ErrorEnum || (TokenNotFoundResponse.ErrorEnum = {}));
|
|
93
|
-
})(TokenNotFoundResponse = exports.TokenNotFoundResponse || (exports.TokenNotFoundResponse = {}));
|
|
94
79
|
/**
|
|
95
80
|
* StatusApi - fetch parameter creator
|
|
96
81
|
* @export
|
|
@@ -229,6 +214,56 @@ exports.TokensApiFetchParamCreator = function (configuration) {
|
|
|
229
214
|
options: localVarRequestOptions,
|
|
230
215
|
};
|
|
231
216
|
},
|
|
217
|
+
/**
|
|
218
|
+
* Retrieves a list of Fungible Tokens
|
|
219
|
+
* @summary Fungible Tokens
|
|
220
|
+
* @param {string} [name]
|
|
221
|
+
* @param {string} [symbol]
|
|
222
|
+
* @param {string} [address] Stacks Address
|
|
223
|
+
* @param {number} [offset] Result offset
|
|
224
|
+
* @param {number} [limit] Results per page
|
|
225
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
226
|
+
* @param {Order} [order] Results order
|
|
227
|
+
* @param {*} [options] Override http request option.
|
|
228
|
+
* @throws {RequiredError}
|
|
229
|
+
*/
|
|
230
|
+
getFungibleTokens: function (name, symbol, address, offset, limit, order_by, order, options) {
|
|
231
|
+
if (options === void 0) { options = {}; }
|
|
232
|
+
var localVarPath = "/metadata/v1/ft";
|
|
233
|
+
var localVarUrlObj = url.parse(localVarPath, true);
|
|
234
|
+
var localVarRequestOptions = Object.assign({ method: 'GET' }, options);
|
|
235
|
+
var localVarHeaderParameter = {};
|
|
236
|
+
var localVarQueryParameter = {};
|
|
237
|
+
if (name !== undefined) {
|
|
238
|
+
localVarQueryParameter['name'] = name;
|
|
239
|
+
}
|
|
240
|
+
if (symbol !== undefined) {
|
|
241
|
+
localVarQueryParameter['symbol'] = symbol;
|
|
242
|
+
}
|
|
243
|
+
if (address !== undefined) {
|
|
244
|
+
localVarQueryParameter['address'] = address;
|
|
245
|
+
}
|
|
246
|
+
if (offset !== undefined) {
|
|
247
|
+
localVarQueryParameter['offset'] = offset;
|
|
248
|
+
}
|
|
249
|
+
if (limit !== undefined) {
|
|
250
|
+
localVarQueryParameter['limit'] = limit;
|
|
251
|
+
}
|
|
252
|
+
if (order_by !== undefined) {
|
|
253
|
+
localVarQueryParameter['order_by'] = order_by;
|
|
254
|
+
}
|
|
255
|
+
if (order !== undefined) {
|
|
256
|
+
localVarQueryParameter['order'] = order;
|
|
257
|
+
}
|
|
258
|
+
localVarUrlObj.query = Object.assign({}, localVarUrlObj.query, localVarQueryParameter, options.query);
|
|
259
|
+
// fix override query string Detail: https://stackoverflow.com/a/7517673/1077943
|
|
260
|
+
delete localVarUrlObj.search;
|
|
261
|
+
localVarRequestOptions.headers = Object.assign({}, localVarHeaderParameter, options.headers);
|
|
262
|
+
return {
|
|
263
|
+
url: url.format(localVarUrlObj),
|
|
264
|
+
options: localVarRequestOptions,
|
|
265
|
+
};
|
|
266
|
+
},
|
|
232
267
|
/**
|
|
233
268
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
234
269
|
* @summary Non-Fungible Token Metadata
|
|
@@ -336,6 +371,34 @@ exports.TokensApiFp = function (configuration) {
|
|
|
336
371
|
});
|
|
337
372
|
};
|
|
338
373
|
},
|
|
374
|
+
/**
|
|
375
|
+
* Retrieves a list of Fungible Tokens
|
|
376
|
+
* @summary Fungible Tokens
|
|
377
|
+
* @param {string} [name]
|
|
378
|
+
* @param {string} [symbol]
|
|
379
|
+
* @param {string} [address] Stacks Address
|
|
380
|
+
* @param {number} [offset] Result offset
|
|
381
|
+
* @param {number} [limit] Results per page
|
|
382
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
383
|
+
* @param {Order} [order] Results order
|
|
384
|
+
* @param {*} [options] Override http request option.
|
|
385
|
+
* @throws {RequiredError}
|
|
386
|
+
*/
|
|
387
|
+
getFungibleTokens: function (name, symbol, address, offset, limit, order_by, order, options) {
|
|
388
|
+
var localVarFetchArgs = exports.TokensApiFetchParamCreator(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options);
|
|
389
|
+
return function (fetch, basePath) {
|
|
390
|
+
if (fetch === void 0) { fetch = isomorphicFetch; }
|
|
391
|
+
if (basePath === void 0) { basePath = BASE_PATH; }
|
|
392
|
+
return fetch(basePath + localVarFetchArgs.url, localVarFetchArgs.options).then(function (response) {
|
|
393
|
+
if (response.status >= 200 && response.status < 300) {
|
|
394
|
+
return response.json();
|
|
395
|
+
}
|
|
396
|
+
else {
|
|
397
|
+
throw response;
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
};
|
|
401
|
+
},
|
|
339
402
|
/**
|
|
340
403
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
341
404
|
* @summary Non-Fungible Token Metadata
|
|
@@ -403,6 +466,22 @@ exports.TokensApiFactory = function (configuration, fetch, basePath) {
|
|
|
403
466
|
getFtMetadata: function (principal, locale, options) {
|
|
404
467
|
return exports.TokensApiFp(configuration).getFtMetadata(principal, locale, options)(fetch, basePath);
|
|
405
468
|
},
|
|
469
|
+
/**
|
|
470
|
+
* Retrieves a list of Fungible Tokens
|
|
471
|
+
* @summary Fungible Tokens
|
|
472
|
+
* @param {string} [name]
|
|
473
|
+
* @param {string} [symbol]
|
|
474
|
+
* @param {string} [address] Stacks Address
|
|
475
|
+
* @param {number} [offset] Result offset
|
|
476
|
+
* @param {number} [limit] Results per page
|
|
477
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
478
|
+
* @param {Order} [order] Results order
|
|
479
|
+
* @param {*} [options] Override http request option.
|
|
480
|
+
* @throws {RequiredError}
|
|
481
|
+
*/
|
|
482
|
+
getFungibleTokens: function (name, symbol, address, offset, limit, order_by, order, options) {
|
|
483
|
+
return exports.TokensApiFp(configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(fetch, basePath);
|
|
484
|
+
},
|
|
406
485
|
/**
|
|
407
486
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
408
487
|
* @summary Non-Fungible Token Metadata
|
|
@@ -452,6 +531,23 @@ var TokensApi = /** @class */ (function (_super) {
|
|
|
452
531
|
TokensApi.prototype.getFtMetadata = function (principal, locale, options) {
|
|
453
532
|
return exports.TokensApiFp(this.configuration).getFtMetadata(principal, locale, options)(this.fetch, this.basePath);
|
|
454
533
|
};
|
|
534
|
+
/**
|
|
535
|
+
* Retrieves a list of Fungible Tokens
|
|
536
|
+
* @summary Fungible Tokens
|
|
537
|
+
* @param {string} [name]
|
|
538
|
+
* @param {string} [symbol]
|
|
539
|
+
* @param {string} [address] Stacks Address
|
|
540
|
+
* @param {number} [offset] Result offset
|
|
541
|
+
* @param {number} [limit] Results per page
|
|
542
|
+
* @param {OrderBy} [order_by] Parameter to order results by
|
|
543
|
+
* @param {Order} [order] Results order
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @throws {RequiredError}
|
|
546
|
+
* @memberof TokensApi
|
|
547
|
+
*/
|
|
548
|
+
TokensApi.prototype.getFungibleTokens = function (name, symbol, address, offset, limit, order_by, order, options) {
|
|
549
|
+
return exports.TokensApiFp(this.configuration).getFungibleTokens(name, symbol, address, offset, limit, order_by, order, options)(this.fetch, this.basePath);
|
|
550
|
+
};
|
|
455
551
|
/**
|
|
456
552
|
* Retrieves metadata for a SIP-009 Non-Fungible Token
|
|
457
553
|
* @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.3.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.3.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.3.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.3.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.3.0
|
|
7
7
|
*
|
|
8
8
|
*
|
|
9
9
|
* NOTE: This file is auto generated by the swagger code generator program.
|
package/package.json
CHANGED