@hirosystems/token-metadata-api-client 1.2.0 → 2.0.0-next.2

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.
@@ -0,0 +1,754 @@
1
+ /**
2
+ * This file was auto-generated by openapi-typescript.
3
+ * Do not make direct changes to the file.
4
+ */
5
+
6
+ export interface paths {
7
+ "/metadata/v1/ft": {
8
+ parameters: {
9
+ query?: never;
10
+ header?: never;
11
+ path?: never;
12
+ cookie?: never;
13
+ };
14
+ /**
15
+ * Fungible Tokens
16
+ * @description Retrieves a list of Fungible Tokens
17
+ */
18
+ get: operations["getFungibleTokens"];
19
+ put?: never;
20
+ post?: never;
21
+ delete?: never;
22
+ options?: never;
23
+ head?: never;
24
+ patch?: never;
25
+ trace?: never;
26
+ };
27
+ "/metadata/v1/ft/{principal}": {
28
+ parameters: {
29
+ query?: never;
30
+ header?: never;
31
+ path?: never;
32
+ cookie?: never;
33
+ };
34
+ /**
35
+ * Fungible Token Metadata
36
+ * @description Retrieves metadata for a SIP-010 Fungible Token
37
+ */
38
+ get: operations["getFtMetadata"];
39
+ put?: never;
40
+ post?: never;
41
+ delete?: never;
42
+ options?: never;
43
+ head?: never;
44
+ patch?: never;
45
+ trace?: never;
46
+ };
47
+ "/metadata/v1/nft/{principal}/{token_id}": {
48
+ parameters: {
49
+ query?: never;
50
+ header?: never;
51
+ path?: never;
52
+ cookie?: never;
53
+ };
54
+ /**
55
+ * Non-Fungible Token Metadata
56
+ * @description Retrieves metadata for a SIP-009 Non-Fungible Token
57
+ */
58
+ get: operations["getNftMetadata"];
59
+ put?: never;
60
+ post?: never;
61
+ delete?: never;
62
+ options?: never;
63
+ head?: never;
64
+ patch?: never;
65
+ trace?: never;
66
+ };
67
+ "/metadata/v1/sft/{principal}/{token_id}": {
68
+ parameters: {
69
+ query?: never;
70
+ header?: never;
71
+ path?: never;
72
+ cookie?: never;
73
+ };
74
+ /**
75
+ * Semi-Fungible Token Metadata
76
+ * @description Retrieves metadata for a SIP-013 Semi-Fungible Token
77
+ */
78
+ get: operations["getSftMetadata"];
79
+ put?: never;
80
+ post?: never;
81
+ delete?: never;
82
+ options?: never;
83
+ head?: never;
84
+ patch?: never;
85
+ trace?: never;
86
+ };
87
+ "/metadata/v1/": {
88
+ parameters: {
89
+ query?: never;
90
+ header?: never;
91
+ path?: never;
92
+ cookie?: never;
93
+ };
94
+ /**
95
+ * API Status
96
+ * @description Displays the status of the API and its current workload
97
+ */
98
+ get: operations["getApiStatus"];
99
+ put?: never;
100
+ post?: never;
101
+ delete?: never;
102
+ options?: never;
103
+ head?: never;
104
+ patch?: never;
105
+ trace?: never;
106
+ };
107
+ }
108
+ export type webhooks = Record<string, never>;
109
+ export interface components {
110
+ schemas: never;
111
+ responses: never;
112
+ parameters: never;
113
+ requestBodies: never;
114
+ headers: never;
115
+ pathItems: never;
116
+ }
117
+ export type $defs = Record<string, never>;
118
+ export interface operations {
119
+ getFungibleTokens: {
120
+ parameters: {
121
+ query?: {
122
+ name?: string;
123
+ symbol?: string;
124
+ /**
125
+ * @description Stacks Address
126
+ * @example SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9
127
+ */
128
+ address?: string;
129
+ /** @description If enabled, only tokens with valid SIP-016 metadata will be returned */
130
+ valid_metadata_only?: boolean;
131
+ /** @description Result offset */
132
+ offset?: number;
133
+ /** @description Results per page */
134
+ limit?: number;
135
+ /** @description Parameter to order results by */
136
+ order_by?: "name" | "symbol";
137
+ /** @description Results order */
138
+ order?: "asc" | "desc";
139
+ };
140
+ header?: never;
141
+ path?: never;
142
+ cookie?: never;
143
+ };
144
+ requestBody?: never;
145
+ responses: {
146
+ /** @description Default Response */
147
+ 200: {
148
+ headers: {
149
+ [name: string]: unknown;
150
+ };
151
+ content: {
152
+ "application/json": {
153
+ /** @example 20 */
154
+ limit: number;
155
+ /** @example 0 */
156
+ offset: number;
157
+ /** @example 1 */
158
+ total: number;
159
+ results: {
160
+ /** @example Wrapped USD */
161
+ name?: string;
162
+ /** @example xUSD */
163
+ symbol?: string;
164
+ /** @example 8 */
165
+ decimals?: number;
166
+ /** @example 9999980000000 */
167
+ total_supply?: string;
168
+ /**
169
+ * Format: uri
170
+ * @description URI for this token's metadata JSON
171
+ * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json
172
+ */
173
+ token_uri?: string;
174
+ /**
175
+ * @description Description
176
+ * @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets
177
+ */
178
+ description?: string;
179
+ /**
180
+ * Format: uri
181
+ * @description Cached image URL
182
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
183
+ */
184
+ image_uri?: string;
185
+ /**
186
+ * Format: uri
187
+ * @description Cached image URL
188
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
189
+ */
190
+ image_thumbnail_uri?: string;
191
+ /**
192
+ * Format: uri
193
+ * @description Original image URL
194
+ * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
195
+ */
196
+ image_canonical_uri?: string;
197
+ /** @example 0xef2ac1126e16f46843228b1dk4830e19eb7599129e4jf392cab9e65ae83a45c0 */
198
+ tx_id: string;
199
+ /** @example ST399W7Z9WS0GMSNQGJGME5JAENKN56D65VGMGKGA */
200
+ sender_address: string;
201
+ /**
202
+ * @description Clarity asset identifier
203
+ * @example SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6.token-ststx-earn-v1::stSTXearn
204
+ */
205
+ asset_identifier: string;
206
+ /** @example SP1H1733V5MZ3SZ9XRW9FKYGEZT0JDGEB8Y634C7R.miamicoin-token-v2 */
207
+ contract_principal: string;
208
+ }[];
209
+ };
210
+ };
211
+ };
212
+ };
213
+ };
214
+ getFtMetadata: {
215
+ parameters: {
216
+ query?: {
217
+ /** @description Metadata localization to retrieve */
218
+ locale?: string;
219
+ };
220
+ header?: never;
221
+ path: {
222
+ /**
223
+ * @description Principal for the contract which owns the SIP-010 token
224
+ * @example SP32XCD69XPS3GKDEXAQ29PJRDSD5AR643GNEEBXZ.fari-token
225
+ */
226
+ principal: string;
227
+ };
228
+ cookie?: never;
229
+ };
230
+ requestBody?: never;
231
+ responses: {
232
+ /** @description Default Response */
233
+ 200: {
234
+ headers: {
235
+ [name: string]: unknown;
236
+ };
237
+ content: {
238
+ "application/json": {
239
+ /**
240
+ * @description Token name
241
+ * @example Wrapped USD
242
+ */
243
+ name?: string;
244
+ /**
245
+ * @description Token symbol
246
+ * @example xUSD
247
+ */
248
+ symbol?: string;
249
+ /**
250
+ * @description Number of decimal places clients should use to format this token's amounts
251
+ * @example 8
252
+ */
253
+ decimals?: number;
254
+ /**
255
+ * @description Current circulating supply as reported by its contract. Clients should format this amount with the correct number of `decimals` before displaying to users
256
+ * @example 9999980000000
257
+ */
258
+ total_supply?: string;
259
+ /**
260
+ * Format: uri
261
+ * @description URI for this token's metadata JSON
262
+ * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json
263
+ */
264
+ token_uri?: string;
265
+ /**
266
+ * @description Description
267
+ * @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets
268
+ */
269
+ description?: string;
270
+ /**
271
+ * Format: uri
272
+ * @description Cached image URL
273
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
274
+ */
275
+ image_uri?: string;
276
+ /**
277
+ * Format: uri
278
+ * @description Cached image URL
279
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
280
+ */
281
+ image_thumbnail_uri?: string;
282
+ /**
283
+ * Format: uri
284
+ * @description Original image URL
285
+ * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
286
+ */
287
+ image_canonical_uri?: string;
288
+ /**
289
+ * @description ID for the transaction that deployed this token
290
+ * @example 0x5642ca7d68976b6b2a2055689d9a57de26d67f0dd8b016d1b0d94cb634454cdd
291
+ */
292
+ tx_id: string;
293
+ /**
294
+ * @description Deployer address
295
+ * @example SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6
296
+ */
297
+ sender_address: string;
298
+ /**
299
+ * @description Clarity asset identifier
300
+ * @example SPZA22A4D15RKH5G8XDGQ7BPC20Q5JNMH0VQKSR6.token-ststx-earn-v1::stSTXearn
301
+ */
302
+ asset_identifier: string;
303
+ /** Metadata */
304
+ metadata?: {
305
+ /** @example 16 */
306
+ sip: number;
307
+ /** @example Satoshi's Team #12200 */
308
+ name?: string;
309
+ /**
310
+ * @description Description
311
+ * @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets
312
+ */
313
+ description?: string;
314
+ /**
315
+ * Format: uri
316
+ * @description Original image URL
317
+ * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
318
+ */
319
+ image?: string;
320
+ /**
321
+ * Format: uri
322
+ * @description Cached image URL
323
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
324
+ */
325
+ cached_image?: string;
326
+ /**
327
+ * Format: uri
328
+ * @description Cached image URL
329
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
330
+ */
331
+ cached_thumbnail_image?: string;
332
+ attributes?: {
333
+ /** @example Background */
334
+ trait_type: string;
335
+ /** @example string */
336
+ display_type?: string;
337
+ /**
338
+ * Metadata Value
339
+ * @example value
340
+ */
341
+ value: unknown;
342
+ }[];
343
+ /**
344
+ * Metadata Properties
345
+ * @example {
346
+ * "collection": "Foo Collection",
347
+ * "total_supply": "10000"
348
+ * }
349
+ */
350
+ properties?: {
351
+ [key: string]: unknown;
352
+ };
353
+ /** Metadata Localization */
354
+ localization?: {
355
+ /**
356
+ * Format: uri
357
+ * @example http://token.com/metadata?hl={locale}
358
+ */
359
+ uri: string;
360
+ /** @example en */
361
+ default: string;
362
+ /** @example [
363
+ * "en",
364
+ * "jp"
365
+ * ] */
366
+ locales: string[];
367
+ };
368
+ };
369
+ };
370
+ };
371
+ };
372
+ /** @description Default Response */
373
+ 404: {
374
+ headers: {
375
+ [name: string]: unknown;
376
+ };
377
+ content: {
378
+ "application/json": {
379
+ /** @enum {string} */
380
+ error: "Token not found";
381
+ } | {
382
+ /** @enum {string} */
383
+ error: "Contract not found";
384
+ };
385
+ };
386
+ };
387
+ /** @description Default Response */
388
+ 422: {
389
+ headers: {
390
+ [name: string]: unknown;
391
+ };
392
+ content: {
393
+ "application/json": {
394
+ /** @enum {string} */
395
+ error: "Token metadata fetch in progress";
396
+ } | {
397
+ /** @enum {string} */
398
+ error: "Locale not found";
399
+ } | {
400
+ /** @enum {string} */
401
+ error: "Token error";
402
+ message: string;
403
+ };
404
+ };
405
+ };
406
+ };
407
+ };
408
+ getNftMetadata: {
409
+ parameters: {
410
+ query?: {
411
+ /** @description Metadata localization to retrieve */
412
+ locale?: string;
413
+ };
414
+ header?: never;
415
+ path: {
416
+ /**
417
+ * @description SIP-009 compliant smart contract principal
418
+ * @example SP497E7RX3233ATBS2AB9G4WTHB63X5PBSP5VGAQ.boomboxes-cycle-12
419
+ */
420
+ principal: string;
421
+ /**
422
+ * @description Token ID to retrieve
423
+ * @example 35
424
+ */
425
+ token_id: number;
426
+ };
427
+ cookie?: never;
428
+ };
429
+ requestBody?: never;
430
+ responses: {
431
+ /** @description Default Response */
432
+ 200: {
433
+ headers: {
434
+ [name: string]: unknown;
435
+ };
436
+ content: {
437
+ "application/json": {
438
+ /**
439
+ * Format: uri
440
+ * @description URI for this token's metadata JSON
441
+ * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json
442
+ */
443
+ token_uri?: string;
444
+ /** Metadata */
445
+ metadata?: {
446
+ /** @example 16 */
447
+ sip: number;
448
+ /** @example Satoshi's Team #12200 */
449
+ name?: string;
450
+ /**
451
+ * @description Description
452
+ * @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets
453
+ */
454
+ description?: string;
455
+ /**
456
+ * Format: uri
457
+ * @description Original image URL
458
+ * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
459
+ */
460
+ image?: string;
461
+ /**
462
+ * Format: uri
463
+ * @description Cached image URL
464
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
465
+ */
466
+ cached_image?: string;
467
+ /**
468
+ * Format: uri
469
+ * @description Cached image URL
470
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
471
+ */
472
+ cached_thumbnail_image?: string;
473
+ attributes?: {
474
+ /** @example Background */
475
+ trait_type: string;
476
+ /** @example string */
477
+ display_type?: string;
478
+ /**
479
+ * Metadata Value
480
+ * @example value
481
+ */
482
+ value: unknown;
483
+ }[];
484
+ /**
485
+ * Metadata Properties
486
+ * @example {
487
+ * "collection": "Foo Collection",
488
+ * "total_supply": "10000"
489
+ * }
490
+ */
491
+ properties?: {
492
+ [key: string]: unknown;
493
+ };
494
+ /** Metadata Localization */
495
+ localization?: {
496
+ /**
497
+ * Format: uri
498
+ * @example http://token.com/metadata?hl={locale}
499
+ */
500
+ uri: string;
501
+ /** @example en */
502
+ default: string;
503
+ /** @example [
504
+ * "en",
505
+ * "jp"
506
+ * ] */
507
+ locales: string[];
508
+ };
509
+ };
510
+ };
511
+ };
512
+ };
513
+ /** @description Default Response */
514
+ 404: {
515
+ headers: {
516
+ [name: string]: unknown;
517
+ };
518
+ content: {
519
+ "application/json": {
520
+ /** @enum {string} */
521
+ error: "Token not found";
522
+ } | {
523
+ /** @enum {string} */
524
+ error: "Contract not found";
525
+ };
526
+ };
527
+ };
528
+ /** @description Default Response */
529
+ 422: {
530
+ headers: {
531
+ [name: string]: unknown;
532
+ };
533
+ content: {
534
+ "application/json": {
535
+ /** @enum {string} */
536
+ error: "Token metadata fetch in progress";
537
+ } | {
538
+ /** @enum {string} */
539
+ error: "Locale not found";
540
+ } | {
541
+ /** @enum {string} */
542
+ error: "Token error";
543
+ message: string;
544
+ };
545
+ };
546
+ };
547
+ };
548
+ };
549
+ getSftMetadata: {
550
+ parameters: {
551
+ query?: {
552
+ /** @description Metadata localization to retrieve */
553
+ locale?: string;
554
+ };
555
+ header?: never;
556
+ path: {
557
+ /**
558
+ * @description SIP-013 compliant smart contract principal
559
+ * @example SP3K8BC0PPEVCV7NZ6QSRWPQ2JE9E5B6N3PA0KBR9.key-alex-autoalex-v1
560
+ */
561
+ principal: string;
562
+ /**
563
+ * @description Token ID to retrieve
564
+ * @example 35
565
+ */
566
+ token_id: number;
567
+ };
568
+ cookie?: never;
569
+ };
570
+ requestBody?: never;
571
+ responses: {
572
+ /** @description Default Response */
573
+ 200: {
574
+ headers: {
575
+ [name: string]: unknown;
576
+ };
577
+ content: {
578
+ "application/json": {
579
+ /**
580
+ * Format: uri
581
+ * @description URI for this token's metadata JSON
582
+ * @example ipfs://ipfs/Qmf9yDYuPTrp8NRUFf8xxDd5Ud24Dx9uYMwMn8o8G2cWPW/12200.json
583
+ */
584
+ token_uri?: string;
585
+ /** @example 6 */
586
+ decimals?: number;
587
+ /** @example 250 */
588
+ total_supply?: string;
589
+ /** Metadata */
590
+ metadata?: {
591
+ /** @example 16 */
592
+ sip: number;
593
+ /** @example Satoshi's Team #12200 */
594
+ name?: string;
595
+ /**
596
+ * @description Description
597
+ * @example Heavy hitters, all-stars and legends of the game join forces to create a collection of unique varsity jackets
598
+ */
599
+ description?: string;
600
+ /**
601
+ * Format: uri
602
+ * @description Original image URL
603
+ * @example ipfs://ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
604
+ */
605
+ image?: string;
606
+ /**
607
+ * Format: uri
608
+ * @description Cached image URL
609
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
610
+ */
611
+ cached_image?: string;
612
+ /**
613
+ * Format: uri
614
+ * @description Cached image URL
615
+ * @example https://ipfs.io/ipfs/QmZMqhh2ztwuZ3Y8PyEp2z5auyH3TCm3nnr5ZfjjgDjd5q/12199.png
616
+ */
617
+ cached_thumbnail_image?: string;
618
+ attributes?: {
619
+ /** @example Background */
620
+ trait_type: string;
621
+ /** @example string */
622
+ display_type?: string;
623
+ /**
624
+ * Metadata Value
625
+ * @example value
626
+ */
627
+ value: unknown;
628
+ }[];
629
+ /**
630
+ * Metadata Properties
631
+ * @example {
632
+ * "collection": "Foo Collection",
633
+ * "total_supply": "10000"
634
+ * }
635
+ */
636
+ properties?: {
637
+ [key: string]: unknown;
638
+ };
639
+ /** Metadata Localization */
640
+ localization?: {
641
+ /**
642
+ * Format: uri
643
+ * @example http://token.com/metadata?hl={locale}
644
+ */
645
+ uri: string;
646
+ /** @example en */
647
+ default: string;
648
+ /** @example [
649
+ * "en",
650
+ * "jp"
651
+ * ] */
652
+ locales: string[];
653
+ };
654
+ };
655
+ };
656
+ };
657
+ };
658
+ /** @description Default Response */
659
+ 404: {
660
+ headers: {
661
+ [name: string]: unknown;
662
+ };
663
+ content: {
664
+ "application/json": {
665
+ /** @enum {string} */
666
+ error: "Token not found";
667
+ } | {
668
+ /** @enum {string} */
669
+ error: "Contract not found";
670
+ };
671
+ };
672
+ };
673
+ /** @description Default Response */
674
+ 422: {
675
+ headers: {
676
+ [name: string]: unknown;
677
+ };
678
+ content: {
679
+ "application/json": {
680
+ /** @enum {string} */
681
+ error: "Token metadata fetch in progress";
682
+ } | {
683
+ /** @enum {string} */
684
+ error: "Locale not found";
685
+ } | {
686
+ /** @enum {string} */
687
+ error: "Token error";
688
+ message: string;
689
+ };
690
+ };
691
+ };
692
+ };
693
+ };
694
+ getApiStatus: {
695
+ parameters: {
696
+ query?: never;
697
+ header?: never;
698
+ path?: never;
699
+ cookie?: never;
700
+ };
701
+ requestBody?: never;
702
+ responses: {
703
+ /** @description Default Response */
704
+ 200: {
705
+ headers: {
706
+ [name: string]: unknown;
707
+ };
708
+ content: {
709
+ "application/json": {
710
+ /** @example token-metadata-api v0.0.1 (master:a1b2c3) */
711
+ server_version: string;
712
+ /** @example ready */
713
+ status: string;
714
+ chain_tip: {
715
+ /** @example 163541 */
716
+ block_height: number;
717
+ };
718
+ /** Api Token Count */
719
+ tokens?: {
720
+ /** @example 512 */
721
+ ft?: number;
722
+ /** @example 493452 */
723
+ nft?: number;
724
+ /** @example 44 */
725
+ sft?: number;
726
+ };
727
+ /** Api Token Contract Count */
728
+ token_contracts?: {
729
+ /** @example 3101 */
730
+ "sip-009"?: number;
731
+ /** @example 512 */
732
+ "sip-010"?: number;
733
+ /** @example 11 */
734
+ "sip-013"?: number;
735
+ };
736
+ /** Api Job Count */
737
+ job_queue?: {
738
+ /** @example 430562 */
739
+ pending?: number;
740
+ /** @example 512 */
741
+ queued?: number;
742
+ /** @example 12532 */
743
+ done?: number;
744
+ /** @example 11 */
745
+ failed?: number;
746
+ /** @example 20 */
747
+ invalid?: number;
748
+ };
749
+ };
750
+ };
751
+ };
752
+ };
753
+ };
754
+ }