@drift-labs/sdk 2.95.0-beta.17 → 2.95.0-beta.18
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/driftClient.js +5 -1
- package/lib/idl/drift.json +8 -3
- package/package.json +1 -1
- package/src/driftClient.ts +8 -1
- package/src/idl/drift.json +8 -3
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.95.0-beta.
|
|
1
|
+
2.95.0-beta.18
|
package/lib/driftClient.js
CHANGED
|
@@ -1725,10 +1725,14 @@ class DriftClient {
|
|
|
1725
1725
|
writablePerpMarketIndexes: [marketIndex],
|
|
1726
1726
|
writableSpotMarketIndexes: [numericConstants_1.QUOTE_SPOT_MARKET_INDEX],
|
|
1727
1727
|
});
|
|
1728
|
+
const perpMarketPublicKey = await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, marketIndex);
|
|
1728
1729
|
return await this.program.instruction.settleExpiredMarket(marketIndex, {
|
|
1729
1730
|
accounts: {
|
|
1730
1731
|
state: await this.getStatePublicKey(),
|
|
1731
|
-
|
|
1732
|
+
admin: this.isSubscribed
|
|
1733
|
+
? this.getStateAccount().admin
|
|
1734
|
+
: this.wallet.publicKey,
|
|
1735
|
+
perpMarket: perpMarketPublicKey,
|
|
1732
1736
|
},
|
|
1733
1737
|
remainingAccounts,
|
|
1734
1738
|
});
|
package/lib/idl/drift.json
CHANGED
|
@@ -1606,15 +1606,20 @@
|
|
|
1606
1606
|
{
|
|
1607
1607
|
"name": "settleExpiredMarket",
|
|
1608
1608
|
"accounts": [
|
|
1609
|
+
{
|
|
1610
|
+
"name": "admin",
|
|
1611
|
+
"isMut": false,
|
|
1612
|
+
"isSigner": true
|
|
1613
|
+
},
|
|
1609
1614
|
{
|
|
1610
1615
|
"name": "state",
|
|
1611
1616
|
"isMut": false,
|
|
1612
1617
|
"isSigner": false
|
|
1613
1618
|
},
|
|
1614
1619
|
{
|
|
1615
|
-
"name": "
|
|
1616
|
-
"isMut":
|
|
1617
|
-
"isSigner":
|
|
1620
|
+
"name": "perpMarket",
|
|
1621
|
+
"isMut": true,
|
|
1622
|
+
"isSigner": false
|
|
1618
1623
|
}
|
|
1619
1624
|
],
|
|
1620
1625
|
"args": [
|
package/package.json
CHANGED
package/src/driftClient.ts
CHANGED
|
@@ -3223,11 +3223,18 @@ export class DriftClient {
|
|
|
3223
3223
|
writablePerpMarketIndexes: [marketIndex],
|
|
3224
3224
|
writableSpotMarketIndexes: [QUOTE_SPOT_MARKET_INDEX],
|
|
3225
3225
|
});
|
|
3226
|
+
const perpMarketPublicKey = await getPerpMarketPublicKey(
|
|
3227
|
+
this.program.programId,
|
|
3228
|
+
marketIndex
|
|
3229
|
+
);
|
|
3226
3230
|
|
|
3227
3231
|
return await this.program.instruction.settleExpiredMarket(marketIndex, {
|
|
3228
3232
|
accounts: {
|
|
3229
3233
|
state: await this.getStatePublicKey(),
|
|
3230
|
-
|
|
3234
|
+
admin: this.isSubscribed
|
|
3235
|
+
? this.getStateAccount().admin
|
|
3236
|
+
: this.wallet.publicKey,
|
|
3237
|
+
perpMarket: perpMarketPublicKey,
|
|
3231
3238
|
},
|
|
3232
3239
|
remainingAccounts,
|
|
3233
3240
|
});
|
package/src/idl/drift.json
CHANGED
|
@@ -1606,15 +1606,20 @@
|
|
|
1606
1606
|
{
|
|
1607
1607
|
"name": "settleExpiredMarket",
|
|
1608
1608
|
"accounts": [
|
|
1609
|
+
{
|
|
1610
|
+
"name": "admin",
|
|
1611
|
+
"isMut": false,
|
|
1612
|
+
"isSigner": true
|
|
1613
|
+
},
|
|
1609
1614
|
{
|
|
1610
1615
|
"name": "state",
|
|
1611
1616
|
"isMut": false,
|
|
1612
1617
|
"isSigner": false
|
|
1613
1618
|
},
|
|
1614
1619
|
{
|
|
1615
|
-
"name": "
|
|
1616
|
-
"isMut":
|
|
1617
|
-
"isSigner":
|
|
1620
|
+
"name": "perpMarket",
|
|
1621
|
+
"isMut": true,
|
|
1622
|
+
"isSigner": false
|
|
1618
1623
|
}
|
|
1619
1624
|
],
|
|
1620
1625
|
"args": [
|