flash-sdk 10.8.0-alpha.1 → 10.8.0-alpha.10
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 +1 -0
- package/dist/PerpetualsClient.js +13 -9
- package/dist/PoolConfig.json +197 -829
- package/dist/idl/perpetuals.d.ts +0 -240
- package/dist/idl/perpetuals.js +0 -240
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
package/dist/PerpetualsClient.js
CHANGED
|
@@ -91,31 +91,35 @@ var PerpetualsClient = (function () {
|
|
|
91
91
|
_this.prioritizationFee = fee;
|
|
92
92
|
};
|
|
93
93
|
this.loadAddressLookupTable = function (poolConfig) { return __awaiter(_this, void 0, void 0, function () {
|
|
94
|
-
var addresses, _i, _a, address, addressLookupTable, accCreationLamports;
|
|
95
|
-
return __generator(this, function (
|
|
96
|
-
switch (
|
|
94
|
+
var addresses, _i, _a, address, addressLookupTable, _b, accCreationLamports;
|
|
95
|
+
return __generator(this, function (_c) {
|
|
96
|
+
switch (_c.label) {
|
|
97
97
|
case 0:
|
|
98
98
|
addresses = [];
|
|
99
99
|
_i = 0, _a = poolConfig.addressLookupTableAddresses;
|
|
100
|
-
|
|
100
|
+
_c.label = 1;
|
|
101
101
|
case 1:
|
|
102
102
|
if (!(_i < _a.length)) return [3, 4];
|
|
103
103
|
address = _a[_i];
|
|
104
104
|
return [4, this.provider.connection.getAddressLookupTable(address)];
|
|
105
105
|
case 2:
|
|
106
|
-
addressLookupTable = (
|
|
106
|
+
addressLookupTable = (_c.sent()).value;
|
|
107
107
|
if (addressLookupTable) {
|
|
108
108
|
addresses.push(addressLookupTable);
|
|
109
109
|
}
|
|
110
|
-
|
|
110
|
+
_c.label = 3;
|
|
111
111
|
case 3:
|
|
112
112
|
_i++;
|
|
113
113
|
return [3, 1];
|
|
114
114
|
case 4:
|
|
115
115
|
this.addressLookupTables = addresses;
|
|
116
|
-
|
|
116
|
+
_b = this;
|
|
117
|
+
return [4, this.provider.connection.getAddressLookupTable(poolConfig.pusherAddressLookupTableAddress)];
|
|
117
118
|
case 5:
|
|
118
|
-
|
|
119
|
+
_b.pusherAddressLookupTables = (_c.sent()).value;
|
|
120
|
+
return [4, (0, spl_token_1.getMinimumBalanceForRentExemptAccount)(this.provider.connection)];
|
|
121
|
+
case 6:
|
|
122
|
+
accCreationLamports = (_c.sent());
|
|
119
123
|
if (accCreationLamports) {
|
|
120
124
|
this.minimumBalanceForRentExemptAccountLamports = accCreationLamports;
|
|
121
125
|
}
|
|
@@ -6678,7 +6682,7 @@ var PerpetualsClient = (function () {
|
|
|
6678
6682
|
_g.label = 16;
|
|
6679
6683
|
case 16:
|
|
6680
6684
|
if (_d) {
|
|
6681
|
-
preInstructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(publicKey, userOutputTokenAccount, publicKey, poolConfig.getTokenFromSymbol(userOutputTokenSymbol).mintKey));
|
|
6685
|
+
preInstructions.push((0, spl_token_1.createAssociatedTokenAccountInstruction)(publicKey, userOutputTokenAccount, publicKey, poolConfig.getTokenFromSymbol(userOutputTokenSymbol).mintKey, poolConfig.getTokenFromSymbol(userOutputTokenSymbol).isToken2022 ? spl_token_1.TOKEN_2022_PROGRAM_ID : spl_token_1.TOKEN_PROGRAM_ID));
|
|
6682
6686
|
}
|
|
6683
6687
|
_g.label = 17;
|
|
6684
6688
|
case 17:
|