@drift-labs/sdk 2.113.0-beta.2 → 2.113.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 CHANGED
@@ -1 +1 @@
1
- 2.113.0-beta.2
1
+ 2.113.0-beta.4
@@ -51,7 +51,8 @@ class grpcAccountSubscriber extends webSocketAccountSubscriber_1.WebSocketAccoun
51
51
  await this.fetch();
52
52
  }
53
53
  // Subscribe with grpc
54
- this.stream = await this.client.subscribe();
54
+ this.stream =
55
+ (await this.client.subscribe());
55
56
  const request = {
56
57
  slots: {},
57
58
  accounts: {
@@ -56,7 +56,8 @@ class grpcProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.W
56
56
  }
57
57
  this.onChange = onChange;
58
58
  // Subscribe with grpc
59
- this.stream = await this.client.subscribe();
59
+ this.stream =
60
+ (await this.client.subscribe());
60
61
  const filters = this.options.filters.map((filter) => {
61
62
  return {
62
63
  memcmp: {
@@ -92,7 +92,7 @@ class JupiterClient {
92
92
  }),
93
93
  })).json();
94
94
  if (!('swapTransaction' in resp)) {
95
- throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${(_a = ', ' + resp.message) !== null && _a !== void 0 ? _a : ''}`);
95
+ throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${', ' + ((_a = resp.message) !== null && _a !== void 0 ? _a : '')}`);
96
96
  }
97
97
  const { swapTransaction } = resp;
98
98
  try {
@@ -1073,7 +1073,7 @@ export type UserStatsAccount = {
1073
1073
  };
1074
1074
  export type FuelOverflowAccount = {
1075
1075
  authority: PublicKey;
1076
- fuelInsurance: number;
1076
+ fuelInsurance: BN;
1077
1077
  fuelDeposits: BN;
1078
1078
  fuelBorrows: BN;
1079
1079
  fuelPositions: BN;
@@ -51,7 +51,8 @@ class grpcAccountSubscriber extends webSocketAccountSubscriber_1.WebSocketAccoun
51
51
  await this.fetch();
52
52
  }
53
53
  // Subscribe with grpc
54
- this.stream = await this.client.subscribe();
54
+ this.stream =
55
+ (await this.client.subscribe());
55
56
  const request = {
56
57
  slots: {},
57
58
  accounts: {
@@ -56,7 +56,8 @@ class grpcProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.W
56
56
  }
57
57
  this.onChange = onChange;
58
58
  // Subscribe with grpc
59
- this.stream = await this.client.subscribe();
59
+ this.stream =
60
+ (await this.client.subscribe());
60
61
  const filters = this.options.filters.map((filter) => {
61
62
  return {
62
63
  memcmp: {
@@ -92,7 +92,7 @@ class JupiterClient {
92
92
  }),
93
93
  })).json();
94
94
  if (!('swapTransaction' in resp)) {
95
- throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${(_a = ', ' + resp.message) !== null && _a !== void 0 ? _a : ''}`);
95
+ throw new Error(`swapTransaction not found, error from Jupiter: ${resp.error} ${', ' + ((_a = resp.message) !== null && _a !== void 0 ? _a : '')}`);
96
96
  }
97
97
  const { swapTransaction } = resp;
98
98
  try {
@@ -1073,7 +1073,7 @@ export type UserStatsAccount = {
1073
1073
  };
1074
1074
  export type FuelOverflowAccount = {
1075
1075
  authority: PublicKey;
1076
- fuelInsurance: number;
1076
+ fuelInsurance: BN;
1077
1077
  fuelDeposits: BN;
1078
1078
  fuelBorrows: BN;
1079
1079
  fuelPositions: BN;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.113.0-beta.2",
3
+ "version": "2.113.0-beta.4",
4
4
  "main": "lib/node/index.js",
5
5
  "types": "lib/node/index.d.ts",
6
6
  "browser": "./lib/browser/index.js",
@@ -72,7 +72,8 @@ export class grpcAccountSubscriber<T> extends WebSocketAccountSubscriber<T> {
72
72
  }
73
73
 
74
74
  // Subscribe with grpc
75
- this.stream = await this.client.subscribe();
75
+ this.stream =
76
+ (await this.client.subscribe()) as unknown as typeof this.stream;
76
77
  const request: SubscribeRequest = {
77
78
  slots: {},
78
79
  accounts: {
@@ -92,7 +92,8 @@ export class grpcProgramAccountSubscriber<
92
92
  this.onChange = onChange;
93
93
 
94
94
  // Subscribe with grpc
95
- this.stream = await this.client.subscribe();
95
+ this.stream =
96
+ (await this.client.subscribe()) as unknown as typeof this.stream;
96
97
  const filters = this.options.filters.map((filter) => {
97
98
  return {
98
99
  memcmp: {
@@ -374,7 +374,7 @@ export class JupiterClient {
374
374
  if (!('swapTransaction' in resp)) {
375
375
  throw new Error(
376
376
  `swapTransaction not found, error from Jupiter: ${resp.error} ${
377
- ', ' + resp.message ?? ''
377
+ ', ' + (resp.message ?? '')
378
378
  }`
379
379
  );
380
380
  }
package/src/types.ts CHANGED
@@ -1011,7 +1011,7 @@ export type UserStatsAccount = {
1011
1011
 
1012
1012
  export type FuelOverflowAccount = {
1013
1013
  authority: PublicKey;
1014
- fuelInsurance: number;
1014
+ fuelInsurance: BN;
1015
1015
  fuelDeposits: BN;
1016
1016
  fuelBorrows: BN;
1017
1017
  fuelPositions: BN;