flash-sdk 11.10.1-alpha.0 → 11.11.0
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/dist/PerpetualsClient.d.ts +14 -52
- package/dist/PerpetualsClient.js +115 -183
- package/dist/PositionAccount.d.ts +1 -2
- package/dist/ViewHelper.d.ts +2 -1
- package/dist/ViewHelper.js +3 -3
- package/dist/idl/perpetuals.d.ts +304 -111
- package/dist/idl/perpetuals.js +305 -112
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +0 -1
- package/dist/types/index.js +1 -2
- package/package.json +1 -1
|
@@ -21,8 +21,7 @@ export declare class PositionAccount implements Position {
|
|
|
21
21
|
cumulativeLockFeeSnapshot: BN;
|
|
22
22
|
degenSizeUsd: BN;
|
|
23
23
|
referencePrice: ContractOraclePrice;
|
|
24
|
-
|
|
25
|
-
previousPenalty: number;
|
|
24
|
+
buffer: number;
|
|
26
25
|
sizeDecimals: number;
|
|
27
26
|
lockedDecimals: number;
|
|
28
27
|
collateralDecimals: number;
|
package/dist/ViewHelper.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { PublicKey, RpcResponseAndContext, SimulatedTransactionResponse, Transaction } from "@solana/web3.js";
|
|
2
2
|
import { PerpetualsClient } from "./PerpetualsClient";
|
|
3
|
+
import { AddressLookupTableAccount } from "@solana/web3.js";
|
|
3
4
|
export declare class ViewHelper {
|
|
4
5
|
private perpetualsClient;
|
|
5
6
|
constructor(client: PerpetualsClient);
|
|
6
7
|
decodeLogs<T>(data: RpcResponseAndContext<SimulatedTransactionResponse>, instructionNumber: number, instructionName?: string): T | undefined;
|
|
7
|
-
simulateTransaction(transaction: Transaction, userPublicKey?: PublicKey | undefined): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
|
|
8
|
+
simulateTransaction(transaction: Transaction, addressLookupTableAccounts: AddressLookupTableAccount[], userPublicKey?: PublicKey | undefined): Promise<RpcResponseAndContext<SimulatedTransactionResponse>>;
|
|
8
9
|
}
|
package/dist/ViewHelper.js
CHANGED
|
@@ -82,8 +82,8 @@ 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_1, addressLookupTableAccounts_1) {
|
|
86
|
+
return __awaiter(this, arguments, void 0, function (transaction, addressLookupTableAccounts, userPublicKey) {
|
|
87
87
|
var latestBlockhash, messageV0, transaction2;
|
|
88
88
|
if (userPublicKey === void 0) { userPublicKey = undefined; }
|
|
89
89
|
return __generator(this, function (_a) {
|
|
@@ -97,7 +97,7 @@ var ViewHelper = (function () {
|
|
|
97
97
|
payerKey: this.perpetualsClient.provider.publicKey,
|
|
98
98
|
recentBlockhash: latestBlockhash.blockhash,
|
|
99
99
|
instructions: transaction.instructions,
|
|
100
|
-
}).compileToV0Message(
|
|
100
|
+
}).compileToV0Message(addressLookupTableAccounts);
|
|
101
101
|
transaction2 = new web3_js_1.VersionedTransaction(messageV0);
|
|
102
102
|
return [2, this.perpetualsClient.provider.connection.simulateTransaction(transaction2, { sigVerify: false, replaceRecentBlockhash: true })];
|
|
103
103
|
}
|