@gmx-io/sdk 1.5.0-alpha-11 → 1.5.0-alpha-13
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/build/cjs/src/clients/v2/__tests__/decrease.spec.js +14 -0
- package/build/cjs/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +24 -0
- package/build/cjs/src/codegen/prebuilt/hashedMarketConfigKeys.json +183 -0
- package/build/cjs/src/codegen/prebuilt/hashedMarketValuesKeys.json +45 -0
- package/build/cjs/src/configs/api.js +9 -9
- package/build/cjs/src/configs/marketHours.js +27 -0
- package/build/cjs/src/configs/markets.js +21 -0
- package/build/cjs/src/configs/tokens.js +32 -0
- package/build/cjs/src/utils/__tests__/markets.spec.js +44 -9
- package/build/cjs/src/utils/markets/utils.js +19 -12
- package/build/cjs/src/utils/orderTransactions/api.js +15 -10
- package/build/cjs/src/utils/orderTransactions/utils.js +2 -2
- package/build/cjs/src/utils/orderTransactions/validateTypedData.js +7 -0
- package/build/cjs/src/utils/positions/utils.js +1 -1
- package/build/cjs/src/utils/subaccount/generateSubaccount.js +20 -2
- package/build/cjs/src/utils/subaccount/index.js +3 -1
- package/build/cjs/src/utils/swap/__tests__/swapRouting.spec.js +1 -1
- package/build/cjs/src/utils/trade/trade.js +7 -0
- package/build/cjs/src/utils/twap/index.js +10 -4
- package/build/esm/src/clients/v2/__tests__/decrease.spec.js +14 -0
- package/build/esm/src/codegen/prebuilt/hashedKinkModelMarketRatesKeys.json +24 -0
- package/build/esm/src/codegen/prebuilt/hashedMarketConfigKeys.json +183 -0
- package/build/esm/src/codegen/prebuilt/hashedMarketValuesKeys.json +45 -0
- package/build/esm/src/configs/api.js +9 -9
- package/build/esm/src/configs/marketHours.js +24 -0
- package/build/esm/src/configs/markets.js +21 -0
- package/build/esm/src/configs/tokens.js +32 -0
- package/build/esm/src/utils/__tests__/markets.spec.js +45 -10
- package/build/esm/src/utils/markets/utils.js +19 -12
- package/build/esm/src/utils/orderTransactions/api.js +15 -10
- package/build/esm/src/utils/orderTransactions/utils.js +2 -2
- package/build/esm/src/utils/orderTransactions/validateTypedData.js +7 -0
- package/build/esm/src/utils/positions/utils.js +1 -1
- package/build/esm/src/utils/subaccount/generateSubaccount.js +14 -1
- package/build/esm/src/utils/subaccount/index.js +1 -1
- package/build/esm/src/utils/swap/__tests__/swapRouting.spec.js +1 -1
- package/build/esm/src/utils/trade/trade.js +7 -0
- package/build/esm/src/utils/twap/index.js +10 -4
- package/build/types/src/codegen/prebuilt/index.d.ts +252 -0
- package/build/types/src/configs/marketHours.d.ts +7 -0
- package/build/types/src/configs/tokens.d.ts +1 -39
- package/build/types/src/utils/markets/utils.d.ts +1 -1
- package/build/types/src/utils/subaccount/generateSubaccount.d.ts +3 -0
- package/build/types/src/utils/subaccount/index.d.ts +1 -1
- package/build/types/src/utils/tokens/types.d.ts +2 -0
- package/package.json +1 -1
|
@@ -2044,6 +2044,51 @@ export declare const HASHED_MARKET_VALUES_KEYS: {
|
|
|
2044
2044
|
shortInterestInTokensUsingLongToken: string;
|
|
2045
2045
|
shortInterestInTokensUsingShortToken: string;
|
|
2046
2046
|
};
|
|
2047
|
+
"0xda81cdd397210C08cFc567f93982E148A3aac8a6": {
|
|
2048
|
+
longPoolAmount: string;
|
|
2049
|
+
shortPoolAmount: string;
|
|
2050
|
+
positionImpactPoolAmount: string;
|
|
2051
|
+
swapImpactPoolAmountLong: string;
|
|
2052
|
+
swapImpactPoolAmountShort: string;
|
|
2053
|
+
longInterestUsingLongToken: string;
|
|
2054
|
+
longInterestUsingShortToken: string;
|
|
2055
|
+
shortInterestUsingLongToken: string;
|
|
2056
|
+
shortInterestUsingShortToken: string;
|
|
2057
|
+
longInterestInTokensUsingLongToken: string;
|
|
2058
|
+
longInterestInTokensUsingShortToken: string;
|
|
2059
|
+
shortInterestInTokensUsingLongToken: string;
|
|
2060
|
+
shortInterestInTokensUsingShortToken: string;
|
|
2061
|
+
};
|
|
2062
|
+
"0x6F287D071800BfA847B4a7a7104BE33F87Ce9E74": {
|
|
2063
|
+
longPoolAmount: string;
|
|
2064
|
+
shortPoolAmount: string;
|
|
2065
|
+
positionImpactPoolAmount: string;
|
|
2066
|
+
swapImpactPoolAmountLong: string;
|
|
2067
|
+
swapImpactPoolAmountShort: string;
|
|
2068
|
+
longInterestUsingLongToken: string;
|
|
2069
|
+
longInterestUsingShortToken: string;
|
|
2070
|
+
shortInterestUsingLongToken: string;
|
|
2071
|
+
shortInterestUsingShortToken: string;
|
|
2072
|
+
longInterestInTokensUsingLongToken: string;
|
|
2073
|
+
longInterestInTokensUsingShortToken: string;
|
|
2074
|
+
shortInterestInTokensUsingLongToken: string;
|
|
2075
|
+
shortInterestInTokensUsingShortToken: string;
|
|
2076
|
+
};
|
|
2077
|
+
"0x2Ce2bc8B0f9d000f359d756a5816C125474Bb39b": {
|
|
2078
|
+
longPoolAmount: string;
|
|
2079
|
+
shortPoolAmount: string;
|
|
2080
|
+
positionImpactPoolAmount: string;
|
|
2081
|
+
swapImpactPoolAmountLong: string;
|
|
2082
|
+
swapImpactPoolAmountShort: string;
|
|
2083
|
+
longInterestUsingLongToken: string;
|
|
2084
|
+
longInterestUsingShortToken: string;
|
|
2085
|
+
shortInterestUsingLongToken: string;
|
|
2086
|
+
shortInterestUsingShortToken: string;
|
|
2087
|
+
longInterestInTokensUsingLongToken: string;
|
|
2088
|
+
longInterestInTokensUsingShortToken: string;
|
|
2089
|
+
shortInterestInTokensUsingLongToken: string;
|
|
2090
|
+
shortInterestInTokensUsingShortToken: string;
|
|
2091
|
+
};
|
|
2047
2092
|
};
|
|
2048
2093
|
"43113": {
|
|
2049
2094
|
"0xD996ff47A1F763E1e55415BC4437c59292D1F415": {
|
|
@@ -11089,6 +11134,189 @@ export declare const HASHED_MARKET_CONFIG_KEYS: {
|
|
|
11089
11134
|
virtualLongTokenId: string;
|
|
11090
11135
|
virtualShortTokenId: string;
|
|
11091
11136
|
};
|
|
11137
|
+
"0xda81cdd397210C08cFc567f93982E148A3aac8a6": {
|
|
11138
|
+
isDisabled: string;
|
|
11139
|
+
maxLongPoolAmount: string;
|
|
11140
|
+
maxShortPoolAmount: string;
|
|
11141
|
+
maxLongPoolUsdForDeposit: string;
|
|
11142
|
+
maxShortPoolUsdForDeposit: string;
|
|
11143
|
+
reserveFactorLong: string;
|
|
11144
|
+
reserveFactorShort: string;
|
|
11145
|
+
openInterestReserveFactorLong: string;
|
|
11146
|
+
openInterestReserveFactorShort: string;
|
|
11147
|
+
maxOpenInterestLong: string;
|
|
11148
|
+
maxOpenInterestShort: string;
|
|
11149
|
+
minPositionImpactPoolAmount: string;
|
|
11150
|
+
positionImpactPoolDistributionRate: string;
|
|
11151
|
+
borrowingFactorLong: string;
|
|
11152
|
+
borrowingFactorShort: string;
|
|
11153
|
+
borrowingExponentFactorLong: string;
|
|
11154
|
+
borrowingExponentFactorShort: string;
|
|
11155
|
+
fundingFactor: string;
|
|
11156
|
+
fundingExponentFactor: string;
|
|
11157
|
+
fundingIncreaseFactorPerSecond: string;
|
|
11158
|
+
fundingDecreaseFactorPerSecond: string;
|
|
11159
|
+
thresholdForStableFunding: string;
|
|
11160
|
+
thresholdForDecreaseFunding: string;
|
|
11161
|
+
minFundingFactorPerSecond: string;
|
|
11162
|
+
maxFundingFactorPerSecond: string;
|
|
11163
|
+
maxPnlFactorForTradersLong: string;
|
|
11164
|
+
maxPnlFactorForTradersShort: string;
|
|
11165
|
+
maxPnlFactorForDepositsLong: string;
|
|
11166
|
+
maxPnlFactorForDepositsShort: string;
|
|
11167
|
+
maxPnlFactorForWithdrawalsLong: string;
|
|
11168
|
+
maxPnlFactorForWithdrawalsShort: string;
|
|
11169
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
11170
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
11171
|
+
positionImpactFactorPositive: string;
|
|
11172
|
+
positionImpactFactorNegative: string;
|
|
11173
|
+
maxPositionImpactFactorPositive: string;
|
|
11174
|
+
maxPositionImpactFactorNegative: string;
|
|
11175
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
11176
|
+
maxLendableImpactFactor: string;
|
|
11177
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
11178
|
+
maxLendableImpactUsd: string;
|
|
11179
|
+
lentPositionImpactPoolAmount: string;
|
|
11180
|
+
minCollateralFactor: string;
|
|
11181
|
+
minCollateralFactorForLiquidation: string;
|
|
11182
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
11183
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
11184
|
+
positionImpactExponentFactorPositive: string;
|
|
11185
|
+
positionImpactExponentFactorNegative: string;
|
|
11186
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
11187
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
11188
|
+
atomicSwapFeeFactor: string;
|
|
11189
|
+
swapImpactFactorPositive: string;
|
|
11190
|
+
swapImpactFactorNegative: string;
|
|
11191
|
+
swapImpactExponentFactor: string;
|
|
11192
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
11193
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
11194
|
+
virtualMarketId: string;
|
|
11195
|
+
virtualLongTokenId: string;
|
|
11196
|
+
virtualShortTokenId: string;
|
|
11197
|
+
};
|
|
11198
|
+
"0x6F287D071800BfA847B4a7a7104BE33F87Ce9E74": {
|
|
11199
|
+
isDisabled: string;
|
|
11200
|
+
maxLongPoolAmount: string;
|
|
11201
|
+
maxShortPoolAmount: string;
|
|
11202
|
+
maxLongPoolUsdForDeposit: string;
|
|
11203
|
+
maxShortPoolUsdForDeposit: string;
|
|
11204
|
+
reserveFactorLong: string;
|
|
11205
|
+
reserveFactorShort: string;
|
|
11206
|
+
openInterestReserveFactorLong: string;
|
|
11207
|
+
openInterestReserveFactorShort: string;
|
|
11208
|
+
maxOpenInterestLong: string;
|
|
11209
|
+
maxOpenInterestShort: string;
|
|
11210
|
+
minPositionImpactPoolAmount: string;
|
|
11211
|
+
positionImpactPoolDistributionRate: string;
|
|
11212
|
+
borrowingFactorLong: string;
|
|
11213
|
+
borrowingFactorShort: string;
|
|
11214
|
+
borrowingExponentFactorLong: string;
|
|
11215
|
+
borrowingExponentFactorShort: string;
|
|
11216
|
+
fundingFactor: string;
|
|
11217
|
+
fundingExponentFactor: string;
|
|
11218
|
+
fundingIncreaseFactorPerSecond: string;
|
|
11219
|
+
fundingDecreaseFactorPerSecond: string;
|
|
11220
|
+
thresholdForStableFunding: string;
|
|
11221
|
+
thresholdForDecreaseFunding: string;
|
|
11222
|
+
minFundingFactorPerSecond: string;
|
|
11223
|
+
maxFundingFactorPerSecond: string;
|
|
11224
|
+
maxPnlFactorForTradersLong: string;
|
|
11225
|
+
maxPnlFactorForTradersShort: string;
|
|
11226
|
+
maxPnlFactorForDepositsLong: string;
|
|
11227
|
+
maxPnlFactorForDepositsShort: string;
|
|
11228
|
+
maxPnlFactorForWithdrawalsLong: string;
|
|
11229
|
+
maxPnlFactorForWithdrawalsShort: string;
|
|
11230
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
11231
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
11232
|
+
positionImpactFactorPositive: string;
|
|
11233
|
+
positionImpactFactorNegative: string;
|
|
11234
|
+
maxPositionImpactFactorPositive: string;
|
|
11235
|
+
maxPositionImpactFactorNegative: string;
|
|
11236
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
11237
|
+
maxLendableImpactFactor: string;
|
|
11238
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
11239
|
+
maxLendableImpactUsd: string;
|
|
11240
|
+
lentPositionImpactPoolAmount: string;
|
|
11241
|
+
minCollateralFactor: string;
|
|
11242
|
+
minCollateralFactorForLiquidation: string;
|
|
11243
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
11244
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
11245
|
+
positionImpactExponentFactorPositive: string;
|
|
11246
|
+
positionImpactExponentFactorNegative: string;
|
|
11247
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
11248
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
11249
|
+
atomicSwapFeeFactor: string;
|
|
11250
|
+
swapImpactFactorPositive: string;
|
|
11251
|
+
swapImpactFactorNegative: string;
|
|
11252
|
+
swapImpactExponentFactor: string;
|
|
11253
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
11254
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
11255
|
+
virtualMarketId: string;
|
|
11256
|
+
virtualLongTokenId: string;
|
|
11257
|
+
virtualShortTokenId: string;
|
|
11258
|
+
};
|
|
11259
|
+
"0x2Ce2bc8B0f9d000f359d756a5816C125474Bb39b": {
|
|
11260
|
+
isDisabled: string;
|
|
11261
|
+
maxLongPoolAmount: string;
|
|
11262
|
+
maxShortPoolAmount: string;
|
|
11263
|
+
maxLongPoolUsdForDeposit: string;
|
|
11264
|
+
maxShortPoolUsdForDeposit: string;
|
|
11265
|
+
reserveFactorLong: string;
|
|
11266
|
+
reserveFactorShort: string;
|
|
11267
|
+
openInterestReserveFactorLong: string;
|
|
11268
|
+
openInterestReserveFactorShort: string;
|
|
11269
|
+
maxOpenInterestLong: string;
|
|
11270
|
+
maxOpenInterestShort: string;
|
|
11271
|
+
minPositionImpactPoolAmount: string;
|
|
11272
|
+
positionImpactPoolDistributionRate: string;
|
|
11273
|
+
borrowingFactorLong: string;
|
|
11274
|
+
borrowingFactorShort: string;
|
|
11275
|
+
borrowingExponentFactorLong: string;
|
|
11276
|
+
borrowingExponentFactorShort: string;
|
|
11277
|
+
fundingFactor: string;
|
|
11278
|
+
fundingExponentFactor: string;
|
|
11279
|
+
fundingIncreaseFactorPerSecond: string;
|
|
11280
|
+
fundingDecreaseFactorPerSecond: string;
|
|
11281
|
+
thresholdForStableFunding: string;
|
|
11282
|
+
thresholdForDecreaseFunding: string;
|
|
11283
|
+
minFundingFactorPerSecond: string;
|
|
11284
|
+
maxFundingFactorPerSecond: string;
|
|
11285
|
+
maxPnlFactorForTradersLong: string;
|
|
11286
|
+
maxPnlFactorForTradersShort: string;
|
|
11287
|
+
maxPnlFactorForDepositsLong: string;
|
|
11288
|
+
maxPnlFactorForDepositsShort: string;
|
|
11289
|
+
maxPnlFactorForWithdrawalsLong: string;
|
|
11290
|
+
maxPnlFactorForWithdrawalsShort: string;
|
|
11291
|
+
positionFeeFactorForBalanceWasImproved: string;
|
|
11292
|
+
positionFeeFactorForBalanceWasNotImproved: string;
|
|
11293
|
+
positionImpactFactorPositive: string;
|
|
11294
|
+
positionImpactFactorNegative: string;
|
|
11295
|
+
maxPositionImpactFactorPositive: string;
|
|
11296
|
+
maxPositionImpactFactorNegative: string;
|
|
11297
|
+
maxPositionImpactFactorForLiquidations: string;
|
|
11298
|
+
maxLendableImpactFactor: string;
|
|
11299
|
+
maxLendableImpactFactorForWithdrawals: string;
|
|
11300
|
+
maxLendableImpactUsd: string;
|
|
11301
|
+
lentPositionImpactPoolAmount: string;
|
|
11302
|
+
minCollateralFactor: string;
|
|
11303
|
+
minCollateralFactorForLiquidation: string;
|
|
11304
|
+
minCollateralFactorForOpenInterestLong: string;
|
|
11305
|
+
minCollateralFactorForOpenInterestShort: string;
|
|
11306
|
+
positionImpactExponentFactorPositive: string;
|
|
11307
|
+
positionImpactExponentFactorNegative: string;
|
|
11308
|
+
swapFeeFactorForBalanceWasImproved: string;
|
|
11309
|
+
swapFeeFactorForBalanceWasNotImproved: string;
|
|
11310
|
+
atomicSwapFeeFactor: string;
|
|
11311
|
+
swapImpactFactorPositive: string;
|
|
11312
|
+
swapImpactFactorNegative: string;
|
|
11313
|
+
swapImpactExponentFactor: string;
|
|
11314
|
+
withdrawalFeeFactorBalanceWasImproved: string;
|
|
11315
|
+
withdrawalFeeFactorBalanceWasNotImproved: string;
|
|
11316
|
+
virtualMarketId: string;
|
|
11317
|
+
virtualLongTokenId: string;
|
|
11318
|
+
virtualShortTokenId: string;
|
|
11319
|
+
};
|
|
11092
11320
|
};
|
|
11093
11321
|
"43113": {
|
|
11094
11322
|
"0xD996ff47A1F763E1e55415BC4437c59292D1F415": {
|
|
@@ -15180,6 +15408,30 @@ export declare const HASHED_KINK_MODEL_MARKET_RATES_KEYS: {
|
|
|
15180
15408
|
aboveOptimalUsageBorrowingFactorLong: string;
|
|
15181
15409
|
aboveOptimalUsageBorrowingFactorShort: string;
|
|
15182
15410
|
};
|
|
15411
|
+
"0xda81cdd397210C08cFc567f93982E148A3aac8a6": {
|
|
15412
|
+
optimalUsageFactorLong: string;
|
|
15413
|
+
optimalUsageFactorShort: string;
|
|
15414
|
+
baseBorrowingFactorLong: string;
|
|
15415
|
+
baseBorrowingFactorShort: string;
|
|
15416
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
15417
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
15418
|
+
};
|
|
15419
|
+
"0x6F287D071800BfA847B4a7a7104BE33F87Ce9E74": {
|
|
15420
|
+
optimalUsageFactorLong: string;
|
|
15421
|
+
optimalUsageFactorShort: string;
|
|
15422
|
+
baseBorrowingFactorLong: string;
|
|
15423
|
+
baseBorrowingFactorShort: string;
|
|
15424
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
15425
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
15426
|
+
};
|
|
15427
|
+
"0x2Ce2bc8B0f9d000f359d756a5816C125474Bb39b": {
|
|
15428
|
+
optimalUsageFactorLong: string;
|
|
15429
|
+
optimalUsageFactorShort: string;
|
|
15430
|
+
baseBorrowingFactorLong: string;
|
|
15431
|
+
baseBorrowingFactorShort: string;
|
|
15432
|
+
aboveOptimalUsageBorrowingFactorLong: string;
|
|
15433
|
+
aboveOptimalUsageBorrowingFactorShort: string;
|
|
15434
|
+
};
|
|
15183
15435
|
};
|
|
15184
15436
|
"43113": {
|
|
15185
15437
|
"0xD996ff47A1F763E1e55415BC4437c59292D1F415": {
|
|
@@ -6,46 +6,8 @@ export declare const TOKENS: {
|
|
|
6
6
|
[chainId: number]: Token[];
|
|
7
7
|
};
|
|
8
8
|
export declare const TOKEN_COLOR_MAP: {
|
|
9
|
-
ETH: string;
|
|
10
|
-
BTC: string;
|
|
11
|
-
WBTC: string;
|
|
12
|
-
PBTC: string;
|
|
13
|
-
USDC: string;
|
|
14
|
-
"USDC.E": string;
|
|
15
|
-
"USDC.SG": string;
|
|
16
|
-
USDT: string;
|
|
17
|
-
MIM: string;
|
|
18
|
-
FRAX: string;
|
|
19
|
-
DAI: string;
|
|
20
|
-
UNI: string;
|
|
21
|
-
AVAX: string;
|
|
22
|
-
LINK: string;
|
|
23
|
-
DOGE: string;
|
|
24
|
-
SOL: string;
|
|
25
|
-
ARB: string;
|
|
26
|
-
NEAR: string;
|
|
27
|
-
BNB: string;
|
|
28
|
-
ATOM: string;
|
|
29
|
-
XRP: string;
|
|
30
|
-
LTC: string;
|
|
31
|
-
OP: string;
|
|
32
|
-
DOT: string;
|
|
33
|
-
tBTC: string;
|
|
34
|
-
TEST: string;
|
|
35
|
-
SHIB: string;
|
|
36
|
-
STX: string;
|
|
37
|
-
ORDI: string;
|
|
38
|
-
MATIC: string;
|
|
39
|
-
EIGEN: string;
|
|
40
|
-
SATS: string;
|
|
41
|
-
XAU: string;
|
|
42
|
-
XAG: string;
|
|
43
|
-
GOLD: string;
|
|
44
|
-
SILVER: string;
|
|
45
|
-
XPT: string;
|
|
46
|
-
XPD: string;
|
|
47
9
|
default: string;
|
|
48
|
-
}
|
|
10
|
+
} & Partial<Record<string, string>>;
|
|
49
11
|
export declare const TOKENS_MAP: {
|
|
50
12
|
[chainId: number]: {
|
|
51
13
|
[address: string]: Token;
|
|
@@ -43,7 +43,7 @@ export declare function getCappedPoolPnl(p: {
|
|
|
43
43
|
isLong: boolean;
|
|
44
44
|
}): bigint;
|
|
45
45
|
export declare function getMaxLeverageByMinCollateralFactor(minCollateralFactor: bigint | undefined): number;
|
|
46
|
-
export declare function getMaxAllowedLeverageByMinCollateralFactor(minCollateralFactor: bigint | undefined): number;
|
|
46
|
+
export declare function getMaxAllowedLeverageByMinCollateralFactor(minCollateralFactor: bigint | undefined, marketAddress: string | undefined): number;
|
|
47
47
|
export declare function getOppositeCollateral(marketInfo: MarketInfo, tokenAddress: string): import("../tokens").TokenData | undefined;
|
|
48
48
|
export declare function getOppositeCollateralFromConfig(marketConfig: ConfigMarketConfig, tokenAddress: string): string;
|
|
49
49
|
export declare function getAvailableUsdLiquidityForCollateral(marketInfo: MarketInfo, isLong: boolean): bigint;
|
|
@@ -3,6 +3,9 @@ import { PrivateKeySigner } from "../signer";
|
|
|
3
3
|
export type GeneratedSubaccount = {
|
|
4
4
|
address: string;
|
|
5
5
|
signer: PrivateKeySigner;
|
|
6
|
+
/** AES-encrypted private key (encrypted with main account address) */
|
|
6
7
|
privateKey: string;
|
|
7
8
|
};
|
|
8
9
|
export declare function generateSubaccount(mainSigner: IAbstractSigner): Promise<GeneratedSubaccount>;
|
|
10
|
+
export declare function decryptSubaccountPrivateKey(encryptedPrivateKey: string, mainAccountAddress: string): `0x${string}`;
|
|
11
|
+
export declare function createSubaccountSignerFromConfig(encryptedPrivateKey: string, mainAccountAddress: string): PrivateKeySigner;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from "./types";
|
|
2
|
-
export { generateSubaccount, type GeneratedSubaccount } from "./generateSubaccount";
|
|
2
|
+
export { generateSubaccount, decryptSubaccountPrivateKey, createSubaccountSignerFromConfig, type GeneratedSubaccount, } from "./generateSubaccount";
|
|
3
3
|
export { hashSubaccountApproval } from "./hashSubaccountApproval";
|
|
4
4
|
export { getEmptySubaccountApproval } from "./getEmptySubaccountApproval";
|
|
5
5
|
export { getSubaccountApprovalTypedData, type SubaccountApprovalTypedData, } from "./getSubaccountApprovalTypedData";
|
|
@@ -28,6 +28,8 @@ export type Token = {
|
|
|
28
28
|
reservesUrl?: string;
|
|
29
29
|
imageUrl?: string;
|
|
30
30
|
categories?: TokenCategory[];
|
|
31
|
+
/** Extra search terms (e.g. Chainlink ticker aliases) not shown in `name` / `symbol`. */
|
|
32
|
+
searchAliases?: string[];
|
|
31
33
|
isPermitSupported?: boolean;
|
|
32
34
|
isPermitDisabled?: boolean;
|
|
33
35
|
contractVersion?: string;
|