@alephium/web3 0.2.0-rc.3 → 0.2.0-rc.30

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 (125) hide show
  1. package/.eslintignore +2 -2
  2. package/README.md +2 -135
  3. package/dist/alephium-web3.min.js +1 -1
  4. package/dist/alephium-web3.min.js.LICENSE.txt +0 -17
  5. package/dist/alephium-web3.min.js.map +1 -1
  6. package/dist/src/api/api-alephium.d.ts +117 -17
  7. package/dist/src/api/api-alephium.js +145 -79
  8. package/dist/src/api/api-explorer.d.ts +163 -48
  9. package/dist/src/api/api-explorer.js +157 -34
  10. package/dist/src/api/index.d.ts +3 -2
  11. package/dist/src/api/index.js +22 -3
  12. package/dist/src/api/types.d.ts +23 -0
  13. package/dist/src/api/types.js +240 -0
  14. package/dist/src/api/utils.d.ts +6 -0
  15. package/dist/{scripts/rename-gitignore.js → src/api/utils.js} +11 -6
  16. package/dist/src/contract/contract.d.ts +107 -68
  17. package/dist/src/contract/contract.js +395 -451
  18. package/dist/src/contract/events.d.ts +4 -4
  19. package/dist/src/contract/events.js +2 -1
  20. package/dist/src/contract/index.js +5 -1
  21. package/dist/src/contract/ralph.d.ts +5 -4
  22. package/dist/src/contract/ralph.js +27 -1
  23. package/dist/src/global.d.ts +4 -0
  24. package/dist/{scripts/stop-devnet.js → src/global.js} +17 -11
  25. package/dist/src/index.d.ts +2 -0
  26. package/dist/src/index.js +23 -1
  27. package/dist/src/signer/index.d.ts +0 -1
  28. package/dist/src/signer/index.js +5 -2
  29. package/dist/src/signer/signer.d.ts +25 -13
  30. package/dist/src/signer/signer.js +51 -16
  31. package/dist/src/transaction/index.d.ts +0 -1
  32. package/dist/src/transaction/index.js +5 -2
  33. package/dist/src/transaction/status.d.ts +2 -1
  34. package/dist/src/transaction/status.js +2 -1
  35. package/dist/src/utils/bs58.d.ts +1 -0
  36. package/dist/src/utils/bs58.js +13 -1
  37. package/dist/src/utils/index.d.ts +0 -1
  38. package/dist/src/utils/index.js +5 -2
  39. package/dist/src/utils/subscription.d.ts +0 -3
  40. package/dist/src/utils/subscription.js +0 -1
  41. package/dist/src/utils/utils.d.ts +4 -9
  42. package/dist/src/utils/utils.js +20 -24
  43. package/jest-config.json +11 -0
  44. package/package.json +11 -47
  45. package/src/api/api-alephium.ts +169 -25
  46. package/src/api/api-explorer.ts +234 -51
  47. package/src/api/index.ts +14 -3
  48. package/src/api/types.ts +233 -0
  49. package/{scripts/rename-gitignore.js → src/api/utils.ts} +7 -6
  50. package/src/contract/contract.ts +579 -545
  51. package/src/contract/events.ts +6 -5
  52. package/src/contract/ralph.ts +29 -4
  53. package/src/{transaction/sign-verify.ts → global.ts} +14 -15
  54. package/src/index.ts +7 -0
  55. package/src/signer/index.ts +0 -1
  56. package/src/signer/signer.ts +79 -27
  57. package/src/transaction/index.ts +0 -1
  58. package/src/transaction/status.ts +5 -2
  59. package/src/utils/bs58.ts +11 -0
  60. package/src/utils/index.ts +0 -1
  61. package/src/utils/subscription.ts +1 -3
  62. package/src/utils/utils.ts +11 -19
  63. package/.eslintrc.json +0 -21
  64. package/LICENSE +0 -165
  65. package/contracts/add/add.ral +0 -16
  66. package/contracts/greeter/greeter.ral +0 -7
  67. package/contracts/greeter/greeter_interface.ral +0 -3
  68. package/contracts/greeter_main.ral +0 -9
  69. package/contracts/main.ral +0 -6
  70. package/contracts/sub/sub.ral +0 -9
  71. package/contracts/test/metadata.ral +0 -17
  72. package/contracts/test/warnings.ral +0 -5
  73. package/dev/user.conf +0 -29
  74. package/dist/scripts/create-project.d.ts +0 -2
  75. package/dist/scripts/create-project.js +0 -125
  76. package/dist/scripts/rename-gitignore.d.ts +0 -1
  77. package/dist/scripts/start-devnet.d.ts +0 -1
  78. package/dist/scripts/start-devnet.js +0 -131
  79. package/dist/scripts/stop-devnet.d.ts +0 -1
  80. package/dist/src/signer/node-wallet.d.ts +0 -13
  81. package/dist/src/signer/node-wallet.js +0 -60
  82. package/dist/src/test/index.d.ts +0 -7
  83. package/dist/src/test/index.js +0 -41
  84. package/dist/src/test/privatekey-wallet.d.ts +0 -12
  85. package/dist/src/test/privatekey-wallet.js +0 -68
  86. package/dist/src/transaction/sign-verify.d.ts +0 -2
  87. package/dist/src/transaction/sign-verify.js +0 -58
  88. package/dist/src/utils/password-crypto.d.ts +0 -2
  89. package/dist/src/utils/password-crypto.js +0 -69
  90. package/gitignore +0 -10
  91. package/scripts/create-project.ts +0 -137
  92. package/scripts/start-devnet.js +0 -141
  93. package/scripts/stop-devnet.js +0 -32
  94. package/src/contract/ralph.test.ts +0 -178
  95. package/src/fixtures/address.json +0 -36
  96. package/src/fixtures/balance.json +0 -9
  97. package/src/fixtures/self-clique.json +0 -19
  98. package/src/fixtures/transaction.json +0 -13
  99. package/src/fixtures/transactions.json +0 -179
  100. package/src/signer/fixtures/genesis.json +0 -26
  101. package/src/signer/fixtures/wallets.json +0 -26
  102. package/src/signer/node-wallet.ts +0 -74
  103. package/src/test/index.ts +0 -32
  104. package/src/test/privatekey-wallet.ts +0 -58
  105. package/src/transaction/sign-verify.test.ts +0 -50
  106. package/src/utils/address.test.ts +0 -47
  107. package/src/utils/djb2.test.ts +0 -35
  108. package/src/utils/password-crypto.test.ts +0 -27
  109. package/src/utils/password-crypto.ts +0 -77
  110. package/src/utils/utils.test.ts +0 -161
  111. package/templates/base/README.md +0 -34
  112. package/templates/base/package.json +0 -35
  113. package/templates/base/src/greeter.ts +0 -41
  114. package/templates/base/tsconfig.json +0 -19
  115. package/templates/react/README.md +0 -34
  116. package/templates/react/config-overrides.js +0 -18
  117. package/templates/react/package.json +0 -66
  118. package/templates/react/src/App.tsx +0 -42
  119. package/templates/react/src/artifacts/greeter.ral.json +0 -26
  120. package/templates/react/src/artifacts/greeter_main.ral.json +0 -22
  121. package/templates/shared/.eslintrc.json +0 -12
  122. package/templates/shared/scripts/header.js +0 -0
  123. package/test/contract.test.ts +0 -197
  124. package/test/events.test.ts +0 -138
  125. package/test/transaction.test.ts +0 -72
@@ -12,6 +12,23 @@ export interface AddressInfo {
12
12
  /** @format int32 */
13
13
  txNumber: number;
14
14
  }
15
+ export interface AssetOutput {
16
+ /** @format int32 */
17
+ hint: number;
18
+ /** @format 32-byte-hash */
19
+ key: string;
20
+ /** @format uint256 */
21
+ attoAlphAmount: string;
22
+ address: string;
23
+ tokens?: Token[];
24
+ /** @format int64 */
25
+ lockTime?: number;
26
+ /** @format hex-string */
27
+ message?: string;
28
+ /** @format 32-byte-hash */
29
+ spent?: string;
30
+ type: string;
31
+ }
15
32
  export interface BadRequest {
16
33
  detail: string;
17
34
  }
@@ -47,6 +64,19 @@ export interface ConfirmedTransaction {
47
64
  gasPrice: string;
48
65
  type: string;
49
66
  }
67
+ export interface ContractOutput {
68
+ /** @format int32 */
69
+ hint: number;
70
+ /** @format 32-byte-hash */
71
+ key: string;
72
+ /** @format uint256 */
73
+ attoAlphAmount: string;
74
+ address: string;
75
+ tokens?: Token[];
76
+ /** @format 32-byte-hash */
77
+ spent?: string;
78
+ type: string;
79
+ }
50
80
  export interface ExplorerInfo {
51
81
  releaseVersion: string;
52
82
  commit: string;
@@ -59,12 +89,12 @@ export interface Hashrate {
59
89
  }
60
90
  export interface Input {
61
91
  outputRef: OutputRef;
92
+ /** @format hex-string */
62
93
  unlockScript?: string;
63
- /** @format 32-byte-hash */
64
- txHashRef: string;
65
- address: string;
94
+ address?: string;
66
95
  /** @format uint256 */
67
- amount: string;
96
+ attoAlphAmount?: string;
97
+ tokens?: Token[];
68
98
  }
69
99
  export interface InternalServerError {
70
100
  detail: string;
@@ -74,23 +104,15 @@ export interface ListBlocks {
74
104
  total: number;
75
105
  blocks?: BlockEntryLite[];
76
106
  }
107
+ export interface LogbackValue {
108
+ name: string;
109
+ level: string;
110
+ }
77
111
  export interface NotFound {
78
112
  detail: string;
79
113
  resource: string;
80
114
  }
81
- export interface Output {
82
- /** @format int32 */
83
- hint: number;
84
- /** @format 32-byte-hash */
85
- key: string;
86
- /** @format uint256 */
87
- amount: string;
88
- address: string;
89
- /** @format int64 */
90
- lockTime?: number;
91
- /** @format 32-byte-hash */
92
- spent?: string;
93
- }
115
+ export declare type Output = AssetOutput | ContractOutput;
94
116
  export interface OutputRef {
95
117
  /** @format int32 */
96
118
  hint: number;
@@ -139,6 +161,12 @@ export interface TimedCount {
139
161
  /** @format int64 */
140
162
  totalCountAllChains: number;
141
163
  }
164
+ export interface Token {
165
+ /** @format 32-byte-hash */
166
+ id: string;
167
+ /** @format uint256 */
168
+ amount: string;
169
+ }
142
170
  export interface TokenSupply {
143
171
  /** @format int64 */
144
172
  timestamp: number;
@@ -168,17 +196,6 @@ export interface Transaction {
168
196
  gasPrice: string;
169
197
  }
170
198
  export declare type TransactionLike = ConfirmedTransaction | UnconfirmedTransaction;
171
- export interface UInput {
172
- outputRef: OutputRef;
173
- unlockScript?: string;
174
- }
175
- export interface UOutput {
176
- /** @format uint256 */
177
- amount: string;
178
- address: string;
179
- /** @format int64 */
180
- lockTime?: number;
181
- }
182
199
  export interface Unauthorized {
183
200
  detail: string;
184
201
  }
@@ -189,12 +206,14 @@ export interface UnconfirmedTransaction {
189
206
  chainFrom: number;
190
207
  /** @format int32 */
191
208
  chainTo: number;
192
- inputs?: UInput[];
193
- outputs?: UOutput[];
209
+ inputs?: Input[];
210
+ outputs?: AssetOutput[];
194
211
  /** @format int32 */
195
212
  gasAmount: number;
196
213
  /** @format uint256 */
197
214
  gasPrice: string;
215
+ /** @format int64 */
216
+ lastSeen: number;
198
217
  type: string;
199
218
  }
200
219
  import 'cross-fetch/polyfill';
@@ -269,10 +288,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
269
288
  * @request GET:/blocks
270
289
  */
271
290
  getBlocks: (query?: {
272
- page?: number | undefined;
273
- limit?: number | undefined;
274
- reverse?: boolean | undefined;
275
- } | undefined, params?: RequestParams) => Promise<ListBlocks>;
291
+ page?: number;
292
+ limit?: number;
293
+ reverse?: boolean;
294
+ }, params?: RequestParams) => Promise<ListBlocks>;
276
295
  /**
277
296
  * @description Get a block with hash
278
297
  *
@@ -289,10 +308,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
289
308
  * @request GET:/blocks/{block-hash}/transactions
290
309
  */
291
310
  getBlocksBlockHashTransactions: (blockHash: string, query?: {
292
- page?: number | undefined;
293
- limit?: number | undefined;
294
- reverse?: boolean | undefined;
295
- } | undefined, params?: RequestParams) => Promise<Transaction[]>;
311
+ page?: number;
312
+ limit?: number;
313
+ reverse?: boolean;
314
+ }, params?: RequestParams) => Promise<Transaction[]>;
296
315
  };
297
316
  transactions: {
298
317
  /**
@@ -304,6 +323,16 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
304
323
  */
305
324
  getTransactionsTransactionHash: (transactionHash: string, params?: RequestParams) => Promise<ConfirmedTransaction | UnconfirmedTransaction>;
306
325
  };
326
+ transactionByOutputRefKey: {
327
+ /**
328
+ * @description Get a transaction from a output reference key
329
+ *
330
+ * @tags Transactions
331
+ * @name GetTransactionByOutputRefKeyOutputRefKey
332
+ * @request GET:/transaction-by-output-ref-key/{output-ref-key}
333
+ */
334
+ getTransactionByOutputRefKeyOutputRefKey: (outputRefKey: string, params?: RequestParams) => Promise<ConfirmedTransaction>;
335
+ };
307
336
  addresses: {
308
337
  /**
309
338
  * @description Get address information
@@ -321,10 +350,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
321
350
  * @request GET:/addresses/{address}/transactions
322
351
  */
323
352
  getAddressesAddressTransactions: (address: string, query?: {
324
- page?: number | undefined;
325
- limit?: number | undefined;
326
- reverse?: boolean | undefined;
327
- } | undefined, params?: RequestParams) => Promise<Transaction[]>;
353
+ page?: number;
354
+ limit?: number;
355
+ reverse?: boolean;
356
+ }, params?: RequestParams) => Promise<Transaction[]>;
328
357
  /**
329
358
  * @description Get total transactions of a given address
330
359
  *
@@ -333,6 +362,14 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
333
362
  * @request GET:/addresses/{address}/total-transactions
334
363
  */
335
364
  getAddressesAddressTotalTransactions: (address: string, params?: RequestParams) => Promise<number>;
365
+ /**
366
+ * @description List unconfirmed transactions of a given address
367
+ *
368
+ * @tags Addresses
369
+ * @name GetAddressesAddressUnconfirmedTransactions
370
+ * @request GET:/addresses/{address}/unconfirmed-transactions
371
+ */
372
+ getAddressesAddressUnconfirmedTransactions: (address: string, params?: RequestParams) => Promise<UnconfirmedTransaction[]>;
336
373
  /**
337
374
  * @description Get address balance
338
375
  *
@@ -341,6 +378,44 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
341
378
  * @request GET:/addresses/{address}/balance
342
379
  */
343
380
  getAddressesAddressBalance: (address: string, params?: RequestParams) => Promise<AddressBalance>;
381
+ /**
382
+ * @description List address tokens
383
+ *
384
+ * @tags Addresses
385
+ * @name GetAddressesAddressTokens
386
+ * @request GET:/addresses/{address}/tokens
387
+ */
388
+ getAddressesAddressTokens: (address: string, params?: RequestParams) => Promise<string[]>;
389
+ /**
390
+ * @description List address tokens
391
+ *
392
+ * @tags Addresses
393
+ * @name GetAddressesAddressTokensTokenIdTransactions
394
+ * @request GET:/addresses/{address}/tokens/{token-id}/transactions
395
+ */
396
+ getAddressesAddressTokensTokenIdTransactions: (address: string, tokenId: string, query?: {
397
+ page?: number;
398
+ limit?: number;
399
+ reverse?: boolean;
400
+ }, params?: RequestParams) => Promise<Transaction[]>;
401
+ /**
402
+ * @description Get address balance of given token
403
+ *
404
+ * @tags Addresses
405
+ * @name GetAddressesAddressTokensTokenIdBalance
406
+ * @request GET:/addresses/{address}/tokens/{token-id}/balance
407
+ */
408
+ getAddressesAddressTokensTokenIdBalance: (address: string, tokenId: string, params?: RequestParams) => Promise<AddressBalance>;
409
+ };
410
+ addressesActive: {
411
+ /**
412
+ * @description Are the addresses active (at least 1 transaction)
413
+ *
414
+ * @tags Addresses
415
+ * @name PostAddressesActive
416
+ * @request POST:/addresses-active
417
+ */
418
+ postAddressesActive: (data?: string[], params?: RequestParams) => Promise<boolean[]>;
344
419
  };
345
420
  infos: {
346
421
  /**
@@ -367,10 +442,10 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
367
442
  * @request GET:/infos/supply
368
443
  */
369
444
  getInfosSupply: (query?: {
370
- page?: number | undefined;
371
- limit?: number | undefined;
372
- reverse?: boolean | undefined;
373
- } | undefined, params?: RequestParams) => Promise<TokenSupply[]>;
445
+ page?: number;
446
+ limit?: number;
447
+ reverse?: boolean;
448
+ }, params?: RequestParams) => Promise<TokenSupply[]>;
374
449
  /**
375
450
  * @description Get the ALPH total supply
376
451
  *
@@ -420,6 +495,46 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
420
495
  */
421
496
  getInfosAverageBlockTimes: (params?: RequestParams) => Promise<PerChainDuration[]>;
422
497
  };
498
+ unconfirmedTransactions: {
499
+ /**
500
+ * @description list unconfirmed transactions
501
+ *
502
+ * @tags Unconfirmed Transactions
503
+ * @name GetUnconfirmedTransactions
504
+ * @request GET:/unconfirmed-transactions
505
+ */
506
+ getUnconfirmedTransactions: (query?: {
507
+ page?: number;
508
+ limit?: number;
509
+ reverse?: boolean;
510
+ }, params?: RequestParams) => Promise<UnconfirmedTransaction[]>;
511
+ };
512
+ tokens: {
513
+ /**
514
+ * @description List tokens
515
+ *
516
+ * @tags Tokens
517
+ * @name GetTokens
518
+ * @request GET:/tokens
519
+ */
520
+ getTokens: (query?: {
521
+ page?: number;
522
+ limit?: number;
523
+ reverse?: boolean;
524
+ }, params?: RequestParams) => Promise<string[]>;
525
+ /**
526
+ * @description List token transactions
527
+ *
528
+ * @tags Tokens
529
+ * @name GetTokensTokenIdTransactions
530
+ * @request GET:/tokens/{token-id}/transactions
531
+ */
532
+ getTokensTokenIdTransactions: (tokenId: string, query?: {
533
+ page?: number;
534
+ limit?: number;
535
+ reverse?: boolean;
536
+ }, params?: RequestParams) => Promise<Transaction[]>;
537
+ };
423
538
  charts: {
424
539
  /**
425
540
  * @description `interval-type` query param: hourly, daily
@@ -479,13 +594,13 @@ export declare class Api<SecurityDataType extends unknown> extends HttpClient<Se
479
594
  */
480
595
  putUtilsUpdateGlobalLoglevel: (data: 'TRACE' | 'DEBUG' | 'INFO' | 'WARN' | 'ERROR', params?: RequestParams) => Promise<void>;
481
596
  /**
482
- * @description Update logging file, only logback.xml is accepted
597
+ * @description Update logback values
483
598
  *
484
599
  * @tags Utils
485
600
  * @name PutUtilsUpdateLogConfig
486
601
  * @request PUT:/utils/update-log-config
487
602
  */
488
- putUtilsUpdateLogConfig: (data: string, params?: RequestParams) => Promise<void>;
603
+ putUtilsUpdateLogConfig: (data?: LogbackValue[], params?: RequestParams) => Promise<void>;
489
604
  };
490
605
  }
491
606
  export {};
@@ -12,14 +12,7 @@
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
13
  exports.Api = exports.HttpClient = exports.ContentType = void 0;
14
14
  require("cross-fetch/polyfill");
15
- function convertHttpResponse(response) {
16
- if (response.error) {
17
- throw new Error(response.error.detail);
18
- }
19
- else {
20
- return response.data;
21
- }
22
- }
15
+ const utils_1 = require("./utils");
23
16
  var ContentType;
24
17
  (function (ContentType) {
25
18
  ContentType["Json"] = "application/json";
@@ -113,8 +106,6 @@ class HttpClient {
113
106
  if (cancelToken) {
114
107
  this.abortControllers.delete(cancelToken);
115
108
  }
116
- if (!response.ok)
117
- throw data;
118
109
  return data;
119
110
  });
120
111
  };
@@ -177,7 +168,7 @@ class Api extends HttpClient {
177
168
  query: query,
178
169
  format: 'json',
179
170
  ...params
180
- }).then(convertHttpResponse),
171
+ }).then(utils_1.convertHttpResponse),
181
172
  /**
182
173
  * @description Get a block with hash
183
174
  *
@@ -190,7 +181,7 @@ class Api extends HttpClient {
190
181
  method: 'GET',
191
182
  format: 'json',
192
183
  ...params
193
- }).then(convertHttpResponse),
184
+ }).then(utils_1.convertHttpResponse),
194
185
  /**
195
186
  * @description Get block's transactions
196
187
  *
@@ -204,7 +195,7 @@ class Api extends HttpClient {
204
195
  query: query,
205
196
  format: 'json',
206
197
  ...params
207
- }).then(convertHttpResponse)
198
+ }).then(utils_1.convertHttpResponse)
208
199
  };
209
200
  this.transactions = {
210
201
  /**
@@ -219,7 +210,22 @@ class Api extends HttpClient {
219
210
  method: 'GET',
220
211
  format: 'json',
221
212
  ...params
222
- }).then(convertHttpResponse)
213
+ }).then(utils_1.convertHttpResponse)
214
+ };
215
+ this.transactionByOutputRefKey = {
216
+ /**
217
+ * @description Get a transaction from a output reference key
218
+ *
219
+ * @tags Transactions
220
+ * @name GetTransactionByOutputRefKeyOutputRefKey
221
+ * @request GET:/transaction-by-output-ref-key/{output-ref-key}
222
+ */
223
+ getTransactionByOutputRefKeyOutputRefKey: (outputRefKey, params = {}) => this.request({
224
+ path: `/transaction-by-output-ref-key/${outputRefKey}`,
225
+ method: 'GET',
226
+ format: 'json',
227
+ ...params
228
+ }).then(utils_1.convertHttpResponse)
223
229
  };
224
230
  this.addresses = {
225
231
  /**
@@ -234,7 +240,7 @@ class Api extends HttpClient {
234
240
  method: 'GET',
235
241
  format: 'json',
236
242
  ...params
237
- }).then(convertHttpResponse),
243
+ }).then(utils_1.convertHttpResponse),
238
244
  /**
239
245
  * @description List transactions of a given address
240
246
  *
@@ -248,7 +254,7 @@ class Api extends HttpClient {
248
254
  query: query,
249
255
  format: 'json',
250
256
  ...params
251
- }).then(convertHttpResponse),
257
+ }).then(utils_1.convertHttpResponse),
252
258
  /**
253
259
  * @description Get total transactions of a given address
254
260
  *
@@ -261,7 +267,20 @@ class Api extends HttpClient {
261
267
  method: 'GET',
262
268
  format: 'json',
263
269
  ...params
264
- }).then(convertHttpResponse),
270
+ }).then(utils_1.convertHttpResponse),
271
+ /**
272
+ * @description List unconfirmed transactions of a given address
273
+ *
274
+ * @tags Addresses
275
+ * @name GetAddressesAddressUnconfirmedTransactions
276
+ * @request GET:/addresses/{address}/unconfirmed-transactions
277
+ */
278
+ getAddressesAddressUnconfirmedTransactions: (address, params = {}) => this.request({
279
+ path: `/addresses/${address}/unconfirmed-transactions`,
280
+ method: 'GET',
281
+ format: 'json',
282
+ ...params
283
+ }).then(utils_1.convertHttpResponse),
265
284
  /**
266
285
  * @description Get address balance
267
286
  *
@@ -274,7 +293,64 @@ class Api extends HttpClient {
274
293
  method: 'GET',
275
294
  format: 'json',
276
295
  ...params
277
- }).then(convertHttpResponse)
296
+ }).then(utils_1.convertHttpResponse),
297
+ /**
298
+ * @description List address tokens
299
+ *
300
+ * @tags Addresses
301
+ * @name GetAddressesAddressTokens
302
+ * @request GET:/addresses/{address}/tokens
303
+ */
304
+ getAddressesAddressTokens: (address, params = {}) => this.request({
305
+ path: `/addresses/${address}/tokens`,
306
+ method: 'GET',
307
+ format: 'json',
308
+ ...params
309
+ }).then(utils_1.convertHttpResponse),
310
+ /**
311
+ * @description List address tokens
312
+ *
313
+ * @tags Addresses
314
+ * @name GetAddressesAddressTokensTokenIdTransactions
315
+ * @request GET:/addresses/{address}/tokens/{token-id}/transactions
316
+ */
317
+ getAddressesAddressTokensTokenIdTransactions: (address, tokenId, query, params = {}) => this.request({
318
+ path: `/addresses/${address}/tokens/${tokenId}/transactions`,
319
+ method: 'GET',
320
+ query: query,
321
+ format: 'json',
322
+ ...params
323
+ }).then(utils_1.convertHttpResponse),
324
+ /**
325
+ * @description Get address balance of given token
326
+ *
327
+ * @tags Addresses
328
+ * @name GetAddressesAddressTokensTokenIdBalance
329
+ * @request GET:/addresses/{address}/tokens/{token-id}/balance
330
+ */
331
+ getAddressesAddressTokensTokenIdBalance: (address, tokenId, params = {}) => this.request({
332
+ path: `/addresses/${address}/tokens/${tokenId}/balance`,
333
+ method: 'GET',
334
+ format: 'json',
335
+ ...params
336
+ }).then(utils_1.convertHttpResponse)
337
+ };
338
+ this.addressesActive = {
339
+ /**
340
+ * @description Are the addresses active (at least 1 transaction)
341
+ *
342
+ * @tags Addresses
343
+ * @name PostAddressesActive
344
+ * @request POST:/addresses-active
345
+ */
346
+ postAddressesActive: (data, params = {}) => this.request({
347
+ path: `/addresses-active`,
348
+ method: 'POST',
349
+ body: data,
350
+ type: ContentType.Json,
351
+ format: 'json',
352
+ ...params
353
+ }).then(utils_1.convertHttpResponse)
278
354
  };
279
355
  this.infos = {
280
356
  /**
@@ -289,7 +365,7 @@ class Api extends HttpClient {
289
365
  method: 'GET',
290
366
  format: 'json',
291
367
  ...params
292
- }).then(convertHttpResponse),
368
+ }).then(utils_1.convertHttpResponse),
293
369
  /**
294
370
  * @description List latest height for each chain
295
371
  *
@@ -302,7 +378,7 @@ class Api extends HttpClient {
302
378
  method: 'GET',
303
379
  format: 'json',
304
380
  ...params
305
- }).then(convertHttpResponse),
381
+ }).then(utils_1.convertHttpResponse),
306
382
  /**
307
383
  * @description Get token supply list
308
384
  *
@@ -316,7 +392,7 @@ class Api extends HttpClient {
316
392
  query: query,
317
393
  format: 'json',
318
394
  ...params
319
- }).then(convertHttpResponse),
395
+ }).then(utils_1.convertHttpResponse),
320
396
  /**
321
397
  * @description Get the ALPH total supply
322
398
  *
@@ -328,7 +404,7 @@ class Api extends HttpClient {
328
404
  path: `/infos/supply/total-alph`,
329
405
  method: 'GET',
330
406
  ...params
331
- }).then(convertHttpResponse),
407
+ }).then(utils_1.convertHttpResponse),
332
408
  /**
333
409
  * @description Get the ALPH circulating supply
334
410
  *
@@ -340,7 +416,7 @@ class Api extends HttpClient {
340
416
  path: `/infos/supply/circulating-alph`,
341
417
  method: 'GET',
342
418
  ...params
343
- }).then(convertHttpResponse),
419
+ }).then(utils_1.convertHttpResponse),
344
420
  /**
345
421
  * @description Get the ALPH reserved supply
346
422
  *
@@ -352,7 +428,7 @@ class Api extends HttpClient {
352
428
  path: `/infos/supply/reserved-alph`,
353
429
  method: 'GET',
354
430
  ...params
355
- }).then(convertHttpResponse),
431
+ }).then(utils_1.convertHttpResponse),
356
432
  /**
357
433
  * @description Get the ALPH locked supply
358
434
  *
@@ -364,7 +440,7 @@ class Api extends HttpClient {
364
440
  path: `/infos/supply/locked-alph`,
365
441
  method: 'GET',
366
442
  ...params
367
- }).then(convertHttpResponse),
443
+ }).then(utils_1.convertHttpResponse),
368
444
  /**
369
445
  * @description Get the total number of transactions
370
446
  *
@@ -376,7 +452,7 @@ class Api extends HttpClient {
376
452
  path: `/infos/total-transactions`,
377
453
  method: 'GET',
378
454
  ...params
379
- }).then(convertHttpResponse),
455
+ }).then(utils_1.convertHttpResponse),
380
456
  /**
381
457
  * @description Get the average block time for each chain
382
458
  *
@@ -389,7 +465,53 @@ class Api extends HttpClient {
389
465
  method: 'GET',
390
466
  format: 'json',
391
467
  ...params
392
- }).then(convertHttpResponse)
468
+ }).then(utils_1.convertHttpResponse)
469
+ };
470
+ this.unconfirmedTransactions = {
471
+ /**
472
+ * @description list unconfirmed transactions
473
+ *
474
+ * @tags Unconfirmed Transactions
475
+ * @name GetUnconfirmedTransactions
476
+ * @request GET:/unconfirmed-transactions
477
+ */
478
+ getUnconfirmedTransactions: (query, params = {}) => this.request({
479
+ path: `/unconfirmed-transactions`,
480
+ method: 'GET',
481
+ query: query,
482
+ format: 'json',
483
+ ...params
484
+ }).then(utils_1.convertHttpResponse)
485
+ };
486
+ this.tokens = {
487
+ /**
488
+ * @description List tokens
489
+ *
490
+ * @tags Tokens
491
+ * @name GetTokens
492
+ * @request GET:/tokens
493
+ */
494
+ getTokens: (query, params = {}) => this.request({
495
+ path: `/tokens`,
496
+ method: 'GET',
497
+ query: query,
498
+ format: 'json',
499
+ ...params
500
+ }).then(utils_1.convertHttpResponse),
501
+ /**
502
+ * @description List token transactions
503
+ *
504
+ * @tags Tokens
505
+ * @name GetTokensTokenIdTransactions
506
+ * @request GET:/tokens/{token-id}/transactions
507
+ */
508
+ getTokensTokenIdTransactions: (tokenId, query, params = {}) => this.request({
509
+ path: `/tokens/${tokenId}/transactions`,
510
+ method: 'GET',
511
+ query: query,
512
+ format: 'json',
513
+ ...params
514
+ }).then(utils_1.convertHttpResponse)
393
515
  };
394
516
  this.charts = {
395
517
  /**
@@ -406,7 +528,7 @@ class Api extends HttpClient {
406
528
  query: query,
407
529
  format: 'json',
408
530
  ...params
409
- }).then(convertHttpResponse),
531
+ }).then(utils_1.convertHttpResponse),
410
532
  /**
411
533
  * @description `interval-type` query param: hourly, daily
412
534
  *
@@ -421,7 +543,7 @@ class Api extends HttpClient {
421
543
  query: query,
422
544
  format: 'json',
423
545
  ...params
424
- }).then(convertHttpResponse),
546
+ }).then(utils_1.convertHttpResponse),
425
547
  /**
426
548
  * @description `interval-type` query param: hourly, daily
427
549
  *
@@ -436,7 +558,7 @@ class Api extends HttpClient {
436
558
  query: query,
437
559
  format: 'json',
438
560
  ...params
439
- }).then(convertHttpResponse)
561
+ }).then(utils_1.convertHttpResponse)
440
562
  };
441
563
  this.utils = {
442
564
  /**
@@ -450,7 +572,7 @@ class Api extends HttpClient {
450
572
  path: `/utils/sanity-check`,
451
573
  method: 'PUT',
452
574
  ...params
453
- }).then(convertHttpResponse),
575
+ }).then(utils_1.convertHttpResponse),
454
576
  /**
455
577
  * @description Update global log level, accepted: TRACE, DEBUG, INFO, WARN, ERROR
456
578
  *
@@ -463,9 +585,9 @@ class Api extends HttpClient {
463
585
  method: 'PUT',
464
586
  body: data,
465
587
  ...params
466
- }).then(convertHttpResponse),
588
+ }).then(utils_1.convertHttpResponse),
467
589
  /**
468
- * @description Update logging file, only logback.xml is accepted
590
+ * @description Update logback values
469
591
  *
470
592
  * @tags Utils
471
593
  * @name PutUtilsUpdateLogConfig
@@ -475,8 +597,9 @@ class Api extends HttpClient {
475
597
  path: `/utils/update-log-config`,
476
598
  method: 'PUT',
477
599
  body: data,
600
+ type: ContentType.Json,
478
601
  ...params
479
- }).then(convertHttpResponse)
602
+ }).then(utils_1.convertHttpResponse)
480
603
  };
481
604
  }
482
605
  }