@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 +1 -1
- package/lib/browser/decode/user.js +3 -1
- package/lib/browser/idl/drift.json +8 -1
- package/lib/browser/types.d.ts +1 -0
- package/lib/node/decode/user.js +3 -1
- package/lib/node/idl/drift.json +8 -1
- package/lib/node/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/decode/user.ts +3 -1
- package/src/idl/drift.json +8 -1
- package/src/types.ts +1 -0
- package/tests/user/helpers.ts +1 -0
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.109.0-beta.
|
|
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
|
-
|
|
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
|
-
|
|
10890
|
+
2
|
|
10884
10891
|
]
|
|
10885
10892
|
}
|
|
10886
10893
|
}
|
package/lib/browser/types.d.ts
CHANGED
package/lib/node/decode/user.js
CHANGED
|
@@ -228,7 +228,8 @@ function decodeUser(buffer) {
|
|
|
228
228
|
offset += 1;
|
|
229
229
|
const auctionDuration = buffer.readUInt8(offset);
|
|
230
230
|
offset += 1;
|
|
231
|
-
|
|
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);
|
package/lib/node/idl/drift.json
CHANGED
|
@@ -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
|
-
|
|
10890
|
+
2
|
|
10884
10891
|
]
|
|
10885
10892
|
}
|
|
10886
10893
|
}
|
package/lib/node/types.d.ts
CHANGED
package/package.json
CHANGED
package/src/decode/user.ts
CHANGED
|
@@ -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
|
-
|
|
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
|
|
package/src/idl/drift.json
CHANGED
|
@@ -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
|
-
|
|
10890
|
+
2
|
|
10884
10891
|
]
|
|
10885
10892
|
}
|
|
10886
10893
|
}
|
package/src/types.ts
CHANGED