flash-sdk 2.51.2 → 2.51.3

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.
@@ -82,10 +82,10 @@ var ViewHelper = (function () {
82
82
  console.log("decode error::", error);
83
83
  }
84
84
  };
85
- ViewHelper.prototype.simulateTransaction = function (transaction_1) {
86
- return __awaiter(this, arguments, void 0, function (transaction, userPublicKey) {
85
+ ViewHelper.prototype.simulateTransaction = function (transaction, userPublicKey) {
86
+ if (userPublicKey === void 0) { userPublicKey = undefined; }
87
+ return __awaiter(this, void 0, void 0, function () {
87
88
  var latestBlockhash, messageV0, transaction2;
88
- if (userPublicKey === void 0) { userPublicKey = undefined; }
89
89
  return __generator(this, function (_a) {
90
90
  switch (_a.label) {
91
91
  case 0:
@@ -129,10 +129,10 @@ var getBackupOracleInstruction = function (program, poolConfig, backupOracleSecr
129
129
  }
130
130
  };
131
131
  exports.getBackupOracleInstruction = getBackupOracleInstruction;
132
- function createBackupOracleInstruction(poolAddress_1) {
133
- return __awaiter(this, arguments, void 0, function (poolAddress, overrideCheck) {
132
+ function createBackupOracleInstruction(poolAddress, overrideCheck) {
133
+ if (overrideCheck === void 0) { overrideCheck = false; }
134
+ return __awaiter(this, void 0, void 0, function () {
134
135
  var backupOracleData, backUpOracleInstruction, error_1;
135
- if (overrideCheck === void 0) { overrideCheck = false; }
136
136
  return __generator(this, function (_a) {
137
137
  switch (_a.label) {
138
138
  case 0:
@@ -1520,6 +1520,44 @@ export type Perpetuals = {
1520
1520
  ];
1521
1521
  "returns": "u8";
1522
1522
  },
1523
+ {
1524
+ "name": "setInternalCurrentPrice";
1525
+ "accounts": [
1526
+ {
1527
+ "name": "authority";
1528
+ "isMut": true;
1529
+ "isSigner": true;
1530
+ }
1531
+ ];
1532
+ "args": [
1533
+ {
1534
+ "name": "params";
1535
+ "type": {
1536
+ "defined": "SetInternalCurrentPriceParams";
1537
+ };
1538
+ }
1539
+ ];
1540
+ "returns": "u8";
1541
+ },
1542
+ {
1543
+ "name": "setInternalEmaPrice";
1544
+ "accounts": [
1545
+ {
1546
+ "name": "authority";
1547
+ "isMut": true;
1548
+ "isSigner": true;
1549
+ }
1550
+ ];
1551
+ "args": [
1552
+ {
1553
+ "name": "params";
1554
+ "type": {
1555
+ "defined": "SetInternalEmaPriceParams";
1556
+ };
1557
+ }
1558
+ ];
1559
+ "returns": "u8";
1560
+ },
1523
1561
  {
1524
1562
  "name": "setInternalOraclePrice";
1525
1563
  "accounts": [
@@ -8326,7 +8364,12 @@ export type Perpetuals = {
8326
8364
  "name": "AddInternalOracleParams";
8327
8365
  "type": {
8328
8366
  "kind": "struct";
8329
- "fields": [];
8367
+ "fields": [
8368
+ {
8369
+ "name": "expo";
8370
+ "type": "i32";
8371
+ }
8372
+ ];
8330
8373
  };
8331
8374
  },
8332
8375
  {
@@ -9704,6 +9747,38 @@ export type Perpetuals = {
9704
9747
  ];
9705
9748
  };
9706
9749
  },
9750
+ {
9751
+ "name": "SetInternalCurrentPriceParams";
9752
+ "type": {
9753
+ "kind": "struct";
9754
+ "fields": [
9755
+ {
9756
+ "name": "prices";
9757
+ "type": {
9758
+ "vec": {
9759
+ "defined": "InternalPrice";
9760
+ };
9761
+ };
9762
+ }
9763
+ ];
9764
+ };
9765
+ },
9766
+ {
9767
+ "name": "SetInternalEmaPriceParams";
9768
+ "type": {
9769
+ "kind": "struct";
9770
+ "fields": [
9771
+ {
9772
+ "name": "prices";
9773
+ "type": {
9774
+ "vec": {
9775
+ "defined": "InternalEmaPrice";
9776
+ };
9777
+ };
9778
+ }
9779
+ ];
9780
+ };
9781
+ },
9707
9782
  {
9708
9783
  "name": "SetInternalOraclePriceParams";
9709
9784
  "type": {
@@ -10593,6 +10668,42 @@ export type Perpetuals = {
10593
10668
  ];
10594
10669
  };
10595
10670
  },
10671
+ {
10672
+ "name": "InternalPrice";
10673
+ "type": {
10674
+ "kind": "struct";
10675
+ "fields": [
10676
+ {
10677
+ "name": "price";
10678
+ "type": "u64";
10679
+ },
10680
+ {
10681
+ "name": "conf";
10682
+ "type": "u64";
10683
+ },
10684
+ {
10685
+ "name": "publishTime";
10686
+ "type": "i64";
10687
+ }
10688
+ ];
10689
+ };
10690
+ },
10691
+ {
10692
+ "name": "InternalEmaPrice";
10693
+ "type": {
10694
+ "kind": "struct";
10695
+ "fields": [
10696
+ {
10697
+ "name": "emaPrice";
10698
+ "type": "u64";
10699
+ },
10700
+ {
10701
+ "name": "publishTime";
10702
+ "type": "i64";
10703
+ }
10704
+ ];
10705
+ };
10706
+ },
10596
10707
  {
10597
10708
  "name": "BackupOracle";
10598
10709
  "type": {
@@ -1523,6 +1523,44 @@ exports.IDL = {
1523
1523
  ],
1524
1524
  "returns": "u8"
1525
1525
  },
1526
+ {
1527
+ "name": "setInternalCurrentPrice",
1528
+ "accounts": [
1529
+ {
1530
+ "name": "authority",
1531
+ "isMut": true,
1532
+ "isSigner": true
1533
+ }
1534
+ ],
1535
+ "args": [
1536
+ {
1537
+ "name": "params",
1538
+ "type": {
1539
+ "defined": "SetInternalCurrentPriceParams"
1540
+ }
1541
+ }
1542
+ ],
1543
+ "returns": "u8"
1544
+ },
1545
+ {
1546
+ "name": "setInternalEmaPrice",
1547
+ "accounts": [
1548
+ {
1549
+ "name": "authority",
1550
+ "isMut": true,
1551
+ "isSigner": true
1552
+ }
1553
+ ],
1554
+ "args": [
1555
+ {
1556
+ "name": "params",
1557
+ "type": {
1558
+ "defined": "SetInternalEmaPriceParams"
1559
+ }
1560
+ }
1561
+ ],
1562
+ "returns": "u8"
1563
+ },
1526
1564
  {
1527
1565
  "name": "setInternalOraclePrice",
1528
1566
  "accounts": [
@@ -8329,7 +8367,12 @@ exports.IDL = {
8329
8367
  "name": "AddInternalOracleParams",
8330
8368
  "type": {
8331
8369
  "kind": "struct",
8332
- "fields": []
8370
+ "fields": [
8371
+ {
8372
+ "name": "expo",
8373
+ "type": "i32"
8374
+ }
8375
+ ]
8333
8376
  }
8334
8377
  },
8335
8378
  {
@@ -9707,6 +9750,38 @@ exports.IDL = {
9707
9750
  ]
9708
9751
  }
9709
9752
  },
9753
+ {
9754
+ "name": "SetInternalCurrentPriceParams",
9755
+ "type": {
9756
+ "kind": "struct",
9757
+ "fields": [
9758
+ {
9759
+ "name": "prices",
9760
+ "type": {
9761
+ "vec": {
9762
+ "defined": "InternalPrice"
9763
+ }
9764
+ }
9765
+ }
9766
+ ]
9767
+ }
9768
+ },
9769
+ {
9770
+ "name": "SetInternalEmaPriceParams",
9771
+ "type": {
9772
+ "kind": "struct",
9773
+ "fields": [
9774
+ {
9775
+ "name": "prices",
9776
+ "type": {
9777
+ "vec": {
9778
+ "defined": "InternalEmaPrice"
9779
+ }
9780
+ }
9781
+ }
9782
+ ]
9783
+ }
9784
+ },
9710
9785
  {
9711
9786
  "name": "SetInternalOraclePriceParams",
9712
9787
  "type": {
@@ -10596,6 +10671,42 @@ exports.IDL = {
10596
10671
  ]
10597
10672
  }
10598
10673
  },
10674
+ {
10675
+ "name": "InternalPrice",
10676
+ "type": {
10677
+ "kind": "struct",
10678
+ "fields": [
10679
+ {
10680
+ "name": "price",
10681
+ "type": "u64"
10682
+ },
10683
+ {
10684
+ "name": "conf",
10685
+ "type": "u64"
10686
+ },
10687
+ {
10688
+ "name": "publishTime",
10689
+ "type": "i64"
10690
+ }
10691
+ ]
10692
+ }
10693
+ },
10694
+ {
10695
+ "name": "InternalEmaPrice",
10696
+ "type": {
10697
+ "kind": "struct",
10698
+ "fields": [
10699
+ {
10700
+ "name": "emaPrice",
10701
+ "type": "u64"
10702
+ },
10703
+ {
10704
+ "name": "publishTime",
10705
+ "type": "i64"
10706
+ }
10707
+ ]
10708
+ }
10709
+ },
10599
10710
  {
10600
10711
  "name": "BackupOracle",
10601
10712
  "type": {