@defisaver/sdk 1.0.4 → 1.0.6
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/esm/src/Action.d.ts +1 -0
- package/esm/src/Action.js +16 -2
- package/esm/src/actions/basic/CreateSubAction.d.ts +13 -0
- package/esm/src/actions/basic/CreateSubAction.js +18 -0
- package/esm/src/actions/basic/UpdateSubAction.js +6 -0
- package/esm/src/actions/basic/index.d.ts +1 -0
- package/esm/src/actions/basic/index.js +1 -0
- package/esm/src/actions/chickenBonds/CBCreateRebondSubAction.d.ts +13 -0
- package/esm/src/actions/chickenBonds/CBCreateRebondSubAction.js +18 -0
- package/esm/src/actions/chickenBonds/CBUpdateRebondSubAction.d.ts +14 -0
- package/esm/src/actions/chickenBonds/CBUpdateRebondSubAction.js +16 -0
- package/esm/src/actions/chickenBonds/FetchBondIdAction.d.ts +15 -0
- package/esm/src/actions/chickenBonds/FetchBondIdAction.js +21 -0
- package/esm/src/actions/chickenBonds/index.d.ts +3 -0
- package/esm/src/actions/chickenBonds/index.js +3 -0
- package/esm/src/actions/curve/CurveDepositAction.js +1 -1
- package/esm/src/actions/curve/CurveWithdrawAction.d.ts +10 -9
- package/esm/src/actions/curve/CurveWithdrawAction.js +11 -10
- package/esm/src/addresses.d.ts +12 -0
- package/esm/src/addresses.js +9 -5
- package/esm/src/index.d.ts +48 -0
- package/esm/src/triggers/CBRebondTrigger.d.ts +10 -0
- package/esm/src/triggers/CBRebondTrigger.js +12 -0
- package/esm/src/triggers/index.d.ts +1 -0
- package/esm/src/triggers/index.js +1 -0
- package/esm/src/utils/curve-utils.d.ts +1 -1
- package/esm/src/utils/curve-utils.js +1 -1
- package/package-lock.json +8845 -0
- package/package.json +5 -3
- package/src/Action.ts +17 -2
- package/src/actions/basic/CreateSubAction.ts +23 -0
- package/src/actions/basic/UpdateSubAction.ts +8 -1
- package/src/actions/basic/index.ts +2 -1
- package/src/actions/chickenBonds/CBCreateRebondSubAction.ts +20 -0
- package/src/actions/chickenBonds/CBUpdateRebondSubAction.ts +18 -0
- package/src/actions/chickenBonds/FetchBondIdAction.ts +23 -0
- package/src/actions/chickenBonds/index.ts +5 -1
- package/src/actions/curve/CurveDepositAction.ts +2 -2
- package/src/actions/curve/CurveWithdrawAction.ts +21 -19
- package/src/addresses.ts +9 -6
- package/src/triggers/CBRebondTrigger.ts +14 -0
- package/src/triggers/index.ts +1 -0
- package/src/utils/curve-utils.ts +2 -1
- package/umd/index.js +486 -312
package/esm/src/index.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ declare const actionAddressesAllChains: {
|
|
|
25
25
|
ToggleSub: string;
|
|
26
26
|
UpdateSub: string;
|
|
27
27
|
TransferNFT: string;
|
|
28
|
+
CreateSub: string;
|
|
28
29
|
DFSSell: string;
|
|
29
30
|
McdGenerate: string;
|
|
30
31
|
McdGive: string;
|
|
@@ -104,6 +105,8 @@ declare const actionAddressesAllChains: {
|
|
|
104
105
|
CurveWithdraw: string;
|
|
105
106
|
FLEuler: string;
|
|
106
107
|
TrailingStopTrigger: string;
|
|
108
|
+
CBRebondTrigger: string;
|
|
109
|
+
CBUpdateRebondSub: string;
|
|
107
110
|
ConvexDeposit: string;
|
|
108
111
|
ConvexWithdraw: string;
|
|
109
112
|
ConvexClaim: string;
|
|
@@ -111,6 +114,7 @@ declare const actionAddressesAllChains: {
|
|
|
111
114
|
CBRedeem: string;
|
|
112
115
|
CBChickenIn: string;
|
|
113
116
|
CBChickenOut: string;
|
|
117
|
+
CBCreateRebondSub: string;
|
|
114
118
|
CompV3Allow: string;
|
|
115
119
|
CompV3Borrow: string;
|
|
116
120
|
CompV3Claim: string;
|
|
@@ -166,6 +170,7 @@ declare const actionAddressesAllChains: {
|
|
|
166
170
|
AutomationV2Unsub?: undefined;
|
|
167
171
|
UpdateSub?: undefined;
|
|
168
172
|
TransferNFT?: undefined;
|
|
173
|
+
CreateSub?: undefined;
|
|
169
174
|
McdGenerate?: undefined;
|
|
170
175
|
McdGive?: undefined;
|
|
171
176
|
McdMerge?: undefined;
|
|
@@ -237,6 +242,8 @@ declare const actionAddressesAllChains: {
|
|
|
237
242
|
CurveWithdraw?: undefined;
|
|
238
243
|
FLEuler?: undefined;
|
|
239
244
|
TrailingStopTrigger?: undefined;
|
|
245
|
+
CBRebondTrigger?: undefined;
|
|
246
|
+
CBUpdateRebondSub?: undefined;
|
|
240
247
|
ConvexDeposit?: undefined;
|
|
241
248
|
ConvexWithdraw?: undefined;
|
|
242
249
|
ConvexClaim?: undefined;
|
|
@@ -244,6 +251,7 @@ declare const actionAddressesAllChains: {
|
|
|
244
251
|
CBRedeem?: undefined;
|
|
245
252
|
CBChickenIn?: undefined;
|
|
246
253
|
CBChickenOut?: undefined;
|
|
254
|
+
CBCreateRebondSub?: undefined;
|
|
247
255
|
CompV3Allow?: undefined;
|
|
248
256
|
CompV3Borrow?: undefined;
|
|
249
257
|
CompV3Claim?: undefined;
|
|
@@ -284,6 +292,7 @@ declare const actionAddressesAllChains: {
|
|
|
284
292
|
AutomationV2Unsub?: undefined;
|
|
285
293
|
UpdateSub?: undefined;
|
|
286
294
|
TransferNFT?: undefined;
|
|
295
|
+
CreateSub?: undefined;
|
|
287
296
|
McdGenerate?: undefined;
|
|
288
297
|
McdGive?: undefined;
|
|
289
298
|
McdMerge?: undefined;
|
|
@@ -355,6 +364,8 @@ declare const actionAddressesAllChains: {
|
|
|
355
364
|
CurveWithdraw?: undefined;
|
|
356
365
|
FLEuler?: undefined;
|
|
357
366
|
TrailingStopTrigger?: undefined;
|
|
367
|
+
CBRebondTrigger?: undefined;
|
|
368
|
+
CBUpdateRebondSub?: undefined;
|
|
358
369
|
ConvexDeposit?: undefined;
|
|
359
370
|
ConvexWithdraw?: undefined;
|
|
360
371
|
ConvexClaim?: undefined;
|
|
@@ -362,6 +373,7 @@ declare const actionAddressesAllChains: {
|
|
|
362
373
|
CBRedeem?: undefined;
|
|
363
374
|
CBChickenIn?: undefined;
|
|
364
375
|
CBChickenOut?: undefined;
|
|
376
|
+
CBCreateRebondSub?: undefined;
|
|
365
377
|
CompV3Allow?: undefined;
|
|
366
378
|
CompV3Borrow?: undefined;
|
|
367
379
|
CompV3Claim?: undefined;
|
|
@@ -387,6 +399,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
387
399
|
ToggleSub: string;
|
|
388
400
|
UpdateSub: string;
|
|
389
401
|
TransferNFT: string;
|
|
402
|
+
CreateSub: string;
|
|
390
403
|
DFSSell: string;
|
|
391
404
|
McdGenerate: string;
|
|
392
405
|
McdGive: string;
|
|
@@ -466,6 +479,8 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
466
479
|
CurveWithdraw: string;
|
|
467
480
|
FLEuler: string;
|
|
468
481
|
TrailingStopTrigger: string;
|
|
482
|
+
CBRebondTrigger: string;
|
|
483
|
+
CBUpdateRebondSub: string;
|
|
469
484
|
ConvexDeposit: string;
|
|
470
485
|
ConvexWithdraw: string;
|
|
471
486
|
ConvexClaim: string;
|
|
@@ -473,6 +488,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
473
488
|
CBRedeem: string;
|
|
474
489
|
CBChickenIn: string;
|
|
475
490
|
CBChickenOut: string;
|
|
491
|
+
CBCreateRebondSub: string;
|
|
476
492
|
CompV3Allow: string;
|
|
477
493
|
CompV3Borrow: string;
|
|
478
494
|
CompV3Claim: string;
|
|
@@ -528,6 +544,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
528
544
|
AutomationV2Unsub?: undefined;
|
|
529
545
|
UpdateSub?: undefined;
|
|
530
546
|
TransferNFT?: undefined;
|
|
547
|
+
CreateSub?: undefined;
|
|
531
548
|
McdGenerate?: undefined;
|
|
532
549
|
McdGive?: undefined;
|
|
533
550
|
McdMerge?: undefined;
|
|
@@ -599,6 +616,8 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
599
616
|
CurveWithdraw?: undefined;
|
|
600
617
|
FLEuler?: undefined;
|
|
601
618
|
TrailingStopTrigger?: undefined;
|
|
619
|
+
CBRebondTrigger?: undefined;
|
|
620
|
+
CBUpdateRebondSub?: undefined;
|
|
602
621
|
ConvexDeposit?: undefined;
|
|
603
622
|
ConvexWithdraw?: undefined;
|
|
604
623
|
ConvexClaim?: undefined;
|
|
@@ -606,6 +625,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
606
625
|
CBRedeem?: undefined;
|
|
607
626
|
CBChickenIn?: undefined;
|
|
608
627
|
CBChickenOut?: undefined;
|
|
628
|
+
CBCreateRebondSub?: undefined;
|
|
609
629
|
CompV3Allow?: undefined;
|
|
610
630
|
CompV3Borrow?: undefined;
|
|
611
631
|
CompV3Claim?: undefined;
|
|
@@ -646,6 +666,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
646
666
|
AutomationV2Unsub?: undefined;
|
|
647
667
|
UpdateSub?: undefined;
|
|
648
668
|
TransferNFT?: undefined;
|
|
669
|
+
CreateSub?: undefined;
|
|
649
670
|
McdGenerate?: undefined;
|
|
650
671
|
McdGive?: undefined;
|
|
651
672
|
McdMerge?: undefined;
|
|
@@ -717,6 +738,8 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
717
738
|
CurveWithdraw?: undefined;
|
|
718
739
|
FLEuler?: undefined;
|
|
719
740
|
TrailingStopTrigger?: undefined;
|
|
741
|
+
CBRebondTrigger?: undefined;
|
|
742
|
+
CBUpdateRebondSub?: undefined;
|
|
720
743
|
ConvexDeposit?: undefined;
|
|
721
744
|
ConvexWithdraw?: undefined;
|
|
722
745
|
ConvexClaim?: undefined;
|
|
@@ -724,6 +747,7 @@ declare const actionAddresses: (chainId?: null) => {
|
|
|
724
747
|
CBRedeem?: undefined;
|
|
725
748
|
CBChickenIn?: undefined;
|
|
726
749
|
CBChickenOut?: undefined;
|
|
750
|
+
CBCreateRebondSub?: undefined;
|
|
727
751
|
CompV3Allow?: undefined;
|
|
728
752
|
CompV3Borrow?: undefined;
|
|
729
753
|
CompV3Claim?: undefined;
|
|
@@ -846,6 +870,7 @@ declare const _default: {
|
|
|
846
870
|
ToggleSub: string;
|
|
847
871
|
UpdateSub: string;
|
|
848
872
|
TransferNFT: string;
|
|
873
|
+
CreateSub: string;
|
|
849
874
|
DFSSell: string;
|
|
850
875
|
McdGenerate: string;
|
|
851
876
|
McdGive: string;
|
|
@@ -925,6 +950,8 @@ declare const _default: {
|
|
|
925
950
|
CurveWithdraw: string;
|
|
926
951
|
FLEuler: string;
|
|
927
952
|
TrailingStopTrigger: string;
|
|
953
|
+
CBRebondTrigger: string;
|
|
954
|
+
CBUpdateRebondSub: string;
|
|
928
955
|
ConvexDeposit: string;
|
|
929
956
|
ConvexWithdraw: string;
|
|
930
957
|
ConvexClaim: string;
|
|
@@ -932,6 +959,7 @@ declare const _default: {
|
|
|
932
959
|
CBRedeem: string;
|
|
933
960
|
CBChickenIn: string;
|
|
934
961
|
CBChickenOut: string;
|
|
962
|
+
CBCreateRebondSub: string;
|
|
935
963
|
CompV3Allow: string;
|
|
936
964
|
CompV3Borrow: string;
|
|
937
965
|
CompV3Claim: string;
|
|
@@ -987,6 +1015,7 @@ declare const _default: {
|
|
|
987
1015
|
AutomationV2Unsub?: undefined;
|
|
988
1016
|
UpdateSub?: undefined;
|
|
989
1017
|
TransferNFT?: undefined;
|
|
1018
|
+
CreateSub?: undefined;
|
|
990
1019
|
McdGenerate?: undefined;
|
|
991
1020
|
McdGive?: undefined;
|
|
992
1021
|
McdMerge?: undefined;
|
|
@@ -1058,6 +1087,8 @@ declare const _default: {
|
|
|
1058
1087
|
CurveWithdraw?: undefined;
|
|
1059
1088
|
FLEuler?: undefined;
|
|
1060
1089
|
TrailingStopTrigger?: undefined;
|
|
1090
|
+
CBRebondTrigger?: undefined;
|
|
1091
|
+
CBUpdateRebondSub?: undefined;
|
|
1061
1092
|
ConvexDeposit?: undefined;
|
|
1062
1093
|
ConvexWithdraw?: undefined;
|
|
1063
1094
|
ConvexClaim?: undefined;
|
|
@@ -1065,6 +1096,7 @@ declare const _default: {
|
|
|
1065
1096
|
CBRedeem?: undefined;
|
|
1066
1097
|
CBChickenIn?: undefined;
|
|
1067
1098
|
CBChickenOut?: undefined;
|
|
1099
|
+
CBCreateRebondSub?: undefined;
|
|
1068
1100
|
CompV3Allow?: undefined;
|
|
1069
1101
|
CompV3Borrow?: undefined;
|
|
1070
1102
|
CompV3Claim?: undefined;
|
|
@@ -1105,6 +1137,7 @@ declare const _default: {
|
|
|
1105
1137
|
AutomationV2Unsub?: undefined;
|
|
1106
1138
|
UpdateSub?: undefined;
|
|
1107
1139
|
TransferNFT?: undefined;
|
|
1140
|
+
CreateSub?: undefined;
|
|
1108
1141
|
McdGenerate?: undefined;
|
|
1109
1142
|
McdGive?: undefined;
|
|
1110
1143
|
McdMerge?: undefined;
|
|
@@ -1176,6 +1209,8 @@ declare const _default: {
|
|
|
1176
1209
|
CurveWithdraw?: undefined;
|
|
1177
1210
|
FLEuler?: undefined;
|
|
1178
1211
|
TrailingStopTrigger?: undefined;
|
|
1212
|
+
CBRebondTrigger?: undefined;
|
|
1213
|
+
CBUpdateRebondSub?: undefined;
|
|
1179
1214
|
ConvexDeposit?: undefined;
|
|
1180
1215
|
ConvexWithdraw?: undefined;
|
|
1181
1216
|
ConvexClaim?: undefined;
|
|
@@ -1183,6 +1218,7 @@ declare const _default: {
|
|
|
1183
1218
|
CBRedeem?: undefined;
|
|
1184
1219
|
CBChickenIn?: undefined;
|
|
1185
1220
|
CBChickenOut?: undefined;
|
|
1221
|
+
CBCreateRebondSub?: undefined;
|
|
1186
1222
|
CompV3Allow?: undefined;
|
|
1187
1223
|
CompV3Borrow?: undefined;
|
|
1188
1224
|
CompV3Claim?: undefined;
|
|
@@ -1208,6 +1244,7 @@ declare const _default: {
|
|
|
1208
1244
|
ToggleSub: string;
|
|
1209
1245
|
UpdateSub: string;
|
|
1210
1246
|
TransferNFT: string;
|
|
1247
|
+
CreateSub: string;
|
|
1211
1248
|
DFSSell: string;
|
|
1212
1249
|
McdGenerate: string;
|
|
1213
1250
|
McdGive: string;
|
|
@@ -1287,6 +1324,8 @@ declare const _default: {
|
|
|
1287
1324
|
CurveWithdraw: string;
|
|
1288
1325
|
FLEuler: string;
|
|
1289
1326
|
TrailingStopTrigger: string;
|
|
1327
|
+
CBRebondTrigger: string;
|
|
1328
|
+
CBUpdateRebondSub: string;
|
|
1290
1329
|
ConvexDeposit: string;
|
|
1291
1330
|
ConvexWithdraw: string;
|
|
1292
1331
|
ConvexClaim: string;
|
|
@@ -1294,6 +1333,7 @@ declare const _default: {
|
|
|
1294
1333
|
CBRedeem: string;
|
|
1295
1334
|
CBChickenIn: string;
|
|
1296
1335
|
CBChickenOut: string;
|
|
1336
|
+
CBCreateRebondSub: string;
|
|
1297
1337
|
CompV3Allow: string;
|
|
1298
1338
|
CompV3Borrow: string;
|
|
1299
1339
|
CompV3Claim: string;
|
|
@@ -1349,6 +1389,7 @@ declare const _default: {
|
|
|
1349
1389
|
AutomationV2Unsub?: undefined;
|
|
1350
1390
|
UpdateSub?: undefined;
|
|
1351
1391
|
TransferNFT?: undefined;
|
|
1392
|
+
CreateSub?: undefined;
|
|
1352
1393
|
McdGenerate?: undefined;
|
|
1353
1394
|
McdGive?: undefined;
|
|
1354
1395
|
McdMerge?: undefined;
|
|
@@ -1420,6 +1461,8 @@ declare const _default: {
|
|
|
1420
1461
|
CurveWithdraw?: undefined;
|
|
1421
1462
|
FLEuler?: undefined;
|
|
1422
1463
|
TrailingStopTrigger?: undefined;
|
|
1464
|
+
CBRebondTrigger?: undefined;
|
|
1465
|
+
CBUpdateRebondSub?: undefined;
|
|
1423
1466
|
ConvexDeposit?: undefined;
|
|
1424
1467
|
ConvexWithdraw?: undefined;
|
|
1425
1468
|
ConvexClaim?: undefined;
|
|
@@ -1427,6 +1470,7 @@ declare const _default: {
|
|
|
1427
1470
|
CBRedeem?: undefined;
|
|
1428
1471
|
CBChickenIn?: undefined;
|
|
1429
1472
|
CBChickenOut?: undefined;
|
|
1473
|
+
CBCreateRebondSub?: undefined;
|
|
1430
1474
|
CompV3Allow?: undefined;
|
|
1431
1475
|
CompV3Borrow?: undefined;
|
|
1432
1476
|
CompV3Claim?: undefined;
|
|
@@ -1467,6 +1511,7 @@ declare const _default: {
|
|
|
1467
1511
|
AutomationV2Unsub?: undefined;
|
|
1468
1512
|
UpdateSub?: undefined;
|
|
1469
1513
|
TransferNFT?: undefined;
|
|
1514
|
+
CreateSub?: undefined;
|
|
1470
1515
|
McdGenerate?: undefined;
|
|
1471
1516
|
McdGive?: undefined;
|
|
1472
1517
|
McdMerge?: undefined;
|
|
@@ -1538,6 +1583,8 @@ declare const _default: {
|
|
|
1538
1583
|
CurveWithdraw?: undefined;
|
|
1539
1584
|
FLEuler?: undefined;
|
|
1540
1585
|
TrailingStopTrigger?: undefined;
|
|
1586
|
+
CBRebondTrigger?: undefined;
|
|
1587
|
+
CBUpdateRebondSub?: undefined;
|
|
1541
1588
|
ConvexDeposit?: undefined;
|
|
1542
1589
|
ConvexWithdraw?: undefined;
|
|
1543
1590
|
ConvexClaim?: undefined;
|
|
@@ -1545,6 +1592,7 @@ declare const _default: {
|
|
|
1545
1592
|
CBRedeem?: undefined;
|
|
1546
1593
|
CBChickenIn?: undefined;
|
|
1547
1594
|
CBChickenOut?: undefined;
|
|
1595
|
+
CBCreateRebondSub?: undefined;
|
|
1548
1596
|
CompV3Allow?: undefined;
|
|
1549
1597
|
CompV3Borrow?: undefined;
|
|
1550
1598
|
CompV3Claim?: undefined;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { Action } from '../Action';
|
|
2
|
+
import { getAddr } from '../addresses';
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
*
|
|
6
|
+
* @category Triggers
|
|
7
|
+
*/
|
|
8
|
+
export class CBRebondTrigger extends Action {
|
|
9
|
+
constructor(bondID) {
|
|
10
|
+
super('CBRebondTrigger', getAddr('CBRebondTrigger'), ['uint256'], [bondID]);
|
|
11
|
+
}
|
|
12
|
+
}
|
|
@@ -4,4 +4,4 @@ export { poolInfo };
|
|
|
4
4
|
* Make Flags
|
|
5
5
|
*
|
|
6
6
|
* */
|
|
7
|
-
export declare const makeFlags: (depositTargetType: any, explicitUnderlying: any, withdrawExact: any) => number;
|
|
7
|
+
export declare const makeFlags: (depositTargetType: any, explicitUnderlying: any, withdrawExact: any, removeOneCoin: any) => number;
|
|
@@ -4,4 +4,4 @@ export { poolInfo };
|
|
|
4
4
|
* Make Flags
|
|
5
5
|
*
|
|
6
6
|
* */
|
|
7
|
-
export const makeFlags = (depositTargetType, explicitUnderlying, withdrawExact) => depositTargetType | explicitUnderlying << 2 | withdrawExact << 3;
|
|
7
|
+
export const makeFlags = (depositTargetType, explicitUnderlying, withdrawExact, removeOneCoin) => depositTargetType | explicitUnderlying << 2 | withdrawExact << 3 | removeOneCoin << 4;
|