@megatao/sdk 1.1.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/.env.example +37 -0
- package/CHANGELOG.md +19 -0
- package/README.md +199 -0
- package/bin/alf +4 -0
- package/cli/README.md +198 -0
- package/cli/TEST_MANUAL.md +577 -0
- package/cli/commands/account.ts +545 -0
- package/cli/commands/funding.ts +481 -0
- package/cli/commands/liquidation.ts +523 -0
- package/cli/commands/market.ts +590 -0
- package/cli/commands/orders.ts +395 -0
- package/cli/commands/position.ts +1085 -0
- package/cli/commands/shared/positionUtils.ts +239 -0
- package/cli/commands/trading.ts +483 -0
- package/cli/commands/utils.ts +281 -0
- package/cli/commands/vault.ts +522 -0
- package/cli/index.ts +169 -0
- package/cli/interactive.ts +530 -0
- package/cli/utils/client.ts +457 -0
- package/cli/utils/config.ts +226 -0
- package/cli/utils/display.ts +258 -0
- package/cli/utils/index.ts +10 -0
- package/cli/utils/prompts.ts +364 -0
- package/config.example.json +23 -0
- package/dist/AlphaFuturesClient.d.ts +36 -0
- package/dist/AlphaFuturesClient.d.ts.map +1 -0
- package/dist/AlphaFuturesClient.js +116 -0
- package/dist/AlphaFuturesClient.js.map +1 -0
- package/dist/abi/Alpha.json +5987 -0
- package/dist/abi/abis.d.ts +319 -0
- package/dist/abi/abis.d.ts.map +1 -0
- package/dist/abi/abis.js +128 -0
- package/dist/abi/abis.js.map +1 -0
- package/dist/abi/index.d.ts +11 -0
- package/dist/abi/index.d.ts.map +1 -0
- package/dist/abi/index.js +15 -0
- package/dist/abi/index.js.map +1 -0
- package/dist/config/contracts.config.d.ts +70 -0
- package/dist/config/contracts.config.d.ts.map +1 -0
- package/dist/config/contracts.config.js +137 -0
- package/dist/config/contracts.config.js.map +1 -0
- package/dist/config/environments/alpha.config.d.ts +17 -0
- package/dist/config/environments/alpha.config.d.ts.map +1 -0
- package/dist/config/environments/alpha.config.js +140 -0
- package/dist/config/environments/alpha.config.js.map +1 -0
- package/dist/config/environments/beta.config.d.ts +16 -0
- package/dist/config/environments/beta.config.d.ts.map +1 -0
- package/dist/config/environments/beta.config.js +131 -0
- package/dist/config/environments/beta.config.js.map +1 -0
- package/dist/config/environments/dev.config.d.ts +13 -0
- package/dist/config/environments/dev.config.d.ts.map +1 -0
- package/dist/config/environments/dev.config.js +123 -0
- package/dist/config/environments/dev.config.js.map +1 -0
- package/dist/config/environments/index.d.ts +48 -0
- package/dist/config/environments/index.d.ts.map +1 -0
- package/dist/config/environments/index.js +81 -0
- package/dist/config/environments/index.js.map +1 -0
- package/dist/config/environments/localhost.config.d.ts +16 -0
- package/dist/config/environments/localhost.config.d.ts.map +1 -0
- package/dist/config/environments/localhost.config.js +152 -0
- package/dist/config/environments/localhost.config.js.map +1 -0
- package/dist/config/environments/prod.config.d.ts +20 -0
- package/dist/config/environments/prod.config.d.ts.map +1 -0
- package/dist/config/environments/prod.config.js +143 -0
- package/dist/config/environments/prod.config.js.map +1 -0
- package/dist/config/index.d.ts +7 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +41 -0
- package/dist/config/index.js.map +1 -0
- package/dist/constants/assets.d.ts +76 -0
- package/dist/constants/assets.d.ts.map +1 -0
- package/dist/constants/assets.js +277 -0
- package/dist/constants/assets.js.map +1 -0
- package/dist/constants/contracts.d.ts +41 -0
- package/dist/constants/contracts.d.ts.map +1 -0
- package/dist/constants/contracts.js +57 -0
- package/dist/constants/contracts.js.map +1 -0
- package/dist/constants/index.d.ts +36 -0
- package/dist/constants/index.d.ts.map +1 -0
- package/dist/constants/index.js +75 -0
- package/dist/constants/index.js.map +1 -0
- package/dist/constants/networks.d.ts +32 -0
- package/dist/constants/networks.d.ts.map +1 -0
- package/dist/constants/networks.js +174 -0
- package/dist/constants/networks.js.map +1 -0
- package/dist/contracts/index.d.ts +5 -0
- package/dist/contracts/index.d.ts.map +1 -0
- package/dist/contracts/index.js +21 -0
- package/dist/contracts/index.js.map +1 -0
- package/dist/contracts/viem/AlphaViem.d.ts +518 -0
- package/dist/contracts/viem/AlphaViem.d.ts.map +1 -0
- package/dist/contracts/viem/AlphaViem.js +1287 -0
- package/dist/contracts/viem/AlphaViem.js.map +1 -0
- package/dist/contracts/viem/PriceOracleViem.d.ts +71 -0
- package/dist/contracts/viem/PriceOracleViem.d.ts.map +1 -0
- package/dist/contracts/viem/PriceOracleViem.js +212 -0
- package/dist/contracts/viem/PriceOracleViem.js.map +1 -0
- package/dist/contracts/viem/index.d.ts +9 -0
- package/dist/contracts/viem/index.d.ts.map +1 -0
- package/dist/contracts/viem/index.js +17 -0
- package/dist/contracts/viem/index.js.map +1 -0
- package/dist/errors/index.d.ts +44 -0
- package/dist/errors/index.d.ts.map +1 -0
- package/dist/errors/index.js +83 -0
- package/dist/errors/index.js.map +1 -0
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +60 -0
- package/dist/index.js.map +1 -0
- package/dist/types/alpha.d.ts +299 -0
- package/dist/types/alpha.d.ts.map +1 -0
- package/dist/types/alpha.js +6 -0
- package/dist/types/alpha.js.map +1 -0
- package/dist/types/client.d.ts +24 -0
- package/dist/types/client.d.ts.map +1 -0
- package/dist/types/client.js +13 -0
- package/dist/types/client.js.map +1 -0
- package/dist/types/contracts.d.ts +48 -0
- package/dist/types/contracts.d.ts.map +1 -0
- package/dist/types/contracts.js +6 -0
- package/dist/types/contracts.js.map +1 -0
- package/dist/types/funding.d.ts +27 -0
- package/dist/types/funding.d.ts.map +1 -0
- package/dist/types/funding.js +6 -0
- package/dist/types/funding.js.map +1 -0
- package/dist/types/index.d.ts +92 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +47 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/liquidation.d.ts +20 -0
- package/dist/types/liquidation.d.ts.map +1 -0
- package/dist/types/liquidation.js +6 -0
- package/dist/types/liquidation.js.map +1 -0
- package/dist/types/margin.d.ts +29 -0
- package/dist/types/margin.d.ts.map +1 -0
- package/dist/types/margin.js +6 -0
- package/dist/types/margin.js.map +1 -0
- package/dist/types/oracle.d.ts +21 -0
- package/dist/types/oracle.d.ts.map +1 -0
- package/dist/types/oracle.js +6 -0
- package/dist/types/oracle.js.map +1 -0
- package/dist/types/positions.d.ts +43 -0
- package/dist/types/positions.d.ts.map +1 -0
- package/dist/types/positions.js +13 -0
- package/dist/types/positions.js.map +1 -0
- package/dist/utils/calculations.d.ts +84 -0
- package/dist/utils/calculations.d.ts.map +1 -0
- package/dist/utils/calculations.js +155 -0
- package/dist/utils/calculations.js.map +1 -0
- package/dist/utils/errors.d.ts +24 -0
- package/dist/utils/errors.d.ts.map +1 -0
- package/dist/utils/errors.js +129 -0
- package/dist/utils/errors.js.map +1 -0
- package/dist/utils/events.d.ts +40 -0
- package/dist/utils/events.d.ts.map +1 -0
- package/dist/utils/events.js +73 -0
- package/dist/utils/events.js.map +1 -0
- package/dist/utils/format.d.ts +40 -0
- package/dist/utils/format.d.ts.map +1 -0
- package/dist/utils/format.js +86 -0
- package/dist/utils/format.js.map +1 -0
- package/dist/utils/index.d.ts +10 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +26 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/network.d.ts +52 -0
- package/dist/utils/network.d.ts.map +1 -0
- package/dist/utils/network.js +192 -0
- package/dist/utils/network.js.map +1 -0
- package/dist/utils/positionCalculations.d.ts +145 -0
- package/dist/utils/positionCalculations.d.ts.map +1 -0
- package/dist/utils/positionCalculations.js +278 -0
- package/dist/utils/positionCalculations.js.map +1 -0
- package/dist/utils/validation.d.ts +28 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/validation.js +68 -0
- package/dist/utils/validation.js.map +1 -0
- package/docs/README.md +40 -0
- package/docs/api/API.md +831 -0
- package/docs/guides/GETTING_STARTED.md +316 -0
- package/docs/guides/TRADING_GUIDE.md +677 -0
- package/docs/integration/INTEGRATION_GUIDE.md +1679 -0
- package/docs/integration/VIEM_INTEGRATION.md +294 -0
- package/docs/reference/CLI_QUICK_REFERENCE.md +197 -0
- package/docs/reference/TROUBLESHOOTING.md +922 -0
- package/package.json +113 -0
- package/src/AlphaFuturesClient.ts +158 -0
- package/src/abi/.gitkeep +1 -0
- package/src/abi/Alpha.json +5987 -0
- package/src/abi/README.md +99 -0
- package/src/abi/abis.ts +131 -0
- package/src/abi/index.ts +13 -0
- package/src/config/contracts.config.ts +186 -0
- package/src/config/environments/alpha.config.ts +139 -0
- package/src/config/environments/beta.config.ts +130 -0
- package/src/config/environments/dev.config.ts +122 -0
- package/src/config/environments/index.ts +87 -0
- package/src/config/environments/localhost.config.ts +153 -0
- package/src/config/environments/prod.config.ts +142 -0
- package/src/config/index.ts +29 -0
- package/src/constants/assets.ts +299 -0
- package/src/constants/contracts.ts +64 -0
- package/src/constants/index.ts +69 -0
- package/src/constants/networks.ts +182 -0
- package/src/contracts/index.ts +5 -0
- package/src/contracts/viem/AlphaViem.ts +1615 -0
- package/src/contracts/viem/PriceOracleViem.ts +272 -0
- package/src/contracts/viem/index.ts +11 -0
- package/src/errors/index.ts +87 -0
- package/src/index.ts +59 -0
- package/src/types/VIEM_TYPES_README.md +70 -0
- package/src/types/alpha.ts +358 -0
- package/src/types/client.ts +27 -0
- package/src/types/contracts.ts +74 -0
- package/src/types/funding.ts +31 -0
- package/src/types/index.ts +108 -0
- package/src/types/liquidation.ts +23 -0
- package/src/types/margin.ts +34 -0
- package/src/types/oracle.ts +24 -0
- package/src/types/positions.ts +48 -0
- package/src/utils/calculations.ts +175 -0
- package/src/utils/errors.ts +147 -0
- package/src/utils/events.ts +98 -0
- package/src/utils/format.ts +84 -0
- package/src/utils/index.ts +10 -0
- package/src/utils/network.ts +212 -0
- package/src/utils/positionCalculations.ts +317 -0
- package/src/utils/validation.ts +76 -0
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Alpha contract wrapper using Viem
|
|
3
|
+
* Main implementation of ALPHA perpetual futures protocol
|
|
4
|
+
*/
|
|
5
|
+
import { Address, PublicClient, WalletClient, Hash, TransactionReceipt } from 'viem';
|
|
6
|
+
import { TransactionOptions } from '../../types';
|
|
7
|
+
import * as AlphaTypes from '../../types/alpha';
|
|
8
|
+
export declare class AlphaViem {
|
|
9
|
+
private publicClient;
|
|
10
|
+
private walletClient?;
|
|
11
|
+
private contractAddress;
|
|
12
|
+
private collateralTokenAddress?;
|
|
13
|
+
constructor(contractAddress: Address, publicClient: PublicClient, walletClient?: WalletClient, collateralTokenAddress?: Address);
|
|
14
|
+
private get isNativeCollateral();
|
|
15
|
+
/**
|
|
16
|
+
* Convert bytes32 (padded by ABI encoding) to bytes16
|
|
17
|
+
* Takes first 16 bytes from the 32 byte value
|
|
18
|
+
*/
|
|
19
|
+
private bytes32ToBytes16;
|
|
20
|
+
/**
|
|
21
|
+
* Simulate a contract transaction before writing to catch errors early
|
|
22
|
+
* This prevents sending failed transactions to the wallet
|
|
23
|
+
*/
|
|
24
|
+
private simulateAndWriteContract;
|
|
25
|
+
initializeMarket(market: Address, maxLeverage: bigint, maintenanceMargin: bigint, liquidationFee: bigint, options?: TransactionOptions): Promise<Hash>;
|
|
26
|
+
addMarket(market: Address, symbol: string, options?: TransactionOptions): Promise<Hash>;
|
|
27
|
+
seedVault(amount: bigint, options?: TransactionOptions): Promise<Hash>;
|
|
28
|
+
deposit(amount: bigint, options?: TransactionOptions): Promise<Hash>;
|
|
29
|
+
withdraw(amount: bigint, options?: TransactionOptions): Promise<Hash>;
|
|
30
|
+
/**
|
|
31
|
+
* Opens a market position with specified margin, leverage, and slippage tolerance
|
|
32
|
+
* @param market - Market address
|
|
33
|
+
* @param isLong - True for long position, false for short
|
|
34
|
+
* @param margin - Collateral amount to risk (in wei)
|
|
35
|
+
* @param leverage - Leverage multiplier in 1e18 format (e.g., 3e18 for 3x)
|
|
36
|
+
* @param maxSlippage - Maximum allowed slippage in basis points
|
|
37
|
+
* @param options - Transaction options
|
|
38
|
+
* @returns Transaction hash
|
|
39
|
+
*/
|
|
40
|
+
openMarketPosition(market: Address, isLong: boolean, margin: bigint, leverage: bigint, maxSlippage: bigint, options?: TransactionOptions): Promise<Hash>;
|
|
41
|
+
openMarketPositionWithStruct(params: AlphaTypes.MarketPositionParams, options?: TransactionOptions): Promise<Hash>;
|
|
42
|
+
closePosition(positionId: AlphaTypes.Bytes16, sizeToClose: bigint, options?: TransactionOptions): Promise<Hash>;
|
|
43
|
+
/**
|
|
44
|
+
* Batch multiple contract calls into a single transaction using multicall.
|
|
45
|
+
* Handles ABI encoding internally.
|
|
46
|
+
*
|
|
47
|
+
* @param calls - Array of { functionName, args } to batch
|
|
48
|
+
* @param options - Optional transaction options
|
|
49
|
+
* @returns Transaction hash
|
|
50
|
+
*
|
|
51
|
+
* @example
|
|
52
|
+
* // Close multiple positions in one tx
|
|
53
|
+
* await alpha.multicall([
|
|
54
|
+
* { functionName: 'closePosition', args: [posId1, 0n] },
|
|
55
|
+
* { functionName: 'closePosition', args: [posId2, 0n] },
|
|
56
|
+
* ]);
|
|
57
|
+
*/
|
|
58
|
+
multicall(calls: {
|
|
59
|
+
functionName: string;
|
|
60
|
+
args?: readonly unknown[];
|
|
61
|
+
}[], options?: TransactionOptions): Promise<Hash>;
|
|
62
|
+
/**
|
|
63
|
+
* Close multiple positions in a single transaction using multicall
|
|
64
|
+
* @param positionIds - Array of position IDs to close (bytes16 format)
|
|
65
|
+
* @param options - Optional transaction options
|
|
66
|
+
* @returns Transaction hash
|
|
67
|
+
*/
|
|
68
|
+
closeAllPositions(positionIds: AlphaTypes.Bytes16[], options?: TransactionOptions): Promise<Hash>;
|
|
69
|
+
/**
|
|
70
|
+
* Places a limit order with specified margin and leverage
|
|
71
|
+
* @param market - Market address
|
|
72
|
+
* @param isBuy - True for buy order, false for sell
|
|
73
|
+
* @param margin - Collateral amount to risk
|
|
74
|
+
* @param leverage - Leverage multiplier in 1e18 format (e.g., 3e18 for 3x)
|
|
75
|
+
* @param price - Limit price in wei
|
|
76
|
+
* @param reduceOnlyType - 0=Normal, 1=TakeProfit (natural side), 2=StopLoss (opposite side)
|
|
77
|
+
* @param options - Transaction options
|
|
78
|
+
* @returns Transaction hash
|
|
79
|
+
*/
|
|
80
|
+
placeLimitOrder(market: Address, isBuy: boolean, margin: bigint, leverage: bigint, price: bigint, reduceOnlyType?: number, options?: TransactionOptions): Promise<Hash>;
|
|
81
|
+
/**
|
|
82
|
+
* Places a limit order using a params struct
|
|
83
|
+
* @param params - LimitOrderParams struct containing all order parameters
|
|
84
|
+
* @param options - Transaction options
|
|
85
|
+
* @returns Transaction hash
|
|
86
|
+
*/
|
|
87
|
+
placeLimitOrderWithStruct(params: AlphaTypes.LimitOrderParams, options?: TransactionOptions): Promise<Hash>;
|
|
88
|
+
cancelOrder(market: Address, orderId: AlphaTypes.Bytes16, options?: TransactionOptions): Promise<Hash>;
|
|
89
|
+
cancelAllOrders(market: Address, options?: TransactionOptions): Promise<Hash>;
|
|
90
|
+
liquidatePosition(positionId: AlphaTypes.Bytes16, options?: TransactionOptions): Promise<Hash>;
|
|
91
|
+
claimKeeperRewards(options?: TransactionOptions): Promise<Hash>;
|
|
92
|
+
getPositionId(trader: Address, market: Address): Promise<AlphaTypes.Bytes16>;
|
|
93
|
+
hasPosition(trader: Address, market: Address): Promise<boolean>;
|
|
94
|
+
getPosition(positionId: AlphaTypes.Bytes16): Promise<AlphaTypes.MonolithPosition>;
|
|
95
|
+
getPositionDetails(positionId: AlphaTypes.Bytes16): Promise<AlphaTypes.PositionDetails>;
|
|
96
|
+
getUserPositions(trader: Address): Promise<AlphaTypes.Bytes16[]>;
|
|
97
|
+
getUserPositionsSummary(trader: Address): Promise<AlphaTypes.PositionSummary>;
|
|
98
|
+
calculateUnrealizedPnl(positionId: AlphaTypes.Bytes16): Promise<bigint>;
|
|
99
|
+
getMarginRatio(positionId: AlphaTypes.Bytes16): Promise<bigint>;
|
|
100
|
+
isLiquidatable(positionId: AlphaTypes.Bytes16): Promise<boolean>;
|
|
101
|
+
getLiquidationStatus(positionId: AlphaTypes.Bytes16): Promise<AlphaTypes.LiquidationStatus>;
|
|
102
|
+
/**
|
|
103
|
+
* Get account-level liquidation status (cross-margin)
|
|
104
|
+
* When account equity < total maintenance, ALL positions are liquidatable (Hyperliquid-style)
|
|
105
|
+
*/
|
|
106
|
+
getAccountLiquidationStatus(trader: Address): Promise<{
|
|
107
|
+
liquidatable: boolean;
|
|
108
|
+
worstPositionId: AlphaTypes.Bytes16;
|
|
109
|
+
accountEquity: bigint;
|
|
110
|
+
totalMaintenanceRequired: bigint;
|
|
111
|
+
}>;
|
|
112
|
+
/**
|
|
113
|
+
* Get cross-margin liquidation price for a position
|
|
114
|
+
* Uses Hyperliquid formula: accounts for all positions' PnL in the account
|
|
115
|
+
*/
|
|
116
|
+
getAccountLiquidationPrice(positionId: AlphaTypes.Bytes16): Promise<bigint>;
|
|
117
|
+
/**
|
|
118
|
+
* Get raw deposited margin balance (excludes unrealized PnL).
|
|
119
|
+
* For account equity (balance + PnL), use getAccountSummary().
|
|
120
|
+
*/
|
|
121
|
+
getMarginBalance(trader: Address): Promise<bigint>;
|
|
122
|
+
/**
|
|
123
|
+
* Get comprehensive account summary in a single RPC call.
|
|
124
|
+
* Returns deposited balance, account equity, unrealized PnL, locked margin, and available margin.
|
|
125
|
+
*/
|
|
126
|
+
getAccountSummary(trader: Address): Promise<AlphaTypes.AccountSummary>;
|
|
127
|
+
getLockedMargin(trader: Address): Promise<bigint>;
|
|
128
|
+
getAvailableMargin(trader: Address): Promise<bigint>;
|
|
129
|
+
getMaxUserDeposit(): Promise<bigint>;
|
|
130
|
+
getMaxGlobalDeposits(): Promise<bigint>;
|
|
131
|
+
getTotalDeposits(): Promise<bigint>;
|
|
132
|
+
getMarketInfo(market: Address): Promise<AlphaTypes.MarketInfo>;
|
|
133
|
+
getMarketOpenInterest(market: Address): Promise<{
|
|
134
|
+
longOI: bigint;
|
|
135
|
+
shortOI: bigint;
|
|
136
|
+
}>;
|
|
137
|
+
getFundingRate(market: Address): Promise<bigint>;
|
|
138
|
+
getFundingState(market: Address): Promise<AlphaTypes.FundingState>;
|
|
139
|
+
updateFundingRates(markets: Address[], options?: TransactionOptions): Promise<{
|
|
140
|
+
hash: Hash;
|
|
141
|
+
wait: () => Promise<TransactionReceipt>;
|
|
142
|
+
}>;
|
|
143
|
+
getBestBid(market: Address): Promise<AlphaTypes.Bytes16>;
|
|
144
|
+
getBestAsk(market: Address): Promise<AlphaTypes.Bytes16>;
|
|
145
|
+
/**
|
|
146
|
+
* Get all open order IDs for a trader in a specific market
|
|
147
|
+
* @param trader - Trader address
|
|
148
|
+
* @param market - Market address
|
|
149
|
+
* @returns Array of order IDs (bytes16)
|
|
150
|
+
*/
|
|
151
|
+
getUserOrders(trader: Address, market: Address): Promise<AlphaTypes.Bytes16[]>;
|
|
152
|
+
/**
|
|
153
|
+
* Get details of a specific order
|
|
154
|
+
* @param market - The market address
|
|
155
|
+
* @param orderId - The order ID (bytes16)
|
|
156
|
+
* @returns Order details including trader, direction, size, price, reduceOnly
|
|
157
|
+
*/
|
|
158
|
+
getOrderDetails(market: Address, orderId: AlphaTypes.Bytes16): Promise<AlphaTypes.OrderDetails>;
|
|
159
|
+
getVaultStats(): Promise<AlphaTypes.VaultStats>;
|
|
160
|
+
getVaultBalance(): Promise<bigint>;
|
|
161
|
+
getVaultState(): Promise<AlphaTypes.VaultState>;
|
|
162
|
+
getVaultExposure(market: Address): Promise<AlphaTypes.VaultExposure>;
|
|
163
|
+
getMaxPositionSize(market: Address): Promise<bigint>;
|
|
164
|
+
calculateVaultSlippage(market: Address, size: bigint, isBuy: boolean): Promise<bigint>;
|
|
165
|
+
getOptimalExecutionPlan(market: Address, size: bigint, isLong: boolean, maxSlippage: bigint): Promise<AlphaTypes.ExecutionPlan>;
|
|
166
|
+
getExecutionStrategyAnalysis(market: Address, size: bigint, isLong: boolean, maxSlippage: bigint): Promise<AlphaTypes.ExecutionStrategyAnalysis>;
|
|
167
|
+
getMarketDepth(market: Address, isBuy: boolean, levels: bigint): Promise<{
|
|
168
|
+
depth: AlphaTypes.DepthLevel[];
|
|
169
|
+
totalLiquidity: bigint;
|
|
170
|
+
}>;
|
|
171
|
+
getOrderbookDepth(market: Address, levels: number): Promise<{
|
|
172
|
+
bidPrices: bigint[];
|
|
173
|
+
bidNotionals: bigint[];
|
|
174
|
+
askPrices: bigint[];
|
|
175
|
+
askNotionals: bigint[];
|
|
176
|
+
}>;
|
|
177
|
+
getVWAP(market: Address, size: bigint, isBuy: boolean): Promise<AlphaTypes.VWAPResult>;
|
|
178
|
+
getBidAskSpread(market: Address): Promise<AlphaTypes.SpreadInfo>;
|
|
179
|
+
estimateMarketImpact(market: Address, size: bigint, isBuy: boolean): Promise<AlphaTypes.MarketImpactEstimate>;
|
|
180
|
+
getMarketLiquidityAnalysis(market: Address): Promise<AlphaTypes.MarketLiquidityAnalysis>;
|
|
181
|
+
parsePositionOpenedEvent(receipt: TransactionReceipt): AlphaTypes.PositionOpenedEvent | undefined;
|
|
182
|
+
parsePositionClosedEvent(receipt: TransactionReceipt): AlphaTypes.PositionClosedEvent | undefined;
|
|
183
|
+
parseOrderPlacedEvent(receipt: TransactionReceipt): AlphaTypes.OrderPlacedEvent | undefined;
|
|
184
|
+
parseHybridOrderExecutedEvent(receipt: TransactionReceipt): AlphaTypes.HybridOrderExecutedEvent | undefined;
|
|
185
|
+
waitForTransaction(hash: Hash): Promise<TransactionReceipt>;
|
|
186
|
+
getContractAddress(): Address;
|
|
187
|
+
readContract({ functionName, args }: {
|
|
188
|
+
functionName: string;
|
|
189
|
+
args: any[];
|
|
190
|
+
}): Promise<any>;
|
|
191
|
+
getConstants(): Promise<AlphaTypes.MonolithConfig>;
|
|
192
|
+
/**
|
|
193
|
+
* Watch for MarginDeposited events
|
|
194
|
+
*/
|
|
195
|
+
watchMarginDepositedEvent(callback: (trader: Address, amount: bigint) => void): import("viem").WatchContractEventReturnType;
|
|
196
|
+
/**
|
|
197
|
+
* Watch for MarginWithdrawn events
|
|
198
|
+
*/
|
|
199
|
+
watchMarginWithdrawnEvent(callback: (trader: Address, amount: bigint) => void): import("viem").WatchContractEventReturnType;
|
|
200
|
+
/**
|
|
201
|
+
* Watch for PositionOpened events
|
|
202
|
+
*/
|
|
203
|
+
watchPositionOpenedEvent(callback: (positionId: `0x${string}`, trader: Address, market: Address, isLong: boolean, notionalValue: bigint, entryPrice: bigint, margin: bigint) => void): import("viem").WatchContractEventReturnType;
|
|
204
|
+
/**
|
|
205
|
+
* Get past MarginDeposited events
|
|
206
|
+
*/
|
|
207
|
+
getMarginDepositedEvents(fromBlock?: bigint, toBlock?: bigint, trader?: Address): Promise<import("viem").GetContractEventsReturnType<({
|
|
208
|
+
type: string;
|
|
209
|
+
name: string;
|
|
210
|
+
inputs: {
|
|
211
|
+
name: string;
|
|
212
|
+
type: string;
|
|
213
|
+
internalType: string;
|
|
214
|
+
}[];
|
|
215
|
+
outputs: {
|
|
216
|
+
name: string;
|
|
217
|
+
type: string;
|
|
218
|
+
internalType: string;
|
|
219
|
+
}[];
|
|
220
|
+
stateMutability: string;
|
|
221
|
+
anonymous?: undefined;
|
|
222
|
+
} | {
|
|
223
|
+
type: string;
|
|
224
|
+
name: string;
|
|
225
|
+
inputs: {
|
|
226
|
+
name: string;
|
|
227
|
+
type: string;
|
|
228
|
+
internalType: string;
|
|
229
|
+
}[];
|
|
230
|
+
outputs: {
|
|
231
|
+
name: string;
|
|
232
|
+
type: string;
|
|
233
|
+
internalType: string;
|
|
234
|
+
components: {
|
|
235
|
+
name: string;
|
|
236
|
+
type: string;
|
|
237
|
+
internalType: string;
|
|
238
|
+
}[];
|
|
239
|
+
}[];
|
|
240
|
+
stateMutability: string;
|
|
241
|
+
anonymous?: undefined;
|
|
242
|
+
} | {
|
|
243
|
+
type: string;
|
|
244
|
+
name: string;
|
|
245
|
+
inputs: {
|
|
246
|
+
name: string;
|
|
247
|
+
type: string;
|
|
248
|
+
internalType: string;
|
|
249
|
+
components: {
|
|
250
|
+
name: string;
|
|
251
|
+
type: string;
|
|
252
|
+
internalType: string;
|
|
253
|
+
}[];
|
|
254
|
+
}[];
|
|
255
|
+
outputs: {
|
|
256
|
+
name: string;
|
|
257
|
+
type: string;
|
|
258
|
+
internalType: string;
|
|
259
|
+
}[];
|
|
260
|
+
stateMutability: string;
|
|
261
|
+
anonymous?: undefined;
|
|
262
|
+
} | {
|
|
263
|
+
type: string;
|
|
264
|
+
name: string;
|
|
265
|
+
inputs: ({
|
|
266
|
+
name: string;
|
|
267
|
+
type: string;
|
|
268
|
+
internalType: string;
|
|
269
|
+
components?: undefined;
|
|
270
|
+
} | {
|
|
271
|
+
name: string;
|
|
272
|
+
type: string;
|
|
273
|
+
internalType: string;
|
|
274
|
+
components: {
|
|
275
|
+
name: string;
|
|
276
|
+
type: string;
|
|
277
|
+
internalType: string;
|
|
278
|
+
}[];
|
|
279
|
+
})[];
|
|
280
|
+
outputs: never[];
|
|
281
|
+
stateMutability: string;
|
|
282
|
+
anonymous?: undefined;
|
|
283
|
+
} | {
|
|
284
|
+
type: string;
|
|
285
|
+
name: string;
|
|
286
|
+
inputs: {
|
|
287
|
+
name: string;
|
|
288
|
+
type: string;
|
|
289
|
+
indexed: boolean;
|
|
290
|
+
internalType: string;
|
|
291
|
+
}[];
|
|
292
|
+
anonymous: boolean;
|
|
293
|
+
outputs?: undefined;
|
|
294
|
+
stateMutability?: undefined;
|
|
295
|
+
} | {
|
|
296
|
+
type: string;
|
|
297
|
+
name: string;
|
|
298
|
+
inputs: {
|
|
299
|
+
name: string;
|
|
300
|
+
type: string;
|
|
301
|
+
internalType: string;
|
|
302
|
+
}[];
|
|
303
|
+
outputs?: undefined;
|
|
304
|
+
stateMutability?: undefined;
|
|
305
|
+
anonymous?: undefined;
|
|
306
|
+
})[], "MarginDeposited", undefined, bigint | "earliest", bigint | "latest">>;
|
|
307
|
+
/**
|
|
308
|
+
* Get past MarginWithdrawn events
|
|
309
|
+
*/
|
|
310
|
+
getMarginWithdrawnEvents(fromBlock?: bigint, toBlock?: bigint, trader?: Address): Promise<import("viem").GetContractEventsReturnType<({
|
|
311
|
+
type: string;
|
|
312
|
+
name: string;
|
|
313
|
+
inputs: {
|
|
314
|
+
name: string;
|
|
315
|
+
type: string;
|
|
316
|
+
internalType: string;
|
|
317
|
+
}[];
|
|
318
|
+
outputs: {
|
|
319
|
+
name: string;
|
|
320
|
+
type: string;
|
|
321
|
+
internalType: string;
|
|
322
|
+
}[];
|
|
323
|
+
stateMutability: string;
|
|
324
|
+
anonymous?: undefined;
|
|
325
|
+
} | {
|
|
326
|
+
type: string;
|
|
327
|
+
name: string;
|
|
328
|
+
inputs: {
|
|
329
|
+
name: string;
|
|
330
|
+
type: string;
|
|
331
|
+
internalType: string;
|
|
332
|
+
}[];
|
|
333
|
+
outputs: {
|
|
334
|
+
name: string;
|
|
335
|
+
type: string;
|
|
336
|
+
internalType: string;
|
|
337
|
+
components: {
|
|
338
|
+
name: string;
|
|
339
|
+
type: string;
|
|
340
|
+
internalType: string;
|
|
341
|
+
}[];
|
|
342
|
+
}[];
|
|
343
|
+
stateMutability: string;
|
|
344
|
+
anonymous?: undefined;
|
|
345
|
+
} | {
|
|
346
|
+
type: string;
|
|
347
|
+
name: string;
|
|
348
|
+
inputs: {
|
|
349
|
+
name: string;
|
|
350
|
+
type: string;
|
|
351
|
+
internalType: string;
|
|
352
|
+
components: {
|
|
353
|
+
name: string;
|
|
354
|
+
type: string;
|
|
355
|
+
internalType: string;
|
|
356
|
+
}[];
|
|
357
|
+
}[];
|
|
358
|
+
outputs: {
|
|
359
|
+
name: string;
|
|
360
|
+
type: string;
|
|
361
|
+
internalType: string;
|
|
362
|
+
}[];
|
|
363
|
+
stateMutability: string;
|
|
364
|
+
anonymous?: undefined;
|
|
365
|
+
} | {
|
|
366
|
+
type: string;
|
|
367
|
+
name: string;
|
|
368
|
+
inputs: ({
|
|
369
|
+
name: string;
|
|
370
|
+
type: string;
|
|
371
|
+
internalType: string;
|
|
372
|
+
components?: undefined;
|
|
373
|
+
} | {
|
|
374
|
+
name: string;
|
|
375
|
+
type: string;
|
|
376
|
+
internalType: string;
|
|
377
|
+
components: {
|
|
378
|
+
name: string;
|
|
379
|
+
type: string;
|
|
380
|
+
internalType: string;
|
|
381
|
+
}[];
|
|
382
|
+
})[];
|
|
383
|
+
outputs: never[];
|
|
384
|
+
stateMutability: string;
|
|
385
|
+
anonymous?: undefined;
|
|
386
|
+
} | {
|
|
387
|
+
type: string;
|
|
388
|
+
name: string;
|
|
389
|
+
inputs: {
|
|
390
|
+
name: string;
|
|
391
|
+
type: string;
|
|
392
|
+
indexed: boolean;
|
|
393
|
+
internalType: string;
|
|
394
|
+
}[];
|
|
395
|
+
anonymous: boolean;
|
|
396
|
+
outputs?: undefined;
|
|
397
|
+
stateMutability?: undefined;
|
|
398
|
+
} | {
|
|
399
|
+
type: string;
|
|
400
|
+
name: string;
|
|
401
|
+
inputs: {
|
|
402
|
+
name: string;
|
|
403
|
+
type: string;
|
|
404
|
+
internalType: string;
|
|
405
|
+
}[];
|
|
406
|
+
outputs?: undefined;
|
|
407
|
+
stateMutability?: undefined;
|
|
408
|
+
anonymous?: undefined;
|
|
409
|
+
})[], "MarginWithdrawn", undefined, bigint | "earliest", bigint | "latest">>;
|
|
410
|
+
/**
|
|
411
|
+
* Get past PositionOpened events
|
|
412
|
+
*/
|
|
413
|
+
getPositionOpenedEvents(fromBlock?: bigint, toBlock?: bigint, trader?: Address): Promise<import("viem").GetContractEventsReturnType<({
|
|
414
|
+
type: string;
|
|
415
|
+
name: string;
|
|
416
|
+
inputs: {
|
|
417
|
+
name: string;
|
|
418
|
+
type: string;
|
|
419
|
+
internalType: string;
|
|
420
|
+
}[];
|
|
421
|
+
outputs: {
|
|
422
|
+
name: string;
|
|
423
|
+
type: string;
|
|
424
|
+
internalType: string;
|
|
425
|
+
}[];
|
|
426
|
+
stateMutability: string;
|
|
427
|
+
anonymous?: undefined;
|
|
428
|
+
} | {
|
|
429
|
+
type: string;
|
|
430
|
+
name: string;
|
|
431
|
+
inputs: {
|
|
432
|
+
name: string;
|
|
433
|
+
type: string;
|
|
434
|
+
internalType: string;
|
|
435
|
+
}[];
|
|
436
|
+
outputs: {
|
|
437
|
+
name: string;
|
|
438
|
+
type: string;
|
|
439
|
+
internalType: string;
|
|
440
|
+
components: {
|
|
441
|
+
name: string;
|
|
442
|
+
type: string;
|
|
443
|
+
internalType: string;
|
|
444
|
+
}[];
|
|
445
|
+
}[];
|
|
446
|
+
stateMutability: string;
|
|
447
|
+
anonymous?: undefined;
|
|
448
|
+
} | {
|
|
449
|
+
type: string;
|
|
450
|
+
name: string;
|
|
451
|
+
inputs: {
|
|
452
|
+
name: string;
|
|
453
|
+
type: string;
|
|
454
|
+
internalType: string;
|
|
455
|
+
components: {
|
|
456
|
+
name: string;
|
|
457
|
+
type: string;
|
|
458
|
+
internalType: string;
|
|
459
|
+
}[];
|
|
460
|
+
}[];
|
|
461
|
+
outputs: {
|
|
462
|
+
name: string;
|
|
463
|
+
type: string;
|
|
464
|
+
internalType: string;
|
|
465
|
+
}[];
|
|
466
|
+
stateMutability: string;
|
|
467
|
+
anonymous?: undefined;
|
|
468
|
+
} | {
|
|
469
|
+
type: string;
|
|
470
|
+
name: string;
|
|
471
|
+
inputs: ({
|
|
472
|
+
name: string;
|
|
473
|
+
type: string;
|
|
474
|
+
internalType: string;
|
|
475
|
+
components?: undefined;
|
|
476
|
+
} | {
|
|
477
|
+
name: string;
|
|
478
|
+
type: string;
|
|
479
|
+
internalType: string;
|
|
480
|
+
components: {
|
|
481
|
+
name: string;
|
|
482
|
+
type: string;
|
|
483
|
+
internalType: string;
|
|
484
|
+
}[];
|
|
485
|
+
})[];
|
|
486
|
+
outputs: never[];
|
|
487
|
+
stateMutability: string;
|
|
488
|
+
anonymous?: undefined;
|
|
489
|
+
} | {
|
|
490
|
+
type: string;
|
|
491
|
+
name: string;
|
|
492
|
+
inputs: {
|
|
493
|
+
name: string;
|
|
494
|
+
type: string;
|
|
495
|
+
indexed: boolean;
|
|
496
|
+
internalType: string;
|
|
497
|
+
}[];
|
|
498
|
+
anonymous: boolean;
|
|
499
|
+
outputs?: undefined;
|
|
500
|
+
stateMutability?: undefined;
|
|
501
|
+
} | {
|
|
502
|
+
type: string;
|
|
503
|
+
name: string;
|
|
504
|
+
inputs: {
|
|
505
|
+
name: string;
|
|
506
|
+
type: string;
|
|
507
|
+
internalType: string;
|
|
508
|
+
}[];
|
|
509
|
+
outputs?: undefined;
|
|
510
|
+
stateMutability?: undefined;
|
|
511
|
+
anonymous?: undefined;
|
|
512
|
+
})[], "PositionOpened", undefined, bigint | "earliest", bigint | "latest">>;
|
|
513
|
+
/**
|
|
514
|
+
* Estimate gas for a transaction
|
|
515
|
+
*/
|
|
516
|
+
estimateGas(functionName: string, args: any[], options?: TransactionOptions): Promise<bigint>;
|
|
517
|
+
}
|
|
518
|
+
//# sourceMappingURL=AlphaViem.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AlphaViem.d.ts","sourceRoot":"","sources":["../../../src/contracts/viem/AlphaViem.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACL,OAAO,EACP,YAAY,EACZ,YAAY,EACZ,IAAI,EACJ,kBAAkB,EAGnB,MAAM,MAAM,CAAC;AACd,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,KAAK,UAAU,MAAM,mBAAmB,CAAC;AAGhD,qBAAa,SAAS;IACpB,OAAO,CAAC,YAAY,CAAe;IACnC,OAAO,CAAC,YAAY,CAAC,CAAe;IACpC,OAAO,CAAC,eAAe,CAAU;IACjC,OAAO,CAAC,sBAAsB,CAAC,CAAU;gBAGvC,eAAe,EAAE,OAAO,EACxB,YAAY,EAAE,YAAY,EAC1B,YAAY,CAAC,EAAE,YAAY,EAC3B,sBAAsB,CAAC,EAAE,OAAO;IAQlC,OAAO,KAAK,kBAAkB,GAK7B;IAID;;;OAGG;IACH,OA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