@drift-labs/sdk-browser 2.109.0-beta.7 → 2.109.0-beta.8

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 CHANGED
@@ -1 +1 @@
1
- 2.109.0-beta.7
1
+ 2.109.0-beta.8
@@ -228,7 +228,8 @@ function decodeUser(buffer) {
228
228
  offset += 1;
229
229
  const auctionDuration = buffer.readUInt8(offset);
230
230
  offset += 1;
231
- offset += 3; // padding
231
+ const postedSlotTail = buffer.readUint8(offset);
232
+ offset += 2; // padding
232
233
  orders.push({
233
234
  slot,
234
235
  price,
@@ -254,6 +255,7 @@ function decodeUser(buffer) {
254
255
  immediateOrCancel,
255
256
  triggerCondition,
256
257
  auctionDuration,
258
+ postedSlotTail,
257
259
  });
258
260
  }
259
261
  const lastAddPerpLpSharesTs = readSignedBigInt64LE(buffer, offset);
@@ -10875,12 +10875,19 @@
10875
10875
  ],
10876
10876
  "type": "u8"
10877
10877
  },
10878
+ {
10879
+ "name": "postedSlotTail",
10880
+ "docs": [
10881
+ "Last 8 bits of the slot the order was posted on-chain (not order slot for swift orders)"
10882
+ ],
10883
+ "type": "u8"
10884
+ },
10878
10885
  {
10879
10886
  "name": "padding",
10880
10887
  "type": {
10881
10888
  "array": [
10882
10889
  "u8",
10883
- 3
10890
+ 2
10884
10891
  ]
10885
10892
  }
10886
10893
  }
@@ -1096,6 +1096,7 @@ export type Order = {
1096
1096
  auctionStartPrice: BN;
1097
1097
  auctionEndPrice: BN;
1098
1098
  maxTs: BN;
1099
+ postedSlotTail: number;
1099
1100
  };
1100
1101
  export type OrderParams = {
1101
1102
  orderType: OrderType;
@@ -228,7 +228,8 @@ function decodeUser(buffer) {
228
228
  offset += 1;
229
229
  const auctionDuration = buffer.readUInt8(offset);
230
230
  offset += 1;
231
- offset += 3; // padding
231
+ const postedSlotTail = buffer.readUint8(offset);
232
+ offset += 2; // padding
232
233
  orders.push({
233
234
  slot,
234
235
  price,
@@ -254,6 +255,7 @@ function decodeUser(buffer) {
254
255
  immediateOrCancel,
255
256
  triggerCondition,
256
257
  auctionDuration,
258
+ postedSlotTail,
257
259
  });
258
260
  }
259
261
  const lastAddPerpLpSharesTs = readSignedBigInt64LE(buffer, offset);
@@ -10875,12 +10875,19 @@
10875
10875
  ],
10876
10876
  "type": "u8"
10877
10877
  },
10878
+ {
10879
+ "name": "postedSlotTail",
10880
+ "docs": [
10881
+ "Last 8 bits of the slot the order was posted on-chain (not order slot for swift orders)"
10882
+ ],
10883
+ "type": "u8"
10884
+ },
10878
10885
  {
10879
10886
  "name": "padding",
10880
10887
  "type": {
10881
10888
  "array": [
10882
10889
  "u8",
10883
- 3
10890
+ 2
10884
10891
  ]
10885
10892
  }
10886
10893
  }
@@ -1096,6 +1096,7 @@ export type Order = {
1096
1096
  auctionStartPrice: BN;
1097
1097
  auctionEndPrice: BN;
1098
1098
  maxTs: BN;
1099
+ postedSlotTail: number;
1099
1100
  };
1100
1101
  export type OrderParams = {
1101
1102
  orderType: OrderType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk-browser",
3
- "version": "2.109.0-beta.7",
3
+ "version": "2.109.0-beta.8",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "browser": "./lib/browser/index.js",
@@ -237,7 +237,8 @@ export function decodeUser(buffer: Buffer): UserAccount {
237
237
  offset += 1;
238
238
  const auctionDuration = buffer.readUInt8(offset);
239
239
  offset += 1;
240
- offset += 3; // padding
240
+ const postedSlotTail = buffer.readUint8(offset);
241
+ offset += 2; // padding
241
242
  orders.push({
242
243
  slot,
243
244
  price,
@@ -263,6 +264,7 @@ export function decodeUser(buffer: Buffer): UserAccount {
263
264
  immediateOrCancel,
264
265
  triggerCondition,
265
266
  auctionDuration,
267
+ postedSlotTail,
266
268
  });
267
269
  }
268
270
 
@@ -10875,12 +10875,19 @@
10875
10875
  ],
10876
10876
  "type": "u8"
10877
10877
  },
10878
+ {
10879
+ "name": "postedSlotTail",
10880
+ "docs": [
10881
+ "Last 8 bits of the slot the order was posted on-chain (not order slot for swift orders)"
10882
+ ],
10883
+ "type": "u8"
10884
+ },
10878
10885
  {
10879
10886
  "name": "padding",
10880
10887
  "type": {
10881
10888
  "array": [
10882
10889
  "u8",
10883
- 3
10890
+ 2
10884
10891
  ]
10885
10892
  }
10886
10893
  }
package/src/types.ts CHANGED
@@ -1040,6 +1040,7 @@ export type Order = {
1040
1040
  auctionStartPrice: BN;
1041
1041
  auctionEndPrice: BN;
1042
1042
  maxTs: BN;
1043
+ postedSlotTail: number;
1043
1044
  };
1044
1045
 
1045
1046
  export type OrderParams = {
@@ -41,6 +41,7 @@ export const mockOrder: Order = {
41
41
  auctionStartPrice: ZERO,
42
42
  auctionEndPrice: ZERO,
43
43
  maxTs: ZERO,
44
+ postedSlotTail: 0,
44
45
  };
45
46
 
46
47
  export const mockSpotPosition: SpotPosition = {