@avalabs/glacier-sdk 2.5.0-alpha.16 → 2.5.0-alpha.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.
- package/CHANGELOG.md +0 -60
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -46
- package/dist/index.js.map +1 -1
- package/dist/src/glacierClient.d.ts +2 -3
- package/dist/src/glacierClient.d.ts.map +1 -1
- package/dist/src/models.d.ts +223 -0
- package/dist/src/models.d.ts.map +1 -0
- package/index.ts +1 -1
- package/package.json +5 -5
- package/regenerate-sdk.sh +3 -0
- package/src/glacierClient.ts +7 -7
- package/src/{generated/models.ts → models.ts} +59 -199
- package/swagger/glacier.json +866 -0
- package/dist/src/generated/models.d.ts +0 -349
- package/dist/src/generated/models.d.ts.map +0 -1
- package/dist/src/types.d.ts +0 -13
- package/dist/src/types.d.ts.map +0 -1
- package/src/types.ts +0 -6
- package/swagger/generateModels.js +0 -40
|
@@ -9,27 +9,21 @@
|
|
|
9
9
|
* ---------------------------------------------------------------
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
}
|
|
12
|
+
export type CurrencyCode =
|
|
13
|
+
| 'usd'
|
|
14
|
+
| 'eur'
|
|
15
|
+
| 'aud'
|
|
16
|
+
| 'cad'
|
|
17
|
+
| 'chf'
|
|
18
|
+
| 'clp'
|
|
19
|
+
| 'czk'
|
|
20
|
+
| 'dkk'
|
|
21
|
+
| 'gbp'
|
|
22
|
+
| 'hkd'
|
|
23
|
+
| 'huf';
|
|
25
24
|
|
|
26
25
|
export interface Money {
|
|
27
|
-
/**
|
|
28
|
-
* ISO 4217 currency code.
|
|
29
|
-
* @example usd
|
|
30
|
-
*/
|
|
31
26
|
currencyCode: CurrencyCode;
|
|
32
|
-
|
|
33
27
|
/**
|
|
34
28
|
* Monetary value in base 10 decimals.
|
|
35
29
|
* @example 42.42
|
|
@@ -38,11 +32,11 @@ export interface Money {
|
|
|
38
32
|
}
|
|
39
33
|
|
|
40
34
|
export interface NativeTokenBalance {
|
|
35
|
+
chainId: string;
|
|
41
36
|
name: string;
|
|
42
37
|
symbol: string;
|
|
43
38
|
decimals: number;
|
|
44
|
-
logoUri
|
|
45
|
-
chainId: string;
|
|
39
|
+
logoUri: string;
|
|
46
40
|
price?: Money;
|
|
47
41
|
balance: string;
|
|
48
42
|
balanceValue?: Money;
|
|
@@ -53,14 +47,14 @@ export interface NativeBalance {
|
|
|
53
47
|
}
|
|
54
48
|
|
|
55
49
|
export interface Erc20TokenBalance {
|
|
56
|
-
|
|
57
|
-
|
|
50
|
+
chainId: string;
|
|
51
|
+
contractAddress: string;
|
|
58
52
|
name: string;
|
|
59
53
|
symbol: string;
|
|
60
54
|
decimals: number;
|
|
55
|
+
tags?: string[];
|
|
61
56
|
logoUri?: string;
|
|
62
57
|
price?: Money;
|
|
63
|
-
chainId: string;
|
|
64
58
|
balance: string;
|
|
65
59
|
balanceValue?: Money;
|
|
66
60
|
}
|
|
@@ -71,78 +65,28 @@ export interface Erc20Balances {
|
|
|
71
65
|
erc20TokenBalances: Erc20TokenBalance[];
|
|
72
66
|
}
|
|
73
67
|
|
|
74
|
-
export interface
|
|
75
|
-
|
|
76
|
-
|
|
68
|
+
export interface Erc721TokenBalanceDto {
|
|
69
|
+
chainId: string;
|
|
70
|
+
contractAddress: string;
|
|
77
71
|
name: string;
|
|
78
72
|
symbol: string;
|
|
79
73
|
tokenId: string;
|
|
80
74
|
tokenUri: string;
|
|
81
|
-
chainId: string;
|
|
82
75
|
}
|
|
83
76
|
|
|
84
77
|
export interface Erc721Balances {
|
|
85
78
|
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
86
79
|
nextPageToken?: string;
|
|
87
|
-
erc721TokenBalances:
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export interface Block {
|
|
91
|
-
/**
|
|
92
|
-
* The block number on the chain.
|
|
93
|
-
* @example 339
|
|
94
|
-
*/
|
|
95
|
-
blockNumber: string;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* The block finality timestamp.
|
|
99
|
-
* @example 1648672486
|
|
100
|
-
*/
|
|
101
|
-
blockTimestamp: number;
|
|
102
|
-
|
|
103
|
-
/**
|
|
104
|
-
* The block hash identifier.
|
|
105
|
-
* @example 0x17533aeb5193378b9ff441d61728e7a2ebaf10f61fd5310759451627dfca2e7c
|
|
106
|
-
*/
|
|
107
|
-
blockHash: string;
|
|
108
|
-
|
|
109
|
-
/** The number of transactions in the block. */
|
|
110
|
-
txCount: number;
|
|
111
|
-
|
|
112
|
-
/** The base gas fee for a transaction to be included in the block. */
|
|
113
|
-
baseFee: string;
|
|
114
|
-
|
|
115
|
-
/** The gas used for transactions in the block. */
|
|
116
|
-
gasUsed: string;
|
|
117
|
-
|
|
118
|
-
/** The total gas limit set for transactions in the block. */
|
|
119
|
-
gasLimit: string;
|
|
120
|
-
gasCost: string;
|
|
121
|
-
|
|
122
|
-
/** The hash of the parent block. */
|
|
123
|
-
parentHash: string;
|
|
124
|
-
|
|
125
|
-
/** The amount of fees spent/burned for transactions in the block. */
|
|
126
|
-
feesSpent: string;
|
|
127
|
-
|
|
128
|
-
/** The cumulative number of transactions for the chain including this block. */
|
|
129
|
-
cumulativeTransactions: string;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export interface ListBlocks {
|
|
133
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
134
|
-
nextPageToken?: string;
|
|
135
|
-
blocks: Block[];
|
|
80
|
+
erc721TokenBalances: Erc721TokenBalanceDto[];
|
|
136
81
|
}
|
|
137
82
|
|
|
138
|
-
export interface
|
|
83
|
+
export interface Address {
|
|
84
|
+
/** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
|
|
85
|
+
address: string;
|
|
139
86
|
name?: string;
|
|
140
87
|
symbol?: string;
|
|
141
|
-
|
|
88
|
+
tags?: string[];
|
|
142
89
|
logoUri?: string;
|
|
143
|
-
|
|
144
|
-
/** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
|
|
145
|
-
address: string;
|
|
146
90
|
}
|
|
147
91
|
|
|
148
92
|
export interface Method {
|
|
@@ -225,8 +169,8 @@ export interface NativeTransaction {
|
|
|
225
169
|
* @example 1
|
|
226
170
|
*/
|
|
227
171
|
nonce: string;
|
|
228
|
-
from:
|
|
229
|
-
to:
|
|
172
|
+
from: Address;
|
|
173
|
+
to: Address;
|
|
230
174
|
method?: Method;
|
|
231
175
|
|
|
232
176
|
/** @example 10000000000000000000 */
|
|
@@ -235,17 +179,16 @@ export interface NativeTransaction {
|
|
|
235
179
|
|
|
236
180
|
export interface Erc20Token {
|
|
237
181
|
/** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
logoUri?: string;
|
|
182
|
+
contractAddress: string;
|
|
183
|
+
tokenName: string;
|
|
184
|
+
tokenSymbol: string;
|
|
185
|
+
tokenDecimals: number;
|
|
243
186
|
price?: Money;
|
|
244
187
|
}
|
|
245
188
|
|
|
246
189
|
export interface Erc20TransferDetails {
|
|
247
|
-
from:
|
|
248
|
-
to:
|
|
190
|
+
from: Address;
|
|
191
|
+
to: Address;
|
|
249
192
|
erc20Token: Erc20Token;
|
|
250
193
|
|
|
251
194
|
/** @example 10000000000000000000 */
|
|
@@ -254,33 +197,30 @@ export interface Erc20TransferDetails {
|
|
|
254
197
|
|
|
255
198
|
export interface Erc721Token {
|
|
256
199
|
/** @example 0x71C7656EC7ab88b098defB751B7401B5f6d8976F */
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
200
|
+
contractAddress: string;
|
|
201
|
+
tokenName: string;
|
|
202
|
+
tokenSymbol: string;
|
|
260
203
|
tokenId: string;
|
|
261
204
|
tokenUri: string;
|
|
262
205
|
}
|
|
263
206
|
|
|
264
207
|
export interface Erc721TransferDetails {
|
|
265
|
-
from:
|
|
266
|
-
to:
|
|
208
|
+
from: Address;
|
|
209
|
+
to: Address;
|
|
267
210
|
erc721Token: Erc721Token;
|
|
268
211
|
}
|
|
269
212
|
|
|
270
|
-
export enum InternalTransactionOpCall {
|
|
271
|
-
UNKNOWN = 'UNKNOWN',
|
|
272
|
-
CALL = 'CALL',
|
|
273
|
-
CREATE = 'CREATE',
|
|
274
|
-
CREATE2 = 'CREATE2',
|
|
275
|
-
CALLCODE = 'CALLCODE',
|
|
276
|
-
DELEGATECALL = 'DELEGATECALL',
|
|
277
|
-
STATICCALL = 'STATICCALL',
|
|
278
|
-
}
|
|
279
|
-
|
|
280
213
|
export interface InternalTransactionDetails {
|
|
281
|
-
from:
|
|
282
|
-
to:
|
|
283
|
-
internalTxType:
|
|
214
|
+
from: Address;
|
|
215
|
+
to: Address;
|
|
216
|
+
internalTxType:
|
|
217
|
+
| 'UNKNOWN'
|
|
218
|
+
| 'CALL'
|
|
219
|
+
| 'CREATE'
|
|
220
|
+
| 'CREATE2'
|
|
221
|
+
| 'CALLCODE'
|
|
222
|
+
| 'DELEGATECALL'
|
|
223
|
+
| 'STATICCALL';
|
|
284
224
|
|
|
285
225
|
/** @example 10000000000000000000 */
|
|
286
226
|
value: string;
|
|
@@ -300,103 +240,16 @@ export interface ListTransactionDetails {
|
|
|
300
240
|
transactions: TransactionDetails[];
|
|
301
241
|
}
|
|
302
242
|
|
|
303
|
-
export interface
|
|
304
|
-
|
|
305
|
-
nextPageToken?: string;
|
|
306
|
-
transactions: NativeTransaction[];
|
|
307
|
-
}
|
|
308
|
-
|
|
309
|
-
export interface Erc20Transfer {
|
|
310
|
-
/**
|
|
311
|
-
* The block number on the chain.
|
|
312
|
-
* @example 339
|
|
313
|
-
*/
|
|
314
|
-
blockNumber: string;
|
|
315
|
-
|
|
316
|
-
/**
|
|
317
|
-
* The block finality timestamp.
|
|
318
|
-
* @example 1648672486
|
|
319
|
-
*/
|
|
320
|
-
blockTimestamp: number;
|
|
321
|
-
|
|
322
|
-
/**
|
|
323
|
-
* The transaction hash identifier.
|
|
324
|
-
* @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
|
|
325
|
-
*/
|
|
326
|
-
txHash: string;
|
|
327
|
-
from: RichAddress;
|
|
328
|
-
to: RichAddress;
|
|
329
|
-
erc20Token: Erc20Token;
|
|
330
|
-
|
|
331
|
-
/** @example 10000000000000000000 */
|
|
332
|
-
value: string;
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
export interface ListErc20Transactions {
|
|
336
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
337
|
-
nextPageToken?: string;
|
|
338
|
-
transactions: Erc20Transfer[];
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
export interface Erc721Transfer {
|
|
342
|
-
/**
|
|
343
|
-
* The block number on the chain.
|
|
344
|
-
* @example 339
|
|
345
|
-
*/
|
|
346
|
-
blockNumber: string;
|
|
347
|
-
|
|
348
|
-
/**
|
|
349
|
-
* The block finality timestamp.
|
|
350
|
-
* @example 1648672486
|
|
351
|
-
*/
|
|
352
|
-
blockTimestamp: number;
|
|
353
|
-
|
|
354
|
-
/**
|
|
355
|
-
* The transaction hash identifier.
|
|
356
|
-
* @example 0x3e9303f81be00b4af28515dab7b914bf3dbff209ea10e7071fa24d4af0a112d4
|
|
357
|
-
*/
|
|
358
|
-
txHash: string;
|
|
359
|
-
from: RichAddress;
|
|
360
|
-
to: RichAddress;
|
|
361
|
-
erc721Token: Erc721Token;
|
|
362
|
-
}
|
|
363
|
-
|
|
364
|
-
export interface ListErc721Transactions {
|
|
365
|
-
/** A token, which can be sent as `pageToken` to retrieve the next page. If this field is omitted or empty, there are no subsequent pages. */
|
|
366
|
-
nextPageToken?: string;
|
|
367
|
-
transactions: Erc721Transfer[];
|
|
243
|
+
export interface UtilityAddresses {
|
|
244
|
+
multicall?: string;
|
|
368
245
|
}
|
|
369
246
|
|
|
370
247
|
export interface NetworkToken {
|
|
371
248
|
name: string;
|
|
372
249
|
symbol: string;
|
|
250
|
+
description: string;
|
|
373
251
|
decimals: number;
|
|
374
252
|
logoUri?: string;
|
|
375
|
-
description?: string;
|
|
376
|
-
}
|
|
377
|
-
|
|
378
|
-
export interface NetworkTokenDetails {
|
|
379
|
-
networkToken: NetworkToken;
|
|
380
|
-
currentPrice?: Money;
|
|
381
|
-
historicalPrice?: Money;
|
|
382
|
-
}
|
|
383
|
-
|
|
384
|
-
export interface FullTransactionDetails {
|
|
385
|
-
nativeTransaction: NativeTransaction;
|
|
386
|
-
erc20Transfers?: Erc20TransferDetails[];
|
|
387
|
-
erc721Transfers?: Erc721TransferDetails[];
|
|
388
|
-
internalTransactions?: InternalTransactionDetails[];
|
|
389
|
-
networkTokenDetails: NetworkTokenDetails;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
export enum VmName {
|
|
393
|
-
EVM = 'EVM',
|
|
394
|
-
BITCOIN = 'BITCOIN',
|
|
395
|
-
ETHEREUM = 'ETHEREUM',
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
export interface UtilityAddresses {
|
|
399
|
-
multicall?: string;
|
|
400
253
|
}
|
|
401
254
|
|
|
402
255
|
export interface ChainInfo {
|
|
@@ -406,7 +259,7 @@ export interface ChainInfo {
|
|
|
406
259
|
platformChainId: string;
|
|
407
260
|
subnetId: string;
|
|
408
261
|
vmId: string;
|
|
409
|
-
vmName:
|
|
262
|
+
vmName: 'EVM' | 'BITCOIN' | 'ETHEREUM';
|
|
410
263
|
explorerUrl?: string;
|
|
411
264
|
rpcUrl: string;
|
|
412
265
|
wsUrl?: string;
|
|
@@ -419,3 +272,10 @@ export interface ChainInfo {
|
|
|
419
272
|
export interface Chains {
|
|
420
273
|
chains: ChainInfo[];
|
|
421
274
|
}
|
|
275
|
+
|
|
276
|
+
export interface HealthStatusCheck {
|
|
277
|
+
status?: string;
|
|
278
|
+
info?: Record<string, { status?: string }>;
|
|
279
|
+
error?: Record<string, { status?: string }>;
|
|
280
|
+
details?: Record<string, { status?: string }>;
|
|
281
|
+
}
|