@alephium/web3 0.8.2-test.2 → 0.9.0-rc.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.
Files changed (78) hide show
  1. package/LICENSE +165 -0
  2. package/package.json +37 -36
  3. package/src/api/api-alephium.ts +2 -1
  4. package/src/api/node-provider.ts +41 -25
  5. package/src/api/types.ts +10 -15
  6. package/src/contract/contract.ts +63 -40
  7. package/src/index.ts +1 -0
  8. package/{dist/scripts/header.js → src/token/index.ts} +2 -1
  9. package/{dist/src/utils/djb2.js → src/token/nft.ts} +16 -9
  10. package/std/fungible_token_interface.ral +1 -0
  11. package/std/nft_collection_interface.ral +24 -3
  12. package/std/nft_interface.ral +22 -0
  13. package/dist/alephium-web3.min.js +0 -3
  14. package/dist/alephium-web3.min.js.LICENSE.txt +0 -12
  15. package/dist/alephium-web3.min.js.map +0 -1
  16. package/dist/scripts/check-versions.d.ts +0 -1
  17. package/dist/scripts/check-versions.js +0 -39
  18. package/dist/scripts/header.d.ts +0 -0
  19. package/dist/src/api/api-alephium.d.ts +0 -1716
  20. package/dist/src/api/api-alephium.js +0 -1284
  21. package/dist/src/api/api-explorer.d.ts +0 -923
  22. package/dist/src/api/api-explorer.js +0 -711
  23. package/dist/src/api/explorer-provider.d.ts +0 -20
  24. package/dist/src/api/explorer-provider.js +0 -69
  25. package/dist/src/api/index.d.ts +0 -6
  26. package/dist/src/api/index.js +0 -52
  27. package/dist/src/api/node-provider.d.ts +0 -23
  28. package/dist/src/api/node-provider.js +0 -93
  29. package/dist/src/api/types.d.ts +0 -38
  30. package/dist/src/api/types.js +0 -263
  31. package/dist/src/api/utils.d.ts +0 -12
  32. package/dist/src/api/utils.js +0 -59
  33. package/dist/src/constants.d.ts +0 -6
  34. package/dist/src/constants.js +0 -26
  35. package/dist/src/contract/contract.d.ts +0 -293
  36. package/dist/src/contract/contract.js +0 -1079
  37. package/dist/src/contract/events.d.ts +0 -11
  38. package/dist/src/contract/events.js +0 -65
  39. package/dist/src/contract/index.d.ts +0 -3
  40. package/dist/src/contract/index.js +0 -36
  41. package/dist/src/contract/ralph.d.ts +0 -13
  42. package/dist/src/contract/ralph.js +0 -397
  43. package/dist/src/global.d.ts +0 -7
  44. package/dist/src/global.js +0 -54
  45. package/dist/src/index.d.ts +0 -8
  46. package/dist/src/index.js +0 -57
  47. package/dist/src/signer/index.d.ts +0 -3
  48. package/dist/src/signer/index.js +0 -36
  49. package/dist/src/signer/signer.d.ts +0 -60
  50. package/dist/src/signer/signer.js +0 -236
  51. package/dist/src/signer/tx-builder.d.ts +0 -12
  52. package/dist/src/signer/tx-builder.js +0 -96
  53. package/dist/src/signer/types.d.ts +0 -115
  54. package/dist/src/signer/types.js +0 -30
  55. package/dist/src/transaction/index.d.ts +0 -2
  56. package/dist/src/transaction/index.js +0 -35
  57. package/dist/src/transaction/sign-verify.d.ts +0 -3
  58. package/dist/src/transaction/sign-verify.js +0 -52
  59. package/dist/src/transaction/status.d.ts +0 -11
  60. package/dist/src/transaction/status.js +0 -49
  61. package/dist/src/utils/address.d.ts +0 -1
  62. package/dist/src/utils/address.js +0 -42
  63. package/dist/src/utils/bs58.d.ts +0 -5
  64. package/dist/src/utils/bs58.js +0 -40
  65. package/dist/src/utils/djb2.d.ts +0 -1
  66. package/dist/src/utils/index.d.ts +0 -7
  67. package/dist/src/utils/index.js +0 -40
  68. package/dist/src/utils/number.d.ts +0 -18
  69. package/dist/src/utils/number.fixture.d.ts +0 -12
  70. package/dist/src/utils/number.fixture.js +0 -189
  71. package/dist/src/utils/number.js +0 -149
  72. package/dist/src/utils/sign.d.ts +0 -3
  73. package/dist/src/utils/sign.js +0 -89
  74. package/dist/src/utils/subscription.d.ts +0 -21
  75. package/dist/src/utils/subscription.js +0 -51
  76. package/dist/src/utils/utils.d.ts +0 -40
  77. package/dist/src/utils/utils.js +0 -244
  78. package/jest-config.json +0 -11
@@ -1,923 +0,0 @@
1
- export interface AcceptedTransaction {
2
- /** @format 32-byte-hash */
3
- hash: string;
4
- /** @format block-hash */
5
- blockHash: string;
6
- /** @format int64 */
7
- timestamp: number;
8
- inputs?: Input[];
9
- outputs?: Output[];
10
- /** @format int32 */
11
- gasAmount: number;
12
- /** @format uint256 */
13
- gasPrice: string;
14
- scriptExecutionOk: boolean;
15
- coinbase: boolean;
16
- type: string;
17
- }
18
- export interface AddressBalance {
19
- /** @format uint256 */
20
- balance: string;
21
- /** @format uint256 */
22
- lockedBalance: string;
23
- }
24
- export interface AddressInfo {
25
- /** @format uint256 */
26
- balance: string;
27
- /** @format uint256 */
28
- lockedBalance: string;
29
- /** @format int32 */
30
- txNumber: number;
31
- }
32
- export interface AssetOutput {
33
- /** @format int32 */
34
- hint: number;
35
- /** @format 32-byte-hash */
36
- key: string;
37
- /** @format uint256 */
38
- attoAlphAmount: string;
39
- /** @format address */
40
- address: string;
41
- tokens?: Token[];
42
- /** @format int64 */
43
- lockTime?: number;
44
- /** @format hex-string */
45
- message?: string;
46
- /** @format 32-byte-hash */
47
- spent?: string;
48
- type: string;
49
- }
50
- export interface BadRequest {
51
- detail: string;
52
- }
53
- export interface BlockEntryLite {
54
- /** @format block-hash */
55
- hash: string;
56
- /** @format int64 */
57
- timestamp: number;
58
- /** @format int32 */
59
- chainFrom: number;
60
- /** @format int32 */
61
- chainTo: number;
62
- /** @format int32 */
63
- height: number;
64
- /** @format int32 */
65
- txNumber: number;
66
- mainChain: boolean;
67
- /** @format bigint */
68
- hashRate: string;
69
- }
70
- export interface ContractOutput {
71
- /** @format int32 */
72
- hint: number;
73
- /** @format 32-byte-hash */
74
- key: string;
75
- /** @format uint256 */
76
- attoAlphAmount: string;
77
- /** @format address */
78
- address: string;
79
- tokens?: Token[];
80
- /** @format 32-byte-hash */
81
- spent?: string;
82
- type: string;
83
- }
84
- export interface ContractParent {
85
- /** @format address */
86
- parent?: string;
87
- }
88
- export interface Event {
89
- /** @format block-hash */
90
- blockHash: string;
91
- /** @format 32-byte-hash */
92
- txHash: string;
93
- /** @format address */
94
- contractAddress: string;
95
- /** @format address */
96
- inputAddress?: string;
97
- /** @format int32 */
98
- eventIndex: number;
99
- fields?: Val[];
100
- }
101
- export interface ExplorerInfo {
102
- releaseVersion: string;
103
- commit: string;
104
- }
105
- export interface Hashrate {
106
- /** @format int64 */
107
- timestamp: number;
108
- hashrate: number;
109
- value: number;
110
- }
111
- export interface Input {
112
- outputRef: OutputRef;
113
- /** @format hex-string */
114
- unlockScript?: string;
115
- /** @format 32-byte-hash */
116
- txHashRef?: string;
117
- /** @format address */
118
- address?: string;
119
- /** @format uint256 */
120
- attoAlphAmount?: string;
121
- tokens?: Token[];
122
- }
123
- export interface InternalServerError {
124
- detail: string;
125
- }
126
- export declare enum IntervalType {
127
- Daily = "daily",
128
- Hourly = "hourly"
129
- }
130
- export interface ListBlocks {
131
- /** @format int32 */
132
- total: number;
133
- blocks?: BlockEntryLite[];
134
- }
135
- export interface LogbackValue {
136
- name: string;
137
- level: string;
138
- }
139
- export interface MempoolTransaction {
140
- /** @format 32-byte-hash */
141
- hash: string;
142
- /** @format int32 */
143
- chainFrom: number;
144
- /** @format int32 */
145
- chainTo: number;
146
- inputs?: Input[];
147
- outputs?: Output[];
148
- /** @format int32 */
149
- gasAmount: number;
150
- /** @format uint256 */
151
- gasPrice: string;
152
- /** @format int64 */
153
- lastSeen: number;
154
- }
155
- export interface NotFound {
156
- detail: string;
157
- resource: string;
158
- }
159
- export declare type Output = AssetOutput | ContractOutput;
160
- export interface OutputRef {
161
- /** @format int32 */
162
- hint: number;
163
- /** @format 32-byte-hash */
164
- key: string;
165
- }
166
- export interface PendingTransaction {
167
- /** @format 32-byte-hash */
168
- hash: string;
169
- /** @format int32 */
170
- chainFrom: number;
171
- /** @format int32 */
172
- chainTo: number;
173
- inputs?: Input[];
174
- outputs?: Output[];
175
- /** @format int32 */
176
- gasAmount: number;
177
- /** @format uint256 */
178
- gasPrice: string;
179
- /** @format int64 */
180
- lastSeen: number;
181
- type: string;
182
- }
183
- export interface PerChainCount {
184
- /** @format int32 */
185
- chainFrom: number;
186
- /** @format int32 */
187
- chainTo: number;
188
- /** @format int64 */
189
- count: number;
190
- }
191
- export interface PerChainDuration {
192
- /** @format int32 */
193
- chainFrom: number;
194
- /** @format int32 */
195
- chainTo: number;
196
- /** @format int64 */
197
- duration: number;
198
- /** @format int64 */
199
- value: number;
200
- }
201
- export interface PerChainHeight {
202
- /** @format int32 */
203
- chainFrom: number;
204
- /** @format int32 */
205
- chainTo: number;
206
- /** @format int64 */
207
- height: number;
208
- /** @format int64 */
209
- value: number;
210
- }
211
- export interface PerChainTimedCount {
212
- /** @format int64 */
213
- timestamp: number;
214
- totalCountPerChain?: PerChainCount[];
215
- }
216
- export interface ServiceUnavailable {
217
- detail: string;
218
- }
219
- export interface SubContracts {
220
- subContracts?: string[];
221
- }
222
- export interface TimedCount {
223
- /** @format int64 */
224
- timestamp: number;
225
- /** @format int64 */
226
- totalCountAllChains: number;
227
- }
228
- export interface Token {
229
- /** @format 32-byte-hash */
230
- id: string;
231
- /** @format uint256 */
232
- amount: string;
233
- }
234
- export interface TokenSupply {
235
- /** @format int64 */
236
- timestamp: number;
237
- /** @format uint256 */
238
- total: string;
239
- /** @format uint256 */
240
- circulating: string;
241
- /** @format uint256 */
242
- reserved: string;
243
- /** @format uint256 */
244
- locked: string;
245
- /** @format uint256 */
246
- maximum: string;
247
- }
248
- export interface Transaction {
249
- /** @format 32-byte-hash */
250
- hash: string;
251
- /** @format block-hash */
252
- blockHash: string;
253
- /** @format int64 */
254
- timestamp: number;
255
- inputs?: Input[];
256
- outputs?: Output[];
257
- /** @format int32 */
258
- gasAmount: number;
259
- /** @format uint256 */
260
- gasPrice: string;
261
- scriptExecutionOk: boolean;
262
- coinbase: boolean;
263
- }
264
- export declare type TransactionLike = AcceptedTransaction | PendingTransaction;
265
- export interface Unauthorized {
266
- detail: string;
267
- }
268
- export declare type Val = ValAddress | ValArray | ValBool | ValByteVec | ValI256 | ValU256;
269
- export interface ValAddress {
270
- /** @format address */
271
- value: string;
272
- type: string;
273
- }
274
- export interface ValArray {
275
- value: Val[];
276
- type: string;
277
- }
278
- export interface ValBool {
279
- value: boolean;
280
- type: string;
281
- }
282
- export interface ValByteVec {
283
- /** @format hex-string */
284
- value: string;
285
- type: string;
286
- }
287
- export interface ValI256 {
288
- /** @format bigint */
289
- value: string;
290
- type: string;
291
- }
292
- export interface ValU256 {
293
- /** @format uint256 */
294
- value: string;
295
- type: string;
296
- }
297
- import 'cross-fetch/polyfill';
298
- export declare type QueryParamsType = Record<string | number, any>;
299
- export declare type ResponseFormat = keyof Omit<Body, 'body' | 'bodyUsed'>;
300
- export interface FullRequestParams extends Omit<RequestInit, 'body'> {
301
- /** set parameter to `true` for call `securityWorker` for this request */
302
- secure?: boolean;
303
- /** request path */
304
- path: string;
305
- /** content type of request body */
306
- type?: ContentType;
307
- /** query params */
308
- query?: QueryParamsType;
309
- /** format of response (i.e. response.json() -> format: "json") */
310
- format?: ResponseFormat;
311
- /** request body */
312
- body?: unknown;
313
- /** base url */
314
- baseUrl?: string;
315
- /** request cancellation token */
316
- cancelToken?: CancelToken;
317
- }
318
- export declare type RequestParams = Omit<FullRequestParams, 'body' | 'method' | 'query' | 'path'>;
319
- export interface ApiConfig<SecurityDataType = unknown> {
320
- baseUrl?: string;
321
- baseApiParams?: Omit<RequestParams, 'baseUrl' | 'cancelToken' | 'signal'>;
322
- securityWorker?: (securityData: SecurityDataType | null) => Promise<RequestParams | void> | RequestParams | void;
323
- customFetch?: typeof fetch;
324
- }
325
- export interface HttpResponse<D extends unknown, E extends unknown = unknown> extends Response {
326
- data: D;
327
- error: E;
328
- }
329
- declare type CancelToken = Symbol | string | number;
330
- export declare enum ContentType {
331
- Json = "application/json",
332
- FormData = "multipart/form-data",
333
- UrlEncoded = "application/x-www-form-urlencoded",
334
- Text = "text/plain"
335
- }
336
- export declare class HttpClient<SecurityDataType = unknown> {
337
- baseUrl: string;
338
- private securityData;
339
- private securityWorker?;
340
- private abortControllers;
341
- private customFetch;
342
- private baseApiParams;
343
- constructor(apiConfig?: ApiConfig<SecurityDataType>);
344
- setSecurityData: (data: SecurityDataType | null) => void;
345
- protected encodeQueryParam(key: string, value: any): string;
346
- protected addQueryParam(query: QueryParamsType, key: string): string;
347
- protected addArrayQueryParam(query: QueryParamsType, key: string): any;
348
- protected toQueryString(rawQuery?: QueryParamsType): string;
349
- protected addQueryParams(rawQuery?: QueryParamsType): string;
350
- private contentFormatters;
351
- protected mergeRequestParams(params1: RequestParams, params2?: RequestParams): RequestParams;
352
- protected createAbortSignal: (cancelToken: CancelToken) => AbortSignal | undefined;
353
- abortRequest: (cancelToken: CancelToken) => void;
354
- request: <T = any, E = any>({ body, secure, path, type, query, format, baseUrl, cancelToken, ...params }: FullRequestParams) => Promise<HttpResponse<T, E>>;
355
- }
356
- /**
357
- * @title Alephium Explorer API
358
- * @version 1.0
359
- */
360
- export declare class Api<SecurityDataType extends unknown> extends HttpClient<SecurityDataType> {
361
- blocks: {
362
- /**
363
- * @description List blocks within time interval
364
- *
365
- * @tags Blocks
366
- * @name GetBlocks
367
- * @request GET:/blocks
368
- */
369
- getBlocks: (query?: {
370
- /**
371
- * Page number
372
- * @format int32
373
- */
374
- page?: number;
375
- /**
376
- * Number of items per page
377
- * @format int32
378
- */
379
- limit?: number;
380
- /** Reverse pagination */
381
- reverse?: boolean;
382
- }, params?: RequestParams) => Promise<ListBlocks>;
383
- /**
384
- * @description Get a block with hash
385
- *
386
- * @tags Blocks
387
- * @name GetBlocksBlockHash
388
- * @request GET:/blocks/{block_hash}
389
- */
390
- getBlocksBlockHash: (blockHash: string, params?: RequestParams) => Promise<BlockEntryLite>;
391
- /**
392
- * @description Get block's transactions
393
- *
394
- * @tags Blocks
395
- * @name GetBlocksBlockHashTransactions
396
- * @request GET:/blocks/{block_hash}/transactions
397
- */
398
- getBlocksBlockHashTransactions: (blockHash: string, query?: {
399
- /**
400
- * Page number
401
- * @format int32
402
- */
403
- page?: number;
404
- /**
405
- * Number of items per page
406
- * @format int32
407
- */
408
- limit?: number;
409
- /** Reverse pagination */
410
- reverse?: boolean;
411
- }, params?: RequestParams) => Promise<Transaction[]>;
412
- };
413
- transactions: {
414
- /**
415
- * @description Get a transaction with hash
416
- *
417
- * @tags Transactions
418
- * @name GetTransactionsTransactionHash
419
- * @request GET:/transactions/{transaction_hash}
420
- */
421
- getTransactionsTransactionHash: (transactionHash: string, params?: RequestParams) => Promise<AcceptedTransaction | PendingTransaction>;
422
- };
423
- addresses: {
424
- /**
425
- * @description Get address information
426
- *
427
- * @tags Addresses
428
- * @name GetAddressesAddress
429
- * @request GET:/addresses/{address}
430
- */
431
- getAddressesAddress: (address: string, params?: RequestParams) => Promise<AddressInfo>;
432
- /**
433
- * @description List transactions of a given address
434
- *
435
- * @tags Addresses
436
- * @name GetAddressesAddressTransactions
437
- * @request GET:/addresses/{address}/transactions
438
- */
439
- getAddressesAddressTransactions: (address: string, query?: {
440
- /**
441
- * Page number
442
- * @format int32
443
- */
444
- page?: number;
445
- /**
446
- * Number of items per page
447
- * @format int32
448
- */
449
- limit?: number;
450
- /** Reverse pagination */
451
- reverse?: boolean;
452
- }, params?: RequestParams) => Promise<Transaction[]>;
453
- /**
454
- * @description List transactions for given addresses
455
- *
456
- * @tags Addresses
457
- * @name PostAddressesTransactions
458
- * @request POST:/addresses/transactions
459
- */
460
- postAddressesTransactions: (query?: {
461
- /**
462
- * Page number
463
- * @format int32
464
- */
465
- page?: number;
466
- /**
467
- * Number of items per page
468
- * @format int32
469
- */
470
- limit?: number;
471
- /** Reverse pagination */
472
- reverse?: boolean;
473
- }, data?: string[], params?: RequestParams) => Promise<Transaction[]>;
474
- /**
475
- * @description List transactions of a given address within a time-range
476
- *
477
- * @tags Addresses
478
- * @name GetAddressesAddressTimerangedTransactions
479
- * @request GET:/addresses/{address}/timeranged-transactions
480
- */
481
- getAddressesAddressTimerangedTransactions: (address: string, query: {
482
- /**
483
- * @format int64
484
- * @min 0
485
- */
486
- fromTs: number;
487
- /**
488
- * @format int64
489
- * @min 0
490
- */
491
- toTs: number;
492
- /**
493
- * Page number
494
- * @format int32
495
- */
496
- page?: number;
497
- /**
498
- * Number of items per page
499
- * @format int32
500
- */
501
- limit?: number;
502
- /** Reverse pagination */
503
- reverse?: boolean;
504
- }, params?: RequestParams) => Promise<Transaction[]>;
505
- /**
506
- * @description Get total transactions of a given address
507
- *
508
- * @tags Addresses
509
- * @name GetAddressesAddressTotalTransactions
510
- * @request GET:/addresses/{address}/total-transactions
511
- */
512
- getAddressesAddressTotalTransactions: (address: string, params?: RequestParams) => Promise<number>;
513
- /**
514
- * @description List mempool transactions of a given address
515
- *
516
- * @tags Addresses
517
- * @name GetAddressesAddressMempoolTransactions
518
- * @request GET:/addresses/{address}/mempool/transactions
519
- */
520
- getAddressesAddressMempoolTransactions: (address: string, params?: RequestParams) => Promise<MempoolTransaction[]>;
521
- /**
522
- * @description Get address balance
523
- *
524
- * @tags Addresses
525
- * @name GetAddressesAddressBalance
526
- * @request GET:/addresses/{address}/balance
527
- */
528
- getAddressesAddressBalance: (address: string, params?: RequestParams) => Promise<AddressBalance>;
529
- /**
530
- * @description List address tokens
531
- *
532
- * @tags Addresses
533
- * @name GetAddressesAddressTokens
534
- * @request GET:/addresses/{address}/tokens
535
- */
536
- getAddressesAddressTokens: (address: string, params?: RequestParams) => Promise<string[]>;
537
- /**
538
- * @description List address tokens
539
- *
540
- * @tags Addresses
541
- * @name GetAddressesAddressTokensTokenIdTransactions
542
- * @request GET:/addresses/{address}/tokens/{token_id}/transactions
543
- */
544
- getAddressesAddressTokensTokenIdTransactions: (address: string, tokenId: string, query?: {
545
- /**
546
- * Page number
547
- * @format int32
548
- */
549
- page?: number;
550
- /**
551
- * Number of items per page
552
- * @format int32
553
- */
554
- limit?: number;
555
- /** Reverse pagination */
556
- reverse?: boolean;
557
- }, params?: RequestParams) => Promise<Transaction[]>;
558
- /**
559
- * @description Get address balance of given token
560
- *
561
- * @tags Addresses
562
- * @name GetAddressesAddressTokensTokenIdBalance
563
- * @request GET:/addresses/{address}/tokens/{token_id}/balance
564
- */
565
- getAddressesAddressTokensTokenIdBalance: (address: string, tokenId: string, params?: RequestParams) => Promise<AddressBalance>;
566
- /**
567
- * @description Are the addresses used (at least 1 transaction)
568
- *
569
- * @tags Addresses, Addresses
570
- * @name PostAddressesUsed
571
- * @request POST:/addresses/used
572
- */
573
- postAddressesUsed: (data?: string[], params?: RequestParams) => Promise<boolean[]>;
574
- /**
575
- * No description
576
- *
577
- * @tags Addresses
578
- * @name GetAddressesAddressExportTransactionsCsv
579
- * @request GET:/addresses/{address}/export-transactions/csv
580
- */
581
- getAddressesAddressExportTransactionsCsv: (address: string, query: {
582
- /**
583
- * @format int64
584
- * @min 0
585
- */
586
- fromTs: number;
587
- /**
588
- * @format int64
589
- * @min 0
590
- */
591
- toTs: number;
592
- }, params?: RequestParams) => Promise<string>;
593
- };
594
- infos: {
595
- /**
596
- * @description Get explorer informations
597
- *
598
- * @tags Infos
599
- * @name GetInfos
600
- * @request GET:/infos
601
- */
602
- getInfos: (params?: RequestParams) => Promise<ExplorerInfo>;
603
- /**
604
- * @description List latest height for each chain
605
- *
606
- * @tags Infos
607
- * @name GetInfosHeights
608
- * @request GET:/infos/heights
609
- */
610
- getInfosHeights: (params?: RequestParams) => Promise<PerChainHeight[]>;
611
- /**
612
- * @description Get token supply list
613
- *
614
- * @tags Infos
615
- * @name GetInfosSupply
616
- * @request GET:/infos/supply
617
- */
618
- getInfosSupply: (query?: {
619
- /**
620
- * Page number
621
- * @format int32
622
- */
623
- page?: number;
624
- /**
625
- * Number of items per page
626
- * @format int32
627
- */
628
- limit?: number;
629
- /** Reverse pagination */
630
- reverse?: boolean;
631
- }, params?: RequestParams) => Promise<TokenSupply[]>;
632
- /**
633
- * @description Get the ALPH total supply
634
- *
635
- * @tags Infos
636
- * @name GetInfosSupplyTotalAlph
637
- * @request GET:/infos/supply/total-alph
638
- */
639
- getInfosSupplyTotalAlph: (params?: RequestParams) => Promise<number>;
640
- /**
641
- * @description Get the ALPH circulating supply
642
- *
643
- * @tags Infos
644
- * @name GetInfosSupplyCirculatingAlph
645
- * @request GET:/infos/supply/circulating-alph
646
- */
647
- getInfosSupplyCirculatingAlph: (params?: RequestParams) => Promise<number>;
648
- /**
649
- * @description Get the ALPH reserved supply
650
- *
651
- * @tags Infos
652
- * @name GetInfosSupplyReservedAlph
653
- * @request GET:/infos/supply/reserved-alph
654
- */
655
- getInfosSupplyReservedAlph: (params?: RequestParams) => Promise<number>;
656
- /**
657
- * @description Get the ALPH locked supply
658
- *
659
- * @tags Infos
660
- * @name GetInfosSupplyLockedAlph
661
- * @request GET:/infos/supply/locked-alph
662
- */
663
- getInfosSupplyLockedAlph: (params?: RequestParams) => Promise<number>;
664
- /**
665
- * @description Get the total number of transactions
666
- *
667
- * @tags Infos
668
- * @name GetInfosTotalTransactions
669
- * @request GET:/infos/total-transactions
670
- */
671
- getInfosTotalTransactions: (params?: RequestParams) => Promise<number>;
672
- /**
673
- * @description Get the average block time for each chain
674
- *
675
- * @tags Infos
676
- * @name GetInfosAverageBlockTimes
677
- * @request GET:/infos/average-block-times
678
- */
679
- getInfosAverageBlockTimes: (params?: RequestParams) => Promise<PerChainDuration[]>;
680
- };
681
- mempool: {
682
- /**
683
- * @description list mempool transactions
684
- *
685
- * @tags Mempool
686
- * @name GetMempoolTransactions
687
- * @request GET:/mempool/transactions
688
- */
689
- getMempoolTransactions: (query?: {
690
- /**
691
- * Page number
692
- * @format int32
693
- */
694
- page?: number;
695
- /**
696
- * Number of items per page
697
- * @format int32
698
- */
699
- limit?: number;
700
- /** Reverse pagination */
701
- reverse?: boolean;
702
- }, params?: RequestParams) => Promise<MempoolTransaction[]>;
703
- };
704
- tokens: {
705
- /**
706
- * @description List tokens
707
- *
708
- * @tags Tokens
709
- * @name GetTokens
710
- * @request GET:/tokens
711
- */
712
- getTokens: (query?: {
713
- /**
714
- * Page number
715
- * @format int32
716
- */
717
- page?: number;
718
- /**
719
- * Number of items per page
720
- * @format int32
721
- */
722
- limit?: number;
723
- /** Reverse pagination */
724
- reverse?: boolean;
725
- }, params?: RequestParams) => Promise<string[]>;
726
- /**
727
- * @description List token transactions
728
- *
729
- * @tags Tokens
730
- * @name GetTokensTokenIdTransactions
731
- * @request GET:/tokens/{token_id}/transactions
732
- */
733
- getTokensTokenIdTransactions: (tokenId: string, query?: {
734
- /**
735
- * Page number
736
- * @format int32
737
- */
738
- page?: number;
739
- /**
740
- * Number of items per page
741
- * @format int32
742
- */
743
- limit?: number;
744
- /** Reverse pagination */
745
- reverse?: boolean;
746
- }, params?: RequestParams) => Promise<Transaction[]>;
747
- };
748
- charts: {
749
- /**
750
- * @description `interval-type` query param: hourly, daily
751
- *
752
- * @tags Charts
753
- * @name GetChartsHashrates
754
- * @summary Get hashrate chart in H/s
755
- * @request GET:/charts/hashrates
756
- */
757
- getChartsHashrates: (query: {
758
- /**
759
- * @format int64
760
- * @min 0
761
- */
762
- fromTs: number;
763
- /**
764
- * @format int64
765
- * @min 0
766
- */
767
- toTs: number;
768
- 'interval-type': IntervalType;
769
- }, params?: RequestParams) => Promise<Hashrate[]>;
770
- /**
771
- * @description `interval-type` query param: hourly, daily
772
- *
773
- * @tags Charts
774
- * @name GetChartsTransactionsCount
775
- * @summary Get transaction count history
776
- * @request GET:/charts/transactions-count
777
- */
778
- getChartsTransactionsCount: (query: {
779
- /**
780
- * @format int64
781
- * @min 0
782
- */
783
- fromTs: number;
784
- /**
785
- * @format int64
786
- * @min 0
787
- */
788
- toTs: number;
789
- 'interval-type': IntervalType;
790
- }, params?: RequestParams) => Promise<TimedCount[]>;
791
- /**
792
- * @description `interval-type` query param: hourly, daily
793
- *
794
- * @tags Charts
795
- * @name GetChartsTransactionsCountPerChain
796
- * @summary Get transaction count history per chain
797
- * @request GET:/charts/transactions-count-per-chain
798
- */
799
- getChartsTransactionsCountPerChain: (query: {
800
- /**
801
- * @format int64
802
- * @min 0
803
- */
804
- fromTs: number;
805
- /**
806
- * @format int64
807
- * @min 0
808
- */
809
- toTs: number;
810
- 'interval-type': IntervalType;
811
- }, params?: RequestParams) => Promise<PerChainTimedCount[]>;
812
- };
813
- contractEvents: {
814
- /**
815
- * @description Get contract events by transaction id
816
- *
817
- * @tags Contract events
818
- * @name GetContractEventsTransactionIdTransactionId
819
- * @request GET:/contract-events/transaction-id/{transaction_id}
820
- */
821
- getContractEventsTransactionIdTransactionId: (transactionId: string, params?: RequestParams) => Promise<Event[]>;
822
- /**
823
- * @description Get contract events by contract address
824
- *
825
- * @tags Contract events
826
- * @name GetContractEventsContractAddressContractAddress
827
- * @request GET:/contract-events/contract-address/{contract_address}
828
- */
829
- getContractEventsContractAddressContractAddress: (contractAddress: string, query?: {
830
- /**
831
- * Page number
832
- * @format int32
833
- */
834
- page?: number;
835
- /**
836
- * Number of items per page
837
- * @format int32
838
- */
839
- limit?: number;
840
- /** Reverse pagination */
841
- reverse?: boolean;
842
- }, params?: RequestParams) => Promise<Event[]>;
843
- /**
844
- * @description Get contract events by contract and input addresses
845
- *
846
- * @tags Contract events
847
- * @name GetContractEventsContractAddressContractAddressInputAddressInputAddress
848
- * @request GET:/contract-events/contract-address/{contract_address}/input-address/{input_address}
849
- */
850
- getContractEventsContractAddressContractAddressInputAddressInputAddress: (contractAddress: string, inputAddress: string, query?: {
851
- /**
852
- * Page number
853
- * @format int32
854
- */
855
- page?: number;
856
- /**
857
- * Number of items per page
858
- * @format int32
859
- */
860
- limit?: number;
861
- /** Reverse pagination */
862
- reverse?: boolean;
863
- }, params?: RequestParams) => Promise<Event[]>;
864
- };
865
- contracts: {
866
- /**
867
- * @description Get contract parent address if exist
868
- *
869
- * @tags Contracts
870
- * @name GetContractsContractParent
871
- * @request GET:/contracts/{contract}/parent
872
- */
873
- getContractsContractParent: (contract: string, params?: RequestParams) => Promise<ContractParent>;
874
- /**
875
- * @description Get sub contract addresses
876
- *
877
- * @tags Contracts
878
- * @name GetContractsContractSubContracts
879
- * @request GET:/contracts/{contract}/sub-contracts
880
- */
881
- getContractsContractSubContracts: (contract: string, query?: {
882
- /**
883
- * Page number
884
- * @format int32
885
- */
886
- page?: number;
887
- /**
888
- * Number of items per page
889
- * @format int32
890
- */
891
- limit?: number;
892
- /** Reverse pagination */
893
- reverse?: boolean;
894
- }, params?: RequestParams) => Promise<SubContracts>;
895
- };
896
- utils: {
897
- /**
898
- * @description Perform a sanity check
899
- *
900
- * @tags Utils
901
- * @name PutUtilsSanityCheck
902
- * @request PUT:/utils/sanity-check
903
- */
904
- putUtilsSanityCheck: (params?: RequestParams) => Promise<void>;
905
- /**
906
- * @description Update global log level, accepted: TRACE, DEBUG, INFO, WARN, ERROR
907
- *
908
- * @tags Utils
909
- * @name PutUtilsUpdateGlobalLoglevel
910
- * @request PUT:/utils/update-global-loglevel
911
- */
912
- putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params?: RequestParams) => Promise<void>;
913
- /**
914
- * @description Update logback values
915
- *
916
- * @tags Utils
917
- * @name PutUtilsUpdateLogConfig
918
- * @request PUT:/utils/update-log-config
919
- */
920
- putUtilsUpdateLogConfig: (data?: LogbackValue[], params?: RequestParams) => Promise<void>;
921
- };
922
- }
923
- export {};