@defisaver/tokens 1.4.41 → 1.4.42
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/README.md +50 -68
- package/esm/assets.js +132 -83
- package/esm/ilks.js +24 -2
- package/esm/index.js +2 -0
- package/esm/types.d.ts +7 -0
- package/package.json +1 -1
- package/umd/index.js +423 -5
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Table of contents
|
|
4
4
|
|
|
5
|
-
### Type
|
|
5
|
+
### Type Aliases
|
|
6
6
|
|
|
7
7
|
- [AaveMarketData](README.md#aavemarketdata)
|
|
8
8
|
- [AddressMapping](README.md#addressmapping)
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
- [tokenFromMakerJoin](README.md#tokenfrommakerjoin)
|
|
35
35
|
- [tokenFromReflexerJoin](README.md#tokenfromreflexerjoin)
|
|
36
36
|
|
|
37
|
-
## Type
|
|
37
|
+
## Type Aliases
|
|
38
38
|
|
|
39
39
|
### AaveMarketData
|
|
40
40
|
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
|
|
52
52
|
#### Defined in
|
|
53
53
|
|
|
54
|
-
[types.ts:70](https://github.com/
|
|
54
|
+
[types.ts:70](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/types.ts#L70)
|
|
55
55
|
|
|
56
56
|
___
|
|
57
57
|
|
|
@@ -65,7 +65,7 @@ ___
|
|
|
65
65
|
|
|
66
66
|
#### Defined in
|
|
67
67
|
|
|
68
|
-
[types.ts:6](https://github.com/
|
|
68
|
+
[types.ts:6](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/types.ts#L6)
|
|
69
69
|
|
|
70
70
|
___
|
|
71
71
|
|
|
@@ -73,8 +73,6 @@ ___
|
|
|
73
73
|
|
|
74
74
|
Ƭ **AssetData**: `Object`
|
|
75
75
|
|
|
76
|
-
Chain-specific asset info type
|
|
77
|
-
|
|
78
76
|
#### Type declaration
|
|
79
77
|
|
|
80
78
|
| Name | Type |
|
|
@@ -96,7 +94,7 @@ Chain-specific asset info type
|
|
|
96
94
|
|
|
97
95
|
#### Defined in
|
|
98
96
|
|
|
99
|
-
[types.ts:36](https://github.com/
|
|
97
|
+
[types.ts:36](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/types.ts#L36)
|
|
100
98
|
|
|
101
99
|
___
|
|
102
100
|
|
|
@@ -104,8 +102,6 @@ ___
|
|
|
104
102
|
|
|
105
103
|
Ƭ **AssetDataBase**: `Object`
|
|
106
104
|
|
|
107
|
-
Chain-agnostic asset info type
|
|
108
|
-
|
|
109
105
|
#### Type declaration
|
|
110
106
|
|
|
111
107
|
| Name | Type |
|
|
@@ -126,7 +122,7 @@ Chain-agnostic asset info type
|
|
|
126
122
|
|
|
127
123
|
#### Defined in
|
|
128
124
|
|
|
129
|
-
[types.ts:17](https://github.com/
|
|
125
|
+
[types.ts:17](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/types.ts#L17)
|
|
130
126
|
|
|
131
127
|
___
|
|
132
128
|
|
|
@@ -136,7 +132,7 @@ ___
|
|
|
136
132
|
|
|
137
133
|
#### Defined in
|
|
138
134
|
|
|
139
|
-
[types.ts:77](https://github.com/
|
|
135
|
+
[types.ts:77](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/types.ts#L77)
|
|
140
136
|
|
|
141
137
|
___
|
|
142
138
|
|
|
@@ -144,8 +140,6 @@ ___
|
|
|
144
140
|
|
|
145
141
|
Ƭ **IlkData**: `Object`
|
|
146
142
|
|
|
147
|
-
Maker ilk info type
|
|
148
|
-
|
|
149
143
|
#### Type declaration
|
|
150
144
|
|
|
151
145
|
| Name | Type |
|
|
@@ -164,63 +158,63 @@ Maker ilk info type
|
|
|
164
158
|
|
|
165
159
|
#### Defined in
|
|
166
160
|
|
|
167
|
-
[types.ts:56](https://github.com/
|
|
161
|
+
[types.ts:56](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/types.ts#L56)
|
|
168
162
|
|
|
169
163
|
## Variables
|
|
170
164
|
|
|
171
165
|
### MAXUINT
|
|
172
166
|
|
|
173
|
-
• **MAXUINT**: `string` = `'115792089237316195423570985008687907853269984665640564039457584007913129639935'`
|
|
167
|
+
• `Const` **MAXUINT**: `string` = `'115792089237316195423570985008687907853269984665640564039457584007913129639935'`
|
|
174
168
|
|
|
175
169
|
#### Defined in
|
|
176
170
|
|
|
177
|
-
[index.ts:27](https://github.com/
|
|
171
|
+
[index.ts:27](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L27)
|
|
178
172
|
|
|
179
173
|
___
|
|
180
174
|
|
|
181
175
|
### aaveV2Markets
|
|
182
176
|
|
|
183
|
-
• **aaveV2Markets**: [`AaveMarketData`](README.md#aavemarketdata)[]
|
|
177
|
+
• `Const` **aaveV2Markets**: [`AaveMarketData`](README.md#aavemarketdata)[]
|
|
184
178
|
|
|
185
179
|
#### Defined in
|
|
186
180
|
|
|
187
|
-
[aaveV2Markets.ts:3](https://github.com/
|
|
181
|
+
[aaveV2Markets.ts:3](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/aaveV2Markets.ts#L3)
|
|
188
182
|
|
|
189
183
|
___
|
|
190
184
|
|
|
191
185
|
### assets
|
|
192
186
|
|
|
193
|
-
• **assets**: [`AssetDataBase`](README.md#assetdatabase)[]
|
|
187
|
+
• `Const` **assets**: [`AssetDataBase`](README.md#assetdatabase)[]
|
|
194
188
|
|
|
195
189
|
#### Defined in
|
|
196
190
|
|
|
197
|
-
[assets.ts:
|
|
191
|
+
[assets.ts:238](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/assets.ts#L238)
|
|
198
192
|
|
|
199
193
|
___
|
|
200
194
|
|
|
201
195
|
### ilks
|
|
202
196
|
|
|
203
|
-
• **ilks**: [`IlkData`](README.md#ilkdata)[]
|
|
197
|
+
• `Const` **ilks**: [`IlkData`](README.md#ilkdata)[]
|
|
204
198
|
|
|
205
199
|
#### Defined in
|
|
206
200
|
|
|
207
|
-
[ilks.ts:5](https://github.com/
|
|
201
|
+
[ilks.ts:5](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/ilks.ts#L5)
|
|
208
202
|
|
|
209
203
|
___
|
|
210
204
|
|
|
211
205
|
### reflexerCollTypes
|
|
212
206
|
|
|
213
|
-
• **reflexerCollTypes**: [`IlkData`](README.md#ilkdata)[]
|
|
207
|
+
• `Const` **reflexerCollTypes**: [`IlkData`](README.md#ilkdata)[]
|
|
214
208
|
|
|
215
209
|
#### Defined in
|
|
216
210
|
|
|
217
|
-
[reflexerCollTypes.ts:3](https://github.com/
|
|
211
|
+
[reflexerCollTypes.ts:3](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/reflexerCollTypes.ts#L3)
|
|
218
212
|
|
|
219
213
|
___
|
|
220
214
|
|
|
221
215
|
### utils
|
|
222
216
|
|
|
223
|
-
• **utils**: `Object`
|
|
217
|
+
• `Const` **utils**: `Object`
|
|
224
218
|
|
|
225
219
|
#### Type declaration
|
|
226
220
|
|
|
@@ -232,20 +226,20 @@ ___
|
|
|
232
226
|
|
|
233
227
|
#### Defined in
|
|
234
228
|
|
|
235
|
-
[index.ts:25](https://github.com/
|
|
229
|
+
[index.ts:25](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L25)
|
|
236
230
|
|
|
237
231
|
## Functions
|
|
238
232
|
|
|
239
233
|
### assetAmountInEth
|
|
240
234
|
|
|
241
|
-
▸
|
|
235
|
+
▸ **assetAmountInEth**(`amount`, `asset?`): `string`
|
|
242
236
|
|
|
243
237
|
#### Parameters
|
|
244
238
|
|
|
245
239
|
| Name | Type | Default value | Description |
|
|
246
240
|
| :------ | :------ | :------ | :------ |
|
|
247
|
-
| `amount` | `string` \| `number` \| `object` | `undefined` |
|
|
248
|
-
| `asset` | `string` | `'ETH'` |
|
|
241
|
+
| `amount` | `string` \| `number` \| `object` | `undefined` | |
|
|
242
|
+
| `asset` | `string` | `'ETH'` | |
|
|
249
243
|
|
|
250
244
|
#### Returns
|
|
251
245
|
|
|
@@ -253,20 +247,20 @@ ___
|
|
|
253
247
|
|
|
254
248
|
#### Defined in
|
|
255
249
|
|
|
256
|
-
[index.ts:149](https://github.com/
|
|
250
|
+
[index.ts:149](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L149)
|
|
257
251
|
|
|
258
252
|
___
|
|
259
253
|
|
|
260
254
|
### assetAmountInWei
|
|
261
255
|
|
|
262
|
-
▸
|
|
256
|
+
▸ **assetAmountInWei**(`amount`, `asset`): `string`
|
|
263
257
|
|
|
264
258
|
#### Parameters
|
|
265
259
|
|
|
266
260
|
| Name | Type | Description |
|
|
267
261
|
| :------ | :------ | :------ |
|
|
268
|
-
| `amount` | `string` \| `number` \| `object` |
|
|
269
|
-
| `asset` | `string` |
|
|
262
|
+
| `amount` | `string` \| `number` \| `object` | |
|
|
263
|
+
| `asset` | `string` | |
|
|
270
264
|
|
|
271
265
|
#### Returns
|
|
272
266
|
|
|
@@ -274,13 +268,13 @@ ___
|
|
|
274
268
|
|
|
275
269
|
#### Defined in
|
|
276
270
|
|
|
277
|
-
[index.ts:170](https://github.com/
|
|
271
|
+
[index.ts:170](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L170)
|
|
278
272
|
|
|
279
273
|
___
|
|
280
274
|
|
|
281
275
|
### getAaveV2MarketInfo
|
|
282
276
|
|
|
283
|
-
▸
|
|
277
|
+
▸ **getAaveV2MarketInfo**(`name?`): `void` \| [`AaveMarketData`](README.md#aavemarketdata)
|
|
284
278
|
|
|
285
279
|
#### Parameters
|
|
286
280
|
|
|
@@ -294,16 +288,13 @@ ___
|
|
|
294
288
|
|
|
295
289
|
#### Defined in
|
|
296
290
|
|
|
297
|
-
[index.ts:142](https://github.com/
|
|
291
|
+
[index.ts:142](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L142)
|
|
298
292
|
|
|
299
293
|
___
|
|
300
294
|
|
|
301
295
|
### getAssetInfo
|
|
302
296
|
|
|
303
|
-
▸
|
|
304
|
-
|
|
305
|
-
Returns asset info.
|
|
306
|
-
Warning: will not throw if asset not found. Instead, will return a placeholder object.
|
|
297
|
+
▸ **getAssetInfo**(`symbol?`, `chainId?`): [`AssetData`](README.md#assetdata)
|
|
307
298
|
|
|
308
299
|
#### Parameters
|
|
309
300
|
|
|
@@ -318,13 +309,13 @@ Warning: will not throw if asset not found. Instead, will return a placeholder o
|
|
|
318
309
|
|
|
319
310
|
#### Defined in
|
|
320
311
|
|
|
321
|
-
[index.ts:60](https://github.com/
|
|
312
|
+
[index.ts:60](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L60)
|
|
322
313
|
|
|
323
314
|
___
|
|
324
315
|
|
|
325
316
|
### getAssetInfoByAddress
|
|
326
317
|
|
|
327
|
-
▸
|
|
318
|
+
▸ **getAssetInfoByAddress**(`address?`, `chainId?`): [`AssetData`](README.md#assetdata)
|
|
328
319
|
|
|
329
320
|
#### Parameters
|
|
330
321
|
|
|
@@ -339,22 +330,19 @@ ___
|
|
|
339
330
|
|
|
340
331
|
#### Defined in
|
|
341
332
|
|
|
342
|
-
[index.ts:95](https://github.com/
|
|
333
|
+
[index.ts:95](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L95)
|
|
343
334
|
|
|
344
335
|
___
|
|
345
336
|
|
|
346
337
|
### getIlkInfo
|
|
347
338
|
|
|
348
|
-
▸
|
|
349
|
-
|
|
350
|
-
Returns Maker or Reflexer ilk info, and asset info as `assetData` attribute.
|
|
351
|
-
Warning: will not throw if ilk not found. Instead, will return a placeholder object.
|
|
339
|
+
▸ **getIlkInfo**(`ilk?`): [`ExtendedIlkData`](README.md#extendedilkdata)
|
|
352
340
|
|
|
353
341
|
#### Parameters
|
|
354
342
|
|
|
355
343
|
| Name | Type | Default value | Description |
|
|
356
344
|
| :------ | :------ | :------ | :------ |
|
|
357
|
-
| `ilk` | `string` | `''` |
|
|
345
|
+
| `ilk` | `string` | `''` | |
|
|
358
346
|
|
|
359
347
|
#### Returns
|
|
360
348
|
|
|
@@ -362,13 +350,13 @@ Warning: will not throw if ilk not found. Instead, will return a placeholder obj
|
|
|
362
350
|
|
|
363
351
|
#### Defined in
|
|
364
352
|
|
|
365
|
-
[index.ts:73](https://github.com/
|
|
353
|
+
[index.ts:73](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L73)
|
|
366
354
|
|
|
367
355
|
___
|
|
368
356
|
|
|
369
357
|
### ilkToAsset
|
|
370
358
|
|
|
371
|
-
▸
|
|
359
|
+
▸ **ilkToAsset**(`ilk?`): `string`
|
|
372
360
|
|
|
373
361
|
#### Parameters
|
|
374
362
|
|
|
@@ -382,13 +370,13 @@ ___
|
|
|
382
370
|
|
|
383
371
|
#### Defined in
|
|
384
372
|
|
|
385
|
-
[index.ts:100](https://github.com/
|
|
373
|
+
[index.ts:100](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L100)
|
|
386
374
|
|
|
387
375
|
___
|
|
388
376
|
|
|
389
377
|
### set
|
|
390
378
|
|
|
391
|
-
▸
|
|
379
|
+
▸ **set**(`key`, `value`): `void`
|
|
392
380
|
|
|
393
381
|
#### Parameters
|
|
394
382
|
|
|
@@ -403,71 +391,65 @@ ___
|
|
|
403
391
|
|
|
404
392
|
#### Defined in
|
|
405
393
|
|
|
406
|
-
[index.ts:21](https://github.com/
|
|
394
|
+
[index.ts:21](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L21)
|
|
407
395
|
|
|
408
396
|
___
|
|
409
397
|
|
|
410
398
|
### tokenFromJoin
|
|
411
399
|
|
|
412
|
-
▸
|
|
400
|
+
▸ **tokenFromJoin**(`join`, `fromIlks?`): `string`
|
|
413
401
|
|
|
414
402
|
#### Parameters
|
|
415
403
|
|
|
416
404
|
| Name | Type | Default value | Description |
|
|
417
405
|
| :------ | :------ | :------ | :------ |
|
|
418
|
-
| `join` | `string` | `undefined` |
|
|
406
|
+
| `join` | `string` | `undefined` | |
|
|
419
407
|
| `fromIlks` | [`IlkData`](README.md#ilkdata)[] | `ilks` | |
|
|
420
408
|
|
|
421
409
|
#### Returns
|
|
422
410
|
|
|
423
411
|
`string`
|
|
424
412
|
|
|
425
|
-
Token symbol
|
|
426
|
-
|
|
427
413
|
#### Defined in
|
|
428
414
|
|
|
429
|
-
[index.ts:122](https://github.com/
|
|
415
|
+
[index.ts:122](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L122)
|
|
430
416
|
|
|
431
417
|
___
|
|
432
418
|
|
|
433
419
|
### tokenFromMakerJoin
|
|
434
420
|
|
|
435
|
-
▸
|
|
421
|
+
▸ **tokenFromMakerJoin**(`join`): `string`
|
|
436
422
|
|
|
437
423
|
#### Parameters
|
|
438
424
|
|
|
439
425
|
| Name | Type | Description |
|
|
440
426
|
| :------ | :------ | :------ |
|
|
441
|
-
| `join` | `string` |
|
|
427
|
+
| `join` | `string` | |
|
|
442
428
|
|
|
443
429
|
#### Returns
|
|
444
430
|
|
|
445
431
|
`string`
|
|
446
432
|
|
|
447
|
-
Token symbol
|
|
448
|
-
|
|
449
433
|
#### Defined in
|
|
450
434
|
|
|
451
|
-
[index.ts:134](https://github.com/
|
|
435
|
+
[index.ts:134](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L134)
|
|
452
436
|
|
|
453
437
|
___
|
|
454
438
|
|
|
455
439
|
### tokenFromReflexerJoin
|
|
456
440
|
|
|
457
|
-
▸
|
|
441
|
+
▸ **tokenFromReflexerJoin**(`join`): `string`
|
|
458
442
|
|
|
459
443
|
#### Parameters
|
|
460
444
|
|
|
461
445
|
| Name | Type | Description |
|
|
462
446
|
| :------ | :------ | :------ |
|
|
463
|
-
| `join` | `string` |
|
|
447
|
+
| `join` | `string` | |
|
|
464
448
|
|
|
465
449
|
#### Returns
|
|
466
450
|
|
|
467
451
|
`string`
|
|
468
452
|
|
|
469
|
-
Token symbol
|
|
470
|
-
|
|
471
453
|
#### Defined in
|
|
472
454
|
|
|
473
|
-
[index.ts:140](https://github.com/
|
|
455
|
+
[index.ts:140](https://github.com/DecenterApps/defisaver-tokens/blob/d43581a/src/index.ts#L140)
|