@drift-labs/sdk 2.74.0-beta.12 → 2.74.0-beta.13
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/adminClient.d.ts +1 -0
- package/lib/adminClient.js +8 -5
- package/package.json +1 -1
- package/src/adminClient.ts +22 -10
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.74.0-beta.
|
|
1
|
+
2.74.0-beta.13
|
package/lib/adminClient.d.ts
CHANGED
|
@@ -94,4 +94,5 @@ export declare class AdminClient extends DriftClient {
|
|
|
94
94
|
updatePrelaunchOracleParams(admin: PublicKey, perpMarketIndex: number, price?: BN, maxPrice?: BN): Promise<TransactionSignature>;
|
|
95
95
|
getUpdatePrelaunchOracleParamsIx(admin: PublicKey, perpMarketIndex: number, price?: BN, maxPrice?: BN): Promise<TransactionInstruction>;
|
|
96
96
|
deletePrelaunchOracle(perpMarketIndex: number): Promise<TransactionSignature>;
|
|
97
|
+
getDeletePrelaunchOracleIx(admin: PublicKey, perpMarketIndex: number): Promise<TransactionInstruction>;
|
|
97
98
|
}
|
package/lib/adminClient.js
CHANGED
|
@@ -1105,17 +1105,20 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
1105
1105
|
});
|
|
1106
1106
|
}
|
|
1107
1107
|
async deletePrelaunchOracle(perpMarketIndex) {
|
|
1108
|
-
const deletePrelaunchOracleIx = await this.
|
|
1108
|
+
const deletePrelaunchOracleIx = await this.getDeletePrelaunchOracleIx(this.wallet.publicKey, perpMarketIndex);
|
|
1109
|
+
const tx = await this.buildTransaction(deletePrelaunchOracleIx);
|
|
1110
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1111
|
+
return txSig;
|
|
1112
|
+
}
|
|
1113
|
+
async getDeletePrelaunchOracleIx(admin, perpMarketIndex) {
|
|
1114
|
+
return await this.program.instruction.deletePrelaunchOracle(perpMarketIndex, {
|
|
1109
1115
|
accounts: {
|
|
1110
|
-
admin
|
|
1116
|
+
admin,
|
|
1111
1117
|
state: await this.getStatePublicKey(),
|
|
1112
1118
|
prelaunchOracle: await (0, pda_1.getPrelaunchOraclePublicKey)(this.program.programId, perpMarketIndex),
|
|
1113
1119
|
perpMarket: await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex),
|
|
1114
1120
|
},
|
|
1115
1121
|
});
|
|
1116
|
-
const tx = await this.buildTransaction(deletePrelaunchOracleIx);
|
|
1117
|
-
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1118
|
-
return txSig;
|
|
1119
1122
|
}
|
|
1120
1123
|
}
|
|
1121
1124
|
exports.AdminClient = AdminClient;
|
package/package.json
CHANGED
package/src/adminClient.ts
CHANGED
|
@@ -2389,10 +2389,27 @@ export class AdminClient extends DriftClient {
|
|
|
2389
2389
|
public async deletePrelaunchOracle(
|
|
2390
2390
|
perpMarketIndex: number
|
|
2391
2391
|
): Promise<TransactionSignature> {
|
|
2392
|
-
const deletePrelaunchOracleIx =
|
|
2393
|
-
|
|
2392
|
+
const deletePrelaunchOracleIx = await this.getDeletePrelaunchOracleIx(
|
|
2393
|
+
this.wallet.publicKey,
|
|
2394
|
+
perpMarketIndex
|
|
2395
|
+
);
|
|
2396
|
+
|
|
2397
|
+
const tx = await this.buildTransaction(deletePrelaunchOracleIx);
|
|
2398
|
+
|
|
2399
|
+
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
2400
|
+
|
|
2401
|
+
return txSig;
|
|
2402
|
+
}
|
|
2403
|
+
|
|
2404
|
+
public async getDeletePrelaunchOracleIx(
|
|
2405
|
+
admin: PublicKey,
|
|
2406
|
+
perpMarketIndex: number
|
|
2407
|
+
): Promise<TransactionInstruction> {
|
|
2408
|
+
return await this.program.instruction.deletePrelaunchOracle(
|
|
2409
|
+
perpMarketIndex,
|
|
2410
|
+
{
|
|
2394
2411
|
accounts: {
|
|
2395
|
-
admin
|
|
2412
|
+
admin,
|
|
2396
2413
|
state: await this.getStatePublicKey(),
|
|
2397
2414
|
prelaunchOracle: await getPrelaunchOraclePublicKey(
|
|
2398
2415
|
this.program.programId,
|
|
@@ -2403,12 +2420,7 @@ export class AdminClient extends DriftClient {
|
|
|
2403
2420
|
perpMarketIndex
|
|
2404
2421
|
),
|
|
2405
2422
|
},
|
|
2406
|
-
}
|
|
2407
|
-
|
|
2408
|
-
const tx = await this.buildTransaction(deletePrelaunchOracleIx);
|
|
2409
|
-
|
|
2410
|
-
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
2411
|
-
|
|
2412
|
-
return txSig;
|
|
2423
|
+
}
|
|
2424
|
+
);
|
|
2413
2425
|
}
|
|
2414
2426
|
}
|