@drift-labs/sdk 2.71.0-beta.3 → 2.71.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 +1 -1
- package/lib/factory/oracleClient.js +4 -3
- package/lib/idl/switchboard.json +8354 -0
- package/lib/oracles/switchboardClient.d.ts +11 -0
- package/lib/oracles/switchboardClient.js +40 -0
- package/lib/types.d.ts +3 -0
- package/lib/types.js +1 -1
- package/package.json +1 -1
- package/src/factory/oracleClient.ts +4 -3
- package/src/idl/switchboard.json +8354 -0
- package/src/oracles/switchboardClient.ts +77 -0
- package/src/types.ts +1 -1
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.71.0-beta.
|
|
1
|
+
2.71.0-beta.4
|
|
@@ -7,6 +7,7 @@ const pythClient_1 = require("../oracles/pythClient");
|
|
|
7
7
|
const quoteAssetOracleClient_1 = require("../oracles/quoteAssetOracleClient");
|
|
8
8
|
const anchor_1 = require("@coral-xyz/anchor");
|
|
9
9
|
const prelaunchOracleClient_1 = require("../oracles/prelaunchOracleClient");
|
|
10
|
+
const switchboardClient_1 = require("../oracles/switchboardClient");
|
|
10
11
|
function getOracleClient(oracleSource, connection, program) {
|
|
11
12
|
if ((0, types_1.isVariant)(oracleSource, 'pyth')) {
|
|
12
13
|
return new pythClient_1.PythClient(connection);
|
|
@@ -20,9 +21,9 @@ function getOracleClient(oracleSource, connection, program) {
|
|
|
20
21
|
if ((0, types_1.isVariant)(oracleSource, 'pythStableCoin')) {
|
|
21
22
|
return new pythClient_1.PythClient(connection, undefined, true);
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
24
|
+
if ((0, types_1.isVariant)(oracleSource, 'switchboard')) {
|
|
25
|
+
return new switchboardClient_1.SwitchboardClient(connection);
|
|
26
|
+
}
|
|
26
27
|
if ((0, types_1.isVariant)(oracleSource, 'prelaunch')) {
|
|
27
28
|
return new prelaunchOracleClient_1.PrelaunchOracleClient(connection, program);
|
|
28
29
|
}
|