extended-typescript-sdk 0.0.1
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/LICENSE +28 -0
- package/README.md +445 -0
- package/dist/config.d.ts +11 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +15 -0
- package/dist/config.js.map +1 -0
- package/dist/errors.d.ts +25 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +45 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +142 -0
- package/dist/index.js.map +1 -0
- package/dist/perpetual/accounts.d.ts +88 -0
- package/dist/perpetual/accounts.d.ts.map +1 -0
- package/dist/perpetual/accounts.js +152 -0
- package/dist/perpetual/accounts.js.map +1 -0
- package/dist/perpetual/amounts.d.ts +41 -0
- package/dist/perpetual/amounts.d.ts.map +1 -0
- package/dist/perpetual/amounts.js +79 -0
- package/dist/perpetual/amounts.js.map +1 -0
- package/dist/perpetual/assets.d.ts +74 -0
- package/dist/perpetual/assets.d.ts.map +1 -0
- package/dist/perpetual/assets.js +119 -0
- package/dist/perpetual/assets.js.map +1 -0
- package/dist/perpetual/bridges.d.ts +29 -0
- package/dist/perpetual/bridges.d.ts.map +1 -0
- package/dist/perpetual/bridges.js +45 -0
- package/dist/perpetual/bridges.js.map +1 -0
- package/dist/perpetual/candles.d.ts +26 -0
- package/dist/perpetual/candles.d.ts.map +1 -0
- package/dist/perpetual/candles.js +29 -0
- package/dist/perpetual/candles.js.map +1 -0
- package/dist/perpetual/clients.d.ts +15 -0
- package/dist/perpetual/clients.d.ts.map +1 -0
- package/dist/perpetual/clients.js +25 -0
- package/dist/perpetual/clients.js.map +1 -0
- package/dist/perpetual/configuration.d.ts +39 -0
- package/dist/perpetual/configuration.d.ts.map +1 -0
- package/dist/perpetual/configuration.js +61 -0
- package/dist/perpetual/configuration.js.map +1 -0
- package/dist/perpetual/crypto/signer.d.ts +164 -0
- package/dist/perpetual/crypto/signer.d.ts.map +1 -0
- package/dist/perpetual/crypto/signer.js +318 -0
- package/dist/perpetual/crypto/signer.js.map +1 -0
- package/dist/perpetual/fees.d.ts +20 -0
- package/dist/perpetual/fees.d.ts.map +1 -0
- package/dist/perpetual/fees.js +35 -0
- package/dist/perpetual/fees.js.map +1 -0
- package/dist/perpetual/funding-rates.d.ts +15 -0
- package/dist/perpetual/funding-rates.d.ts.map +1 -0
- package/dist/perpetual/funding-rates.js +23 -0
- package/dist/perpetual/funding-rates.js.map +1 -0
- package/dist/perpetual/markets.d.ts +83 -0
- package/dist/perpetual/markets.d.ts.map +1 -0
- package/dist/perpetual/markets.js +124 -0
- package/dist/perpetual/markets.js.map +1 -0
- package/dist/perpetual/order-object-settlement.d.ts +43 -0
- package/dist/perpetual/order-object-settlement.d.ts.map +1 -0
- package/dist/perpetual/order-object-settlement.js +121 -0
- package/dist/perpetual/order-object-settlement.js.map +1 -0
- package/dist/perpetual/order-object.d.ts +38 -0
- package/dist/perpetual/order-object.d.ts.map +1 -0
- package/dist/perpetual/order-object.js +90 -0
- package/dist/perpetual/order-object.js.map +1 -0
- package/dist/perpetual/orderbooks.d.ts +23 -0
- package/dist/perpetual/orderbooks.d.ts.map +1 -0
- package/dist/perpetual/orderbooks.js +36 -0
- package/dist/perpetual/orderbooks.js.map +1 -0
- package/dist/perpetual/orders.d.ts +207 -0
- package/dist/perpetual/orders.d.ts.map +1 -0
- package/dist/perpetual/orders.js +266 -0
- package/dist/perpetual/orders.js.map +1 -0
- package/dist/perpetual/positions.d.ts +80 -0
- package/dist/perpetual/positions.d.ts.map +1 -0
- package/dist/perpetual/positions.js +94 -0
- package/dist/perpetual/positions.js.map +1 -0
- package/dist/perpetual/stream-client/perpetual-stream-connection.d.ts +47 -0
- package/dist/perpetual/stream-client/perpetual-stream-connection.d.ts.map +1 -0
- package/dist/perpetual/stream-client/perpetual-stream-connection.js +125 -0
- package/dist/perpetual/stream-client/perpetual-stream-connection.js.map +1 -0
- package/dist/perpetual/stream-client/stream-client.d.ts +46 -0
- package/dist/perpetual/stream-client/stream-client.d.ts.map +1 -0
- package/dist/perpetual/stream-client/stream-client.js +79 -0
- package/dist/perpetual/stream-client/stream-client.js.map +1 -0
- package/dist/perpetual/trades.d.ts +44 -0
- package/dist/perpetual/trades.d.ts.map +1 -0
- package/dist/perpetual/trades.js +48 -0
- package/dist/perpetual/trades.js.map +1 -0
- package/dist/perpetual/trading-client/account-module.d.ts +192 -0
- package/dist/perpetual/trading-client/account-module.d.ts.map +1 -0
- package/dist/perpetual/trading-client/account-module.js +357 -0
- package/dist/perpetual/trading-client/account-module.js.map +1 -0
- package/dist/perpetual/trading-client/base-module.d.ts +27 -0
- package/dist/perpetual/trading-client/base-module.d.ts.map +1 -0
- package/dist/perpetual/trading-client/base-module.js +49 -0
- package/dist/perpetual/trading-client/base-module.js.map +1 -0
- package/dist/perpetual/trading-client/info-module.d.ts +24 -0
- package/dist/perpetual/trading-client/info-module.d.ts.map +1 -0
- package/dist/perpetual/trading-client/info-module.js +33 -0
- package/dist/perpetual/trading-client/info-module.js.map +1 -0
- package/dist/perpetual/trading-client/markets-information-module.d.ts +53 -0
- package/dist/perpetual/trading-client/markets-information-module.d.ts.map +1 -0
- package/dist/perpetual/trading-client/markets-information-module.js +106 -0
- package/dist/perpetual/trading-client/markets-information-module.js.map +1 -0
- package/dist/perpetual/trading-client/order-management-module.d.ts +40 -0
- package/dist/perpetual/trading-client/order-management-module.d.ts.map +1 -0
- package/dist/perpetual/trading-client/order-management-module.js +71 -0
- package/dist/perpetual/trading-client/order-management-module.js.map +1 -0
- package/dist/perpetual/trading-client/testnet-module.d.ts +27 -0
- package/dist/perpetual/trading-client/testnet-module.d.ts.map +1 -0
- package/dist/perpetual/trading-client/testnet-module.js +45 -0
- package/dist/perpetual/trading-client/testnet-module.js.map +1 -0
- package/dist/perpetual/trading-client/trading-client.d.ts +75 -0
- package/dist/perpetual/trading-client/trading-client.d.ts.map +1 -0
- package/dist/perpetual/trading-client/trading-client.js +115 -0
- package/dist/perpetual/trading-client/trading-client.js.map +1 -0
- package/dist/perpetual/transfer-object.d.ts +12 -0
- package/dist/perpetual/transfer-object.d.ts.map +1 -0
- package/dist/perpetual/transfer-object.js +57 -0
- package/dist/perpetual/transfer-object.js.map +1 -0
- package/dist/perpetual/transfers.d.ts +54 -0
- package/dist/perpetual/transfers.d.ts.map +1 -0
- package/dist/perpetual/transfers.js +90 -0
- package/dist/perpetual/transfers.js.map +1 -0
- package/dist/perpetual/user-client/onboarding.d.ts +101 -0
- package/dist/perpetual/user-client/onboarding.d.ts.map +1 -0
- package/dist/perpetual/user-client/onboarding.js +247 -0
- package/dist/perpetual/user-client/onboarding.js.map +1 -0
- package/dist/perpetual/user-client/user-client.d.ts +45 -0
- package/dist/perpetual/user-client/user-client.d.ts.map +1 -0
- package/dist/perpetual/user-client/user-client.js +185 -0
- package/dist/perpetual/user-client/user-client.js.map +1 -0
- package/dist/perpetual/withdrawal-object.d.ts +12 -0
- package/dist/perpetual/withdrawal-object.d.ts.map +1 -0
- package/dist/perpetual/withdrawal-object.js +51 -0
- package/dist/perpetual/withdrawal-object.js.map +1 -0
- package/dist/perpetual/withdrawals.d.ts +40 -0
- package/dist/perpetual/withdrawals.d.ts.map +1 -0
- package/dist/perpetual/withdrawals.js +65 -0
- package/dist/perpetual/withdrawals.js.map +1 -0
- package/dist/utils/date.d.ts +13 -0
- package/dist/utils/date.d.ts.map +1 -0
- package/dist/utils/date.js +21 -0
- package/dist/utils/date.js.map +1 -0
- package/dist/utils/env.d.ts +50 -0
- package/dist/utils/env.d.ts.map +1 -0
- package/dist/utils/env.js +157 -0
- package/dist/utils/env.js.map +1 -0
- package/dist/utils/http.d.ts +98 -0
- package/dist/utils/http.d.ts.map +1 -0
- package/dist/utils/http.js +290 -0
- package/dist/utils/http.js.map +1 -0
- package/dist/utils/model.d.ts +35 -0
- package/dist/utils/model.d.ts.map +1 -0
- package/dist/utils/model.js +86 -0
- package/dist/utils/model.js.map +1 -0
- package/dist/utils/nonce.d.ts +9 -0
- package/dist/utils/nonce.d.ts.map +1 -0
- package/dist/utils/nonce.js +14 -0
- package/dist/utils/nonce.js.map +1 -0
- package/dist/utils/string.d.ts +10 -0
- package/dist/utils/string.d.ts.map +1 -0
- package/dist/utils/string.js +20 -0
- package/dist/utils/string.js.map +1 -0
- package/package.json +56 -0
- package/wasm/stark_crypto_wasm-web.js +5 -0
- package/wasm/stark_crypto_wasm.d-web.ts +63 -0
- package/wasm/stark_crypto_wasm.d.ts +63 -0
- package/wasm/stark_crypto_wasm.js +362 -0
- package/wasm/stark_crypto_wasm_bg-web.wasm +0 -0
- package/wasm/stark_crypto_wasm_bg.wasm +0 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 X10 <tech@ex10.org>
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
package/README.md
ADDED
|
@@ -0,0 +1,445 @@
|
|
|
1
|
+
# Extended TypeScript Trading SDK
|
|
2
|
+
|
|
3
|
+
**⚠️ Unofficial SDK**: This is an **unofficial TypeScript SDK** for Extended Exchange, built and maintained by the community. It is not officially supported by Extended.
|
|
4
|
+
|
|
5
|
+
TypeScript client for [Extended Exchange API](https://api.docs.extended.exchange/).
|
|
6
|
+
|
|
7
|
+
## About Extended Exchange
|
|
8
|
+
|
|
9
|
+
Extended is a perpetual DEX (Decentralized Exchange), built by an ex-Revolut team. As of now, Extended offers perpetual contracts on both crypto and TradFi assets, with USDC as collateral and leverage of up to 100x.
|
|
10
|
+
|
|
11
|
+
This SDK provides full type safety and modern async/await patterns for interacting with the Extended Exchange API.
|
|
12
|
+
|
|
13
|
+
## Installation
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
npm install extended-typescript-sdk
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
## Prerequisites
|
|
20
|
+
|
|
21
|
+
- Node.js 18+ or TypeScript 5.3+
|
|
22
|
+
- **No Rust required** - The SDK ships with pre-built WASM signer
|
|
23
|
+
|
|
24
|
+
## Quick Start
|
|
25
|
+
|
|
26
|
+
### 1. Initialize the SDK
|
|
27
|
+
|
|
28
|
+
The SDK ships with pre-built WASM signer - no build step required!
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
import {
|
|
32
|
+
initWasm,
|
|
33
|
+
TESTNET_CONFIG,
|
|
34
|
+
StarkPerpetualAccount,
|
|
35
|
+
PerpetualTradingClient,
|
|
36
|
+
} from 'extended-typescript-sdk';
|
|
37
|
+
import Decimal from 'decimal.js';
|
|
38
|
+
|
|
39
|
+
// Initialize WASM module (MUST be called before using any crypto functions)
|
|
40
|
+
// Automatically loads the correct WASM for Node.js or browser
|
|
41
|
+
await initWasm();
|
|
42
|
+
|
|
43
|
+
// Create a Stark account
|
|
44
|
+
const starkAccount = new StarkPerpetualAccount(
|
|
45
|
+
vaultId, // number
|
|
46
|
+
privateKey, // Hex string (e.g., "0x123...")
|
|
47
|
+
publicKey, // Hex string
|
|
48
|
+
apiKey // string
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
// Create trading client
|
|
52
|
+
const tradingClient = new PerpetualTradingClient(TESTNET_CONFIG, starkAccount);
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### 2. Place an Order
|
|
56
|
+
|
|
57
|
+
```typescript
|
|
58
|
+
import { OrderSide } from 'extended-typescript-sdk';
|
|
59
|
+
import Decimal from 'decimal.js';
|
|
60
|
+
|
|
61
|
+
const placedOrder = await tradingClient.placeOrder({
|
|
62
|
+
marketName: 'BTC-USD',
|
|
63
|
+
amountOfSynthetic: new Decimal('1'),
|
|
64
|
+
price: new Decimal('63000.1'),
|
|
65
|
+
side: OrderSide.SELL,
|
|
66
|
+
});
|
|
67
|
+
|
|
68
|
+
console.log('Placed order:', placedOrder);
|
|
69
|
+
|
|
70
|
+
// Cancel the order
|
|
71
|
+
await tradingClient.orders.cancelOrder(placedOrder.id);
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
### 3. Get Account Information
|
|
75
|
+
|
|
76
|
+
```typescript
|
|
77
|
+
// Get balance
|
|
78
|
+
const balance = await tradingClient.account.getBalance();
|
|
79
|
+
console.log('Balance:', balance.toPrettyJson());
|
|
80
|
+
|
|
81
|
+
// Get positions
|
|
82
|
+
const positions = await tradingClient.account.getPositions();
|
|
83
|
+
console.log('Positions:', positions.toPrettyJson());
|
|
84
|
+
|
|
85
|
+
// Get open orders
|
|
86
|
+
const openOrders = await tradingClient.account.getOpenOrders();
|
|
87
|
+
console.log('Open orders:', openOrders.toPrettyJson());
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### 4. Onboarding (User Client)
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
import { UserClient, TESTNET_CONFIG } from 'extended-typescript-sdk';
|
|
94
|
+
|
|
95
|
+
// Create user client
|
|
96
|
+
const userClient = new UserClient(TESTNET_CONFIG, () => ethPrivateKey);
|
|
97
|
+
|
|
98
|
+
// Onboard new account
|
|
99
|
+
const account = await userClient.onboard();
|
|
100
|
+
|
|
101
|
+
// Get API key
|
|
102
|
+
const apiKey = await userClient.createAccountApiKey(account.account, 'My trading key');
|
|
103
|
+
|
|
104
|
+
// Use the account
|
|
105
|
+
const starkAccount = new StarkPerpetualAccount(
|
|
106
|
+
account.account.l2Vault,
|
|
107
|
+
account.l2KeyPair.privateHex,
|
|
108
|
+
account.l2KeyPair.publicHex,
|
|
109
|
+
apiKey
|
|
110
|
+
);
|
|
111
|
+
|
|
112
|
+
const client = new PerpetualTradingClient(TESTNET_CONFIG, starkAccount);
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### 5. Stream Data
|
|
116
|
+
|
|
117
|
+
```typescript
|
|
118
|
+
import { PerpetualStreamClient, TESTNET_CONFIG } from 'extended-typescript-sdk';
|
|
119
|
+
|
|
120
|
+
const streamClient = new PerpetualStreamClient({
|
|
121
|
+
apiUrl: TESTNET_CONFIG.streamUrl,
|
|
122
|
+
});
|
|
123
|
+
|
|
124
|
+
// Subscribe to orderbooks
|
|
125
|
+
const orderbookStream = streamClient.subscribeToOrderbooks({ marketName: 'BTC-USD' });
|
|
126
|
+
await orderbookStream.connect();
|
|
127
|
+
|
|
128
|
+
for await (const update of orderbookStream) {
|
|
129
|
+
console.log('Orderbook update:', update);
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
// Subscribe to account updates
|
|
133
|
+
const accountStream = streamClient.subscribeToAccountUpdates(apiKey);
|
|
134
|
+
await accountStream.connect();
|
|
135
|
+
|
|
136
|
+
for await (const update of accountStream) {
|
|
137
|
+
console.log('Account update:', update);
|
|
138
|
+
}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## WASM Signer
|
|
142
|
+
|
|
143
|
+
The SDK includes a pre-built WASM signer that works in both **Node.js** and **browser** environments. **No Rust installation is required to use the SDK.**
|
|
144
|
+
|
|
145
|
+
### Using the Pre-built Signer
|
|
146
|
+
|
|
147
|
+
The SDK ships with pre-built WASM files. Simply use the SDK:
|
|
148
|
+
|
|
149
|
+
```typescript
|
|
150
|
+
import { initWasm, sign } from 'extended-typescript-sdk';
|
|
151
|
+
|
|
152
|
+
await initWasm(); // Automatically loads the correct WASM for your environment
|
|
153
|
+
const [r, s] = sign(privateKey, msgHash);
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
The signer automatically detects your environment (Node.js or browser) and loads the appropriate WASM module.
|
|
157
|
+
|
|
158
|
+
### Building Your Own WASM Signer
|
|
159
|
+
|
|
160
|
+
If you want to build your own WASM signer (requires Rust and wasm-pack):
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
npm run build:signer:custom
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Prerequisites:**
|
|
167
|
+
1. Install Rust: https://www.rust-lang.org/tools/install
|
|
168
|
+
2. Install wasm-pack: `cargo install wasm-pack`
|
|
169
|
+
|
|
170
|
+
This will build both Node.js and browser targets and replace the shipped WASM signer.
|
|
171
|
+
|
|
172
|
+
### Implementation
|
|
173
|
+
|
|
174
|
+
The WASM signer uses `starknet-crypto` crate for cryptographic operations. It's production-ready and tested for compatibility with Extended Exchange API.
|
|
175
|
+
|
|
176
|
+
## API Documentation
|
|
177
|
+
|
|
178
|
+
### Trading Client
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
import { PerpetualTradingClient, TESTNET_CONFIG } from 'extended-typescript-sdk';
|
|
182
|
+
|
|
183
|
+
const client = new PerpetualTradingClient(config, account);
|
|
184
|
+
|
|
185
|
+
// Place order
|
|
186
|
+
await client.placeOrder({
|
|
187
|
+
marketName: 'BTC-USD',
|
|
188
|
+
amountOfSynthetic: new Decimal('1'),
|
|
189
|
+
price: new Decimal('63000'),
|
|
190
|
+
side: OrderSide.BUY,
|
|
191
|
+
});
|
|
192
|
+
|
|
193
|
+
// Account module
|
|
194
|
+
await client.account.getBalance();
|
|
195
|
+
await client.account.getPositions();
|
|
196
|
+
await client.account.getOpenOrders();
|
|
197
|
+
await client.account.updateLeverage('BTC-USD', new Decimal('10'));
|
|
198
|
+
|
|
199
|
+
// Orders module
|
|
200
|
+
await client.orders.cancelOrder(orderId);
|
|
201
|
+
await client.orders.cancelOrderByExternalId(externalId);
|
|
202
|
+
await client.orders.massCancel({ markets: ['BTC-USD'] });
|
|
203
|
+
|
|
204
|
+
// Markets module
|
|
205
|
+
await client.marketsInfo.getMarkets();
|
|
206
|
+
await client.marketsInfo.getMarketStatistics('BTC-USD');
|
|
207
|
+
await client.marketsInfo.getOrderbookSnapshot('BTC-USD');
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
### User Client (Onboarding)
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
import { UserClient } from 'extended-typescript-sdk';
|
|
214
|
+
|
|
215
|
+
const userClient = new UserClient(config, () => ethPrivateKey);
|
|
216
|
+
|
|
217
|
+
// Onboard new account
|
|
218
|
+
const account = await userClient.onboard();
|
|
219
|
+
|
|
220
|
+
// Onboard subaccount
|
|
221
|
+
const subaccount = await userClient.onboardSubaccount(1, 'My subaccount');
|
|
222
|
+
|
|
223
|
+
// Get all accounts
|
|
224
|
+
const accounts = await userClient.getAccounts();
|
|
225
|
+
|
|
226
|
+
// Create API key
|
|
227
|
+
const apiKey = await userClient.createAccountApiKey(account.account, 'description');
|
|
228
|
+
```
|
|
229
|
+
|
|
230
|
+
### Stream Client
|
|
231
|
+
|
|
232
|
+
```typescript
|
|
233
|
+
import { PerpetualStreamClient } from 'extended-typescript-sdk';
|
|
234
|
+
|
|
235
|
+
const streamClient = new PerpetualStreamClient({ apiUrl: config.streamUrl });
|
|
236
|
+
|
|
237
|
+
// Subscribe to orderbooks
|
|
238
|
+
const orderbookStream = streamClient.subscribeToOrderbooks({
|
|
239
|
+
marketName: 'BTC-USD',
|
|
240
|
+
depth: 10,
|
|
241
|
+
});
|
|
242
|
+
|
|
243
|
+
// Subscribe to public trades
|
|
244
|
+
const tradesStream = streamClient.subscribeToPublicTrades('BTC-USD');
|
|
245
|
+
|
|
246
|
+
// Subscribe to funding rates
|
|
247
|
+
const fundingStream = streamClient.subscribeToFundingRates('BTC-USD');
|
|
248
|
+
|
|
249
|
+
// Subscribe to account updates (requires API key)
|
|
250
|
+
const accountStream = streamClient.subscribeToAccountUpdates(apiKey);
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
## Environment Configuration
|
|
254
|
+
|
|
255
|
+
The SDK supports different environments:
|
|
256
|
+
|
|
257
|
+
```typescript
|
|
258
|
+
import { TESTNET_CONFIG, MAINNET_CONFIG } from 'extended-typescript-sdk';
|
|
259
|
+
|
|
260
|
+
// Use testnet
|
|
261
|
+
const client = new PerpetualTradingClient(TESTNET_CONFIG, account);
|
|
262
|
+
|
|
263
|
+
// Use mainnet
|
|
264
|
+
const client = new PerpetualTradingClient(MAINNET_CONFIG, account);
|
|
265
|
+
```
|
|
266
|
+
|
|
267
|
+
## TypeScript Support
|
|
268
|
+
|
|
269
|
+
This SDK is written in TypeScript and provides full type definitions. All types are exported:
|
|
270
|
+
|
|
271
|
+
```typescript
|
|
272
|
+
import {
|
|
273
|
+
OrderSide,
|
|
274
|
+
OrderType,
|
|
275
|
+
OrderStatus,
|
|
276
|
+
TimeInForce,
|
|
277
|
+
StarkPerpetualAccount,
|
|
278
|
+
PerpetualTradingClient,
|
|
279
|
+
UserClient,
|
|
280
|
+
PerpetualStreamClient,
|
|
281
|
+
// ... and more
|
|
282
|
+
} from 'extended-typescript-sdk';
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
## Error Handling
|
|
286
|
+
|
|
287
|
+
The SDK provides specific error types:
|
|
288
|
+
|
|
289
|
+
```typescript
|
|
290
|
+
import {
|
|
291
|
+
X10Error,
|
|
292
|
+
RateLimitException,
|
|
293
|
+
NotAuthorizedException,
|
|
294
|
+
SubAccountExists,
|
|
295
|
+
} from 'extended-typescript-sdk';
|
|
296
|
+
|
|
297
|
+
try {
|
|
298
|
+
await client.placeOrder({ ... });
|
|
299
|
+
} catch (error) {
|
|
300
|
+
if (error instanceof RateLimitException) {
|
|
301
|
+
// Handle rate limit
|
|
302
|
+
} else if (error instanceof NotAuthorizedException) {
|
|
303
|
+
// Handle authentication error
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
## Examples
|
|
309
|
+
|
|
310
|
+
See `examples/` directory for complete examples:
|
|
311
|
+
|
|
312
|
+
- Basic order placement
|
|
313
|
+
- Onboarding flow
|
|
314
|
+
- Stream subscriptions
|
|
315
|
+
- Market data access
|
|
316
|
+
- Account management
|
|
317
|
+
|
|
318
|
+
## WASM Performance
|
|
319
|
+
|
|
320
|
+
The WASM signer provides ~90-95% of native Rust performance:
|
|
321
|
+
|
|
322
|
+
```
|
|
323
|
+
Native Rust: ~50μs per signature
|
|
324
|
+
WASM (Rust): ~55μs per signature (10% slower)
|
|
325
|
+
Pure JavaScript: ~500μs per signature (10x slower)
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
The performance difference is negligible in real-world applications.
|
|
329
|
+
|
|
330
|
+
## Building the SDK
|
|
331
|
+
|
|
332
|
+
### For Users (No Build Required)
|
|
333
|
+
|
|
334
|
+
The SDK ships with pre-built WASM signer - just install and use:
|
|
335
|
+
|
|
336
|
+
```bash
|
|
337
|
+
npm install extended-typescript-sdk
|
|
338
|
+
```
|
|
339
|
+
|
|
340
|
+
### For Developers
|
|
341
|
+
|
|
342
|
+
If you're developing the SDK or want to build your own WASM signer:
|
|
343
|
+
|
|
344
|
+
```bash
|
|
345
|
+
# Install dependencies
|
|
346
|
+
npm install
|
|
347
|
+
|
|
348
|
+
# Build WASM signer (requires Rust and wasm-pack)
|
|
349
|
+
npm run build:signer
|
|
350
|
+
|
|
351
|
+
# Build TypeScript
|
|
352
|
+
npm run build:ts
|
|
353
|
+
|
|
354
|
+
# Build everything
|
|
355
|
+
npm run build # Builds both WASM signer and TypeScript
|
|
356
|
+
|
|
357
|
+
# Build custom WASM signer (for users who want to replace shipped WASM)
|
|
358
|
+
npm run build:signer:custom
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
### Build Commands
|
|
362
|
+
|
|
363
|
+
- `npm run build` - Builds WASM signer and TypeScript (full build)
|
|
364
|
+
- `npm run build:signer` - Builds WASM signer for both Node.js and browser
|
|
365
|
+
- `npm run build:signer:custom` - Build your own WASM signer (requires Rust)
|
|
366
|
+
- `npm run build:ts` - Build TypeScript only
|
|
367
|
+
- `npm run clean` - Clean all build artifacts
|
|
368
|
+
|
|
369
|
+
### Development Commands
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
# Run tests
|
|
373
|
+
npm test
|
|
374
|
+
|
|
375
|
+
# Lint
|
|
376
|
+
npm run lint
|
|
377
|
+
|
|
378
|
+
# Format code
|
|
379
|
+
npm run format
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
## Contributing
|
|
383
|
+
|
|
384
|
+
1. Clone the repository
|
|
385
|
+
2. Install dependencies: `npm install`
|
|
386
|
+
3. Install Rust and wasm-pack (only if building WASM signer)
|
|
387
|
+
4. Build: `npm run build`
|
|
388
|
+
5. Run tests: `npm test`
|
|
389
|
+
|
|
390
|
+
## License
|
|
391
|
+
|
|
392
|
+
MIT
|
|
393
|
+
|
|
394
|
+
## Support
|
|
395
|
+
|
|
396
|
+
For issues and questions:
|
|
397
|
+
- GitHub: https://github.com/Bvvvp009/Extended-TS-SDK
|
|
398
|
+
- Documentation: https://api.docs.extended.exchange/
|
|
399
|
+
- Extended Exchange: https://extended.exchange/
|
|
400
|
+
|
|
401
|
+
**Note**: This is an unofficial, community-maintained SDK. For official support, please contact Extended Exchange directly.
|
|
402
|
+
|
|
403
|
+
## API Coverage
|
|
404
|
+
|
|
405
|
+
See [API_COVERAGE.md](./API_COVERAGE.md) for complete API endpoint coverage analysis.
|
|
406
|
+
|
|
407
|
+
## Standalone Signer Functions
|
|
408
|
+
|
|
409
|
+
The cryptographic signer functions are exported from the main SDK package for standalone use:
|
|
410
|
+
|
|
411
|
+
```typescript
|
|
412
|
+
import {
|
|
413
|
+
initWasm,
|
|
414
|
+
sign,
|
|
415
|
+
pedersenHash,
|
|
416
|
+
getOrderMsgHash,
|
|
417
|
+
getTransferMsgHash,
|
|
418
|
+
getWithdrawalMsgHash,
|
|
419
|
+
generateKeypairFromEthSignature
|
|
420
|
+
} from 'extended-typescript-sdk';
|
|
421
|
+
|
|
422
|
+
// Initialize WASM module (required first!)
|
|
423
|
+
await initWasm();
|
|
424
|
+
|
|
425
|
+
// Sign a message hash
|
|
426
|
+
const privateKey = BigInt('0x...');
|
|
427
|
+
const msgHash = BigInt('0x...');
|
|
428
|
+
const [r, s] = sign(privateKey, msgHash);
|
|
429
|
+
|
|
430
|
+
// Compute Pedersen hash
|
|
431
|
+
const hash = pedersenHash(BigInt('0x123'), BigInt('0x456'));
|
|
432
|
+
|
|
433
|
+
// Generate order message hash (for custom order signing)
|
|
434
|
+
const orderHash = getOrderMsgHash({
|
|
435
|
+
positionId: 12345,
|
|
436
|
+
baseAssetId: '0x...',
|
|
437
|
+
baseAmount: '1000000',
|
|
438
|
+
// ... other order parameters
|
|
439
|
+
});
|
|
440
|
+
|
|
441
|
+
// Generate keypair from Ethereum signature (for onboarding)
|
|
442
|
+
const [privateKey, publicKey] = generateKeypairFromEthSignature(ethSignature);
|
|
443
|
+
```
|
|
444
|
+
|
|
445
|
+
All signer functions are documented with JSDoc comments. See the [signer source code](./src/perpetual/crypto/signer.ts) for detailed documentation.
|
package/dist/config.d.ts
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Configuration constants for the X10 SDK
|
|
3
|
+
*/
|
|
4
|
+
export declare const DEFAULT_REQUEST_TIMEOUT_SECONDS = 500;
|
|
5
|
+
export declare const SDK_VERSION = "0.0.1";
|
|
6
|
+
export declare const USER_AGENT = "X10TypeScriptTradingClient/0.0.1";
|
|
7
|
+
export declare const BTC_USD_MARKET = "BTC-USD";
|
|
8
|
+
export declare const SOL_USD_MARKET = "SOL-USD";
|
|
9
|
+
export declare const ADA_USD_MARKET = "ADA-USD";
|
|
10
|
+
export declare const ETH_USD_MARKET = "ETH-USD";
|
|
11
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,eAAO,MAAM,+BAA+B,MAAM,CAAC;AACnD,eAAO,MAAM,WAAW,UAAU,CAAC;AACnC,eAAO,MAAM,UAAU,qCAA8C,CAAC;AAGtE,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,cAAc,YAAY,CAAC;AACxC,eAAO,MAAM,cAAc,YAAY,CAAC"}
|
package/dist/config.js
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Configuration constants for the X10 SDK
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ETH_USD_MARKET = exports.ADA_USD_MARKET = exports.SOL_USD_MARKET = exports.BTC_USD_MARKET = exports.USER_AGENT = exports.SDK_VERSION = exports.DEFAULT_REQUEST_TIMEOUT_SECONDS = void 0;
|
|
7
|
+
exports.DEFAULT_REQUEST_TIMEOUT_SECONDS = 500;
|
|
8
|
+
exports.SDK_VERSION = '0.0.1';
|
|
9
|
+
exports.USER_AGENT = `X10TypeScriptTradingClient/${exports.SDK_VERSION}`;
|
|
10
|
+
// Market constants
|
|
11
|
+
exports.BTC_USD_MARKET = 'BTC-USD';
|
|
12
|
+
exports.SOL_USD_MARKET = 'SOL-USD';
|
|
13
|
+
exports.ADA_USD_MARKET = 'ADA-USD';
|
|
14
|
+
exports.ETH_USD_MARKET = 'ETH-USD';
|
|
15
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAEU,QAAA,+BAA+B,GAAG,GAAG,CAAC;AACtC,QAAA,WAAW,GAAG,OAAO,CAAC;AACtB,QAAA,UAAU,GAAG,8BAA8B,mBAAW,EAAE,CAAC;AAEtE,mBAAmB;AACN,QAAA,cAAc,GAAG,SAAS,CAAC;AAC3B,QAAA,cAAc,GAAG,SAAS,CAAC;AAC3B,QAAA,cAAc,GAAG,SAAS,CAAC;AAC3B,QAAA,cAAc,GAAG,SAAS,CAAC"}
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Base error class for all X10 SDK errors
|
|
3
|
+
*/
|
|
4
|
+
export declare class X10Error extends Error {
|
|
5
|
+
constructor(message: string);
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Error thrown when rate limit is exceeded
|
|
9
|
+
*/
|
|
10
|
+
export declare class RateLimitException extends X10Error {
|
|
11
|
+
constructor(message: string);
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Error thrown when authentication fails
|
|
15
|
+
*/
|
|
16
|
+
export declare class NotAuthorizedException extends X10Error {
|
|
17
|
+
constructor(message: string);
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Error thrown when a sub-account already exists
|
|
21
|
+
*/
|
|
22
|
+
export declare class SubAccountExists extends X10Error {
|
|
23
|
+
constructor(message: string);
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,qBAAa,QAAS,SAAQ,KAAK;gBACrB,OAAO,EAAE,MAAM;CAK5B;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,QAAQ;gBAClC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,sBAAuB,SAAQ,QAAQ;gBACtC,OAAO,EAAE,MAAM;CAI5B;AAED;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,QAAQ;gBAChC,OAAO,EAAE,MAAM;CAI5B"}
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SubAccountExists = exports.NotAuthorizedException = exports.RateLimitException = exports.X10Error = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Base error class for all X10 SDK errors
|
|
6
|
+
*/
|
|
7
|
+
class X10Error extends Error {
|
|
8
|
+
constructor(message) {
|
|
9
|
+
super(message);
|
|
10
|
+
this.name = 'X10Error';
|
|
11
|
+
Object.setPrototypeOf(this, X10Error.prototype);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
exports.X10Error = X10Error;
|
|
15
|
+
/**
|
|
16
|
+
* Error thrown when rate limit is exceeded
|
|
17
|
+
*/
|
|
18
|
+
class RateLimitException extends X10Error {
|
|
19
|
+
constructor(message) {
|
|
20
|
+
super(message);
|
|
21
|
+
this.name = 'RateLimitException';
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.RateLimitException = RateLimitException;
|
|
25
|
+
/**
|
|
26
|
+
* Error thrown when authentication fails
|
|
27
|
+
*/
|
|
28
|
+
class NotAuthorizedException extends X10Error {
|
|
29
|
+
constructor(message) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = 'NotAuthorizedException';
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.NotAuthorizedException = NotAuthorizedException;
|
|
35
|
+
/**
|
|
36
|
+
* Error thrown when a sub-account already exists
|
|
37
|
+
*/
|
|
38
|
+
class SubAccountExists extends X10Error {
|
|
39
|
+
constructor(message) {
|
|
40
|
+
super(message);
|
|
41
|
+
this.name = 'SubAccountExists';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.SubAccountExists = SubAccountExists;
|
|
45
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACH,MAAa,QAAS,SAAQ,KAAK;IACjC,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAClD,CAAC;CACF;AAND,4BAMC;AAED;;GAEG;AACH,MAAa,kBAAmB,SAAQ,QAAQ;IAC9C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,oBAAoB,CAAC;IACnC,CAAC;CACF;AALD,gDAKC;AAED;;GAEG;AACH,MAAa,sBAAuB,SAAQ,QAAQ;IAClD,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,wBAAwB,CAAC;IACvC,CAAC;CACF;AALD,wDAKC;AAED;;GAEG;AACH,MAAa,gBAAiB,SAAQ,QAAQ;IAC5C,YAAY,OAAe;QACzB,KAAK,CAAC,OAAO,CAAC,CAAC;QACf,IAAI,CAAC,IAAI,GAAG,kBAAkB,CAAC;IACjC,CAAC;CACF;AALD,4CAKC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Extended TypeScript Trading SDK
|
|
3
|
+
*
|
|
4
|
+
* Unofficial TypeScript client for Extended Exchange API
|
|
5
|
+
* Built and maintained by the community
|
|
6
|
+
*
|
|
7
|
+
* Extended is a perpetual DEX, built by an ex-Revolut team.
|
|
8
|
+
* Extended offers perpetual contracts on both crypto and TradFi assets,
|
|
9
|
+
* with USDC as collateral and leverage of up to 100x.
|
|
10
|
+
*/
|
|
11
|
+
export { initWasm } from './perpetual/crypto/signer';
|
|
12
|
+
export { EndpointConfig, StarknetDomain, TESTNET_CONFIG, MAINNET_CONFIG } from './perpetual/configuration';
|
|
13
|
+
export { StarkPerpetualAccount, AccountModel, AccountLeverage, BalanceModel } from './perpetual/accounts';
|
|
14
|
+
export { OrderSide, OrderType, OrderStatus, OrderStatusReason, TimeInForce, OrderTpslType, SelfTradeProtectionLevel, OrderPriceType, OrderTriggerPriceType, NewOrderModel, PlacedOrderModel, OpenOrderModel, CreateOrderTpslTriggerModel, } from './perpetual/orders';
|
|
15
|
+
export { PerpetualTradingClient } from './perpetual/trading-client/trading-client';
|
|
16
|
+
export { AccountModule } from './perpetual/trading-client/account-module';
|
|
17
|
+
export { OrderManagementModule } from './perpetual/trading-client/order-management-module';
|
|
18
|
+
export { MarketsInformationModule } from './perpetual/trading-client/markets-information-module';
|
|
19
|
+
export { InfoModule } from './perpetual/trading-client/info-module';
|
|
20
|
+
export { TestnetModule } from './perpetual/trading-client/testnet-module';
|
|
21
|
+
export { UserClient } from './perpetual/user-client/user-client';
|
|
22
|
+
export { OnBoardedAccount, StarkKeyPair } from './perpetual/user-client/onboarding';
|
|
23
|
+
export { PerpetualStreamClient } from './perpetual/stream-client/stream-client';
|
|
24
|
+
export { PerpetualStreamConnection } from './perpetual/stream-client/perpetual-stream-connection';
|
|
25
|
+
export { PositionModel, PositionHistoryModel, PositionSide, PositionStatus, ExitType } from './perpetual/positions';
|
|
26
|
+
export { AccountTradeModel, PublicTradeModel, TradeType } from './perpetual/trades';
|
|
27
|
+
export { createOrderObject, OrderTpslTriggerParam } from './perpetual/order-object';
|
|
28
|
+
export { MarketModel, MarketStatsModel, TradingConfigModel } from './perpetual/markets';
|
|
29
|
+
export { Asset, AssetOperationType, AssetOperationStatus } from './perpetual/assets';
|
|
30
|
+
export { TradingFeeModel, DEFAULT_FEES } from './perpetual/fees';
|
|
31
|
+
export { X10Error, RateLimitException, NotAuthorizedException, SubAccountExists } from './errors';
|
|
32
|
+
export { WrappedApiResponse, WrappedStreamResponse, StreamDataType } from './utils/http';
|
|
33
|
+
export { X10BaseModel, SettlementSignatureModel } from './utils/model';
|
|
34
|
+
export { generateNonce } from './utils/nonce';
|
|
35
|
+
export { utcNow, toEpochMillis } from './utils/date';
|
|
36
|
+
export * from './utils/env';
|
|
37
|
+
export { sign, pedersenHash, generateKeypairFromEthSignature, getOrderMsgHash, getTransferMsgHash, getWithdrawalMsgHash, } from './perpetual/crypto/signer';
|
|
38
|
+
export declare const SDK_VERSION = "0.0.1";
|
|
39
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAG3G,OAAO,EAAE,qBAAqB,EAAE,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAG1G,OAAO,EACL,SAAS,EACT,SAAS,EACT,WAAW,EACX,iBAAiB,EACjB,WAAW,EACX,aAAa,EACb,wBAAwB,EACxB,cAAc,EACd,qBAAqB,EACrB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAG5B,OAAO,EAAE,sBAAsB,EAAE,MAAM,2CAA2C,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAC1E,OAAO,EAAE,qBAAqB,EAAE,MAAM,oDAAoD,CAAC;AAC3F,OAAO,EAAE,wBAAwB,EAAE,MAAM,uDAAuD,CAAC;AACjG,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,aAAa,EAAE,MAAM,2CAA2C,CAAC;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,qCAAqC,CAAC;AACjE,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAGpF,OAAO,EAAE,qBAAqB,EAAE,MAAM,yCAAyC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,uDAAuD,CAAC;AAGlG,OAAO,EAAE,aAAa,EAAE,oBAAoB,EAAE,YAAY,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACpH,OAAO,EAAE,iBAAiB,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAGpF,OAAO,EAAE,iBAAiB,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAGpF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAGxF,OAAO,EAAE,KAAK,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAGrF,OAAO,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGjE,OAAO,EAAE,QAAQ,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGlG,OAAO,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzF,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAGrD,cAAc,aAAa,CAAC;AAG5B,OAAO,EACL,IAAI,EACJ,YAAY,EACZ,+BAA+B,EAC/B,eAAe,EACf,kBAAkB,EAClB,oBAAoB,GACrB,MAAM,2BAA2B,CAAC;AAGnC,eAAO,MAAM,WAAW,UAAU,CAAC"}
|