flash-sdk 2.6.3 → 2.6.5
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/PerpetualsClient.d.ts +0 -4
- package/dist/PerpetualsClient.js +4 -49
- package/dist/idl/perpetuals.d.ts +78 -678
- package/dist/idl/perpetuals.js +78 -678
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +0 -8
- package/package.json +1 -1
@@ -2383,10 +2383,6 @@ export declare class PerpetualsClient {
|
|
2383
2383
|
instructions: TransactionInstruction[];
|
2384
2384
|
additionalSigners: Signer[];
|
2385
2385
|
}>;
|
2386
|
-
setCustomOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
2387
|
-
instructions: TransactionInstruction[];
|
2388
|
-
additionalSigners: Signer[];
|
2389
|
-
}>;
|
2390
2386
|
setInternalOraclePrice: (tokenMint: PublicKey, price: BN, expo: number, conf: BN, ema: BN, publishTime: BN, poolConfig: PoolConfig) => Promise<{
|
2391
2387
|
instructions: TransactionInstruction[];
|
2392
2388
|
additionalSigners: Signer[];
|
package/dist/PerpetualsClient.js
CHANGED
@@ -4352,53 +4352,8 @@ var PerpetualsClient = (function () {
|
|
4352
4352
|
}
|
4353
4353
|
});
|
4354
4354
|
}); };
|
4355
|
-
this.setCustomOraclePrice = function (tokenMint, price, expo, conf, ema, publishTime, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
4356
|
-
var instructions, additionalSigners, custodyConfig, setCustomOraclePrice, err_27;
|
4357
|
-
return __generator(this, function (_a) {
|
4358
|
-
switch (_a.label) {
|
4359
|
-
case 0:
|
4360
|
-
instructions = [];
|
4361
|
-
additionalSigners = [];
|
4362
|
-
custodyConfig = poolConfig.custodies.find(function (i) { return i.mintKey.equals(tokenMint); });
|
4363
|
-
_a.label = 1;
|
4364
|
-
case 1:
|
4365
|
-
_a.trys.push([1, 3, , 4]);
|
4366
|
-
return [4, this.program.methods
|
4367
|
-
.setCustomOraclePrice({
|
4368
|
-
price: price,
|
4369
|
-
expo: expo,
|
4370
|
-
conf: conf,
|
4371
|
-
ema: ema,
|
4372
|
-
publishTime: publishTime,
|
4373
|
-
})
|
4374
|
-
.accounts({
|
4375
|
-
admin: this.provider.wallet.publicKey,
|
4376
|
-
multisig: poolConfig.multisig,
|
4377
|
-
perpetuals: poolConfig.perpetuals,
|
4378
|
-
pool: poolConfig.poolAddress,
|
4379
|
-
custody: custodyConfig.custodyAccount,
|
4380
|
-
intOracleAccount: custodyConfig.intOracleAccount,
|
4381
|
-
extOracleAccount: custodyConfig.extOracleAccount,
|
4382
|
-
systemProgram: web3_js_1.SystemProgram.programId,
|
4383
|
-
})
|
4384
|
-
.instruction()];
|
4385
|
-
case 2:
|
4386
|
-
setCustomOraclePrice = _a.sent();
|
4387
|
-
instructions.push(setCustomOraclePrice);
|
4388
|
-
return [3, 4];
|
4389
|
-
case 3:
|
4390
|
-
err_27 = _a.sent();
|
4391
|
-
console.log("perpClient setCustomOracleAccount error:: ", err_27);
|
4392
|
-
throw err_27;
|
4393
|
-
case 4: return [2, {
|
4394
|
-
instructions: __spreadArray([], instructions, true),
|
4395
|
-
additionalSigners: additionalSigners
|
4396
|
-
}];
|
4397
|
-
}
|
4398
|
-
});
|
4399
|
-
}); };
|
4400
4355
|
this.setInternalOraclePrice = function (tokenMint, price, expo, conf, ema, publishTime, poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
4401
|
-
var instructions, additionalSigners, custodyConfig, setInternalOraclePrice,
|
4356
|
+
var instructions, additionalSigners, custodyConfig, setInternalOraclePrice, err_27;
|
4402
4357
|
return __generator(this, function (_a) {
|
4403
4358
|
switch (_a.label) {
|
4404
4359
|
case 0:
|
@@ -4431,9 +4386,9 @@ var PerpetualsClient = (function () {
|
|
4431
4386
|
instructions.push(setInternalOraclePrice);
|
4432
4387
|
return [3, 4];
|
4433
4388
|
case 3:
|
4434
|
-
|
4435
|
-
console.log("perpClient setInternalOracleAccount error:: ",
|
4436
|
-
throw
|
4389
|
+
err_27 = _a.sent();
|
4390
|
+
console.log("perpClient setInternalOracleAccount error:: ", err_27);
|
4391
|
+
throw err_27;
|
4437
4392
|
case 4: return [2, {
|
4438
4393
|
instructions: __spreadArray([], instructions, true),
|
4439
4394
|
additionalSigners: additionalSigners
|