@drift-labs/sdk 2.86.0-beta.25 → 2.86.0-beta.26
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/addresses/pda.d.ts +1 -0
- package/lib/addresses/pda.js +8 -1
- package/lib/adminClient.d.ts +2 -0
- package/lib/adminClient.js +26 -0
- package/lib/driftClient.d.ts +7 -4
- package/lib/driftClient.js +102 -0
- package/lib/idl/drift.json +179 -0
- package/lib/types.d.ts +15 -0
- package/lib/user.js +1 -1
- package/package.json +1 -1
- package/src/addresses/pda.ts +15 -0
- package/src/adminClient.ts +51 -0
- package/src/driftClient.ts +132 -2
- package/src/idl/drift.json +179 -0
- package/src/idl/openbook.json +3854 -0
- package/src/types.ts +17 -0
- package/src/user.ts +5 -2
package/src/types.ts
CHANGED
|
@@ -1181,6 +1181,23 @@ export type PhoenixV1FulfillmentConfigAccount = {
|
|
|
1181
1181
|
status: SpotFulfillmentStatus;
|
|
1182
1182
|
};
|
|
1183
1183
|
|
|
1184
|
+
export type OpenbookV2FulfillmentConfigAccount = {
|
|
1185
|
+
pubkey: PublicKey;
|
|
1186
|
+
openbookV2ProgramId: PublicKey;
|
|
1187
|
+
openbookV2Market: PublicKey;
|
|
1188
|
+
openbookV2MarketAuthority: PublicKey;
|
|
1189
|
+
openbookV2EventHeap: PublicKey;
|
|
1190
|
+
openbookV2Bids: PublicKey;
|
|
1191
|
+
openbookV2Asks: PublicKey;
|
|
1192
|
+
openbookV2BaseVault: PublicKey;
|
|
1193
|
+
openbookV2QuoteVault: PublicKey;
|
|
1194
|
+
marketIndex: number;
|
|
1195
|
+
fulfillmentType: SpotFulfillmentType;
|
|
1196
|
+
status: SpotFulfillmentStatus;
|
|
1197
|
+
// not actually on the account, just used to pass around remaining accounts in ts
|
|
1198
|
+
remainingAccounts?: PublicKey[];
|
|
1199
|
+
};
|
|
1200
|
+
|
|
1184
1201
|
export type ReferrerNameAccount = {
|
|
1185
1202
|
name: number[];
|
|
1186
1203
|
user: PublicKey;
|
package/src/user.ts
CHANGED
|
@@ -1010,8 +1010,11 @@ export class User {
|
|
|
1010
1010
|
const spotMarketAccount: SpotMarketAccount =
|
|
1011
1011
|
this.driftClient.getSpotMarketAccount(GOV_SPOT_MARKET_INDEX);
|
|
1012
1012
|
|
|
1013
|
-
const fuelBonusNumeratorUserStats =
|
|
1014
|
-
|
|
1013
|
+
const fuelBonusNumeratorUserStats = BN.max(
|
|
1014
|
+
now.sub(
|
|
1015
|
+
BN.max(new BN(userStats.lastFuelIfBonusUpdateTs), FUEL_START_TS)
|
|
1016
|
+
),
|
|
1017
|
+
ZERO
|
|
1015
1018
|
);
|
|
1016
1019
|
|
|
1017
1020
|
result.insuranceFuel = result.insuranceFuel.add(
|