lighter-sdk-client 0.2.22 → 0.2.27
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.
Potentially problematic release.
This version of lighter-sdk-client might be problematic. Click here for more details.
- package/README.md +78 -0
- package/dist/api/exchange/create-intent-address.cjs +6 -0
- package/dist/api/exchange/create-intent-address.d.cts +16 -0
- package/dist/api/exchange/create-intent-address.d.ts +16 -0
- package/dist/api/exchange/create-intent-address.js +6 -0
- package/dist/api/exchange/index.cjs +6 -2
- package/dist/api/exchange/index.d.cts +1 -0
- package/dist/api/exchange/index.d.ts +1 -0
- package/dist/api/exchange/index.js +5 -1
- package/dist/api/info/index.cjs +20 -20
- package/dist/api/info/index.js +23 -23
- package/dist/api/info-private/bridges.cjs +6 -0
- package/dist/api/info-private/bridges.d.cts +30 -0
- package/dist/api/info-private/bridges.d.ts +30 -0
- package/dist/api/info-private/bridges.js +6 -0
- package/dist/api/info-private/index.cjs +23 -19
- package/dist/api/info-private/index.d.cts +1 -0
- package/dist/api/info-private/index.d.ts +1 -0
- package/dist/api/info-private/index.js +24 -20
- package/dist/api/info-private/pnl.d.cts +14 -3
- package/dist/api/info-private/pnl.d.ts +14 -3
- package/dist/{chunk-R37XMGAI.cjs → chunk-4XX2BB5H.cjs} +21 -0
- package/dist/chunk-73K2MTMD.js +22 -0
- package/dist/{chunk-OBR3B6S7.cjs → chunk-B3IAFLNV.cjs} +35 -17
- package/dist/{chunk-TM3CNEVD.js → chunk-E7FSMXYD.js} +37 -19
- package/dist/chunk-IW5D24DG.cjs +16 -0
- package/dist/{chunk-NOREYPFC.js → chunk-PANGEIBE.js} +21 -0
- package/dist/chunk-PF37LUXN.cjs +22 -0
- package/dist/chunk-QRIGHPWL.js +16 -0
- package/dist/client/exchange-client.cjs +4 -3
- package/dist/client/exchange-client.d.cts +17 -0
- package/dist/client/exchange-client.d.ts +17 -0
- package/dist/client/exchange-client.js +3 -2
- package/dist/client/index.cjs +23 -21
- package/dist/client/index.d.cts +2 -0
- package/dist/client/index.d.ts +2 -0
- package/dist/client/index.js +22 -20
- package/dist/client/info-client.cjs +10 -10
- package/dist/client/info-client.js +9 -9
- package/dist/client/info-private-client.cjs +11 -10
- package/dist/client/info-private-client.d.cts +13 -0
- package/dist/client/info-private-client.d.ts +13 -0
- package/dist/client/info-private-client.js +10 -9
- package/dist/index.cjs +28 -26
- package/dist/index.d.cts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +27 -25
- package/dist/types/index.cjs +1 -1
- package/dist/types/index.js +1 -1
- package/package.json +1 -1
- package/dist/{chunk-JLCOD3WH.cjs → chunk-2AC4DHYR.cjs} +19 -19
- package/dist/{chunk-6CD3YMMG.cjs → chunk-4JQWAMCD.cjs} +0 -0
- package/dist/{chunk-AHCELOTZ.js → chunk-FQUOIQJJ.js} +23 -23
- /package/dist/{chunk-GI4WUHSL.cjs → chunk-KAD2P2GV.cjs} +0 -0
- /package/dist/{chunk-DCKMNDS3.js → chunk-S4IHMH3J.js} +0 -0
- /package/dist/{chunk-TSHQJVUP.js → chunk-UONA2XN2.js} +0 -0
package/README.md
CHANGED
|
@@ -105,6 +105,14 @@ const withdrawResult = await client.fastWithdraw({
|
|
|
105
105
|
to_address: '0x...'
|
|
106
106
|
}, 'auth-token');
|
|
107
107
|
|
|
108
|
+
// Create intent address for deposits
|
|
109
|
+
const intentAddress = await client.createIntentAddress({
|
|
110
|
+
chain_id: 101, // Solana chain ID
|
|
111
|
+
from_addr: '0x47Af141529dd73CD4Ca07416ad449b29df6F3c9e',
|
|
112
|
+
amount: '0',
|
|
113
|
+
is_external_deposit: true
|
|
114
|
+
}, 'auth-token');
|
|
115
|
+
|
|
108
116
|
// Create API token
|
|
109
117
|
const newToken = await client.createToken({
|
|
110
118
|
name: 'My API Token',
|
|
@@ -184,6 +192,11 @@ const deposits = await client.getDepositHistory({
|
|
|
184
192
|
filter: 'pending'
|
|
185
193
|
});
|
|
186
194
|
|
|
195
|
+
// Get bridges for L1 address
|
|
196
|
+
const bridges = await client.getBridges({
|
|
197
|
+
l1_address: '0x47Af141529dd73CD4Ca07416ad449b29df6F3c9e'
|
|
198
|
+
});
|
|
199
|
+
|
|
187
200
|
// Get withdrawal history
|
|
188
201
|
const withdrawals = await client.getWithdrawHistory({
|
|
189
202
|
account_index: 0,
|
|
@@ -391,6 +404,69 @@ wsClient.disconnect();
|
|
|
391
404
|
- ✅ **Type-Safe** - Full TypeScript support with typed update handlers
|
|
392
405
|
- ✅ **Connection Management** - Built-in connection state tracking and lifecycle hooks
|
|
393
406
|
|
|
407
|
+
### Bridge Operations
|
|
408
|
+
|
|
409
|
+
The SDK provides comprehensive support for cross-chain bridge operations, including creating intent addresses for deposits and tracking bridge status.
|
|
410
|
+
|
|
411
|
+
#### Creating Intent Addresses (ExchangeClient)
|
|
412
|
+
|
|
413
|
+
Create an intent address for depositing funds from external chains (e.g., Solana):
|
|
414
|
+
|
|
415
|
+
```typescript
|
|
416
|
+
import { ExchangeClient } from 'lighter-sdk-client';
|
|
417
|
+
|
|
418
|
+
const exchangeClient = new ExchangeClient({
|
|
419
|
+
baseURL: 'https://mainnet.zklighter.elliot.ai',
|
|
420
|
+
wasmSigner: wasmSigner
|
|
421
|
+
});
|
|
422
|
+
|
|
423
|
+
// Create intent address for Solana deposit
|
|
424
|
+
const intentResult = await exchangeClient.createIntentAddress({
|
|
425
|
+
chain_id: 101, // Solana chain ID
|
|
426
|
+
from_addr: '0x47Af141529dd73CD4Ca07416ad449b29df6F3c9e',
|
|
427
|
+
amount: '0',
|
|
428
|
+
is_external_deposit: true
|
|
429
|
+
}, authToken);
|
|
430
|
+
|
|
431
|
+
console.log('Intent address:', intentResult.data?.intent_address);
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
#### Tracking Bridge Status (InfoPrivateClient)
|
|
435
|
+
|
|
436
|
+
Monitor the status of bridge transactions:
|
|
437
|
+
|
|
438
|
+
```typescript
|
|
439
|
+
import { InfoPrivateClient } from 'lighter-sdk-client';
|
|
440
|
+
|
|
441
|
+
const privateClient = new InfoPrivateClient({
|
|
442
|
+
baseURL: 'https://mainnet.zklighter.elliot.ai',
|
|
443
|
+
wasmSigner: wasmSigner
|
|
444
|
+
});
|
|
445
|
+
|
|
446
|
+
// Get all bridges for an L1 address
|
|
447
|
+
const bridges = await privateClient.getBridges({
|
|
448
|
+
l1_address: '0x47Af141529dd73CD4Ca07416ad449b29df6F3c9e'
|
|
449
|
+
});
|
|
450
|
+
|
|
451
|
+
// Process bridge information
|
|
452
|
+
bridges.bridges?.forEach(bridge => {
|
|
453
|
+
console.log(`Bridge ID: ${bridge.id}`);
|
|
454
|
+
console.log(`Source: ${bridge.source} (Chain ${bridge.source_chain_id})`);
|
|
455
|
+
console.log(`Intent Address: ${bridge.intent_address}`);
|
|
456
|
+
console.log(`Amount: ${bridge.amount}`);
|
|
457
|
+
console.log(`Status: ${bridge.status} - ${bridge.description}`);
|
|
458
|
+
console.log(`Step: ${bridge.step}`);
|
|
459
|
+
console.log(`External Deposit: ${bridge.is_external_deposit}`);
|
|
460
|
+
console.log('---');
|
|
461
|
+
});
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
**Bridge Status Flow:**
|
|
465
|
+
1. `pending` - Waiting for user to deposit to the intent address
|
|
466
|
+
2. Transaction processing on source chain
|
|
467
|
+
3. Cross-chain verification
|
|
468
|
+
4. Funds credited to L2 account
|
|
469
|
+
|
|
394
470
|
## API Reference
|
|
395
471
|
|
|
396
472
|
### InfoClient
|
|
@@ -450,6 +526,7 @@ Client for sending transactions and managing exchange operations.
|
|
|
450
526
|
**Account Management**
|
|
451
527
|
- `changeAccountTier(params, authorization?)` - Change account tier (requires authorization)
|
|
452
528
|
- `fastWithdraw(params, authorization?)` - Fast withdraw funds (requires authorization)
|
|
529
|
+
- `createIntentAddress(params, authorization?)` - Create intent address for deposits (requires authorization)
|
|
453
530
|
|
|
454
531
|
**API Tokens**
|
|
455
532
|
- `createToken(params, authorization?)` - Create API token with specified permissions and expiry
|
|
@@ -477,6 +554,7 @@ Client for authenticated/private endpoints. Authentication is handled automatica
|
|
|
477
554
|
|
|
478
555
|
**Transaction History**
|
|
479
556
|
- `getDepositHistory(params)` - Get deposit history with status and timestamps
|
|
557
|
+
- `getBridges(params)` - Get bridges for an L1 address
|
|
480
558
|
- `getWithdrawHistory(params)` - Get withdrawal history with status and timestamps
|
|
481
559
|
- `getFastWithdrawInfo(params)` - Get fast withdraw limits and account information
|
|
482
560
|
- `getTransferFeeInfo(params)` - Get transfer fee information between accounts
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
3
|
+
interface CreateIntentAddressRequest {
|
|
4
|
+
chain_id: number;
|
|
5
|
+
from_addr: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
is_external_deposit: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface CreateIntentAddressResponse {
|
|
10
|
+
code: number;
|
|
11
|
+
message?: string;
|
|
12
|
+
intent_address: string;
|
|
13
|
+
}
|
|
14
|
+
declare function createIntentAddress(client: AxiosInstance, params: CreateIntentAddressRequest, authorization?: string): Promise<CreateIntentAddressResponse>;
|
|
15
|
+
|
|
16
|
+
export { type CreateIntentAddressRequest, type CreateIntentAddressResponse, createIntentAddress };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
3
|
+
interface CreateIntentAddressRequest {
|
|
4
|
+
chain_id: number;
|
|
5
|
+
from_addr: string;
|
|
6
|
+
amount: string;
|
|
7
|
+
is_external_deposit: boolean;
|
|
8
|
+
}
|
|
9
|
+
interface CreateIntentAddressResponse {
|
|
10
|
+
code: number;
|
|
11
|
+
message?: string;
|
|
12
|
+
intent_address: string;
|
|
13
|
+
}
|
|
14
|
+
declare function createIntentAddress(client: AxiosInstance, params: CreateIntentAddressRequest, authorization?: string): Promise<CreateIntentAddressResponse>;
|
|
15
|
+
|
|
16
|
+
export { type CreateIntentAddressRequest, type CreateIntentAddressResponse, createIntentAddress };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-4JQWAMCD.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
var _chunk3R4OL3TUcjs = require('../../chunk-3R4OL3TU.cjs');
|
|
@@ -22,6 +22,9 @@ var _chunkGYQ6HJQYcjs = require('../../chunk-GYQ6HJQY.cjs');
|
|
|
22
22
|
var _chunkF24JA2OVcjs = require('../../chunk-F24JA2OV.cjs');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
+
var _chunkPF37LUXNcjs = require('../../chunk-PF37LUXN.cjs');
|
|
26
|
+
|
|
27
|
+
|
|
25
28
|
var _chunk5JDRAN7Lcjs = require('../../chunk-5JDRAN7L.cjs');
|
|
26
29
|
|
|
27
30
|
|
|
@@ -34,4 +37,5 @@ var _chunk5JDRAN7Lcjs = require('../../chunk-5JDRAN7L.cjs');
|
|
|
34
37
|
|
|
35
38
|
|
|
36
39
|
|
|
37
|
-
|
|
40
|
+
|
|
41
|
+
exports.acknowledgeNotification = _chunk3R4OL3TUcjs.acknowledgeNotification; exports.changeAccountTier = _chunkF24JA2OVcjs.changeAccountTier; exports.createIntentAddress = _chunkPF37LUXNcjs.createIntentAddress; exports.createToken = _chunkZGWYI7Q2cjs.createToken; exports.fastWithdraw = _chunk5JDRAN7Lcjs.fastWithdraw; exports.revokeToken = _chunkGYQ6HJQYcjs.revokeToken; exports.sendTransaction = _chunkRYDJEI67cjs.sendTransaction; exports.sendTransactionBatch = _chunkZIMFMYT2cjs.sendTransactionBatch; exports.sendTx = _chunkRYDJEI67cjs.sendTx; exports.sendTxJson = _chunkRYDJEI67cjs.sendTxJson; exports.sendTxWithIndices = _chunkRYDJEI67cjs.sendTxWithIndices;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ChangeAccountTierRequest, ChangeAccountTierResponse, changeAccountTier } from './change-account-tier.cjs';
|
|
2
|
+
export { CreateIntentAddressRequest, CreateIntentAddressResponse, createIntentAddress } from './create-intent-address.cjs';
|
|
2
3
|
export { FastWithdrawRequest, FastWithdrawResponse, fastWithdraw } from './fastwithdraw.cjs';
|
|
3
4
|
export { NotificationAckRequest, NotificationAckResponse, acknowledgeNotification } from './notification-ack.cjs';
|
|
4
5
|
export { SendTransactionRequest, SendTxFormRequest, SendTxWithIndicesRequest, TxHashResponse, sendTransaction, sendTx, sendTxJson, sendTxWithIndices } from './send-tx.cjs';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export { ChangeAccountTierRequest, ChangeAccountTierResponse, changeAccountTier } from './change-account-tier.js';
|
|
2
|
+
export { CreateIntentAddressRequest, CreateIntentAddressResponse, createIntentAddress } from './create-intent-address.js';
|
|
2
3
|
export { FastWithdrawRequest, FastWithdrawResponse, fastWithdraw } from './fastwithdraw.js';
|
|
3
4
|
export { NotificationAckRequest, NotificationAckResponse, acknowledgeNotification } from './notification-ack.js';
|
|
4
5
|
export { SendTransactionRequest, SendTxFormRequest, SendTxWithIndicesRequest, TxHashResponse, sendTransaction, sendTx, sendTxJson, sendTxWithIndices } from './send-tx.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import "../../chunk-
|
|
1
|
+
import "../../chunk-S4IHMH3J.js";
|
|
2
2
|
import {
|
|
3
3
|
acknowledgeNotification
|
|
4
4
|
} from "../../chunk-FJJWUBKM.js";
|
|
@@ -20,12 +20,16 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
changeAccountTier
|
|
22
22
|
} from "../../chunk-5WEMEUUI.js";
|
|
23
|
+
import {
|
|
24
|
+
createIntentAddress
|
|
25
|
+
} from "../../chunk-73K2MTMD.js";
|
|
23
26
|
import {
|
|
24
27
|
fastWithdraw
|
|
25
28
|
} from "../../chunk-SA6CXVP6.js";
|
|
26
29
|
export {
|
|
27
30
|
acknowledgeNotification,
|
|
28
31
|
changeAccountTier,
|
|
32
|
+
createIntentAddress,
|
|
29
33
|
createToken,
|
|
30
34
|
fastWithdraw,
|
|
31
35
|
revokeToken,
|
package/dist/api/info/index.cjs
CHANGED
|
@@ -1,65 +1,65 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-3ZIFHX7Q.cjs');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkZKFXRN6Wcjs = require('../../chunk-ZKFXRN6W.cjs');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkQNM3HYIVcjs = require('../../chunk-QNM3HYIV.cjs');
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
var
|
|
10
|
+
var _chunkIQQRFW4Acjs = require('../../chunk-IQQRFW4A.cjs');
|
|
11
11
|
|
|
12
12
|
|
|
13
|
+
var _chunkWWLOQFSWcjs = require('../../chunk-WWLOQFSW.cjs');
|
|
13
14
|
|
|
14
|
-
var _chunkBA2QFD27cjs = require('../../chunk-BA2QFD27.cjs');
|
|
15
15
|
|
|
16
|
+
var _chunkVNQKWIQGcjs = require('../../chunk-VNQKWIQG.cjs');
|
|
16
17
|
|
|
17
|
-
var _chunkWK6OQRMGcjs = require('../../chunk-WK6OQRMG.cjs');
|
|
18
18
|
|
|
19
|
+
var _chunk7U2USLAMcjs = require('../../chunk-7U2USLAM.cjs');
|
|
19
20
|
|
|
20
|
-
var _chunkZKFXRN6Wcjs = require('../../chunk-ZKFXRN6W.cjs');
|
|
21
21
|
|
|
22
|
+
var _chunkQCE5PEXEcjs = require('../../chunk-QCE5PEXE.cjs');
|
|
22
23
|
|
|
23
|
-
var _chunkQNM3HYIVcjs = require('../../chunk-QNM3HYIV.cjs');
|
|
24
24
|
|
|
25
|
+
var _chunk6GCE6YQRcjs = require('../../chunk-6GCE6YQR.cjs');
|
|
25
26
|
|
|
26
|
-
var _chunkIQQRFW4Acjs = require('../../chunk-IQQRFW4A.cjs');
|
|
27
27
|
|
|
28
|
+
var _chunkBVC2AA7Ycjs = require('../../chunk-BVC2AA7Y.cjs');
|
|
28
29
|
|
|
29
|
-
var _chunkWWLOQFSWcjs = require('../../chunk-WWLOQFSW.cjs');
|
|
30
30
|
|
|
31
|
+
var _chunkZ5XTWR2Acjs = require('../../chunk-Z5XTWR2A.cjs');
|
|
31
32
|
|
|
32
|
-
var _chunkVNQKWIQGcjs = require('../../chunk-VNQKWIQG.cjs');
|
|
33
33
|
|
|
34
|
+
var _chunkQMXZQNBKcjs = require('../../chunk-QMXZQNBK.cjs');
|
|
34
35
|
|
|
35
|
-
var _chunkINCL3WRAcjs = require('../../chunk-INCL3WRA.cjs');
|
|
36
36
|
|
|
37
|
+
var _chunk4MZ3XQUJcjs = require('../../chunk-4MZ3XQUJ.cjs');
|
|
37
38
|
|
|
38
|
-
var _chunk5U6X6DI7cjs = require('../../chunk-5U6X6DI7.cjs');
|
|
39
39
|
|
|
40
40
|
|
|
41
|
-
var
|
|
41
|
+
var _chunkBA2QFD27cjs = require('../../chunk-BA2QFD27.cjs');
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
var
|
|
44
|
+
var _chunkWK6OQRMGcjs = require('../../chunk-WK6OQRMG.cjs');
|
|
45
45
|
|
|
46
46
|
|
|
47
|
-
var
|
|
47
|
+
var _chunk2R5COGAHcjs = require('../../chunk-2R5COGAH.cjs');
|
|
48
48
|
|
|
49
49
|
|
|
50
|
-
var
|
|
50
|
+
var _chunkPP4Q2W66cjs = require('../../chunk-PP4Q2W66.cjs');
|
|
51
51
|
|
|
52
52
|
|
|
53
|
-
var
|
|
53
|
+
var _chunkE3GJJZERcjs = require('../../chunk-E3GJJZER.cjs');
|
|
54
54
|
|
|
55
55
|
|
|
56
|
-
var
|
|
56
|
+
var _chunkINCL3WRAcjs = require('../../chunk-INCL3WRA.cjs');
|
|
57
57
|
|
|
58
58
|
|
|
59
|
-
var
|
|
59
|
+
var _chunk5U6X6DI7cjs = require('../../chunk-5U6X6DI7.cjs');
|
|
60
60
|
|
|
61
61
|
|
|
62
|
-
var
|
|
62
|
+
var _chunkNIT6TCVScjs = require('../../chunk-NIT6TCVS.cjs');
|
|
63
63
|
|
|
64
64
|
|
|
65
65
|
|
package/dist/api/info/index.js
CHANGED
|
@@ -1,20 +1,4 @@
|
|
|
1
1
|
import "../../chunk-MO4PMYTS.js";
|
|
2
|
-
import {
|
|
3
|
-
getTransactions
|
|
4
|
-
} from "../../chunk-GYABNQWH.js";
|
|
5
|
-
import {
|
|
6
|
-
getWithdrawalDelay
|
|
7
|
-
} from "../../chunk-K7ZQARON.js";
|
|
8
|
-
import {
|
|
9
|
-
getNextNonce
|
|
10
|
-
} from "../../chunk-77QSYYAW.js";
|
|
11
|
-
import {
|
|
12
|
-
getOrderBookDetails,
|
|
13
|
-
getOrderBookOrders
|
|
14
|
-
} from "../../chunk-ZWYNOAL3.js";
|
|
15
|
-
import {
|
|
16
|
-
getOrderBooks
|
|
17
|
-
} from "../../chunk-3OSXAPI3.js";
|
|
18
2
|
import {
|
|
19
3
|
getRecentTrades
|
|
20
4
|
} from "../../chunk-BXMXWCMD.js";
|
|
@@ -31,14 +15,11 @@ import {
|
|
|
31
15
|
getTransaction
|
|
32
16
|
} from "../../chunk-TELGVFFP.js";
|
|
33
17
|
import {
|
|
34
|
-
|
|
35
|
-
} from "../../chunk-
|
|
36
|
-
import {
|
|
37
|
-
getAssetDetails
|
|
38
|
-
} from "../../chunk-A2APDMN3.js";
|
|
18
|
+
getTransactions
|
|
19
|
+
} from "../../chunk-GYABNQWH.js";
|
|
39
20
|
import {
|
|
40
|
-
|
|
41
|
-
} from "../../chunk-
|
|
21
|
+
getWithdrawalDelay
|
|
22
|
+
} from "../../chunk-K7ZQARON.js";
|
|
42
23
|
import {
|
|
43
24
|
getExchangeStats
|
|
44
25
|
} from "../../chunk-BKJGDTS3.js";
|
|
@@ -51,6 +32,16 @@ import {
|
|
|
51
32
|
import {
|
|
52
33
|
getFundings
|
|
53
34
|
} from "../../chunk-MZCKU6FF.js";
|
|
35
|
+
import {
|
|
36
|
+
getNextNonce
|
|
37
|
+
} from "../../chunk-77QSYYAW.js";
|
|
38
|
+
import {
|
|
39
|
+
getOrderBookDetails,
|
|
40
|
+
getOrderBookOrders
|
|
41
|
+
} from "../../chunk-ZWYNOAL3.js";
|
|
42
|
+
import {
|
|
43
|
+
getOrderBooks
|
|
44
|
+
} from "../../chunk-3OSXAPI3.js";
|
|
54
45
|
import {
|
|
55
46
|
getAccountByL1Address
|
|
56
47
|
} from "../../chunk-4VAZ7ZA2.js";
|
|
@@ -60,6 +51,15 @@ import {
|
|
|
60
51
|
import {
|
|
61
52
|
getAnnouncements
|
|
62
53
|
} from "../../chunk-YWN57BJF.js";
|
|
54
|
+
import {
|
|
55
|
+
getApiKeys
|
|
56
|
+
} from "../../chunk-S4OE3IME.js";
|
|
57
|
+
import {
|
|
58
|
+
getAssetDetails
|
|
59
|
+
} from "../../chunk-A2APDMN3.js";
|
|
60
|
+
import {
|
|
61
|
+
getCandlesticks
|
|
62
|
+
} from "../../chunk-JTE4UBAX.js";
|
|
63
63
|
export {
|
|
64
64
|
getAccountByL1Address,
|
|
65
65
|
getAccountInfo,
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
3
|
+
interface BridgesRequest {
|
|
4
|
+
l1_address: string;
|
|
5
|
+
}
|
|
6
|
+
interface BridgeItem {
|
|
7
|
+
id: number;
|
|
8
|
+
version: number;
|
|
9
|
+
source: string;
|
|
10
|
+
source_chain_id: string;
|
|
11
|
+
fast_bridge_tx_hash: string;
|
|
12
|
+
batch_claim_tx_hash: string;
|
|
13
|
+
cctp_burn_tx_hash: string;
|
|
14
|
+
amount: string;
|
|
15
|
+
intent_address: string;
|
|
16
|
+
status: string;
|
|
17
|
+
step: string;
|
|
18
|
+
description: string;
|
|
19
|
+
created_at: number;
|
|
20
|
+
updated_at: number;
|
|
21
|
+
is_external_deposit: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface BridgesResponse {
|
|
24
|
+
code: number;
|
|
25
|
+
message?: string;
|
|
26
|
+
bridges: BridgeItem[];
|
|
27
|
+
}
|
|
28
|
+
declare function getBridges(client: AxiosInstance, params: BridgesRequest, authorization?: string): Promise<BridgesResponse>;
|
|
29
|
+
|
|
30
|
+
export { type BridgeItem, type BridgesRequest, type BridgesResponse, getBridges };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { AxiosInstance } from 'axios';
|
|
2
|
+
|
|
3
|
+
interface BridgesRequest {
|
|
4
|
+
l1_address: string;
|
|
5
|
+
}
|
|
6
|
+
interface BridgeItem {
|
|
7
|
+
id: number;
|
|
8
|
+
version: number;
|
|
9
|
+
source: string;
|
|
10
|
+
source_chain_id: string;
|
|
11
|
+
fast_bridge_tx_hash: string;
|
|
12
|
+
batch_claim_tx_hash: string;
|
|
13
|
+
cctp_burn_tx_hash: string;
|
|
14
|
+
amount: string;
|
|
15
|
+
intent_address: string;
|
|
16
|
+
status: string;
|
|
17
|
+
step: string;
|
|
18
|
+
description: string;
|
|
19
|
+
created_at: number;
|
|
20
|
+
updated_at: number;
|
|
21
|
+
is_external_deposit: boolean;
|
|
22
|
+
}
|
|
23
|
+
interface BridgesResponse {
|
|
24
|
+
code: number;
|
|
25
|
+
message?: string;
|
|
26
|
+
bridges: BridgeItem[];
|
|
27
|
+
}
|
|
28
|
+
declare function getBridges(client: AxiosInstance, params: BridgesRequest, authorization?: string): Promise<BridgesResponse>;
|
|
29
|
+
|
|
30
|
+
export { type BridgeItem, type BridgesRequest, type BridgesResponse, getBridges };
|
|
@@ -1,13 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var _chunkU2SM46CPcjs = require('../../chunk-U2SM46CP.cjs');
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
var _chunk4TIJW7PHcjs = require('../../chunk-4TIJW7PH.cjs');
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
var _chunkJ3UZK77Ocjs = require('../../chunk-J3UZK77O.cjs');
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-KAD2P2GV.cjs');
|
|
11
2
|
|
|
12
3
|
|
|
13
4
|
var _chunkDW6W5SX2cjs = require('../../chunk-DW6W5SX2.cjs');
|
|
@@ -16,12 +7,6 @@ var _chunkDW6W5SX2cjs = require('../../chunk-DW6W5SX2.cjs');
|
|
|
16
7
|
var _chunkJ7GXRK7Rcjs = require('../../chunk-J7GXRK7R.cjs');
|
|
17
8
|
|
|
18
9
|
|
|
19
|
-
var _chunkFM4WWIRIcjs = require('../../chunk-FM4WWIRI.cjs');
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
var _chunkDOZF64YCcjs = require('../../chunk-DOZF64YC.cjs');
|
|
23
|
-
|
|
24
|
-
|
|
25
10
|
var _chunkON64OVOQcjs = require('../../chunk-ON64OVOQ.cjs');
|
|
26
11
|
|
|
27
12
|
|
|
@@ -37,10 +22,13 @@ var _chunkX7E6XJVQcjs = require('../../chunk-X7E6XJVQ.cjs');
|
|
|
37
22
|
var _chunk6LUEPRL7cjs = require('../../chunk-6LUEPRL7.cjs');
|
|
38
23
|
|
|
39
24
|
|
|
40
|
-
var
|
|
25
|
+
var _chunkU2SM46CPcjs = require('../../chunk-U2SM46CP.cjs');
|
|
41
26
|
|
|
42
27
|
|
|
43
|
-
var
|
|
28
|
+
var _chunk4TIJW7PHcjs = require('../../chunk-4TIJW7PH.cjs');
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
var _chunkJ3UZK77Ocjs = require('../../chunk-J3UZK77O.cjs');
|
|
44
32
|
|
|
45
33
|
|
|
46
34
|
var _chunkU25GSCR7cjs = require('../../chunk-U25GSCR7.cjs');
|
|
@@ -49,12 +37,28 @@ var _chunkU25GSCR7cjs = require('../../chunk-U25GSCR7.cjs');
|
|
|
49
37
|
var _chunkZJVQD6JDcjs = require('../../chunk-ZJVQD6JD.cjs');
|
|
50
38
|
|
|
51
39
|
|
|
40
|
+
var _chunkIW5D24DGcjs = require('../../chunk-IW5D24DG.cjs');
|
|
41
|
+
|
|
42
|
+
|
|
52
43
|
var _chunkYVJVFJ24cjs = require('../../chunk-YVJVFJ24.cjs');
|
|
53
44
|
|
|
54
45
|
|
|
55
46
|
var _chunkIT6LK2G5cjs = require('../../chunk-IT6LK2G5.cjs');
|
|
56
47
|
|
|
57
48
|
|
|
49
|
+
var _chunkFM4WWIRIcjs = require('../../chunk-FM4WWIRI.cjs');
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
var _chunkDOZF64YCcjs = require('../../chunk-DOZF64YC.cjs');
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
var _chunkXOG6T533cjs = require('../../chunk-XOG6T533.cjs');
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
var _chunkBKIL4UXVcjs = require('../../chunk-BKIL4UXV.cjs');
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
|
|
58
62
|
|
|
59
63
|
|
|
60
64
|
|
|
@@ -72,4 +76,4 @@ var _chunkIT6LK2G5cjs = require('../../chunk-IT6LK2G5.cjs');
|
|
|
72
76
|
|
|
73
77
|
|
|
74
78
|
|
|
75
|
-
exports.getAccountActiveOrders = _chunkXOG6T533cjs.getAccountActiveOrders; exports.getAccountInactiveOrders = _chunkBKIL4UXVcjs.getAccountInactiveOrders; exports.getAccountLimits = _chunkU25GSCR7cjs.getAccountLimits; exports.getAccountMetadata = _chunkZJVQD6JDcjs.getAccountMetadata; exports.getDepositHistory = _chunkYVJVFJ24cjs.getDepositHistory; exports.getExport = _chunkIT6LK2G5cjs.getExport; exports.getFastWithdrawInfo = _chunkFM4WWIRIcjs.getFastWithdrawInfo; exports.getL1Metadata = _chunkDOZF64YCcjs.getL1Metadata; exports.getLiquidations = _chunkON64OVOQcjs.getLiquidations; exports.getPnL = _chunkTWGXKYO2cjs.getPnL; exports.getPositionFunding = _chunkLBVNEQ5Rcjs.getPositionFunding; exports.getPublicPools = _chunkX7E6XJVQcjs.getPublicPools; exports.getReferralPoints = _chunk6LUEPRL7cjs.getReferralPoints; exports.getTokens = _chunkU2SM46CPcjs.getTokens; exports.getTrades = _chunk4TIJW7PHcjs.getTrades; exports.getTransferFeeInfo = _chunkJ3UZK77Ocjs.getTransferFeeInfo; exports.getTransferHistory = _chunkDW6W5SX2cjs.getTransferHistory; exports.getWithdrawHistory = _chunkJ7GXRK7Rcjs.getWithdrawHistory;
|
|
79
|
+
exports.getAccountActiveOrders = _chunkXOG6T533cjs.getAccountActiveOrders; exports.getAccountInactiveOrders = _chunkBKIL4UXVcjs.getAccountInactiveOrders; exports.getAccountLimits = _chunkU25GSCR7cjs.getAccountLimits; exports.getAccountMetadata = _chunkZJVQD6JDcjs.getAccountMetadata; exports.getBridges = _chunkIW5D24DGcjs.getBridges; exports.getDepositHistory = _chunkYVJVFJ24cjs.getDepositHistory; exports.getExport = _chunkIT6LK2G5cjs.getExport; exports.getFastWithdrawInfo = _chunkFM4WWIRIcjs.getFastWithdrawInfo; exports.getL1Metadata = _chunkDOZF64YCcjs.getL1Metadata; exports.getLiquidations = _chunkON64OVOQcjs.getLiquidations; exports.getPnL = _chunkTWGXKYO2cjs.getPnL; exports.getPositionFunding = _chunkLBVNEQ5Rcjs.getPositionFunding; exports.getPublicPools = _chunkX7E6XJVQcjs.getPublicPools; exports.getReferralPoints = _chunk6LUEPRL7cjs.getReferralPoints; exports.getTokens = _chunkU2SM46CPcjs.getTokens; exports.getTrades = _chunk4TIJW7PHcjs.getTrades; exports.getTransferFeeInfo = _chunkJ3UZK77Ocjs.getTransferFeeInfo; exports.getTransferHistory = _chunkDW6W5SX2cjs.getTransferHistory; exports.getWithdrawHistory = _chunkJ7GXRK7Rcjs.getWithdrawHistory;
|
|
@@ -2,6 +2,7 @@ export { AccountActiveOrdersRequest, getAccountActiveOrders } from './account-ac
|
|
|
2
2
|
export { AccountInactiveOrdersRequest, Order, Orders, getAccountInactiveOrders } from './account-inactive-orders.cjs';
|
|
3
3
|
export { AccountLimitsRequest, AccountLimitsResponse, getAccountLimits } from './account-limits.cjs';
|
|
4
4
|
export { AccountMetadataInfo, AccountMetadataRequest, AccountMetadataResponse, getAccountMetadata } from './account-metadata.cjs';
|
|
5
|
+
export { BridgeItem, BridgesRequest, BridgesResponse, getBridges } from './bridges.cjs';
|
|
5
6
|
export { DepositHistoryItem, DepositHistoryRequest, DepositHistoryResponse, getDepositHistory } from './deposit-history.cjs';
|
|
6
7
|
export { ExportRequest, ExportResponse, getExport } from './export.cjs';
|
|
7
8
|
export { FastWithdrawInfoRequest, FastWithdrawInfoResponse, getFastWithdrawInfo } from './fastwithdraw-info.cjs';
|
|
@@ -2,6 +2,7 @@ export { AccountActiveOrdersRequest, getAccountActiveOrders } from './account-ac
|
|
|
2
2
|
export { AccountInactiveOrdersRequest, Order, Orders, getAccountInactiveOrders } from './account-inactive-orders.js';
|
|
3
3
|
export { AccountLimitsRequest, AccountLimitsResponse, getAccountLimits } from './account-limits.js';
|
|
4
4
|
export { AccountMetadataInfo, AccountMetadataRequest, AccountMetadataResponse, getAccountMetadata } from './account-metadata.js';
|
|
5
|
+
export { BridgeItem, BridgesRequest, BridgesResponse, getBridges } from './bridges.js';
|
|
5
6
|
export { DepositHistoryItem, DepositHistoryRequest, DepositHistoryResponse, getDepositHistory } from './deposit-history.js';
|
|
6
7
|
export { ExportRequest, ExportResponse, getExport } from './export.js';
|
|
7
8
|
export { FastWithdrawInfoRequest, FastWithdrawInfoResponse, getFastWithdrawInfo } from './fastwithdraw-info.js';
|
|
@@ -1,25 +1,10 @@
|
|
|
1
|
-
import "../../chunk-
|
|
2
|
-
import {
|
|
3
|
-
getTokens
|
|
4
|
-
} from "../../chunk-OPSCTD6W.js";
|
|
5
|
-
import {
|
|
6
|
-
getTrades
|
|
7
|
-
} from "../../chunk-467IJZRE.js";
|
|
8
|
-
import {
|
|
9
|
-
getTransferFeeInfo
|
|
10
|
-
} from "../../chunk-LYNZNSLV.js";
|
|
1
|
+
import "../../chunk-UONA2XN2.js";
|
|
11
2
|
import {
|
|
12
3
|
getTransferHistory
|
|
13
4
|
} from "../../chunk-3Y76Q54G.js";
|
|
14
5
|
import {
|
|
15
6
|
getWithdrawHistory
|
|
16
7
|
} from "../../chunk-PEALQBVN.js";
|
|
17
|
-
import {
|
|
18
|
-
getFastWithdrawInfo
|
|
19
|
-
} from "../../chunk-ZDNQFOED.js";
|
|
20
|
-
import {
|
|
21
|
-
getL1Metadata
|
|
22
|
-
} from "../../chunk-QXGO7TJ2.js";
|
|
23
8
|
import {
|
|
24
9
|
getLiquidations
|
|
25
10
|
} from "../../chunk-RGVFMOQI.js";
|
|
@@ -36,28 +21,47 @@ import {
|
|
|
36
21
|
getReferralPoints
|
|
37
22
|
} from "../../chunk-W5VY4TWP.js";
|
|
38
23
|
import {
|
|
39
|
-
|
|
40
|
-
} from "../../chunk-
|
|
24
|
+
getTokens
|
|
25
|
+
} from "../../chunk-OPSCTD6W.js";
|
|
41
26
|
import {
|
|
42
|
-
|
|
43
|
-
} from "../../chunk-
|
|
27
|
+
getTrades
|
|
28
|
+
} from "../../chunk-467IJZRE.js";
|
|
29
|
+
import {
|
|
30
|
+
getTransferFeeInfo
|
|
31
|
+
} from "../../chunk-LYNZNSLV.js";
|
|
44
32
|
import {
|
|
45
33
|
getAccountLimits
|
|
46
34
|
} from "../../chunk-4LNJ2577.js";
|
|
47
35
|
import {
|
|
48
36
|
getAccountMetadata
|
|
49
37
|
} from "../../chunk-5P5CPB5A.js";
|
|
38
|
+
import {
|
|
39
|
+
getBridges
|
|
40
|
+
} from "../../chunk-QRIGHPWL.js";
|
|
50
41
|
import {
|
|
51
42
|
getDepositHistory
|
|
52
43
|
} from "../../chunk-P32EPCEM.js";
|
|
53
44
|
import {
|
|
54
45
|
getExport
|
|
55
46
|
} from "../../chunk-EBSW5ZYW.js";
|
|
47
|
+
import {
|
|
48
|
+
getFastWithdrawInfo
|
|
49
|
+
} from "../../chunk-ZDNQFOED.js";
|
|
50
|
+
import {
|
|
51
|
+
getL1Metadata
|
|
52
|
+
} from "../../chunk-QXGO7TJ2.js";
|
|
53
|
+
import {
|
|
54
|
+
getAccountActiveOrders
|
|
55
|
+
} from "../../chunk-AMNDQGYL.js";
|
|
56
|
+
import {
|
|
57
|
+
getAccountInactiveOrders
|
|
58
|
+
} from "../../chunk-XQGOXCT4.js";
|
|
56
59
|
export {
|
|
57
60
|
getAccountActiveOrders,
|
|
58
61
|
getAccountInactiveOrders,
|
|
59
62
|
getAccountLimits,
|
|
60
63
|
getAccountMetadata,
|
|
64
|
+
getBridges,
|
|
61
65
|
getDepositHistory,
|
|
62
66
|
getExport,
|
|
63
67
|
getFastWithdrawInfo,
|
|
@@ -12,12 +12,23 @@ interface PnLRequest {
|
|
|
12
12
|
}
|
|
13
13
|
interface PnLEntry {
|
|
14
14
|
timestamp: number;
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
trade_pnl: number;
|
|
16
|
+
trade_spot_pnl: number;
|
|
17
|
+
inflow: number;
|
|
18
|
+
outflow: number;
|
|
19
|
+
spot_outflow: number;
|
|
20
|
+
spot_inflow: number;
|
|
21
|
+
pool_pnl: number;
|
|
22
|
+
pool_inflow: number;
|
|
23
|
+
pool_outflow: number;
|
|
24
|
+
staking_pnl: number;
|
|
25
|
+
staking_inflow: number;
|
|
26
|
+
staking_outflow: number;
|
|
27
|
+
pool_total_shares: number;
|
|
17
28
|
}
|
|
18
29
|
interface PnLResponse {
|
|
19
30
|
code: number;
|
|
20
|
-
|
|
31
|
+
pnl: PnLEntry[];
|
|
21
32
|
}
|
|
22
33
|
declare function getPnL(client: AxiosInstance, params: PnLRequest, authorization?: string): Promise<PnLResponse>;
|
|
23
34
|
|