@drift-labs/sdk 2.22.0-beta.2 → 2.22.0
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/lib/driftClient.js +2 -0
- package/lib/idl/drift.json +2 -2
- package/package.json +1 -1
- package/src/driftClient.ts +2 -0
- package/src/idl/drift.json +2 -2
package/lib/driftClient.js
CHANGED
|
@@ -212,6 +212,7 @@ class DriftClient {
|
|
|
212
212
|
getPerpMarketAccounts() {
|
|
213
213
|
return this.accountSubscriber
|
|
214
214
|
.getMarketAccountsAndSlots()
|
|
215
|
+
.filter((value) => value !== undefined)
|
|
215
216
|
.map((value) => value.data);
|
|
216
217
|
}
|
|
217
218
|
getSpotMarketAccount(marketIndex) {
|
|
@@ -228,6 +229,7 @@ class DriftClient {
|
|
|
228
229
|
getSpotMarketAccounts() {
|
|
229
230
|
return this.accountSubscriber
|
|
230
231
|
.getSpotMarketAccountsAndSlots()
|
|
232
|
+
.filter((value) => value !== undefined)
|
|
231
233
|
.map((value) => value.data);
|
|
232
234
|
}
|
|
233
235
|
getQuoteSpotMarketAccount() {
|
package/lib/idl/drift.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.22.0
|
|
2
|
+
"version": "2.22.0",
|
|
3
3
|
"name": "drift",
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -5119,7 +5119,7 @@
|
|
|
5119
5119
|
"fields": [
|
|
5120
5120
|
{
|
|
5121
5121
|
"name": "revenueWithdrawSinceLastSettle",
|
|
5122
|
-
"type": "
|
|
5122
|
+
"type": "u64"
|
|
5123
5123
|
},
|
|
5124
5124
|
{
|
|
5125
5125
|
"name": "maxRevenueWithdrawPerPeriod",
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -360,6 +360,7 @@ export class DriftClient {
|
|
|
360
360
|
public getPerpMarketAccounts(): PerpMarketAccount[] {
|
|
361
361
|
return this.accountSubscriber
|
|
362
362
|
.getMarketAccountsAndSlots()
|
|
363
|
+
.filter((value) => value !== undefined)
|
|
363
364
|
.map((value) => value.data);
|
|
364
365
|
}
|
|
365
366
|
|
|
@@ -383,6 +384,7 @@ export class DriftClient {
|
|
|
383
384
|
public getSpotMarketAccounts(): SpotMarketAccount[] {
|
|
384
385
|
return this.accountSubscriber
|
|
385
386
|
.getSpotMarketAccountsAndSlots()
|
|
387
|
+
.filter((value) => value !== undefined)
|
|
386
388
|
.map((value) => value.data);
|
|
387
389
|
}
|
|
388
390
|
|
package/src/idl/drift.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "2.22.0
|
|
2
|
+
"version": "2.22.0",
|
|
3
3
|
"name": "drift",
|
|
4
4
|
"instructions": [
|
|
5
5
|
{
|
|
@@ -5119,7 +5119,7 @@
|
|
|
5119
5119
|
"fields": [
|
|
5120
5120
|
{
|
|
5121
5121
|
"name": "revenueWithdrawSinceLastSettle",
|
|
5122
|
-
"type": "
|
|
5122
|
+
"type": "u64"
|
|
5123
5123
|
},
|
|
5124
5124
|
{
|
|
5125
5125
|
"name": "maxRevenueWithdrawPerPeriod",
|