@drift-labs/sdk 2.59.0-beta.0 → 2.59.0-beta.2

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.59.0-beta.0
1
+ 2.59.0-beta.2
@@ -1,4 +1,4 @@
1
- import { Connection } from '@solana/web3.js';
1
+ import { Connection, PublicKey } from '@solana/web3.js';
2
2
  import { PriorityFeeMethod, PriorityFeeStrategy, PriorityFeeSubscriberConfig } from './types';
3
3
  import { AverageOverSlotsStrategy } from './averageOverSlotsStrategy';
4
4
  import { MaxOverSlotsStrategy } from './maxOverSlotsStrategy';
@@ -30,4 +30,5 @@ export declare class PriorityFeeSubscriber {
30
30
  getMaxStrategyResult(): number;
31
31
  load(): Promise<void>;
32
32
  unsubscribe(): Promise<void>;
33
+ updateAddresses(addresses: PublicKey[]): void;
33
34
  }
@@ -38,6 +38,9 @@ class PriorityFeeSubscriber {
38
38
  throw new Error('Connection must be helius, or heliusRpcUrl must be provided to use PriorityFeeMethod.HELIUS');
39
39
  }
40
40
  }
41
+ else {
42
+ this.heliusRpcUrl = config.heliusRpcUrl;
43
+ }
41
44
  }
42
45
  }
43
46
  if (this.priorityFeeMethod === types_1.PriorityFeeMethod.SOLANA) {
@@ -107,5 +110,8 @@ class PriorityFeeSubscriber {
107
110
  this.intervalId = undefined;
108
111
  }
109
112
  }
113
+ updateAddresses(addresses) {
114
+ this.addresses = addresses.map((k) => k.toBase58());
115
+ }
110
116
  }
111
117
  exports.PriorityFeeSubscriber = PriorityFeeSubscriber;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@drift-labs/sdk",
3
- "version": "2.59.0-beta.0",
3
+ "version": "2.59.0-beta.2",
4
4
  "main": "lib/index.js",
5
5
  "types": "lib/index.d.ts",
6
6
  "author": "crispheaney",
@@ -1,4 +1,4 @@
1
- import { Connection } from '@solana/web3.js';
1
+ import { Connection, PublicKey } from '@solana/web3.js';
2
2
  import {
3
3
  PriorityFeeMethod,
4
4
  PriorityFeeStrategy,
@@ -56,6 +56,8 @@ export class PriorityFeeSubscriber {
56
56
  'Connection must be helius, or heliusRpcUrl must be provided to use PriorityFeeMethod.HELIUS'
57
57
  );
58
58
  }
59
+ } else {
60
+ this.heliusRpcUrl = config.heliusRpcUrl;
59
61
  }
60
62
  }
61
63
  }
@@ -150,4 +152,8 @@ export class PriorityFeeSubscriber {
150
152
  this.intervalId = undefined;
151
153
  }
152
154
  }
155
+
156
+ public updateAddresses(addresses: PublicKey[]) {
157
+ this.addresses = addresses.map((k) => k.toBase58());
158
+ }
153
159
  }