@drift-labs/sdk 2.98.0-beta.2 → 2.98.0-beta.4
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/VERSION +1 -1
- package/lib/browser/driftClient.d.ts +6 -2
- package/lib/browser/driftClient.js +10 -2
- package/lib/browser/events/types.d.ts +3 -2
- package/lib/browser/events/types.js +1 -0
- package/lib/browser/idl/drift.json +32 -0
- package/lib/browser/types.d.ts +7 -0
- package/lib/node/driftClient.d.ts +6 -2
- package/lib/node/driftClient.js +10 -2
- package/lib/node/events/types.d.ts +3 -2
- package/lib/node/events/types.js +1 -0
- package/lib/node/idl/drift.json +32 -0
- package/lib/node/types.d.ts +7 -0
- package/package.json +1 -1
- package/src/driftClient.ts +19 -3
- package/src/events/types.ts +5 -1
- package/src/idl/drift.json +32 -0
- package/src/types.ts +8 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.98.0-beta.
|
|
1
|
+
2.98.0-beta.4
|
|
@@ -798,9 +798,13 @@ export declare class DriftClient {
|
|
|
798
798
|
postSwitchboardOnDemandUpdate(feed: PublicKey, numSignatures?: number): Promise<TransactionSignature>;
|
|
799
799
|
private getBuildEncodedVaaIxs;
|
|
800
800
|
enableUserHighLeverageMode(subAccountId: number, txParams?: TxParams): Promise<TransactionSignature>;
|
|
801
|
-
getEnableHighLeverageModeIx(subAccountId: number
|
|
801
|
+
getEnableHighLeverageModeIx(subAccountId: number, depositToTradeArgs?: {
|
|
802
|
+
isMakingNewAccount: boolean;
|
|
803
|
+
depositMarketIndex: number;
|
|
804
|
+
orderMarketIndex: number;
|
|
805
|
+
}): Promise<TransactionInstruction>;
|
|
802
806
|
disableUserHighLeverageMode(user: PublicKey, userAccount?: UserAccount, txParams?: TxParams): Promise<TransactionSignature>;
|
|
803
|
-
getDisableHighLeverageModeIx(user: PublicKey, userAccount?: UserAccount): Promise<
|
|
807
|
+
getDisableHighLeverageModeIx(user: PublicKey, userAccount?: UserAccount): Promise<TransactionInstruction>;
|
|
804
808
|
fetchHighLeverageModeConfig(): Promise<HighLeverageModeConfig>;
|
|
805
809
|
private handleSignedTransaction;
|
|
806
810
|
private handlePreSignedTransaction;
|
|
@@ -4372,9 +4372,17 @@ class DriftClient {
|
|
|
4372
4372
|
const { txSig } = await this.sendTransaction(await this.buildTransaction(await this.getEnableHighLeverageModeIx(subAccountId), txParams), [], this.opts);
|
|
4373
4373
|
return txSig;
|
|
4374
4374
|
}
|
|
4375
|
-
async getEnableHighLeverageModeIx(subAccountId) {
|
|
4375
|
+
async getEnableHighLeverageModeIx(subAccountId, depositToTradeArgs) {
|
|
4376
|
+
const isDepositToTradeTx = depositToTradeArgs !== undefined;
|
|
4376
4377
|
const remainingAccounts = this.getRemainingAccounts({
|
|
4377
|
-
userAccounts:
|
|
4378
|
+
userAccounts: (depositToTradeArgs === null || depositToTradeArgs === void 0 ? void 0 : depositToTradeArgs.isMakingNewAccount)
|
|
4379
|
+
? []
|
|
4380
|
+
: [this.getUserAccount(subAccountId)],
|
|
4381
|
+
useMarketLastSlotCache: false,
|
|
4382
|
+
readablePerpMarketIndex: depositToTradeArgs === null || depositToTradeArgs === void 0 ? void 0 : depositToTradeArgs.orderMarketIndex,
|
|
4383
|
+
readableSpotMarketIndexes: isDepositToTradeTx
|
|
4384
|
+
? [depositToTradeArgs === null || depositToTradeArgs === void 0 ? void 0 : depositToTradeArgs.depositMarketIndex]
|
|
4385
|
+
: undefined,
|
|
4378
4386
|
});
|
|
4379
4387
|
const ix = await this.program.instruction.enableUserHighLeverageMode(subAccountId, {
|
|
4380
4388
|
accounts: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Commitment, PublicKey, TransactionSignature } from '@solana/web3.js';
|
|
3
|
-
import { DepositRecord, FundingPaymentRecord, FundingRateRecord, LiquidationRecord, NewUserRecord, OrderActionRecord, OrderRecord, SettlePnlRecord, LPRecord, InsuranceFundRecord, SpotInterestRecord, InsuranceFundStakeRecord, CurveRecord, SwapRecord, SpotMarketVaultDepositRecord } from '../index';
|
|
3
|
+
import { DepositRecord, FundingPaymentRecord, FundingRateRecord, LiquidationRecord, NewUserRecord, OrderActionRecord, OrderRecord, SettlePnlRecord, LPRecord, InsuranceFundRecord, SpotInterestRecord, InsuranceFundStakeRecord, CurveRecord, SwapRecord, SpotMarketVaultDepositRecord, SwiftOrderRecord } from '../index';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
export type EventSubscriptionOptions = {
|
|
6
6
|
address?: PublicKey;
|
|
@@ -41,9 +41,10 @@ export type EventMap = {
|
|
|
41
41
|
CurveRecord: Event<CurveRecord>;
|
|
42
42
|
SwapRecord: Event<SwapRecord>;
|
|
43
43
|
SpotMarketVaultDepositRecord: Event<SpotMarketVaultDepositRecord>;
|
|
44
|
+
SwiftOrderRecord: Event<SwiftOrderRecord>;
|
|
44
45
|
};
|
|
45
46
|
export type EventType = keyof EventMap;
|
|
46
|
-
export type DriftEvent = Event<DepositRecord> | Event<FundingPaymentRecord> | Event<LiquidationRecord> | Event<FundingRateRecord> | Event<OrderRecord> | Event<OrderActionRecord> | Event<SettlePnlRecord> | Event<NewUserRecord> | Event<LPRecord> | Event<InsuranceFundRecord> | Event<SpotInterestRecord> | Event<InsuranceFundStakeRecord> | Event<CurveRecord> | Event<SwapRecord> | Event<SpotMarketVaultDepositRecord>;
|
|
47
|
+
export type DriftEvent = Event<DepositRecord> | Event<FundingPaymentRecord> | Event<LiquidationRecord> | Event<FundingRateRecord> | Event<OrderRecord> | Event<OrderActionRecord> | Event<SettlePnlRecord> | Event<NewUserRecord> | Event<LPRecord> | Event<InsuranceFundRecord> | Event<SpotInterestRecord> | Event<InsuranceFundStakeRecord> | Event<CurveRecord> | Event<SwapRecord> | Event<SpotMarketVaultDepositRecord> | Event<SwiftOrderRecord>;
|
|
47
48
|
export interface EventSubscriberEvents {
|
|
48
49
|
newEvent: (event: WrappedEvent<EventType>) => void;
|
|
49
50
|
}
|
|
@@ -11529,6 +11529,38 @@
|
|
|
11529
11529
|
}
|
|
11530
11530
|
]
|
|
11531
11531
|
},
|
|
11532
|
+
{
|
|
11533
|
+
"name": "SwiftOrderRecord",
|
|
11534
|
+
"fields": [
|
|
11535
|
+
{
|
|
11536
|
+
"name": "user",
|
|
11537
|
+
"type": "publicKey",
|
|
11538
|
+
"index": false
|
|
11539
|
+
},
|
|
11540
|
+
{
|
|
11541
|
+
"name": "hash",
|
|
11542
|
+
"type": "string",
|
|
11543
|
+
"index": false
|
|
11544
|
+
},
|
|
11545
|
+
{
|
|
11546
|
+
"name": "matchingOrderParams",
|
|
11547
|
+
"type": {
|
|
11548
|
+
"defined": "OrderParams"
|
|
11549
|
+
},
|
|
11550
|
+
"index": false
|
|
11551
|
+
},
|
|
11552
|
+
{
|
|
11553
|
+
"name": "swiftOrderSlot",
|
|
11554
|
+
"type": "u64",
|
|
11555
|
+
"index": false
|
|
11556
|
+
},
|
|
11557
|
+
{
|
|
11558
|
+
"name": "userNextOrderId",
|
|
11559
|
+
"type": "u32",
|
|
11560
|
+
"index": false
|
|
11561
|
+
}
|
|
11562
|
+
]
|
|
11563
|
+
},
|
|
11532
11564
|
{
|
|
11533
11565
|
"name": "OrderRecord",
|
|
11534
11566
|
"fields": [
|
package/lib/browser/types.d.ts
CHANGED
|
@@ -642,6 +642,13 @@ export type SettlePnlRecord = {
|
|
|
642
642
|
settlePrice: BN;
|
|
643
643
|
explanation: SettlePnlExplanation;
|
|
644
644
|
};
|
|
645
|
+
export type SwiftOrderRecord = {
|
|
646
|
+
user: PublicKey;
|
|
647
|
+
hash: string;
|
|
648
|
+
matchingOrderParams: OrderParams;
|
|
649
|
+
swiftOrderSlot: BN;
|
|
650
|
+
userNextOrderId: number;
|
|
651
|
+
};
|
|
645
652
|
export type OrderRecord = {
|
|
646
653
|
ts: BN;
|
|
647
654
|
user: PublicKey;
|
|
@@ -798,9 +798,13 @@ export declare class DriftClient {
|
|
|
798
798
|
postSwitchboardOnDemandUpdate(feed: PublicKey, numSignatures?: number): Promise<TransactionSignature>;
|
|
799
799
|
private getBuildEncodedVaaIxs;
|
|
800
800
|
enableUserHighLeverageMode(subAccountId: number, txParams?: TxParams): Promise<TransactionSignature>;
|
|
801
|
-
getEnableHighLeverageModeIx(subAccountId: number
|
|
801
|
+
getEnableHighLeverageModeIx(subAccountId: number, depositToTradeArgs?: {
|
|
802
|
+
isMakingNewAccount: boolean;
|
|
803
|
+
depositMarketIndex: number;
|
|
804
|
+
orderMarketIndex: number;
|
|
805
|
+
}): Promise<TransactionInstruction>;
|
|
802
806
|
disableUserHighLeverageMode(user: PublicKey, userAccount?: UserAccount, txParams?: TxParams): Promise<TransactionSignature>;
|
|
803
|
-
getDisableHighLeverageModeIx(user: PublicKey, userAccount?: UserAccount): Promise<
|
|
807
|
+
getDisableHighLeverageModeIx(user: PublicKey, userAccount?: UserAccount): Promise<TransactionInstruction>;
|
|
804
808
|
fetchHighLeverageModeConfig(): Promise<HighLeverageModeConfig>;
|
|
805
809
|
private handleSignedTransaction;
|
|
806
810
|
private handlePreSignedTransaction;
|
package/lib/node/driftClient.js
CHANGED
|
@@ -4372,9 +4372,17 @@ class DriftClient {
|
|
|
4372
4372
|
const { txSig } = await this.sendTransaction(await this.buildTransaction(await this.getEnableHighLeverageModeIx(subAccountId), txParams), [], this.opts);
|
|
4373
4373
|
return txSig;
|
|
4374
4374
|
}
|
|
4375
|
-
async getEnableHighLeverageModeIx(subAccountId) {
|
|
4375
|
+
async getEnableHighLeverageModeIx(subAccountId, depositToTradeArgs) {
|
|
4376
|
+
const isDepositToTradeTx = depositToTradeArgs !== undefined;
|
|
4376
4377
|
const remainingAccounts = this.getRemainingAccounts({
|
|
4377
|
-
userAccounts:
|
|
4378
|
+
userAccounts: (depositToTradeArgs === null || depositToTradeArgs === void 0 ? void 0 : depositToTradeArgs.isMakingNewAccount)
|
|
4379
|
+
? []
|
|
4380
|
+
: [this.getUserAccount(subAccountId)],
|
|
4381
|
+
useMarketLastSlotCache: false,
|
|
4382
|
+
readablePerpMarketIndex: depositToTradeArgs === null || depositToTradeArgs === void 0 ? void 0 : depositToTradeArgs.orderMarketIndex,
|
|
4383
|
+
readableSpotMarketIndexes: isDepositToTradeTx
|
|
4384
|
+
? [depositToTradeArgs === null || depositToTradeArgs === void 0 ? void 0 : depositToTradeArgs.depositMarketIndex]
|
|
4385
|
+
: undefined,
|
|
4378
4386
|
});
|
|
4379
4387
|
const ix = await this.program.instruction.enableUserHighLeverageMode(subAccountId, {
|
|
4380
4388
|
accounts: {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { Commitment, PublicKey, TransactionSignature } from '@solana/web3.js';
|
|
3
|
-
import { DepositRecord, FundingPaymentRecord, FundingRateRecord, LiquidationRecord, NewUserRecord, OrderActionRecord, OrderRecord, SettlePnlRecord, LPRecord, InsuranceFundRecord, SpotInterestRecord, InsuranceFundStakeRecord, CurveRecord, SwapRecord, SpotMarketVaultDepositRecord } from '../index';
|
|
3
|
+
import { DepositRecord, FundingPaymentRecord, FundingRateRecord, LiquidationRecord, NewUserRecord, OrderActionRecord, OrderRecord, SettlePnlRecord, LPRecord, InsuranceFundRecord, SpotInterestRecord, InsuranceFundStakeRecord, CurveRecord, SwapRecord, SpotMarketVaultDepositRecord, SwiftOrderRecord } from '../index';
|
|
4
4
|
import { EventEmitter } from 'events';
|
|
5
5
|
export type EventSubscriptionOptions = {
|
|
6
6
|
address?: PublicKey;
|
|
@@ -41,9 +41,10 @@ export type EventMap = {
|
|
|
41
41
|
CurveRecord: Event<CurveRecord>;
|
|
42
42
|
SwapRecord: Event<SwapRecord>;
|
|
43
43
|
SpotMarketVaultDepositRecord: Event<SpotMarketVaultDepositRecord>;
|
|
44
|
+
SwiftOrderRecord: Event<SwiftOrderRecord>;
|
|
44
45
|
};
|
|
45
46
|
export type EventType = keyof EventMap;
|
|
46
|
-
export type DriftEvent = Event<DepositRecord> | Event<FundingPaymentRecord> | Event<LiquidationRecord> | Event<FundingRateRecord> | Event<OrderRecord> | Event<OrderActionRecord> | Event<SettlePnlRecord> | Event<NewUserRecord> | Event<LPRecord> | Event<InsuranceFundRecord> | Event<SpotInterestRecord> | Event<InsuranceFundStakeRecord> | Event<CurveRecord> | Event<SwapRecord> | Event<SpotMarketVaultDepositRecord>;
|
|
47
|
+
export type DriftEvent = Event<DepositRecord> | Event<FundingPaymentRecord> | Event<LiquidationRecord> | Event<FundingRateRecord> | Event<OrderRecord> | Event<OrderActionRecord> | Event<SettlePnlRecord> | Event<NewUserRecord> | Event<LPRecord> | Event<InsuranceFundRecord> | Event<SpotInterestRecord> | Event<InsuranceFundStakeRecord> | Event<CurveRecord> | Event<SwapRecord> | Event<SpotMarketVaultDepositRecord> | Event<SwiftOrderRecord>;
|
|
47
48
|
export interface EventSubscriberEvents {
|
|
48
49
|
newEvent: (event: WrappedEvent<EventType>) => void;
|
|
49
50
|
}
|
package/lib/node/events/types.js
CHANGED
package/lib/node/idl/drift.json
CHANGED
|
@@ -11529,6 +11529,38 @@
|
|
|
11529
11529
|
}
|
|
11530
11530
|
]
|
|
11531
11531
|
},
|
|
11532
|
+
{
|
|
11533
|
+
"name": "SwiftOrderRecord",
|
|
11534
|
+
"fields": [
|
|
11535
|
+
{
|
|
11536
|
+
"name": "user",
|
|
11537
|
+
"type": "publicKey",
|
|
11538
|
+
"index": false
|
|
11539
|
+
},
|
|
11540
|
+
{
|
|
11541
|
+
"name": "hash",
|
|
11542
|
+
"type": "string",
|
|
11543
|
+
"index": false
|
|
11544
|
+
},
|
|
11545
|
+
{
|
|
11546
|
+
"name": "matchingOrderParams",
|
|
11547
|
+
"type": {
|
|
11548
|
+
"defined": "OrderParams"
|
|
11549
|
+
},
|
|
11550
|
+
"index": false
|
|
11551
|
+
},
|
|
11552
|
+
{
|
|
11553
|
+
"name": "swiftOrderSlot",
|
|
11554
|
+
"type": "u64",
|
|
11555
|
+
"index": false
|
|
11556
|
+
},
|
|
11557
|
+
{
|
|
11558
|
+
"name": "userNextOrderId",
|
|
11559
|
+
"type": "u32",
|
|
11560
|
+
"index": false
|
|
11561
|
+
}
|
|
11562
|
+
]
|
|
11563
|
+
},
|
|
11532
11564
|
{
|
|
11533
11565
|
"name": "OrderRecord",
|
|
11534
11566
|
"fields": [
|
package/lib/node/types.d.ts
CHANGED
|
@@ -642,6 +642,13 @@ export type SettlePnlRecord = {
|
|
|
642
642
|
settlePrice: BN;
|
|
643
643
|
explanation: SettlePnlExplanation;
|
|
644
644
|
};
|
|
645
|
+
export type SwiftOrderRecord = {
|
|
646
|
+
user: PublicKey;
|
|
647
|
+
hash: string;
|
|
648
|
+
matchingOrderParams: OrderParams;
|
|
649
|
+
swiftOrderSlot: BN;
|
|
650
|
+
userNextOrderId: number;
|
|
651
|
+
};
|
|
645
652
|
export type OrderRecord = {
|
|
646
653
|
ts: BN;
|
|
647
654
|
user: PublicKey;
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -8300,9 +8300,25 @@ export class DriftClient {
|
|
|
8300
8300
|
return txSig;
|
|
8301
8301
|
}
|
|
8302
8302
|
|
|
8303
|
-
public async getEnableHighLeverageModeIx(
|
|
8303
|
+
public async getEnableHighLeverageModeIx(
|
|
8304
|
+
subAccountId: number,
|
|
8305
|
+
depositToTradeArgs?: {
|
|
8306
|
+
isMakingNewAccount: boolean;
|
|
8307
|
+
depositMarketIndex: number;
|
|
8308
|
+
orderMarketIndex: number;
|
|
8309
|
+
}
|
|
8310
|
+
): Promise<TransactionInstruction> {
|
|
8311
|
+
const isDepositToTradeTx = depositToTradeArgs !== undefined;
|
|
8312
|
+
|
|
8304
8313
|
const remainingAccounts = this.getRemainingAccounts({
|
|
8305
|
-
userAccounts:
|
|
8314
|
+
userAccounts: depositToTradeArgs?.isMakingNewAccount
|
|
8315
|
+
? []
|
|
8316
|
+
: [this.getUserAccount(subAccountId)],
|
|
8317
|
+
useMarketLastSlotCache: false,
|
|
8318
|
+
readablePerpMarketIndex: depositToTradeArgs?.orderMarketIndex,
|
|
8319
|
+
readableSpotMarketIndexes: isDepositToTradeTx
|
|
8320
|
+
? [depositToTradeArgs?.depositMarketIndex]
|
|
8321
|
+
: undefined,
|
|
8306
8322
|
});
|
|
8307
8323
|
|
|
8308
8324
|
const ix = await this.program.instruction.enableUserHighLeverageMode(
|
|
@@ -8346,7 +8362,7 @@ export class DriftClient {
|
|
|
8346
8362
|
public async getDisableHighLeverageModeIx(
|
|
8347
8363
|
user: PublicKey,
|
|
8348
8364
|
userAccount?: UserAccount
|
|
8349
|
-
) {
|
|
8365
|
+
): Promise<TransactionInstruction> {
|
|
8350
8366
|
const remainingAccounts = userAccount
|
|
8351
8367
|
? this.getRemainingAccounts({
|
|
8352
8368
|
userAccounts: [userAccount],
|
package/src/events/types.ts
CHANGED
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
CurveRecord,
|
|
16
16
|
SwapRecord,
|
|
17
17
|
SpotMarketVaultDepositRecord,
|
|
18
|
+
SwiftOrderRecord,
|
|
18
19
|
} from '../index';
|
|
19
20
|
import { EventEmitter } from 'events';
|
|
20
21
|
|
|
@@ -49,6 +50,7 @@ export const DefaultEventSubscriptionOptions: EventSubscriptionOptions = {
|
|
|
49
50
|
'CurveRecord',
|
|
50
51
|
'SwapRecord',
|
|
51
52
|
'SpotMarketVaultDepositRecord',
|
|
53
|
+
'SwiftOrderRecord',
|
|
52
54
|
],
|
|
53
55
|
maxEventsPerType: 4096,
|
|
54
56
|
orderBy: 'blockchain',
|
|
@@ -92,6 +94,7 @@ export type EventMap = {
|
|
|
92
94
|
CurveRecord: Event<CurveRecord>;
|
|
93
95
|
SwapRecord: Event<SwapRecord>;
|
|
94
96
|
SpotMarketVaultDepositRecord: Event<SpotMarketVaultDepositRecord>;
|
|
97
|
+
SwiftOrderRecord: Event<SwiftOrderRecord>;
|
|
95
98
|
};
|
|
96
99
|
|
|
97
100
|
export type EventType = keyof EventMap;
|
|
@@ -111,7 +114,8 @@ export type DriftEvent =
|
|
|
111
114
|
| Event<InsuranceFundStakeRecord>
|
|
112
115
|
| Event<CurveRecord>
|
|
113
116
|
| Event<SwapRecord>
|
|
114
|
-
| Event<SpotMarketVaultDepositRecord
|
|
117
|
+
| Event<SpotMarketVaultDepositRecord>
|
|
118
|
+
| Event<SwiftOrderRecord>;
|
|
115
119
|
|
|
116
120
|
export interface EventSubscriberEvents {
|
|
117
121
|
newEvent: (event: WrappedEvent<EventType>) => void;
|
package/src/idl/drift.json
CHANGED
|
@@ -11529,6 +11529,38 @@
|
|
|
11529
11529
|
}
|
|
11530
11530
|
]
|
|
11531
11531
|
},
|
|
11532
|
+
{
|
|
11533
|
+
"name": "SwiftOrderRecord",
|
|
11534
|
+
"fields": [
|
|
11535
|
+
{
|
|
11536
|
+
"name": "user",
|
|
11537
|
+
"type": "publicKey",
|
|
11538
|
+
"index": false
|
|
11539
|
+
},
|
|
11540
|
+
{
|
|
11541
|
+
"name": "hash",
|
|
11542
|
+
"type": "string",
|
|
11543
|
+
"index": false
|
|
11544
|
+
},
|
|
11545
|
+
{
|
|
11546
|
+
"name": "matchingOrderParams",
|
|
11547
|
+
"type": {
|
|
11548
|
+
"defined": "OrderParams"
|
|
11549
|
+
},
|
|
11550
|
+
"index": false
|
|
11551
|
+
},
|
|
11552
|
+
{
|
|
11553
|
+
"name": "swiftOrderSlot",
|
|
11554
|
+
"type": "u64",
|
|
11555
|
+
"index": false
|
|
11556
|
+
},
|
|
11557
|
+
{
|
|
11558
|
+
"name": "userNextOrderId",
|
|
11559
|
+
"type": "u32",
|
|
11560
|
+
"index": false
|
|
11561
|
+
}
|
|
11562
|
+
]
|
|
11563
|
+
},
|
|
11532
11564
|
{
|
|
11533
11565
|
"name": "OrderRecord",
|
|
11534
11566
|
"fields": [
|
package/src/types.ts
CHANGED
|
@@ -541,6 +541,14 @@ export type SettlePnlRecord = {
|
|
|
541
541
|
explanation: SettlePnlExplanation;
|
|
542
542
|
};
|
|
543
543
|
|
|
544
|
+
export type SwiftOrderRecord = {
|
|
545
|
+
user: PublicKey;
|
|
546
|
+
hash: string;
|
|
547
|
+
matchingOrderParams: OrderParams;
|
|
548
|
+
swiftOrderSlot: BN;
|
|
549
|
+
userNextOrderId: number;
|
|
550
|
+
};
|
|
551
|
+
|
|
544
552
|
export type OrderRecord = {
|
|
545
553
|
ts: BN;
|
|
546
554
|
user: PublicKey;
|