@typus/typus-perp-sdk 1.0.58 → 1.0.59-leaderboard-b
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/src/api/sentio.d.ts +11 -2
- package/dist/src/api/sentio.js +56 -28
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +3 -2
- package/dist/src/typus_perp/admin/functions.d.ts +10 -0
- package/dist/src/typus_perp/admin/functions.js +17 -0
- package/dist/src/typus_perp/competition/functions.d.ts +24 -0
- package/dist/src/typus_perp/competition/functions.js +38 -0
- package/dist/src/typus_perp/competition/structs.d.ts +92 -0
- package/dist/src/typus_perp/competition/structs.js +288 -0
- package/dist/src/typus_perp/error/functions.d.ts +3 -0
- package/dist/src/typus_perp/error/functions.js +15 -0
- package/dist/src/typus_perp/position/functions.d.ts +8 -0
- package/dist/src/typus_perp/position/functions.js +8 -0
- package/dist/src/typus_perp/trading/functions.d.ts +156 -0
- package/dist/src/typus_perp/trading/functions.js +216 -0
- package/dist/src/typus_perp/trading/structs.d.ts +127 -0
- package/dist/src/typus_perp/trading/structs.js +395 -204
- package/dist/src/user/order.js +3 -1
- package/dist/src/user/orderWithBidReceipt.js +6 -2
- package/package.json +2 -2
package/dist/src/user/order.js
CHANGED
|
@@ -122,7 +122,7 @@ function createTradingOrder(config, tx, pythClient, input) {
|
|
|
122
122
|
}
|
|
123
123
|
finally { if (e_1) throw e_1.error; }
|
|
124
124
|
}
|
|
125
|
-
(0, functions_1.
|
|
125
|
+
(0, functions_1.createTradingOrderV2)(tx, [cToken, baseToken], {
|
|
126
126
|
version: __1.PERP_VERSION,
|
|
127
127
|
registry: __1.MARKET,
|
|
128
128
|
poolRegistry: __1.LP_POOL,
|
|
@@ -141,6 +141,8 @@ function createTradingOrder(config, tx, pythClient, input) {
|
|
|
141
141
|
isStopOrder: input.isStopOrder,
|
|
142
142
|
reduceOnly: input.reduceOnly,
|
|
143
143
|
linkedPositionId: input.linkedPositionId ? BigInt(input.linkedPositionId) : null,
|
|
144
|
+
tailsStakingRegistry: config.registry.typus.tailsStaking,
|
|
145
|
+
competitionConfig: __1.COMPETITION_CONFIG,
|
|
144
146
|
});
|
|
145
147
|
return [2 /*return*/, tx];
|
|
146
148
|
}
|
|
@@ -89,7 +89,7 @@ function createTradingOrderWithBidReceipt(config, tx, pythClient, input) {
|
|
|
89
89
|
cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
90
90
|
bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
91
91
|
baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
92
|
-
(0, functions_1.
|
|
92
|
+
(0, functions_1.createTradingOrderWithBidReceiptV2)(tx, [cToken, bToken, baseToken], {
|
|
93
93
|
version: __1.PERP_VERSION,
|
|
94
94
|
registry: __1.MARKET,
|
|
95
95
|
poolRegistry: __1.LP_POOL,
|
|
@@ -105,6 +105,8 @@ function createTradingOrderWithBidReceipt(config, tx, pythClient, input) {
|
|
|
105
105
|
dovRegistry: config.registry.dov.dovSingle,
|
|
106
106
|
collateralBidReceipt: collateralBidReceipt,
|
|
107
107
|
user: input.user,
|
|
108
|
+
tailsStakingRegistry: config.registry.typus.tailsStaking,
|
|
109
|
+
competitionConfig: __1.COMPETITION_CONFIG,
|
|
108
110
|
});
|
|
109
111
|
return [2 /*return*/, tx];
|
|
110
112
|
}
|
|
@@ -140,7 +142,7 @@ function reduceOptionCollateralPositionSize(config, tx, pythClient, input) {
|
|
|
140
142
|
cToken = constants_1.tokenType[__1.NETWORK][TOKEN];
|
|
141
143
|
bToken = constants_1.tokenType[__1.NETWORK][input.bToken];
|
|
142
144
|
baseToken = constants_1.tokenType[__1.NETWORK][BASE_TOKEN];
|
|
143
|
-
(0, functions_1.
|
|
145
|
+
(0, functions_1.reduceOptionCollateralPositionSizeV2)(tx, [cToken, bToken, baseToken], {
|
|
144
146
|
version: __1.PERP_VERSION,
|
|
145
147
|
registry: __1.MARKET,
|
|
146
148
|
poolRegistry: __1.LP_POOL,
|
|
@@ -155,6 +157,8 @@ function reduceOptionCollateralPositionSize(config, tx, pythClient, input) {
|
|
|
155
157
|
dovRegistry: config.registry.dov.dovSingle,
|
|
156
158
|
positionId: BigInt(input.positionId),
|
|
157
159
|
orderSize: input.orderSize ? BigInt(input.orderSize) : null,
|
|
160
|
+
tailsStakingRegistry: config.registry.typus.tailsStaking,
|
|
161
|
+
competitionConfig: __1.COMPETITION_CONFIG,
|
|
158
162
|
});
|
|
159
163
|
return [2 /*return*/, tx];
|
|
160
164
|
}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@typus/typus-perp-sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.59-leaderboard-b",
|
|
4
4
|
"repository": "https://github.com/Typus-Lab/typus-perp-sdk.git",
|
|
5
5
|
"author": "Typus",
|
|
6
6
|
"description": "typus perp sdk",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@typus/typus-sdk": "1.6.
|
|
9
|
+
"@typus/typus-sdk": "1.6.21"
|
|
10
10
|
},
|
|
11
11
|
"devDependencies": {
|
|
12
12
|
"@types/bs58": "^4.0.1",
|