lynx-client 0.0.11 → 0.0.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/README.md +192 -2
- package/dist/cjs/index.js +9 -1
- package/dist/cjs/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +1 -0
- package/dist/cjs/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.js +158 -25
- package/dist/cjs/lib/contractsIntegration/OrderBookService/OrderBookService.js +14 -2
- package/dist/cjs/lib/contractsIntegration/PNLRService/PNLRService.js +10 -10
- package/dist/cjs/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +26 -14
- package/dist/cjs/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +72 -15
- package/dist/cjs/lib/contractsIntegration/TriggersService/TriggersService.js +14 -8
- package/dist/cjs/lib/contractsIntegration/common/ILynxVersionedContract.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/IPendableAdmin.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/IPendableImplementation.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/IProtocolConstants.js +2 -0
- package/dist/cjs/lib/contractsIntegration/common/index.js +2 -0
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -28
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.js +207 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1 -28
- package/dist/cjs/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/cjs/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +1 -1
- package/dist/esm/index.d.ts +9 -1
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +9 -1
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +2 -3
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.js +1 -0
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts +52 -6
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts +17 -20
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.js +158 -25
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.d.ts +1 -1
- package/dist/esm/lib/contractsIntegration/OnBehalfTradingService/index.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +6 -10
- package/dist/esm/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +5 -2
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/OrderBookService/OrderBookService.js +14 -2
- package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +4 -12
- package/dist/esm/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts +4 -3
- package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/PNLRService/PNLRService.js +10 -10
- package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts +1 -1
- package/dist/esm/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +2 -4
- package/dist/esm/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +8 -13
- package/dist/esm/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +5 -2
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.js +26 -14
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +31 -13
- package/dist/esm/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +14 -87
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TradingFloorService/TradingFloorService.js +72 -15
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +6 -9
- package/dist/esm/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts +4 -2
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -1
- package/dist/esm/lib/contractsIntegration/TriggersService/TriggersService.js +14 -8
- package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.d.ts +11 -0
- package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/ILynxVersionedContract.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.d.ts +9 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableAdmin.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.d.ts +9 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/IPendableImplementation.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.d.ts +32 -0
- package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/IProtocolConstants.js +2 -0
- package/dist/esm/lib/contractsIntegration/common/index.d.ts +5 -0
- package/dist/esm/lib/contractsIntegration/common/index.d.ts.map +1 -0
- package/dist/esm/lib/contractsIntegration/common/index.js +2 -0
- package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts +151 -1
- package/dist/esm/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -21
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.js +1 -28
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts +157 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.js +207 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1 -21
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.js +1 -28
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.js +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +1 -1
- package/dist/esm/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.js +1 -1
- package/dist/types/index.d.ts +9 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts +2 -3
- package/dist/types/lib/contractsIntegration/LexPoolV1Service/ILexPoolV1Service.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/LexPoolV1Service/LexPoolV1Service.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts +52 -6
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/IOnBehalfTradingService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts +17 -20
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/OnBehalfTradingService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/index.d.ts +1 -1
- package/dist/types/lib/contractsIntegration/OnBehalfTradingService/index.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts +6 -10
- package/dist/types/lib/contractsIntegration/OrderBookService/IOrderBookService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts +5 -2
- package/dist/types/lib/contractsIntegration/OrderBookService/OrderBookService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts +4 -12
- package/dist/types/lib/contractsIntegration/PNLRService/IPNLRService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts +4 -3
- package/dist/types/lib/contractsIntegration/PNLRService/PNLRService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts +1 -1
- package/dist/types/lib/contractsIntegration/PNLRService/index.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts +2 -4
- package/dist/types/lib/contractsIntegration/PoolAccountantV1Service/IPoolAccountantV1Service.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts +8 -13
- package/dist/types/lib/contractsIntegration/TradersPortalService/ITradersPortalService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts +5 -2
- package/dist/types/lib/contractsIntegration/TradersPortalService/TradersPortalServiceService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts +31 -13
- package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts +14 -87
- package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts +6 -9
- package/dist/types/lib/contractsIntegration/TriggersService/ITriggersService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts +4 -2
- package/dist/types/lib/contractsIntegration/TriggersService/TriggersService.d.ts.map +1 -1
- package/dist/types/lib/contractsIntegration/common/ILynxVersionedContract.d.ts +11 -0
- package/dist/types/lib/contractsIntegration/common/ILynxVersionedContract.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/IPendableAdmin.d.ts +9 -0
- package/dist/types/lib/contractsIntegration/common/IPendableAdmin.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/IPendableImplementation.d.ts +9 -0
- package/dist/types/lib/contractsIntegration/common/IPendableImplementation.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/IProtocolConstants.d.ts +32 -0
- package/dist/types/lib/contractsIntegration/common/IProtocolConstants.d.ts.map +1 -0
- package/dist/types/lib/contractsIntegration/common/index.d.ts +5 -0
- package/dist/types/lib/contractsIntegration/common/index.d.ts.map +1 -0
- package/dist/types/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts +151 -1
- package/dist/types/lib/typechain/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/ChipsIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/LiquidityIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/IntentsVerifier/TradeIntentsVerifierV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts +1 -21
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/LexPool/LexPoolV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PNLR/PNLR__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Lex/PoolAccountant/PoolAccountantV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts +157 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/OnBehalfTrading/OnBehalfTradingV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/OrderBook/OrderBookV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Registry/RegistryV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradersPortal/TradersPortalV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts +1 -21
- package/dist/types/lib/typechain/factories/contracts/Lynx/TradingFloor/TradingFloorV1__factory.d.ts.map +1 -1
- package/dist/types/lib/typechain/factories/contracts/Lynx/Triggers/TriggersV1__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/LexLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TradingFloorLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/Lens/TriggersAndPortalLens__factory.d.ts +1 -1
- package/dist/types/lib/typechain/factories/contracts/Peripheral/TokensDistribution/SinglePhaseSingleTokenDistributor/SinglePhaseSingleTokenDistributor__factory.d.ts +1 -1
- package/package.json +4 -4
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { BytesLike } from "ethers";
|
|
2
2
|
import { TradingFloorStructsV1 } from "../../typechain/contracts/Lynx/TradingFloor/TradingFloorV1";
|
|
3
3
|
import { TSafeBigNumberStruct } from "../../utils/ethersTypes";
|
|
4
|
+
import { ILynxVersionedContract, IPendableAdmin, IPendableImplementation, IProtocolConstants } from "../common";
|
|
4
5
|
type PositionRequestIdentifierStruct = TradingFloorStructsV1.PositionRequestIdentifiersStruct;
|
|
5
6
|
type PositionRequestParamsStruct = TradingFloorStructsV1.PositionRequestParamsStruct;
|
|
6
7
|
export type TPositionRequestIdentifierStruct = TSafeBigNumberStruct<PositionRequestIdentifierStruct>;
|
|
7
8
|
export type TPositionRequestParamsStruct = TSafeBigNumberStruct<PositionRequestParamsStruct>;
|
|
8
|
-
export interface
|
|
9
|
+
export interface ITradingFloorFunctionsGroup_PositionQueries {
|
|
9
10
|
generatePositionHashId(settlementAsset: string, trader: string, pairId: bigint, index: bigint): Promise<string>;
|
|
10
11
|
getPositionPortalInfo(positionId: BytesLike): Promise<{
|
|
11
12
|
phase: bigint;
|
|
@@ -54,9 +55,13 @@ export interface ITradingFloorService {
|
|
|
54
55
|
slByFraction: bigint;
|
|
55
56
|
}>;
|
|
56
57
|
initialCollateralByPositionId(positionId: BytesLike): Promise<bigint>;
|
|
58
|
+
}
|
|
59
|
+
export interface ITradingFloorFunctionsGroup_SettlementAndPool {
|
|
57
60
|
isSettlementAssetSupported(settlementAsset: string): Promise<boolean>;
|
|
58
61
|
lexPoolForAsset(asset: string): Promise<string>;
|
|
59
62
|
poolAccountantForAsset(asset: string): Promise<string>;
|
|
63
|
+
}
|
|
64
|
+
export interface ITradingFloorFunctionsGroup_Deprecated {
|
|
60
65
|
deprecated_pairTraders(asset: string, pairId: bigint, index: bigint): Promise<string>;
|
|
61
66
|
deprecated_pairTradersArray(asset: string, pairIndex: bigint): Promise<string[]>;
|
|
62
67
|
deprecated_pairTradersInfo(asset: string, trader: string, pairId: bigint): Promise<{
|
|
@@ -64,6 +69,8 @@ export interface ITradingFloorService {
|
|
|
64
69
|
positionInArray: bigint;
|
|
65
70
|
}>;
|
|
66
71
|
pausedPairs(pairId: bigint): Promise<boolean>;
|
|
72
|
+
}
|
|
73
|
+
export interface ITradingFloorFunctionsGroup_TraderTracking {
|
|
67
74
|
traders(index: bigint): Promise<string>;
|
|
68
75
|
tradersAmount(): Promise<bigint>;
|
|
69
76
|
tradersIndex(trader: string): Promise<bigint>;
|
|
@@ -73,24 +80,35 @@ export interface ITradingFloorService {
|
|
|
73
80
|
getActivePositionIdsForTrader(trader: string): Promise<string[]>;
|
|
74
81
|
getNextPositionIndexForTrader(trader: string): Promise<bigint>;
|
|
75
82
|
pairTradersLastUsedPositionIndex(trader: string): Promise<bigint>;
|
|
83
|
+
}
|
|
84
|
+
export interface ITradingFloorFunctionsGroup_TradingParameters {
|
|
76
85
|
maxSanityProfitF(): Promise<bigint>;
|
|
77
86
|
maxSlF(): Promise<bigint>;
|
|
78
87
|
maxTradesPerTrader(): Promise<bigint>;
|
|
88
|
+
}
|
|
89
|
+
export interface ITradingFloorFunctionsGroup_Fees {
|
|
79
90
|
feesMap(asset: string, feeType: bigint): Promise<bigint>;
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
implementation(): Promise<string>;
|
|
83
|
-
pendingImplementation(): Promise<string>;
|
|
91
|
+
}
|
|
92
|
+
export interface ITradingFloorFunctionsGroup_ContractReferences {
|
|
84
93
|
registry(): Promise<string>;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
CONTRACT_VERSION(): Promise<string>;
|
|
89
|
-
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
90
|
-
FRACTION_SCALE(): Promise<bigint>;
|
|
91
|
-
LEVERAGE_SCALE(): Promise<bigint>;
|
|
94
|
+
}
|
|
95
|
+
export type ITradingFloorFunctionsGroup_LynxVersionedContract = ILynxVersionedContract;
|
|
96
|
+
export interface ITradingFloorFunctionsGroup_Constants extends IProtocolConstants {
|
|
92
97
|
MAX_FEE_FRACTION_FOR_CANCEL(): Promise<bigint>;
|
|
93
|
-
|
|
98
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
99
|
+
}
|
|
100
|
+
export interface ITradingFloorService {
|
|
101
|
+
positionQueries: ITradingFloorFunctionsGroup_PositionQueries;
|
|
102
|
+
settlementAndPool: ITradingFloorFunctionsGroup_SettlementAndPool;
|
|
103
|
+
deprecated: ITradingFloorFunctionsGroup_Deprecated;
|
|
104
|
+
traderTracking: ITradingFloorFunctionsGroup_TraderTracking;
|
|
105
|
+
tradingParameters: ITradingFloorFunctionsGroup_TradingParameters;
|
|
106
|
+
fees: ITradingFloorFunctionsGroup_Fees;
|
|
107
|
+
contractReferences: ITradingFloorFunctionsGroup_ContractReferences;
|
|
108
|
+
pendableAdmin: IPendableAdmin;
|
|
109
|
+
pendableImplementation: IPendableImplementation;
|
|
110
|
+
lynxVersionedContract: ILynxVersionedContract;
|
|
111
|
+
constants: ITradingFloorFunctionsGroup_Constants;
|
|
94
112
|
}
|
|
95
113
|
export {};
|
|
96
114
|
//# sourceMappingURL=ITradingFloorService.d.ts.map
|
package/dist/types/lib/contractsIntegration/TradingFloorService/ITradingFloorService.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITradingFloorService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorService/ITradingFloorService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,QAAQ,
|
|
1
|
+
{"version":3,"file":"ITradingFloorService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorService/ITradingFloorService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,QAAQ,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,4DAA4D,CAAA;AAClG,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAA;AAE9D,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,uBAAuB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAA;AAE/G,KAAK,+BAA+B,GAClC,qBAAqB,CAAC,gCAAgC,CAAA;AACxD,KAAK,2BAA2B,GAC9B,qBAAqB,CAAC,2BAA2B,CAAA;AAEnD,MAAM,MAAM,gCAAgC,GAC1C,oBAAoB,CAAC,+BAA+B,CAAC,CAAA;AACvD,MAAM,MAAM,4BAA4B,GACtC,oBAAoB,CAAC,2BAA2B,CAAC,CAAA;AAEnD,MAAM,WAAW,2CAA2C;IAC1D,sBAAsB,CACpB,eAAe,EAAE,MAAM,EACvB,MAAM,EAAE,MAAM,EACd,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC,MAAM,CAAC,CAAA;IAElB,qBAAqB,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC;QACpD,KAAK,EAAE,MAAM,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;QACjB,MAAM,EAAE,MAAM,CAAA;KACf,CAAC,CAAA;IAEF,6BAA6B,CAAC,UAAU,EAAE,SAAS,GAAG,OAAO,CAAC;QAC5D,UAAU,EAAE,MAAM,CAAA;QAClB,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,EAAE,OAAO,CAAA;QACb,SAAS,EAAE,MAAM,CAAA;QACjB,EAAE,EAAE,MAAM,CAAA;KACX,CAAC,CAAA;IA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|
-
import {
|
|
2
|
-
import { ITradingFloorService } from "./ITradingFloorService";
|
|
1
|
+
import { Signer, Provider } from "ethers";
|
|
2
|
+
import { ITradingFloorService, ITradingFloorFunctionsGroup_PositionQueries, ITradingFloorFunctionsGroup_SettlementAndPool, ITradingFloorFunctionsGroup_Deprecated, ITradingFloorFunctionsGroup_TraderTracking, ITradingFloorFunctionsGroup_TradingParameters, ITradingFloorFunctionsGroup_Fees, ITradingFloorFunctionsGroup_ContractReferences, ITradingFloorFunctionsGroup_Constants } from "./ITradingFloorService";
|
|
3
|
+
import { ILynxVersionedContract, IPendableAdmin, IPendableImplementation } from "../common";
|
|
3
4
|
export declare class TradingFloorService implements ITradingFloorService {
|
|
4
5
|
private signerOrProvider;
|
|
5
6
|
private tradingFloorContract;
|
|
7
|
+
positionQueries: ITradingFloorFunctionsGroup_PositionQueries;
|
|
8
|
+
settlementAndPool: ITradingFloorFunctionsGroup_SettlementAndPool;
|
|
9
|
+
deprecated: ITradingFloorFunctionsGroup_Deprecated;
|
|
10
|
+
traderTracking: ITradingFloorFunctionsGroup_TraderTracking;
|
|
11
|
+
tradingParameters: ITradingFloorFunctionsGroup_TradingParameters;
|
|
12
|
+
fees: ITradingFloorFunctionsGroup_Fees;
|
|
13
|
+
contractReferences: ITradingFloorFunctionsGroup_ContractReferences;
|
|
14
|
+
pendableAdmin: IPendableAdmin;
|
|
15
|
+
pendableImplementation: IPendableImplementation;
|
|
16
|
+
lynxVersionedContract: ILynxVersionedContract;
|
|
17
|
+
constants: ITradingFloorFunctionsGroup_Constants;
|
|
6
18
|
constructor(address: string, signerOrProvider: Signer | Provider);
|
|
7
|
-
generatePositionHashId(settlementAsset: string, trader: string, pairId: bigint, index: bigint): Promise<string>;
|
|
8
|
-
getPositionPortalInfo(positionId: BytesLike): Promise<{
|
|
9
|
-
phase: bigint;
|
|
10
|
-
timestamp: bigint;
|
|
11
|
-
trader: string;
|
|
12
|
-
}>;
|
|
13
|
-
getPositionRegistrationParams(positionId: BytesLike): Promise<{
|
|
14
|
-
collateral: bigint;
|
|
15
|
-
leverage: bigint;
|
|
16
|
-
long: boolean;
|
|
17
|
-
openPrice: bigint;
|
|
18
|
-
tp: bigint;
|
|
19
|
-
}>;
|
|
20
|
-
getPositionTriggerInfo(positionId: BytesLike): Promise<{
|
|
21
|
-
phase: bigint;
|
|
22
|
-
timestamp: bigint;
|
|
23
|
-
pairId: bigint;
|
|
24
|
-
long: boolean;
|
|
25
|
-
spreadReductionF: bigint;
|
|
26
|
-
}>;
|
|
27
|
-
positionIdentifiersById(positionId: BytesLike): Promise<{
|
|
28
|
-
settlementAsset: string;
|
|
29
|
-
pairId: bigint;
|
|
30
|
-
index: bigint;
|
|
31
|
-
trader: string;
|
|
32
|
-
}>;
|
|
33
|
-
positionLimitsInfoById(positionId: BytesLike): Promise<{
|
|
34
|
-
tpLastUpdated: bigint;
|
|
35
|
-
slLastUpdated: bigint;
|
|
36
|
-
tp: bigint;
|
|
37
|
-
sl: bigint;
|
|
38
|
-
}>;
|
|
39
|
-
positionsById(positionId: BytesLike): Promise<{
|
|
40
|
-
collateral: bigint;
|
|
41
|
-
phase: bigint;
|
|
42
|
-
inPhaseSince: bigint;
|
|
43
|
-
leverage: bigint;
|
|
44
|
-
long: boolean;
|
|
45
|
-
openPrice: bigint;
|
|
46
|
-
spreadReductionF: bigint;
|
|
47
|
-
}>;
|
|
48
|
-
triggerPricesById(positionId: BytesLike): Promise<{
|
|
49
|
-
minPrice: bigint;
|
|
50
|
-
maxPrice: bigint;
|
|
51
|
-
tpByFraction: bigint;
|
|
52
|
-
slByFraction: bigint;
|
|
53
|
-
}>;
|
|
54
|
-
initialCollateralByPositionId(positionId: BytesLike): Promise<bigint>;
|
|
55
|
-
isSettlementAssetSupported(settlementAsset: string): Promise<boolean>;
|
|
56
|
-
lexPoolForAsset(asset: string): Promise<string>;
|
|
57
|
-
poolAccountantForAsset(asset: string): Promise<string>;
|
|
58
|
-
deprecated_pairTraders(asset: string, pairId: bigint, index: bigint): Promise<string>;
|
|
59
|
-
deprecated_pairTradersArray(asset: string, pairIndex: bigint): Promise<string[]>;
|
|
60
|
-
deprecated_pairTradersInfo(asset: string, trader: string, pairId: bigint): Promise<{
|
|
61
|
-
positionsCounter: bigint;
|
|
62
|
-
positionInArray: bigint;
|
|
63
|
-
}>;
|
|
64
|
-
pausedPairs(pairId: bigint): Promise<boolean>;
|
|
65
|
-
traders(index: bigint): Promise<string>;
|
|
66
|
-
tradersAmount(): Promise<bigint>;
|
|
67
|
-
tradersIndex(trader: string): Promise<bigint>;
|
|
68
|
-
getActivePositionsAmountForTrader(trader: string): Promise<bigint>;
|
|
69
|
-
activePositionIdsByTrader(trader: string, index: bigint): Promise<string>;
|
|
70
|
-
positionIdToActivePositionIndex(trader: string, positionId: string): Promise<bigint>;
|
|
71
|
-
getActivePositionIdsForTrader(trader: string): Promise<string[]>;
|
|
72
|
-
getNextPositionIndexForTrader(trader: string): Promise<bigint>;
|
|
73
|
-
pairTradersLastUsedPositionIndex(trader: string): Promise<bigint>;
|
|
74
|
-
maxSanityProfitF(): Promise<bigint>;
|
|
75
|
-
maxSlF(): Promise<bigint>;
|
|
76
|
-
maxTradesPerTrader(): Promise<bigint>;
|
|
77
|
-
feesMap(asset: string, feeType: bigint): Promise<bigint>;
|
|
78
|
-
admin(): Promise<string>;
|
|
79
|
-
pendingAdmin(): Promise<string>;
|
|
80
|
-
implementation(): Promise<string>;
|
|
81
|
-
pendingImplementation(): Promise<string>;
|
|
82
|
-
registry(): Promise<string>;
|
|
83
|
-
getContractName(): Promise<string>;
|
|
84
|
-
getContractVersion(): Promise<string>;
|
|
85
|
-
CONTRACT_NAME(): Promise<string>;
|
|
86
|
-
CONTRACT_VERSION(): Promise<string>;
|
|
87
|
-
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
88
|
-
FRACTION_SCALE(): Promise<bigint>;
|
|
89
|
-
LEVERAGE_SCALE(): Promise<bigint>;
|
|
90
|
-
MAX_FEE_FRACTION_FOR_CANCEL(): Promise<bigint>;
|
|
91
|
-
PRECISION(): Promise<bigint>;
|
|
92
19
|
}
|
|
93
20
|
//# sourceMappingURL=TradingFloorService.d.ts.map
|
package/dist/types/lib/contractsIntegration/TradingFloorService/TradingFloorService.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TradingFloorService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorService/TradingFloorService.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"TradingFloorService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TradingFloorService/TradingFloorService.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAA;AAIf,OAAO,EACL,oBAAoB,EACpB,2CAA2C,EAC3C,6CAA6C,EAC7C,sCAAsC,EACtC,0CAA0C,EAC1C,6CAA6C,EAC7C,gCAAgC,EAChC,8CAA8C,EAC9C,qCAAqC,EAGtC,MAAM,wBAAwB,CAAA;AAC/B,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,uBAAuB,EAAE,MAAM,WAAW,CAAA;AA4V3F,qBAAa,mBAAoB,YAAW,oBAAoB;IAiB5D,OAAO,CAAC,gBAAgB;IAhB1B,OAAO,CAAC,oBAAoB,CAAgB;IAErC,eAAe,EAAE,2CAA2C,CAAA;IAC5D,iBAAiB,EAAE,6CAA6C,CAAA;IAChE,UAAU,EAAE,sCAAsC,CAAA;IAClD,cAAc,EAAE,0CAA0C,CAAA;IAC1D,iBAAiB,EAAE,6CAA6C,CAAA;IAChE,IAAI,EAAE,gCAAgC,CAAA;IACtC,kBAAkB,EAAE,8CAA8C,CAAA;IAClE,aAAa,EAAE,cAAc,CAAA;IAC7B,sBAAsB,EAAE,uBAAuB,CAAA;IAC/C,qBAAqB,EAAE,sBAAsB,CAAA;IAC7C,SAAS,EAAE,qCAAqC,CAAA;gBAGrD,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAmB9C"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { BytesLike, ContractTransactionResponse } from "ethers";
|
|
2
|
+
import { IPendableAdmin, IProtocolConstants } from "../common";
|
|
2
3
|
export interface ITriggersFunctionsGroup_OpenTriggers {
|
|
3
4
|
market(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
4
5
|
limit(positionId: BytesLike, pricePayload: BytesLike[], nativeFee: bigint): Promise<ContractTransactionResponse>;
|
|
@@ -19,9 +20,7 @@ export interface ITriggersFunctionsGroup_TimeoutTriggers {
|
|
|
19
20
|
marketClose(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
20
21
|
updatePosition(positionId: BytesLike): Promise<ContractTransactionResponse>;
|
|
21
22
|
}
|
|
22
|
-
export interface
|
|
23
|
-
admin(): Promise<string>;
|
|
24
|
-
pendingAdmin(): Promise<string>;
|
|
23
|
+
export interface ITriggersFunctionsGroup_ContractReferences {
|
|
25
24
|
orderBook(): Promise<string>;
|
|
26
25
|
tradingFloor(): Promise<string>;
|
|
27
26
|
priceValidator(): Promise<string>;
|
|
@@ -50,20 +49,18 @@ export interface ITriggersFunctionsGroup_Permissions {
|
|
|
50
49
|
isAllowedToTrigger(account: string): Promise<boolean>;
|
|
51
50
|
getAllTriggerPermissionedAccounts(): Promise<string[]>;
|
|
52
51
|
}
|
|
53
|
-
export interface ITriggersFunctionsGroup_Constants {
|
|
54
|
-
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
55
|
-
FRACTION_SCALE(): Promise<bigint>;
|
|
56
|
-
LEVERAGE_SCALE(): Promise<bigint>;
|
|
52
|
+
export interface ITriggersFunctionsGroup_Constants extends IProtocolConstants {
|
|
57
53
|
MAX_ALLOWED_CONFIDENCE_FRACTION(): Promise<bigint>;
|
|
58
54
|
MAX_ALLOWED_SPREAD_FRACTION(): Promise<bigint>;
|
|
59
|
-
|
|
55
|
+
ACCURACY_IMPROVEMENT_SCALE(): Promise<bigint>;
|
|
60
56
|
}
|
|
61
57
|
export interface ITriggersService {
|
|
62
58
|
openTriggers: ITriggersFunctionsGroup_OpenTriggers;
|
|
63
59
|
closeTriggers: ITriggersFunctionsGroup_CloseTriggers;
|
|
64
60
|
updateTriggers: ITriggersFunctionsGroup_UpdateTriggers;
|
|
65
61
|
timeoutTriggers: ITriggersFunctionsGroup_TimeoutTriggers;
|
|
66
|
-
|
|
62
|
+
contractReferences: ITriggersFunctionsGroup_ContractReferences;
|
|
63
|
+
pendableAdmin: IPendableAdmin;
|
|
67
64
|
status: ITriggersFunctionsGroup_Status;
|
|
68
65
|
configuration: ITriggersFunctionsGroup_Configuration;
|
|
69
66
|
pairConfiguration: ITriggersFunctionsGroup_PairConfiguration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ITriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/ITriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"ITriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/ITriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,2BAA2B,EAAE,MAAM,QAAQ,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAE/D,MAAM,WAAW,oCAAoC;IACnD,MAAM,CACJ,UAAU,EAAE,SAAS,EACrB,YAAY,EAAE,SAAS,EAAE,EACzB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,2BAA2B,CAAC,CAAC;IAExC,KAAK,CACH,UAAU,EAAE,SAAS,EACrB,YAAY,EAAE,SAAS,EAAE,EACzB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC,2BAA2B,CA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CAAkC,SAAQ,kBAAkB;IAE3E,+BAA+B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IACnD,2BAA2B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;IAG/C,0BAA0B,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CAC/C;AAED,MAAM,WAAW,gBAAgB;IAC/B,YAAY,EAAE,oCAAoC,CAAC;IACnD,aAAa,EAAE,qCAAqC,CAAC;IACrD,cAAc,EAAE,sCAAsC,CAAC;IACvD,eAAe,EAAE,uCAAuC,CAAC;IACzD,kBAAkB,EAAE,0CAA0C,CAAC;IAC/D,aAAa,EAAE,cAAc,CAAC;IAC9B,MAAM,EAAE,8BAA8B,CAAC;IACvC,aAAa,EAAE,qCAAqC,CAAC;IACrD,iBAAiB,EAAE,yCAAyC,CAAC;IAC7D,WAAW,EAAE,mCAAmC,CAAC;IACjD,SAAS,EAAE,iCAAiC,CAAC;CAC9C"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Signer, Provider } from "ethers";
|
|
2
|
-
import { ITriggersService, ITriggersFunctionsGroup_OpenTriggers, ITriggersFunctionsGroup_CloseTriggers, ITriggersFunctionsGroup_UpdateTriggers, ITriggersFunctionsGroup_TimeoutTriggers,
|
|
2
|
+
import { ITriggersService, ITriggersFunctionsGroup_OpenTriggers, ITriggersFunctionsGroup_CloseTriggers, ITriggersFunctionsGroup_UpdateTriggers, ITriggersFunctionsGroup_TimeoutTriggers, ITriggersFunctionsGroup_ContractReferences, ITriggersFunctionsGroup_Status, ITriggersFunctionsGroup_Configuration, ITriggersFunctionsGroup_PairConfiguration, ITriggersFunctionsGroup_Permissions, ITriggersFunctionsGroup_Constants } from "./ITriggersService";
|
|
3
|
+
import { IPendableAdmin } from "../common";
|
|
3
4
|
export declare class TriggersService implements ITriggersService {
|
|
4
5
|
private signerOrProvider;
|
|
5
6
|
private triggersContract;
|
|
@@ -7,7 +8,8 @@ export declare class TriggersService implements ITriggersService {
|
|
|
7
8
|
readonly closeTriggers: ITriggersFunctionsGroup_CloseTriggers;
|
|
8
9
|
readonly updateTriggers: ITriggersFunctionsGroup_UpdateTriggers;
|
|
9
10
|
readonly timeoutTriggers: ITriggersFunctionsGroup_TimeoutTriggers;
|
|
10
|
-
readonly
|
|
11
|
+
readonly contractReferences: ITriggersFunctionsGroup_ContractReferences;
|
|
12
|
+
readonly pendableAdmin: IPendableAdmin;
|
|
11
13
|
readonly status: ITriggersFunctionsGroup_Status;
|
|
12
14
|
readonly configuration: ITriggersFunctionsGroup_Configuration;
|
|
13
15
|
readonly pairConfiguration: ITriggersFunctionsGroup_PairConfiguration;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/TriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAC;AAIhB,OAAO,EACL,gBAAgB,EAChB,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,EACvC,
|
|
1
|
+
{"version":3,"file":"TriggersService.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/TriggersService/TriggersService.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,MAAM,EACN,QAAQ,EAET,MAAM,QAAQ,CAAC;AAIhB,OAAO,EACL,gBAAgB,EAChB,oCAAoC,EACpC,qCAAqC,EACrC,sCAAsC,EACtC,uCAAuC,EACvC,0CAA0C,EAC1C,8BAA8B,EAC9B,qCAAqC,EACrC,yCAAyC,EACzC,mCAAmC,EACnC,iCAAiC,EAClC,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAwR3C,qBAAa,eAAgB,YAAW,gBAAgB;IAgBpD,OAAO,CAAC,gBAAgB;IAf1B,OAAO,CAAC,gBAAgB,CAAa;IACrC,SAAgB,YAAY,EAAE,oCAAoC,CAAC;IACnE,SAAgB,aAAa,EAAE,qCAAqC,CAAC;IACrE,SAAgB,cAAc,EAAE,sCAAsC,CAAC;IACvE,SAAgB,eAAe,EAAE,uCAAuC,CAAC;IACzE,SAAgB,kBAAkB,EAAE,0CAA0C,CAAC;IAC/E,SAAgB,aAAa,EAAE,cAAc,CAAC;IAC9C,SAAgB,MAAM,EAAE,8BAA8B,CAAC;IACvD,SAAgB,aAAa,EAAE,qCAAqC,CAAC;IACrE,SAAgB,iBAAiB,EAAE,yCAAyC,CAAC;IAC7E,SAAgB,WAAW,EAAE,mCAAmC,CAAC;IACjE,SAAgB,SAAS,EAAE,iCAAiC,CAAC;gBAG3D,OAAO,EAAE,MAAM,EACP,gBAAgB,EAAE,MAAM,GAAG,QAAQ;CAmB9C"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common interface for Lynx versioned contracts
|
|
3
|
+
* All Lynx contracts implement these versioning methods
|
|
4
|
+
*/
|
|
5
|
+
export interface ILynxVersionedContract {
|
|
6
|
+
getContractName(): Promise<string>;
|
|
7
|
+
getContractVersion(): Promise<string>;
|
|
8
|
+
CONTRACT_NAME(): Promise<string>;
|
|
9
|
+
CONTRACT_VERSION(): Promise<string>;
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=ILynxVersionedContract.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ILynxVersionedContract.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/ILynxVersionedContract.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAClC,kBAAkB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACrC,aAAa,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAChC,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACpC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common interface for contracts with pendable admin pattern
|
|
3
|
+
* Allows for two-step admin transfer process
|
|
4
|
+
*/
|
|
5
|
+
export interface IPendableAdmin {
|
|
6
|
+
admin(): Promise<string>;
|
|
7
|
+
pendingAdmin(): Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=IPendableAdmin.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPendableAdmin.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/IPendableAdmin.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,KAAK,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACxB,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CAChC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common interface for upgradeable contracts with pendable implementation pattern
|
|
3
|
+
* Allows for two-step implementation upgrade process
|
|
4
|
+
*/
|
|
5
|
+
export interface IPendableImplementation {
|
|
6
|
+
implementation(): Promise<string>;
|
|
7
|
+
pendingImplementation(): Promise<string>;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=IPendableImplementation.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IPendableImplementation.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/IPendableImplementation.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,uBAAuB;IACtC,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IACjC,qBAAqB,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACzC"}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Common interface for protocol-wide constants used across multiple contracts
|
|
3
|
+
* These constants define the scaling factors and precision levels used throughout the Lynx protocol
|
|
4
|
+
*/
|
|
5
|
+
export interface IProtocolConstants {
|
|
6
|
+
/**
|
|
7
|
+
* Scale factor for fraction calculations (typically 100,000 for 5 decimal precision)
|
|
8
|
+
* Used for percentage-based calculations like fees, rates, etc.
|
|
9
|
+
*/
|
|
10
|
+
FRACTION_SCALE(): Promise<bigint>;
|
|
11
|
+
/**
|
|
12
|
+
* General precision constant used for various calculations
|
|
13
|
+
* The specific value and usage may vary by contract
|
|
14
|
+
*/
|
|
15
|
+
PRECISION(): Promise<bigint>;
|
|
16
|
+
/**
|
|
17
|
+
* Scale factor for leverage values (typically 100)
|
|
18
|
+
* Leverage of 25x is stored as 2500
|
|
19
|
+
*/
|
|
20
|
+
LEVERAGE_SCALE(): Promise<bigint>;
|
|
21
|
+
/**
|
|
22
|
+
* Optional: Scale factor for improved calculation accuracy
|
|
23
|
+
* Not all contracts implement this
|
|
24
|
+
*/
|
|
25
|
+
ACCURACY_IMPROVEMENT_SCALE?(): Promise<bigint>;
|
|
26
|
+
/**
|
|
27
|
+
* Optional: Unit scale specific to the contract
|
|
28
|
+
* Used in contracts like LexPool for internal calculations
|
|
29
|
+
*/
|
|
30
|
+
SELF_UNIT_SCALE?(): Promise<bigint>;
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=IProtocolConstants.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IProtocolConstants.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/IProtocolConstants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAEjC;;;OAGG;IACH,SAAS,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE5B;;;OAGG;IACH,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAEjC;;;OAGG;IACH,0BAA0B,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;IAE9C;;;OAGG;IACH,eAAe,CAAC,IAAI,OAAO,CAAC,MAAM,CAAC,CAAA;CACpC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type { ILynxVersionedContract } from "./ILynxVersionedContract";
|
|
2
|
+
export type { IPendableAdmin } from "./IPendableAdmin";
|
|
3
|
+
export type { IPendableImplementation } from "./IPendableImplementation";
|
|
4
|
+
export type { IProtocolConstants } from "./IProtocolConstants";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../lib/contractsIntegration/common/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAA;AACtE,YAAY,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAA;AACtD,YAAY,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACxE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAA"}
|