@strobelabs/perpcity-sdk 0.4.3 → 0.5.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.
- package/dist/index.d.mts +101 -123
- package/dist/index.d.ts +101 -123
- package/dist/index.js +109 -145
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +109 -145
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -452,22 +452,17 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
452
452
|
}, {
|
|
453
453
|
readonly anonymous: false;
|
|
454
454
|
readonly inputs: readonly [{
|
|
455
|
-
readonly indexed:
|
|
456
|
-
readonly internalType: "
|
|
457
|
-
readonly name: "
|
|
458
|
-
readonly type: "
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
readonly anonymous: false;
|
|
464
|
-
readonly inputs: readonly [{
|
|
465
|
-
readonly indexed: false;
|
|
466
|
-
readonly internalType: "contract ILockupPeriod";
|
|
467
|
-
readonly name: "lockupPeriodModule";
|
|
455
|
+
readonly indexed: true;
|
|
456
|
+
readonly internalType: "uint8";
|
|
457
|
+
readonly name: "moduleType";
|
|
458
|
+
readonly type: "uint8";
|
|
459
|
+
}, {
|
|
460
|
+
readonly indexed: true;
|
|
461
|
+
readonly internalType: "address";
|
|
462
|
+
readonly name: "module";
|
|
468
463
|
readonly type: "address";
|
|
469
464
|
}];
|
|
470
|
-
readonly name: "
|
|
465
|
+
readonly name: "ModuleRegistered";
|
|
471
466
|
readonly type: "event";
|
|
472
467
|
}, {
|
|
473
468
|
readonly anonymous: false;
|
|
@@ -489,16 +484,6 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
489
484
|
}];
|
|
490
485
|
readonly name: "MarginAdjusted";
|
|
491
486
|
readonly type: "event";
|
|
492
|
-
}, {
|
|
493
|
-
readonly anonymous: false;
|
|
494
|
-
readonly inputs: readonly [{
|
|
495
|
-
readonly indexed: false;
|
|
496
|
-
readonly internalType: "contract IMarginRatios";
|
|
497
|
-
readonly name: "marginRatiosModule";
|
|
498
|
-
readonly type: "address";
|
|
499
|
-
}];
|
|
500
|
-
readonly name: "MarginRatiosModuleRegistered";
|
|
501
|
-
readonly type: "event";
|
|
502
487
|
}, {
|
|
503
488
|
readonly anonymous: false;
|
|
504
489
|
readonly inputs: readonly [{
|
|
@@ -639,12 +624,12 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
639
624
|
}, {
|
|
640
625
|
readonly indexed: false;
|
|
641
626
|
readonly internalType: "int256";
|
|
642
|
-
readonly name: "
|
|
627
|
+
readonly name: "exitPerpDelta";
|
|
643
628
|
readonly type: "int256";
|
|
644
629
|
}, {
|
|
645
630
|
readonly indexed: false;
|
|
646
631
|
readonly internalType: "int256";
|
|
647
|
-
readonly name: "
|
|
632
|
+
readonly name: "exitUsdDelta";
|
|
648
633
|
readonly type: "int256";
|
|
649
634
|
}, {
|
|
650
635
|
readonly indexed: false;
|
|
@@ -656,6 +641,36 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
656
641
|
readonly internalType: "int24";
|
|
657
642
|
readonly name: "tickUpper";
|
|
658
643
|
readonly type: "int24";
|
|
644
|
+
}, {
|
|
645
|
+
readonly indexed: false;
|
|
646
|
+
readonly internalType: "int256";
|
|
647
|
+
readonly name: "netUsdDelta";
|
|
648
|
+
readonly type: "int256";
|
|
649
|
+
}, {
|
|
650
|
+
readonly indexed: false;
|
|
651
|
+
readonly internalType: "int256";
|
|
652
|
+
readonly name: "funding";
|
|
653
|
+
readonly type: "int256";
|
|
654
|
+
}, {
|
|
655
|
+
readonly indexed: false;
|
|
656
|
+
readonly internalType: "uint256";
|
|
657
|
+
readonly name: "utilizationFee";
|
|
658
|
+
readonly type: "uint256";
|
|
659
|
+
}, {
|
|
660
|
+
readonly indexed: false;
|
|
661
|
+
readonly internalType: "uint256";
|
|
662
|
+
readonly name: "adl";
|
|
663
|
+
readonly type: "uint256";
|
|
664
|
+
}, {
|
|
665
|
+
readonly indexed: false;
|
|
666
|
+
readonly internalType: "uint256";
|
|
667
|
+
readonly name: "liquidationFee";
|
|
668
|
+
readonly type: "uint256";
|
|
669
|
+
}, {
|
|
670
|
+
readonly indexed: false;
|
|
671
|
+
readonly internalType: "int256";
|
|
672
|
+
readonly name: "netMargin";
|
|
673
|
+
readonly type: "int256";
|
|
659
674
|
}];
|
|
660
675
|
readonly name: "PositionClosed";
|
|
661
676
|
readonly type: "event";
|
|
@@ -714,16 +729,6 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
714
729
|
}];
|
|
715
730
|
readonly name: "PositionOpened";
|
|
716
731
|
readonly type: "event";
|
|
717
|
-
}, {
|
|
718
|
-
readonly anonymous: false;
|
|
719
|
-
readonly inputs: readonly [{
|
|
720
|
-
readonly indexed: false;
|
|
721
|
-
readonly internalType: "contract ISqrtPriceImpactLimit";
|
|
722
|
-
readonly name: "sqrtPriceImpactLimitModule";
|
|
723
|
-
readonly type: "address";
|
|
724
|
-
}];
|
|
725
|
-
readonly name: "SqrtPriceImpactLimitModuleRegistered";
|
|
726
|
-
readonly type: "event";
|
|
727
732
|
}, {
|
|
728
733
|
readonly anonymous: false;
|
|
729
734
|
readonly inputs: readonly [{
|
|
@@ -821,11 +826,11 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
821
826
|
readonly type: "uint256";
|
|
822
827
|
}, {
|
|
823
828
|
readonly internalType: "int256";
|
|
824
|
-
readonly name: "
|
|
829
|
+
readonly name: "usdDelta";
|
|
825
830
|
readonly type: "int256";
|
|
826
831
|
}, {
|
|
827
832
|
readonly internalType: "uint128";
|
|
828
|
-
readonly name: "
|
|
833
|
+
readonly name: "perpLimit";
|
|
829
834
|
readonly type: "uint128";
|
|
830
835
|
}];
|
|
831
836
|
readonly internalType: "struct IPerpManager.AdjustNotionalParams";
|
|
@@ -1016,10 +1021,6 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
1016
1021
|
readonly internalType: "contract ISqrtPriceImpactLimit";
|
|
1017
1022
|
readonly name: "sqrtPriceImpactLimit";
|
|
1018
1023
|
readonly type: "address";
|
|
1019
|
-
}, {
|
|
1020
|
-
readonly internalType: "uint160";
|
|
1021
|
-
readonly name: "startingSqrtPriceX96";
|
|
1022
|
-
readonly type: "uint160";
|
|
1023
1024
|
}];
|
|
1024
1025
|
readonly internalType: "struct IPerpManager.CreatePerpParams";
|
|
1025
1026
|
readonly name: "params";
|
|
@@ -1109,53 +1110,15 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
1109
1110
|
readonly type: "function";
|
|
1110
1111
|
}, {
|
|
1111
1112
|
readonly inputs: readonly [{
|
|
1112
|
-
readonly internalType: "
|
|
1113
|
-
readonly name: "";
|
|
1114
|
-
readonly type: "
|
|
1115
|
-
}
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
readonly internalType: "bool";
|
|
1119
|
-
readonly name: "";
|
|
1120
|
-
readonly type: "bool";
|
|
1121
|
-
}];
|
|
1122
|
-
readonly stateMutability: "view";
|
|
1123
|
-
readonly type: "function";
|
|
1124
|
-
}, {
|
|
1125
|
-
readonly inputs: readonly [{
|
|
1126
|
-
readonly internalType: "contract ILockupPeriod";
|
|
1127
|
-
readonly name: "";
|
|
1128
|
-
readonly type: "address";
|
|
1129
|
-
}];
|
|
1130
|
-
readonly name: "isLockupPeriodRegistered";
|
|
1131
|
-
readonly outputs: readonly [{
|
|
1132
|
-
readonly internalType: "bool";
|
|
1133
|
-
readonly name: "";
|
|
1134
|
-
readonly type: "bool";
|
|
1135
|
-
}];
|
|
1136
|
-
readonly stateMutability: "view";
|
|
1137
|
-
readonly type: "function";
|
|
1138
|
-
}, {
|
|
1139
|
-
readonly inputs: readonly [{
|
|
1140
|
-
readonly internalType: "contract IMarginRatios";
|
|
1141
|
-
readonly name: "";
|
|
1142
|
-
readonly type: "address";
|
|
1143
|
-
}];
|
|
1144
|
-
readonly name: "isMarginRatiosRegistered";
|
|
1145
|
-
readonly outputs: readonly [{
|
|
1146
|
-
readonly internalType: "bool";
|
|
1147
|
-
readonly name: "";
|
|
1148
|
-
readonly type: "bool";
|
|
1149
|
-
}];
|
|
1150
|
-
readonly stateMutability: "view";
|
|
1151
|
-
readonly type: "function";
|
|
1152
|
-
}, {
|
|
1153
|
-
readonly inputs: readonly [{
|
|
1154
|
-
readonly internalType: "contract ISqrtPriceImpactLimit";
|
|
1155
|
-
readonly name: "";
|
|
1113
|
+
readonly internalType: "uint8";
|
|
1114
|
+
readonly name: "moduleType";
|
|
1115
|
+
readonly type: "uint8";
|
|
1116
|
+
}, {
|
|
1117
|
+
readonly internalType: "address";
|
|
1118
|
+
readonly name: "module";
|
|
1156
1119
|
readonly type: "address";
|
|
1157
1120
|
}];
|
|
1158
|
-
readonly name: "
|
|
1121
|
+
readonly name: "isModuleRegistered";
|
|
1159
1122
|
readonly outputs: readonly [{
|
|
1160
1123
|
readonly internalType: "bool";
|
|
1161
1124
|
readonly name: "";
|
|
@@ -1425,13 +1388,17 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
1425
1388
|
readonly name: "funding";
|
|
1426
1389
|
readonly type: "int256";
|
|
1427
1390
|
}, {
|
|
1428
|
-
readonly internalType: "
|
|
1391
|
+
readonly internalType: "int256";
|
|
1429
1392
|
readonly name: "netMargin";
|
|
1430
|
-
readonly type: "
|
|
1393
|
+
readonly type: "int256";
|
|
1431
1394
|
}, {
|
|
1432
1395
|
readonly internalType: "bool";
|
|
1433
1396
|
readonly name: "wasLiquidated";
|
|
1434
1397
|
readonly type: "bool";
|
|
1398
|
+
}, {
|
|
1399
|
+
readonly internalType: "uint256";
|
|
1400
|
+
readonly name: "notional";
|
|
1401
|
+
readonly type: "uint256";
|
|
1435
1402
|
}];
|
|
1436
1403
|
readonly stateMutability: "nonpayable";
|
|
1437
1404
|
readonly type: "function";
|
|
@@ -1539,41 +1506,53 @@ declare const PERP_MANAGER_ABI: readonly [{
|
|
|
1539
1506
|
readonly type: "function";
|
|
1540
1507
|
}, {
|
|
1541
1508
|
readonly inputs: readonly [{
|
|
1542
|
-
readonly internalType: "
|
|
1543
|
-
readonly name: "
|
|
1544
|
-
readonly type: "
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
readonly
|
|
1553
|
-
|
|
1554
|
-
readonly
|
|
1509
|
+
readonly internalType: "PoolId";
|
|
1510
|
+
readonly name: "perpId";
|
|
1511
|
+
readonly type: "bytes32";
|
|
1512
|
+
}, {
|
|
1513
|
+
readonly internalType: "bool";
|
|
1514
|
+
readonly name: "zeroForOne";
|
|
1515
|
+
readonly type: "bool";
|
|
1516
|
+
}, {
|
|
1517
|
+
readonly internalType: "bool";
|
|
1518
|
+
readonly name: "isExactIn";
|
|
1519
|
+
readonly type: "bool";
|
|
1520
|
+
}, {
|
|
1521
|
+
readonly internalType: "uint256";
|
|
1522
|
+
readonly name: "amount";
|
|
1523
|
+
readonly type: "uint256";
|
|
1524
|
+
}, {
|
|
1525
|
+
readonly internalType: "uint160";
|
|
1526
|
+
readonly name: "sqrtPriceLimitX96";
|
|
1527
|
+
readonly type: "uint160";
|
|
1555
1528
|
}];
|
|
1556
|
-
readonly name: "
|
|
1557
|
-
readonly outputs: readonly [
|
|
1558
|
-
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1562
|
-
readonly internalType: "
|
|
1563
|
-
readonly name: "
|
|
1564
|
-
readonly type: "
|
|
1529
|
+
readonly name: "quoteSwap";
|
|
1530
|
+
readonly outputs: readonly [{
|
|
1531
|
+
readonly internalType: "bytes";
|
|
1532
|
+
readonly name: "unexpectedReason";
|
|
1533
|
+
readonly type: "bytes";
|
|
1534
|
+
}, {
|
|
1535
|
+
readonly internalType: "int256";
|
|
1536
|
+
readonly name: "perpDelta";
|
|
1537
|
+
readonly type: "int256";
|
|
1538
|
+
}, {
|
|
1539
|
+
readonly internalType: "int256";
|
|
1540
|
+
readonly name: "usdDelta";
|
|
1541
|
+
readonly type: "int256";
|
|
1565
1542
|
}];
|
|
1566
|
-
readonly name: "registerMarginRatiosModule";
|
|
1567
|
-
readonly outputs: readonly [];
|
|
1568
1543
|
readonly stateMutability: "nonpayable";
|
|
1569
1544
|
readonly type: "function";
|
|
1570
1545
|
}, {
|
|
1571
1546
|
readonly inputs: readonly [{
|
|
1572
|
-
readonly internalType: "
|
|
1573
|
-
readonly name: "
|
|
1547
|
+
readonly internalType: "uint8";
|
|
1548
|
+
readonly name: "moduleType";
|
|
1549
|
+
readonly type: "uint8";
|
|
1550
|
+
}, {
|
|
1551
|
+
readonly internalType: "address";
|
|
1552
|
+
readonly name: "module";
|
|
1574
1553
|
readonly type: "address";
|
|
1575
1554
|
}];
|
|
1576
|
-
readonly name: "
|
|
1555
|
+
readonly name: "registerModule";
|
|
1577
1556
|
readonly outputs: readonly [];
|
|
1578
1557
|
readonly stateMutability: "nonpayable";
|
|
1579
1558
|
readonly type: "function";
|
|
@@ -1850,7 +1829,6 @@ type OpenMakerPositionParams = {
|
|
|
1850
1829
|
maxAmt1In: number | bigint;
|
|
1851
1830
|
};
|
|
1852
1831
|
type CreatePerpParams = {
|
|
1853
|
-
startingPrice: number;
|
|
1854
1832
|
beacon: Address;
|
|
1855
1833
|
fees?: Address;
|
|
1856
1834
|
marginRatios?: Address;
|
|
@@ -6112,27 +6090,27 @@ declare class PerpCityContext {
|
|
|
6112
6090
|
[x: `int24[${string}]`]: undefined;
|
|
6113
6091
|
[x: `uint24[${string}]`]: undefined;
|
|
6114
6092
|
[x: `uint128[${string}]`]: undefined;
|
|
6115
|
-
[x: `uint160[${string}]`]: undefined;
|
|
6116
6093
|
[x: `uint120[${string}]`]: undefined;
|
|
6094
|
+
[x: `uint160[${string}]`]: undefined;
|
|
6117
6095
|
[x: `bytes4[${string}]`]: undefined;
|
|
6118
6096
|
[x: `bytes1[${string}]`]: undefined;
|
|
6119
6097
|
[x: `bytes2[${string}]`]: undefined;
|
|
6120
6098
|
[x: `bytes3[${string}]`]: undefined;
|
|
6121
6099
|
[x: `bytes25[${string}]`]: undefined;
|
|
6122
6100
|
[x: `bytes6[${string}]`]: undefined;
|
|
6123
|
-
[x: `
|
|
6101
|
+
[x: `bytes18[${string}]`]: undefined;
|
|
6124
6102
|
[x: `bytes10[${string}]`]: undefined;
|
|
6125
6103
|
[x: `bytes5[${string}]`]: undefined;
|
|
6126
6104
|
[x: `bytes8[${string}]`]: undefined;
|
|
6127
6105
|
[x: `bytes7[${string}]`]: undefined;
|
|
6128
6106
|
[x: `bytes9[${string}]`]: undefined;
|
|
6129
6107
|
[x: `bytes11[${string}]`]: undefined;
|
|
6108
|
+
[x: `bytes12[${string}]`]: undefined;
|
|
6130
6109
|
[x: `bytes13[${string}]`]: undefined;
|
|
6131
6110
|
[x: `bytes14[${string}]`]: undefined;
|
|
6132
6111
|
[x: `bytes15[${string}]`]: undefined;
|
|
6133
6112
|
[x: `bytes16[${string}]`]: undefined;
|
|
6134
6113
|
[x: `bytes17[${string}]`]: undefined;
|
|
6135
|
-
[x: `bytes18[${string}]`]: undefined;
|
|
6136
6114
|
[x: `bytes19[${string}]`]: undefined;
|
|
6137
6115
|
[x: `bytes20[${string}]`]: undefined;
|
|
6138
6116
|
[x: `bytes21[${string}]`]: undefined;
|
|
@@ -6214,27 +6192,27 @@ declare class PerpCityContext {
|
|
|
6214
6192
|
int24?: undefined;
|
|
6215
6193
|
uint24?: undefined;
|
|
6216
6194
|
uint128?: undefined;
|
|
6217
|
-
uint160?: undefined;
|
|
6218
6195
|
uint120?: undefined;
|
|
6196
|
+
uint160?: undefined;
|
|
6219
6197
|
bytes4?: undefined;
|
|
6220
6198
|
bytes1?: undefined;
|
|
6221
6199
|
bytes2?: undefined;
|
|
6222
6200
|
bytes3?: undefined;
|
|
6223
6201
|
bytes25?: undefined;
|
|
6224
6202
|
bytes6?: undefined;
|
|
6225
|
-
|
|
6203
|
+
bytes18?: undefined;
|
|
6226
6204
|
bytes10?: undefined;
|
|
6227
6205
|
bytes5?: undefined;
|
|
6228
6206
|
bytes8?: undefined;
|
|
6229
6207
|
bytes7?: undefined;
|
|
6230
6208
|
bytes9?: undefined;
|
|
6231
6209
|
bytes11?: undefined;
|
|
6210
|
+
bytes12?: undefined;
|
|
6232
6211
|
bytes13?: undefined;
|
|
6233
6212
|
bytes14?: undefined;
|
|
6234
6213
|
bytes15?: undefined;
|
|
6235
6214
|
bytes16?: undefined;
|
|
6236
6215
|
bytes17?: undefined;
|
|
6237
|
-
bytes18?: undefined;
|
|
6238
6216
|
bytes19?: undefined;
|
|
6239
6217
|
bytes20?: undefined;
|
|
6240
6218
|
bytes21?: undefined;
|