@drift-labs/sdk 2.139.0-beta.14 → 2.139.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 +1 -1
- package/bun.lock +0 -21
- package/lib/browser/accounts/grpcAccountSubscriber.js +1 -1
- package/lib/browser/accounts/grpcProgramAccountSubscriber.js +1 -1
- package/lib/browser/accounts/laserProgramAccountSubscriber.d.ts +1 -1
- package/lib/browser/accounts/laserProgramAccountSubscriber.js +7 -6
- package/lib/browser/adminClient.d.ts +1 -5
- package/lib/browser/adminClient.js +0 -38
- package/lib/browser/constants/perpMarkets.js +0 -12
- package/lib/browser/constants/spotMarkets.js +0 -11
- package/lib/browser/idl/drift.json +1 -108
- package/lib/browser/math/auction.js +0 -3
- package/lib/browser/math/orders.js +1 -1
- package/lib/browser/swift/swiftOrderSubscriber.d.ts +0 -4
- package/lib/node/accounts/grpcAccountSubscriber.js +1 -1
- package/lib/node/accounts/grpcProgramAccountSubscriber.js +1 -1
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts +1 -1
- package/lib/node/accounts/laserProgramAccountSubscriber.d.ts.map +1 -1
- package/lib/node/accounts/laserProgramAccountSubscriber.js +7 -6
- package/lib/node/adminClient.d.ts +1 -5
- package/lib/node/adminClient.d.ts.map +1 -1
- package/lib/node/adminClient.js +0 -38
- package/lib/node/constants/perpMarkets.d.ts.map +1 -1
- package/lib/node/constants/perpMarkets.js +0 -12
- package/lib/node/constants/spotMarkets.d.ts.map +1 -1
- package/lib/node/constants/spotMarkets.js +0 -11
- package/lib/node/idl/drift.json +1 -108
- package/lib/node/isomorphic/grpc.d.ts +1 -2
- package/lib/node/isomorphic/grpc.js +1 -3
- package/lib/node/isomorphic/grpc.node.d.ts +1 -2
- package/lib/node/isomorphic/grpc.node.d.ts.map +1 -1
- package/lib/node/isomorphic/grpc.node.js +1 -3
- package/lib/node/math/auction.d.ts.map +1 -1
- package/lib/node/math/auction.js +0 -3
- package/lib/node/math/orders.js +1 -1
- package/lib/node/swift/swiftOrderSubscriber.d.ts +0 -4
- package/lib/node/swift/swiftOrderSubscriber.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/accounts/laserProgramAccountSubscriber.ts +2 -2
- package/src/adminClient.ts +0 -80
- package/src/constants/perpMarkets.ts +0 -13
- package/src/constants/spotMarkets.ts +0 -12
- package/src/idl/drift.json +1 -108
- package/src/isomorphic/grpc.node.ts +1 -1
- package/src/math/auction.ts +0 -4
- package/src/math/orders.ts +1 -1
- package/src/swift/swiftOrderSubscriber.ts +0 -4
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.139.0-beta.
|
|
1
|
+
2.139.0-beta.2
|
package/bun.lock
CHANGED
|
@@ -20,7 +20,6 @@
|
|
|
20
20
|
"@triton-one/yellowstone-grpc": "1.3.0",
|
|
21
21
|
"anchor-bankrun": "0.3.0",
|
|
22
22
|
"gill": "^0.10.2",
|
|
23
|
-
"helius-laserstream": "0.1.8",
|
|
24
23
|
"nanoid": "3.3.4",
|
|
25
24
|
"node-cache": "5.1.2",
|
|
26
25
|
"rpc-websockets": "7.5.1",
|
|
@@ -336,8 +335,6 @@
|
|
|
336
335
|
|
|
337
336
|
"@types/node": ["@types/node@22.13.8", "", { "dependencies": { "undici-types": "~6.20.0" } }, "sha512-G3EfaZS+iOGYWLLRCEAXdWK9my08oHNZ+FHluRiggIYJPOXzhOiDgpVCUHaUvyIC5/fj7C/p637jdzC666AOKQ=="],
|
|
338
337
|
|
|
339
|
-
"@types/protobufjs": ["@types/protobufjs@6.0.0", "", { "dependencies": { "protobufjs": "*" } }, "sha512-A27RDExpAf3rdDjIrHKiJK6x8kqqJ4CmoChwtipfhVAn1p7+wviQFFP7dppn8FslSbHtQeVPvi8wNKkDjSYjHw=="],
|
|
340
|
-
|
|
341
338
|
"@types/semver": ["@types/semver@7.7.0", "", {}, "sha512-k107IF4+Xr7UHjwDc7Cfd6PRQfbdkiRabXGRjo07b4WyPahFBZCZ1sE+BNxYIJPPg73UkfOsVOLwqVc/6ETrIA=="],
|
|
342
339
|
|
|
343
340
|
"@types/stack-utils": ["@types/stack-utils@2.0.3", "", {}, "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw=="],
|
|
@@ -714,20 +711,6 @@
|
|
|
714
711
|
|
|
715
712
|
"he": ["he@1.2.0", "", { "bin": { "he": "bin/he" } }, "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="],
|
|
716
713
|
|
|
717
|
-
"helius-laserstream": ["helius-laserstream@0.1.8", "", { "dependencies": { "@types/protobufjs": "^6.0.0", "protobufjs": "^7.5.3" }, "optionalDependencies": { "helius-laserstream-darwin-arm64": "0.1.8", "helius-laserstream-darwin-x64": "0.1.8", "helius-laserstream-linux-arm64-gnu": "0.1.8", "helius-laserstream-linux-arm64-musl": "0.1.8", "helius-laserstream-linux-x64-gnu": "0.1.8", "helius-laserstream-linux-x64-musl": "0.1.8" }, "os": [ "linux", "darwin", ], "cpu": [ "x64", "arm64", ] }, "sha512-jXQkwQRWiowbVPGQrGacOkI5shKPhrEixCu93OpoMtL5fs9mnhtD7XKMPi8CX0W8gsqsJjwR4NlaR+EflyANbQ=="],
|
|
718
|
-
|
|
719
|
-
"helius-laserstream-darwin-arm64": ["helius-laserstream-darwin-arm64@0.1.8", "", { "os": "darwin", "cpu": "arm64" }, "sha512-p/K2Mi3wZnMxEYSLCvu858VyMvtJFonhdF8cLaMcszFv04WWdsK+hINNZpVRfakypvDfDPbMudEhL1Q9USD5+w=="],
|
|
720
|
-
|
|
721
|
-
"helius-laserstream-darwin-x64": ["helius-laserstream-darwin-x64@0.1.8", "", { "os": "darwin", "cpu": "x64" }, "sha512-Hd5irFyfOqQZLdoj5a+OV7vML2YfySSBuKlOwtisMHkUuIXZ4NpAexslDmK7iP5VWRI+lOv9X/tA7BhxW7RGSQ=="],
|
|
722
|
-
|
|
723
|
-
"helius-laserstream-linux-arm64-gnu": ["helius-laserstream-linux-arm64-gnu@0.1.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-PlPm1dvOvTGBL1nuzK98Xe40BJq1JWNREXlBHKDVA/B+KCGQnIMJ1s6e1MevSvFE7SOix5i1BxhYIxGioK2GMg=="],
|
|
724
|
-
|
|
725
|
-
"helius-laserstream-linux-arm64-musl": ["helius-laserstream-linux-arm64-musl@0.1.8", "", { "os": "linux", "cpu": "arm64" }, "sha512-LFadfMRuTd1zo6RZqLTgHQapo3gJYioS7wFMWFoBOFulG0BpAqHEDNobkxx0002QArw+zX29MQ/5OaOCf8kKTA=="],
|
|
726
|
-
|
|
727
|
-
"helius-laserstream-linux-x64-gnu": ["helius-laserstream-linux-x64-gnu@0.1.8", "", { "os": "linux", "cpu": "x64" }, "sha512-IZWK/OQIe0647QqfYikLb1DFK+nYtXLJiMcpj24qnNVWBOtMXmPc1hL6ebazdEiaKt7fxNd5IiM1RqeaqZAZMw=="],
|
|
728
|
-
|
|
729
|
-
"helius-laserstream-linux-x64-musl": ["helius-laserstream-linux-x64-musl@0.1.8", "", { "os": "linux", "cpu": "x64" }, "sha512-riTS6VgxDae1fHOJ2XC/o/v1OZRbEv/3rcoa3NlAOnooDKp5HDgD0zJTcImjQHpYWwGaejx1oX/Ht53lxNoijw=="],
|
|
730
|
-
|
|
731
714
|
"humanize-ms": ["humanize-ms@1.2.1", "", { "dependencies": { "ms": "^2.0.0" } }, "sha512-Fl70vYtsAFb/C06PTS9dZBo7ihau+Tu/DNCk/OyHhea07S+aeMWpFFkUaXRa8fI+ScZbEI8dfSxwY7gxZ9SAVQ=="],
|
|
732
715
|
|
|
733
716
|
"iconv-lite": ["iconv-lite@0.6.3", "", { "dependencies": { "safer-buffer": ">= 2.1.2 < 3.0.0" } }, "sha512-4fCk79wshMdzMp2rH06qWrJE4iolqLhCUH+OiuIgU++RB0+94NlDL81atO7GX55uUKueo0txHNtvEyI6D7WdMw=="],
|
|
@@ -1212,8 +1195,6 @@
|
|
|
1212
1195
|
|
|
1213
1196
|
"@switchboard-xyz/on-demand/bs58": ["bs58@6.0.0", "", { "dependencies": { "base-x": "^5.0.0" } }, "sha512-PD0wEnEYg6ijszw/u8s+iI3H17cTymlrwkKhDhPZq+Sokl3AU4htyBFTjAeNAlCCmg0f53g6ih3jATyCKftTfw=="],
|
|
1214
1197
|
|
|
1215
|
-
"@types/protobufjs/protobufjs": ["protobufjs@7.5.4", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg=="],
|
|
1216
|
-
|
|
1217
1198
|
"@typescript-eslint/project-service/@typescript-eslint/types": ["@typescript-eslint/types@8.38.0", "", {}, "sha512-wzkUfX3plUqij4YwWaJyqhiPE5UCRVlFpKn1oCRn2O1bJ592XxWJj8ROQ3JD5MYXLORW84063z3tZTb/cs4Tyw=="],
|
|
1218
1199
|
|
|
1219
1200
|
"@typescript-eslint/typescript-estree/minimatch": ["minimatch@9.0.3", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg=="],
|
|
@@ -1240,8 +1221,6 @@
|
|
|
1240
1221
|
|
|
1241
1222
|
"glob/minimatch": ["minimatch@5.1.6", "", { "dependencies": { "brace-expansion": "^2.0.1" } }, "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g=="],
|
|
1242
1223
|
|
|
1243
|
-
"helius-laserstream/protobufjs": ["protobufjs@7.5.4", "", { "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", "@protobufjs/codegen": "^2.0.4", "@protobufjs/eventemitter": "^1.1.0", "@protobufjs/fetch": "^1.1.0", "@protobufjs/float": "^1.0.2", "@protobufjs/inquire": "^1.1.0", "@protobufjs/path": "^1.1.2", "@protobufjs/pool": "^1.1.0", "@protobufjs/utf8": "^1.1.0", "@types/node": ">=13.7.0", "long": "^5.0.0" } }, "sha512-CvexbZtbov6jW2eXAvLukXjXUW1TzFaivC46BpWc/3BpcCysb5Vffu+B3XHMm8lVEuy2Mm4XGex8hBSg1yapPg=="],
|
|
1244
|
-
|
|
1245
1224
|
"jayson/@types/node": ["@types/node@12.20.55", "", {}, "sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ=="],
|
|
1246
1225
|
|
|
1247
1226
|
"jayson/commander": ["commander@2.20.3", "", {}, "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ=="],
|
|
@@ -39,7 +39,7 @@ class grpcAccountSubscriber extends webSocketAccountSubscriber_1.WebSocketAccoun
|
|
|
39
39
|
const client = await (0, grpc_1.createClient)(grpcConfigs.endpoint, grpcConfigs.token, (_a = grpcConfigs.channelOptions) !== null && _a !== void 0 ? _a : {});
|
|
40
40
|
const commitmentLevel =
|
|
41
41
|
// @ts-ignore :: isomorphic exported enum fails typescript but will work at runtime
|
|
42
|
-
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b :
|
|
42
|
+
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b : CommitmentLevel.CONFIRMED;
|
|
43
43
|
return new grpcAccountSubscriber(client, commitmentLevel, accountName, program, accountPublicKey, decodeBuffer, resubOpts);
|
|
44
44
|
}
|
|
45
45
|
async subscribe(onChange) {
|
|
@@ -47,7 +47,7 @@ class grpcProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.W
|
|
|
47
47
|
const client = await (0, grpc_1.createClient)(grpcConfigs.endpoint, grpcConfigs.token, (_a = grpcConfigs.channelOptions) !== null && _a !== void 0 ? _a : {});
|
|
48
48
|
const commitmentLevel =
|
|
49
49
|
// @ts-ignore :: isomorphic exported enum fails typescript but will work at runtime
|
|
50
|
-
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b :
|
|
50
|
+
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b : CommitmentLevel.CONFIRMED;
|
|
51
51
|
return new grpcProgramAccountSubscriber(client, commitmentLevel, subscriptionName, accountDiscriminator, program, decodeBufferFn, options, resubOpts);
|
|
52
52
|
}
|
|
53
53
|
async subscribe(onChange) {
|
|
@@ -4,7 +4,7 @@ import { GrpcConfigs, ResubOpts } from './types';
|
|
|
4
4
|
import { Program } from '@coral-xyz/anchor';
|
|
5
5
|
import { Context, MemcmpFilter, PublicKey } from '@solana/web3.js';
|
|
6
6
|
import { WebSocketProgramAccountSubscriber } from './webSocketProgramAccountSubscriber';
|
|
7
|
-
import { LaserCommitmentLevel } from '../isomorphic/grpc';
|
|
7
|
+
import { LaserCommitmentLevel } from '../isomorphic/grpc.node';
|
|
8
8
|
type LaserCommitment = (typeof LaserCommitmentLevel)[keyof typeof LaserCommitmentLevel];
|
|
9
9
|
export declare class LaserstreamProgramAccountSubscriber<T> extends WebSocketProgramAccountSubscriber<T> {
|
|
10
10
|
private stream;
|
|
@@ -27,7 +27,8 @@ exports.LaserstreamProgramAccountSubscriber = void 0;
|
|
|
27
27
|
const web3_js_1 = require("@solana/web3.js");
|
|
28
28
|
const Buffer = __importStar(require("buffer"));
|
|
29
29
|
const webSocketProgramAccountSubscriber_1 = require("./webSocketProgramAccountSubscriber");
|
|
30
|
-
const
|
|
30
|
+
const grpc_node_1 = require("../isomorphic/grpc.node");
|
|
31
|
+
const yellowstone_grpc_1 = require("@triton-one/yellowstone-grpc");
|
|
31
32
|
class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.WebSocketProgramAccountSubscriber {
|
|
32
33
|
constructor(laserConfig, commitmentLevel, subscriptionName, accountDiscriminator, program, decodeBufferFn, options = { filters: [] }, resubOpts) {
|
|
33
34
|
super(subscriptionName, accountDiscriminator, program, decodeBufferFn, options, resubOpts);
|
|
@@ -43,11 +44,11 @@ class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscri
|
|
|
43
44
|
endpoint: grpcConfigs.endpoint,
|
|
44
45
|
maxReconnectAttempts: grpcConfigs.enableReconnect ? 10 : 0,
|
|
45
46
|
channelOptions: {
|
|
46
|
-
'grpc.default_compression_algorithm':
|
|
47
|
+
'grpc.default_compression_algorithm': grpc_node_1.CompressionAlgorithms.zstd,
|
|
47
48
|
'grpc.max_receive_message_length': 1000000000,
|
|
48
49
|
},
|
|
49
50
|
};
|
|
50
|
-
const commitmentLevel = (_a = grpcConfigs.commitmentLevel) !== null && _a !== void 0 ? _a :
|
|
51
|
+
const commitmentLevel = (_a = grpcConfigs.commitmentLevel) !== null && _a !== void 0 ? _a : yellowstone_grpc_1.CommitmentLevel.CONFIRMED;
|
|
51
52
|
return new LaserstreamProgramAccountSubscriber(laserConfig, commitmentLevel, subscriptionName, accountDiscriminator, program, decodeBufferFn, options, resubOpts);
|
|
52
53
|
}
|
|
53
54
|
async subscribe(onChange) {
|
|
@@ -81,7 +82,7 @@ class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscri
|
|
|
81
82
|
transactionsStatus: {},
|
|
82
83
|
};
|
|
83
84
|
try {
|
|
84
|
-
const stream = await (0,
|
|
85
|
+
const stream = await (0, grpc_node_1.LaserSubscribe)(this.laserConfig, request, async (update) => {
|
|
85
86
|
var _a;
|
|
86
87
|
if (update.account) {
|
|
87
88
|
const slot = Number(update.account.slot);
|
|
@@ -146,9 +147,9 @@ class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscri
|
|
|
146
147
|
toLaserCommitment(level) {
|
|
147
148
|
var _a, _b;
|
|
148
149
|
if (typeof level === 'string') {
|
|
149
|
-
return ((_a =
|
|
150
|
+
return ((_a = grpc_node_1.LaserCommitmentLevel[level.toUpperCase()]) !== null && _a !== void 0 ? _a : grpc_node_1.LaserCommitmentLevel.CONFIRMED);
|
|
150
151
|
}
|
|
151
|
-
return (_b = level) !== null && _b !== void 0 ? _b :
|
|
152
|
+
return (_b = level) !== null && _b !== void 0 ? _b : grpc_node_1.LaserCommitmentLevel.CONFIRMED;
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
exports.LaserstreamProgramAccountSubscriber = LaserstreamProgramAccountSubscriber;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="bn.js" />
|
|
2
2
|
import { PublicKey, TransactionInstruction, TransactionSignature } from '@solana/web3.js';
|
|
3
|
-
import { FeeStructure, OracleGuardRails, OracleSource, ExchangeStatus, MarketStatus, ContractTier, AssetTier, SpotFulfillmentConfigStatus, IfRebalanceConfigParams
|
|
3
|
+
import { FeeStructure, OracleGuardRails, OracleSource, ExchangeStatus, MarketStatus, ContractTier, AssetTier, SpotFulfillmentConfigStatus, IfRebalanceConfigParams } from './types';
|
|
4
4
|
import { BN } from '@coral-xyz/anchor';
|
|
5
5
|
import { DriftClient } from './driftClient';
|
|
6
6
|
export declare class AdminClient extends DriftClient {
|
|
@@ -236,10 +236,6 @@ export declare class AdminClient extends DriftClient {
|
|
|
236
236
|
getZeroMMOracleFieldsIx(marketIndex: number): Promise<TransactionInstruction>;
|
|
237
237
|
updateFeatureBitFlagsMMOracle(enable: boolean): Promise<TransactionSignature>;
|
|
238
238
|
getUpdateFeatureBitFlagsMMOracleIx(enable: boolean): Promise<TransactionInstruction>;
|
|
239
|
-
updateFeatureBitFlagsMedianTriggerPrice(enable: boolean): Promise<TransactionSignature>;
|
|
240
|
-
getUpdateFeatureBitFlagsMedianTriggerPriceIx(enable: boolean): Promise<TransactionInstruction>;
|
|
241
239
|
updateDelegateUserGovTokenInsuranceStake(authority: PublicKey, delegate: PublicKey): Promise<TransactionSignature>;
|
|
242
240
|
getUpdateDelegateUserGovTokenInsuranceStakeIx(authority: PublicKey, delegate: PublicKey): Promise<TransactionInstruction>;
|
|
243
|
-
depositIntoInsuranceFundStake(marketIndex: number, amount: BN, userStatsPublicKey: PublicKey, insuranceFundStakePublicKey: PublicKey, userTokenAccountPublicKey: PublicKey, txParams?: TxParams): Promise<TransactionSignature>;
|
|
244
|
-
getDepositIntoInsuranceFundStakeIx(marketIndex: number, amount: BN, userStatsPublicKey: PublicKey, insuranceFundStakePublicKey: PublicKey, userTokenAccountPublicKey: PublicKey): Promise<TransactionInstruction>;
|
|
245
241
|
}
|
|
@@ -2155,22 +2155,6 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
2155
2155
|
},
|
|
2156
2156
|
});
|
|
2157
2157
|
}
|
|
2158
|
-
async updateFeatureBitFlagsMedianTriggerPrice(enable) {
|
|
2159
|
-
const updateFeatureBitFlagsMedianTriggerPriceIx = await this.getUpdateFeatureBitFlagsMedianTriggerPriceIx(enable);
|
|
2160
|
-
const tx = await this.buildTransaction(updateFeatureBitFlagsMedianTriggerPriceIx);
|
|
2161
|
-
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
2162
|
-
return txSig;
|
|
2163
|
-
}
|
|
2164
|
-
async getUpdateFeatureBitFlagsMedianTriggerPriceIx(enable) {
|
|
2165
|
-
return await this.program.instruction.updateFeatureBitFlagsMedianTriggerPrice(enable, {
|
|
2166
|
-
accounts: {
|
|
2167
|
-
admin: this.useHotWalletAdmin
|
|
2168
|
-
? this.wallet.publicKey
|
|
2169
|
-
: this.getStateAccount().admin,
|
|
2170
|
-
state: await this.getStatePublicKey(),
|
|
2171
|
-
},
|
|
2172
|
-
});
|
|
2173
|
-
}
|
|
2174
2158
|
async updateDelegateUserGovTokenInsuranceStake(authority, delegate) {
|
|
2175
2159
|
const updateDelegateUserGovTokenInsuranceStakeIx = await this.getUpdateDelegateUserGovTokenInsuranceStakeIx(authority, delegate);
|
|
2176
2160
|
const tx = await this.buildTransaction(updateDelegateUserGovTokenInsuranceStakeIx);
|
|
@@ -2194,27 +2178,5 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
2194
2178
|
});
|
|
2195
2179
|
return ix;
|
|
2196
2180
|
}
|
|
2197
|
-
async depositIntoInsuranceFundStake(marketIndex, amount, userStatsPublicKey, insuranceFundStakePublicKey, userTokenAccountPublicKey, txParams) {
|
|
2198
|
-
const tx = await this.buildTransaction(await this.getDepositIntoInsuranceFundStakeIx(marketIndex, amount, userStatsPublicKey, insuranceFundStakePublicKey, userTokenAccountPublicKey), txParams);
|
|
2199
|
-
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
2200
|
-
return txSig;
|
|
2201
|
-
}
|
|
2202
|
-
async getDepositIntoInsuranceFundStakeIx(marketIndex, amount, userStatsPublicKey, insuranceFundStakePublicKey, userTokenAccountPublicKey) {
|
|
2203
|
-
const spotMarket = this.getSpotMarketAccount(marketIndex);
|
|
2204
|
-
return await this.program.instruction.depositIntoInsuranceFundStake(marketIndex, amount, {
|
|
2205
|
-
accounts: {
|
|
2206
|
-
signer: this.wallet.publicKey,
|
|
2207
|
-
state: await this.getStatePublicKey(),
|
|
2208
|
-
spotMarket: spotMarket.pubkey,
|
|
2209
|
-
insuranceFundStake: insuranceFundStakePublicKey,
|
|
2210
|
-
userStats: userStatsPublicKey,
|
|
2211
|
-
spotMarketVault: spotMarket.vault,
|
|
2212
|
-
insuranceFundVault: spotMarket.insuranceFund.vault,
|
|
2213
|
-
userTokenAccount: userTokenAccountPublicKey,
|
|
2214
|
-
tokenProgram: this.getTokenProgramForSpotMarket(spotMarket),
|
|
2215
|
-
driftSigner: this.getSignerPublicKey(),
|
|
2216
|
-
},
|
|
2217
|
-
});
|
|
2218
|
-
}
|
|
2219
2181
|
}
|
|
2220
2182
|
exports.AdminClient = AdminClient;
|
|
@@ -1216,18 +1216,6 @@ exports.MainnetPerpMarkets = [
|
|
|
1216
1216
|
oracleSource: types_1.OracleSource.PYTH_LAZER,
|
|
1217
1217
|
pythLazerId: 1578,
|
|
1218
1218
|
},
|
|
1219
|
-
{
|
|
1220
|
-
fullName: 'ASTER',
|
|
1221
|
-
category: ['DEX'],
|
|
1222
|
-
symbol: 'ASTER-PERP',
|
|
1223
|
-
baseAssetSymbol: 'ASTER',
|
|
1224
|
-
marketIndex: 76,
|
|
1225
|
-
oracle: new web3_js_1.PublicKey('E4tyjB3os4jVczLVQ258uxLdcwjuqmhcsPquVWgrpah4'),
|
|
1226
|
-
launchTs: 1758632629000,
|
|
1227
|
-
oracleSource: types_1.OracleSource.PYTH_LAZER,
|
|
1228
|
-
pythFeedId: '0xa903b5a82cb572397e3d47595d2889cf80513f5b4cf7a36b513ae10cc8b1e338',
|
|
1229
|
-
pythLazerId: 2310,
|
|
1230
|
-
},
|
|
1231
1219
|
];
|
|
1232
1220
|
exports.PerpMarkets = {
|
|
1233
1221
|
devnet: exports.DevnetPerpMarkets,
|
|
@@ -92,17 +92,6 @@ exports.DevnetSpotMarkets = [
|
|
|
92
92
|
pythFeedId: '0xeaa020c61cc479712813461ce153894a96a6c00b21ed0cfc2798d1f9a9e9c94a',
|
|
93
93
|
pythLazerId: 7,
|
|
94
94
|
},
|
|
95
|
-
{
|
|
96
|
-
symbol: 'GLXY',
|
|
97
|
-
marketIndex: 7,
|
|
98
|
-
poolId: 0,
|
|
99
|
-
oracle: new web3_js_1.PublicKey('4wFrjUQHzRBc6qjVtMDbt28aEVgn6GaNiWR6vEff4KxR'),
|
|
100
|
-
oracleSource: types_1.OracleSource.Prelaunch,
|
|
101
|
-
mint: new web3_js_1.PublicKey('2vVfXmcWXEaFzp7iaTVnQ4y1gR41S6tJQQMo1S5asJyC'),
|
|
102
|
-
precision: new anchor_1.BN(10).pow(numericConstants_1.SIX),
|
|
103
|
-
precisionExp: numericConstants_1.SIX,
|
|
104
|
-
pythFeedId: '0x67e031d1723e5c89e4a826d80b2f3b41a91b05ef6122d523b8829a02e0f563aa',
|
|
105
|
-
},
|
|
106
95
|
];
|
|
107
96
|
exports.MainnetSpotMarkets = [
|
|
108
97
|
{
|
|
@@ -3141,42 +3141,6 @@
|
|
|
3141
3141
|
],
|
|
3142
3142
|
"args": []
|
|
3143
3143
|
},
|
|
3144
|
-
{
|
|
3145
|
-
"name": "updateDelegateUserGovTokenInsuranceStake",
|
|
3146
|
-
"accounts": [
|
|
3147
|
-
{
|
|
3148
|
-
"name": "spotMarket",
|
|
3149
|
-
"isMut": true,
|
|
3150
|
-
"isSigner": false
|
|
3151
|
-
},
|
|
3152
|
-
{
|
|
3153
|
-
"name": "insuranceFundStake",
|
|
3154
|
-
"isMut": false,
|
|
3155
|
-
"isSigner": false
|
|
3156
|
-
},
|
|
3157
|
-
{
|
|
3158
|
-
"name": "userStats",
|
|
3159
|
-
"isMut": true,
|
|
3160
|
-
"isSigner": false
|
|
3161
|
-
},
|
|
3162
|
-
{
|
|
3163
|
-
"name": "admin",
|
|
3164
|
-
"isMut": false,
|
|
3165
|
-
"isSigner": true
|
|
3166
|
-
},
|
|
3167
|
-
{
|
|
3168
|
-
"name": "insuranceFundVault",
|
|
3169
|
-
"isMut": true,
|
|
3170
|
-
"isSigner": false
|
|
3171
|
-
},
|
|
3172
|
-
{
|
|
3173
|
-
"name": "state",
|
|
3174
|
-
"isMut": false,
|
|
3175
|
-
"isSigner": false
|
|
3176
|
-
}
|
|
3177
|
-
],
|
|
3178
|
-
"args": []
|
|
3179
|
-
},
|
|
3180
3144
|
{
|
|
3181
3145
|
"name": "initializeInsuranceFundStake",
|
|
3182
3146
|
"accounts": [
|
|
@@ -3670,71 +3634,6 @@
|
|
|
3670
3634
|
}
|
|
3671
3635
|
]
|
|
3672
3636
|
},
|
|
3673
|
-
{
|
|
3674
|
-
"name": "depositIntoInsuranceFundStake",
|
|
3675
|
-
"accounts": [
|
|
3676
|
-
{
|
|
3677
|
-
"name": "signer",
|
|
3678
|
-
"isMut": false,
|
|
3679
|
-
"isSigner": true
|
|
3680
|
-
},
|
|
3681
|
-
{
|
|
3682
|
-
"name": "state",
|
|
3683
|
-
"isMut": true,
|
|
3684
|
-
"isSigner": false
|
|
3685
|
-
},
|
|
3686
|
-
{
|
|
3687
|
-
"name": "spotMarket",
|
|
3688
|
-
"isMut": true,
|
|
3689
|
-
"isSigner": false
|
|
3690
|
-
},
|
|
3691
|
-
{
|
|
3692
|
-
"name": "insuranceFundStake",
|
|
3693
|
-
"isMut": true,
|
|
3694
|
-
"isSigner": false
|
|
3695
|
-
},
|
|
3696
|
-
{
|
|
3697
|
-
"name": "userStats",
|
|
3698
|
-
"isMut": true,
|
|
3699
|
-
"isSigner": false
|
|
3700
|
-
},
|
|
3701
|
-
{
|
|
3702
|
-
"name": "spotMarketVault",
|
|
3703
|
-
"isMut": true,
|
|
3704
|
-
"isSigner": false
|
|
3705
|
-
},
|
|
3706
|
-
{
|
|
3707
|
-
"name": "insuranceFundVault",
|
|
3708
|
-
"isMut": true,
|
|
3709
|
-
"isSigner": false
|
|
3710
|
-
},
|
|
3711
|
-
{
|
|
3712
|
-
"name": "userTokenAccount",
|
|
3713
|
-
"isMut": true,
|
|
3714
|
-
"isSigner": false
|
|
3715
|
-
},
|
|
3716
|
-
{
|
|
3717
|
-
"name": "tokenProgram",
|
|
3718
|
-
"isMut": false,
|
|
3719
|
-
"isSigner": false
|
|
3720
|
-
},
|
|
3721
|
-
{
|
|
3722
|
-
"name": "driftSigner",
|
|
3723
|
-
"isMut": false,
|
|
3724
|
-
"isSigner": false
|
|
3725
|
-
}
|
|
3726
|
-
],
|
|
3727
|
-
"args": [
|
|
3728
|
-
{
|
|
3729
|
-
"name": "marketIndex",
|
|
3730
|
-
"type": "u16"
|
|
3731
|
-
},
|
|
3732
|
-
{
|
|
3733
|
-
"name": "amount",
|
|
3734
|
-
"type": "u64"
|
|
3735
|
-
}
|
|
3736
|
-
]
|
|
3737
|
-
},
|
|
3738
3637
|
{
|
|
3739
3638
|
"name": "updatePythPullOracle",
|
|
3740
3639
|
"accounts": [
|
|
@@ -12307,9 +12206,6 @@
|
|
|
12307
12206
|
},
|
|
12308
12207
|
{
|
|
12309
12208
|
"name": "StakeTransfer"
|
|
12310
|
-
},
|
|
12311
|
-
{
|
|
12312
|
-
"name": "AdminDeposit"
|
|
12313
12209
|
}
|
|
12314
12210
|
]
|
|
12315
12211
|
}
|
|
@@ -16322,8 +16218,5 @@
|
|
|
16322
16218
|
"name": "InvalidIfRebalanceSwap",
|
|
16323
16219
|
"msg": "Invalid If Rebalance Swap"
|
|
16324
16220
|
}
|
|
16325
|
-
]
|
|
16326
|
-
"metadata": {
|
|
16327
|
-
"address": "dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"
|
|
16328
|
-
}
|
|
16221
|
+
]
|
|
16329
16222
|
}
|
|
@@ -17,9 +17,6 @@ function isFallbackAvailableLiquiditySource(order, minAuctionDuration, slot) {
|
|
|
17
17
|
if (minAuctionDuration === 0) {
|
|
18
18
|
return true;
|
|
19
19
|
}
|
|
20
|
-
if ((order.bitFlags & types_2.OrderBitFlag.SafeTriggerOrder) !== 0) {
|
|
21
|
-
return true;
|
|
22
|
-
}
|
|
23
20
|
return new anchor_1.BN(slot).sub(order.slot).gt(new anchor_1.BN(minAuctionDuration));
|
|
24
21
|
}
|
|
25
22
|
exports.isFallbackAvailableLiquiditySource = isFallbackAvailableLiquiditySource;
|
|
@@ -147,7 +147,7 @@ function hasAuctionPrice(order, slot) {
|
|
|
147
147
|
exports.hasAuctionPrice = hasAuctionPrice;
|
|
148
148
|
function isFillableByVAMM(order, market, mmOraclePriceData, slot, ts, minAuctionDuration) {
|
|
149
149
|
return (((0, auction_1.isFallbackAvailableLiquiditySource)(order, minAuctionDuration, slot) &&
|
|
150
|
-
calculateBaseAssetAmountForAmmToFulfill(order, market, mmOraclePriceData, slot).
|
|
150
|
+
calculateBaseAssetAmountForAmmToFulfill(order, market, mmOraclePriceData, slot).gte(market.amm.minOrderSize)) ||
|
|
151
151
|
isOrderExpired(order, ts));
|
|
152
152
|
}
|
|
153
153
|
exports.isFillableByVAMM = isFillableByVAMM;
|
|
@@ -37,10 +37,6 @@ export interface SwiftOrderMessage {
|
|
|
37
37
|
/** Base64 string of a prerequisite deposit tx. The swift order_message should be bundled
|
|
38
38
|
* after the deposit when present */
|
|
39
39
|
depositTx?: string;
|
|
40
|
-
/** order market index */
|
|
41
|
-
market_index: number;
|
|
42
|
-
/** order timestamp in unix ms */
|
|
43
|
-
ts: number;
|
|
44
40
|
}
|
|
45
41
|
export declare class SwiftOrderSubscriber {
|
|
46
42
|
private config;
|
|
@@ -39,7 +39,7 @@ class grpcAccountSubscriber extends webSocketAccountSubscriber_1.WebSocketAccoun
|
|
|
39
39
|
const client = await (0, grpc_1.createClient)(grpcConfigs.endpoint, grpcConfigs.token, (_a = grpcConfigs.channelOptions) !== null && _a !== void 0 ? _a : {});
|
|
40
40
|
const commitmentLevel =
|
|
41
41
|
// @ts-ignore :: isomorphic exported enum fails typescript but will work at runtime
|
|
42
|
-
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b :
|
|
42
|
+
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b : CommitmentLevel.CONFIRMED;
|
|
43
43
|
return new grpcAccountSubscriber(client, commitmentLevel, accountName, program, accountPublicKey, decodeBuffer, resubOpts);
|
|
44
44
|
}
|
|
45
45
|
async subscribe(onChange) {
|
|
@@ -47,7 +47,7 @@ class grpcProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.W
|
|
|
47
47
|
const client = await (0, grpc_1.createClient)(grpcConfigs.endpoint, grpcConfigs.token, (_a = grpcConfigs.channelOptions) !== null && _a !== void 0 ? _a : {});
|
|
48
48
|
const commitmentLevel =
|
|
49
49
|
// @ts-ignore :: isomorphic exported enum fails typescript but will work at runtime
|
|
50
|
-
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b :
|
|
50
|
+
(_b = grpcConfigs.commitmentLevel) !== null && _b !== void 0 ? _b : CommitmentLevel.CONFIRMED;
|
|
51
51
|
return new grpcProgramAccountSubscriber(client, commitmentLevel, subscriptionName, accountDiscriminator, program, decodeBufferFn, options, resubOpts);
|
|
52
52
|
}
|
|
53
53
|
async subscribe(onChange) {
|
|
@@ -4,7 +4,7 @@ import { GrpcConfigs, ResubOpts } from './types';
|
|
|
4
4
|
import { Program } from '@coral-xyz/anchor';
|
|
5
5
|
import { Context, MemcmpFilter, PublicKey } from '@solana/web3.js';
|
|
6
6
|
import { WebSocketProgramAccountSubscriber } from './webSocketProgramAccountSubscriber';
|
|
7
|
-
import { LaserCommitmentLevel } from '../isomorphic/grpc';
|
|
7
|
+
import { LaserCommitmentLevel } from '../isomorphic/grpc.node';
|
|
8
8
|
type LaserCommitment = (typeof LaserCommitmentLevel)[keyof typeof LaserCommitmentLevel];
|
|
9
9
|
export declare class LaserstreamProgramAccountSubscriber<T> extends WebSocketProgramAccountSubscriber<T> {
|
|
10
10
|
private stream;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"laserProgramAccountSubscriber.d.ts","sourceRoot":"","sources":["../../../src/accounts/laserProgramAccountSubscriber.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EACN,oBAAoB,
|
|
1
|
+
{"version":3,"file":"laserProgramAccountSubscriber.d.ts","sourceRoot":"","sources":["../../../src/accounts/laserProgramAccountSubscriber.ts"],"names":[],"mappings":";;AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAC5C,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAEnE,OAAO,EAAE,iCAAiC,EAAE,MAAM,qCAAqC,CAAC;AAExF,OAAO,EACN,oBAAoB,EAMpB,MAAM,yBAAyB,CAAC;AAGjC,KAAK,eAAe,GACnB,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,OAAO,oBAAoB,CAAC,CAAC;AAElE,qBAAa,mCAAmC,CAC/C,CAAC,CACA,SAAQ,iCAAiC,CAAC,CAAC,CAAC;IAC7C,OAAO,CAAC,MAAM,CAMD;IAEb,OAAO,CAAC,eAAe,CAAkB;IAClC,UAAU,CAAC,EAAE,MAAM,CAAC;IAE3B,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAoB;IAEhD,OAAO;WAsBa,MAAM,CAAC,CAAC,EAC3B,WAAW,EAAE,WAAW,EACxB,gBAAgB,EAAE,MAAM,EACxB,oBAAoB,EAAE,MAAM,EAC5B,OAAO,EAAE,OAAO,EAChB,cAAc,EAAE,CAAC,WAAW,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,KAAK,CAAC,EACtD,OAAO,GAAE;QAAE,OAAO,EAAE,YAAY,EAAE,CAAA;KAEjC,EACD,SAAS,CAAC,EAAE,SAAS,GACnB,OAAO,CAAC,mCAAmC,CAAC,CAAC,CAAC,CAAC;IA0B5C,SAAS,CACd,QAAQ,EAAE,CACT,SAAS,EAAE,SAAS,EACpB,IAAI,EAAE,CAAC,EACP,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,MAAM,KACV,IAAI,GACP,OAAO,CAAC,IAAI,CAAC;IAmFH,WAAW,CAAC,OAAO,UAAQ,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBjD,iBAAiB,CACvB,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAChC,eAAe;CASlB"}
|
|
@@ -27,7 +27,8 @@ exports.LaserstreamProgramAccountSubscriber = void 0;
|
|
|
27
27
|
const web3_js_1 = require("@solana/web3.js");
|
|
28
28
|
const Buffer = __importStar(require("buffer"));
|
|
29
29
|
const webSocketProgramAccountSubscriber_1 = require("./webSocketProgramAccountSubscriber");
|
|
30
|
-
const
|
|
30
|
+
const grpc_node_1 = require("../isomorphic/grpc.node");
|
|
31
|
+
const yellowstone_grpc_1 = require("@triton-one/yellowstone-grpc");
|
|
31
32
|
class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscriber_1.WebSocketProgramAccountSubscriber {
|
|
32
33
|
constructor(laserConfig, commitmentLevel, subscriptionName, accountDiscriminator, program, decodeBufferFn, options = { filters: [] }, resubOpts) {
|
|
33
34
|
super(subscriptionName, accountDiscriminator, program, decodeBufferFn, options, resubOpts);
|
|
@@ -43,11 +44,11 @@ class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscri
|
|
|
43
44
|
endpoint: grpcConfigs.endpoint,
|
|
44
45
|
maxReconnectAttempts: grpcConfigs.enableReconnect ? 10 : 0,
|
|
45
46
|
channelOptions: {
|
|
46
|
-
'grpc.default_compression_algorithm':
|
|
47
|
+
'grpc.default_compression_algorithm': grpc_node_1.CompressionAlgorithms.zstd,
|
|
47
48
|
'grpc.max_receive_message_length': 1000000000,
|
|
48
49
|
},
|
|
49
50
|
};
|
|
50
|
-
const commitmentLevel = (_a = grpcConfigs.commitmentLevel) !== null && _a !== void 0 ? _a :
|
|
51
|
+
const commitmentLevel = (_a = grpcConfigs.commitmentLevel) !== null && _a !== void 0 ? _a : yellowstone_grpc_1.CommitmentLevel.CONFIRMED;
|
|
51
52
|
return new LaserstreamProgramAccountSubscriber(laserConfig, commitmentLevel, subscriptionName, accountDiscriminator, program, decodeBufferFn, options, resubOpts);
|
|
52
53
|
}
|
|
53
54
|
async subscribe(onChange) {
|
|
@@ -81,7 +82,7 @@ class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscri
|
|
|
81
82
|
transactionsStatus: {},
|
|
82
83
|
};
|
|
83
84
|
try {
|
|
84
|
-
const stream = await (0,
|
|
85
|
+
const stream = await (0, grpc_node_1.LaserSubscribe)(this.laserConfig, request, async (update) => {
|
|
85
86
|
var _a;
|
|
86
87
|
if (update.account) {
|
|
87
88
|
const slot = Number(update.account.slot);
|
|
@@ -146,9 +147,9 @@ class LaserstreamProgramAccountSubscriber extends webSocketProgramAccountSubscri
|
|
|
146
147
|
toLaserCommitment(level) {
|
|
147
148
|
var _a, _b;
|
|
148
149
|
if (typeof level === 'string') {
|
|
149
|
-
return ((_a =
|
|
150
|
+
return ((_a = grpc_node_1.LaserCommitmentLevel[level.toUpperCase()]) !== null && _a !== void 0 ? _a : grpc_node_1.LaserCommitmentLevel.CONFIRMED);
|
|
150
151
|
}
|
|
151
|
-
return (_b = level) !== null && _b !== void 0 ? _b :
|
|
152
|
+
return (_b = level) !== null && _b !== void 0 ? _b : grpc_node_1.LaserCommitmentLevel.CONFIRMED;
|
|
152
153
|
}
|
|
153
154
|
}
|
|
154
155
|
exports.LaserstreamProgramAccountSubscriber = LaserstreamProgramAccountSubscriber;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="bn.js" />
|
|
2
2
|
import { PublicKey, TransactionInstruction, TransactionSignature } from '@solana/web3.js';
|
|
3
|
-
import { FeeStructure, OracleGuardRails, OracleSource, ExchangeStatus, MarketStatus, ContractTier, AssetTier, SpotFulfillmentConfigStatus, IfRebalanceConfigParams
|
|
3
|
+
import { FeeStructure, OracleGuardRails, OracleSource, ExchangeStatus, MarketStatus, ContractTier, AssetTier, SpotFulfillmentConfigStatus, IfRebalanceConfigParams } from './types';
|
|
4
4
|
import { BN } from '@coral-xyz/anchor';
|
|
5
5
|
import { DriftClient } from './driftClient';
|
|
6
6
|
export declare class AdminClient extends DriftClient {
|
|
@@ -236,11 +236,7 @@ export declare class AdminClient extends DriftClient {
|
|
|
236
236
|
getZeroMMOracleFieldsIx(marketIndex: number): Promise<TransactionInstruction>;
|
|
237
237
|
updateFeatureBitFlagsMMOracle(enable: boolean): Promise<TransactionSignature>;
|
|
238
238
|
getUpdateFeatureBitFlagsMMOracleIx(enable: boolean): Promise<TransactionInstruction>;
|
|
239
|
-
updateFeatureBitFlagsMedianTriggerPrice(enable: boolean): Promise<TransactionSignature>;
|
|
240
|
-
getUpdateFeatureBitFlagsMedianTriggerPriceIx(enable: boolean): Promise<TransactionInstruction>;
|
|
241
239
|
updateDelegateUserGovTokenInsuranceStake(authority: PublicKey, delegate: PublicKey): Promise<TransactionSignature>;
|
|
242
240
|
getUpdateDelegateUserGovTokenInsuranceStakeIx(authority: PublicKey, delegate: PublicKey): Promise<TransactionInstruction>;
|
|
243
|
-
depositIntoInsuranceFundStake(marketIndex: number, amount: BN, userStatsPublicKey: PublicKey, insuranceFundStakePublicKey: PublicKey, userTokenAccountPublicKey: PublicKey, txParams?: TxParams): Promise<TransactionSignature>;
|
|
244
|
-
getDepositIntoInsuranceFundStakeIx(marketIndex: number, amount: BN, userStatsPublicKey: PublicKey, insuranceFundStakePublicKey: PublicKey, userTokenAccountPublicKey: PublicKey): Promise<TransactionInstruction>;
|
|
245
241
|
}
|
|
246
242
|
//# sourceMappingURL=adminClient.d.ts.map
|