@drift-labs/sdk 2.146.0-beta.4 → 2.146.0-beta.5
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/browser/adminClient.js +18 -18
- package/lib/browser/idl/drift.json +0 -21
- package/lib/node/adminClient.js +18 -18
- package/lib/node/idl/drift.json +0 -21
- package/package.json +1 -1
- package/src/adminClient.ts +18 -18
- package/src/idl/drift.json +0 -21
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.146.0-beta.
|
|
1
|
+
2.146.0-beta.5
|
|
@@ -309,9 +309,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
309
309
|
return await this.program.instruction.updateInitialAmmCacheInfo({
|
|
310
310
|
accounts: {
|
|
311
311
|
state: await this.getStatePublicKey(),
|
|
312
|
-
admin: this.
|
|
313
|
-
? this.
|
|
314
|
-
: this.
|
|
312
|
+
admin: this.useHotWalletAdmin
|
|
313
|
+
? this.wallet.publicKey
|
|
314
|
+
: this.getStateAccount().admin,
|
|
315
315
|
ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
|
|
316
316
|
},
|
|
317
317
|
remainingAccounts,
|
|
@@ -334,9 +334,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
334
334
|
}, params), {
|
|
335
335
|
accounts: {
|
|
336
336
|
state: await this.getStatePublicKey(),
|
|
337
|
-
admin: this.
|
|
338
|
-
? this.
|
|
339
|
-
: this.
|
|
337
|
+
admin: this.useHotWalletAdmin
|
|
338
|
+
? this.wallet.publicKey
|
|
339
|
+
: this.getStateAccount().admin,
|
|
340
340
|
ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
|
|
341
341
|
},
|
|
342
342
|
});
|
|
@@ -351,9 +351,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
351
351
|
return this.program.instruction.resetAmmCache({
|
|
352
352
|
accounts: {
|
|
353
353
|
state: await this.getStatePublicKey(),
|
|
354
|
-
admin: this.
|
|
355
|
-
? this.
|
|
356
|
-
: this.
|
|
354
|
+
admin: this.useHotWalletAdmin
|
|
355
|
+
? this.wallet.publicKey
|
|
356
|
+
: this.getStateAccount().admin,
|
|
357
357
|
ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
|
|
358
358
|
systemProgram: anchor.web3.SystemProgram.programId,
|
|
359
359
|
},
|
|
@@ -2610,9 +2610,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
2610
2610
|
return await this.program.instruction.updateConstituentPausedOperations(pausedOperations, {
|
|
2611
2611
|
accounts: {
|
|
2612
2612
|
constituent,
|
|
2613
|
-
admin: this.
|
|
2614
|
-
? this.
|
|
2615
|
-
: this.
|
|
2613
|
+
admin: this.useHotWalletAdmin
|
|
2614
|
+
? this.wallet.publicKey
|
|
2615
|
+
: this.getStateAccount().admin,
|
|
2616
2616
|
state: await this.getStatePublicKey(),
|
|
2617
2617
|
},
|
|
2618
2618
|
});
|
|
@@ -3005,9 +3005,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
3005
3005
|
async getUpdatePerpMarketLpPoolFeeTransferScalarIx(marketIndex, lpFeeTransferScalar, lpExchangeFeeExcluscionScalar) {
|
|
3006
3006
|
return this.program.instruction.updatePerpMarketLpPoolFeeTransferScalar(lpFeeTransferScalar !== null && lpFeeTransferScalar !== void 0 ? lpFeeTransferScalar : null, lpExchangeFeeExcluscionScalar !== null && lpExchangeFeeExcluscionScalar !== void 0 ? lpExchangeFeeExcluscionScalar : null, {
|
|
3007
3007
|
accounts: {
|
|
3008
|
-
admin: this.
|
|
3009
|
-
? this.
|
|
3010
|
-
: this.
|
|
3008
|
+
admin: this.useHotWalletAdmin
|
|
3009
|
+
? this.wallet.publicKey
|
|
3010
|
+
: this.getStateAccount().admin,
|
|
3011
3011
|
state: await this.getStatePublicKey(),
|
|
3012
3012
|
perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
|
|
3013
3013
|
},
|
|
@@ -3022,9 +3022,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
3022
3022
|
async getUpdatePerpMarketLpPoolPausedOperationsIx(marketIndex, pausedOperations) {
|
|
3023
3023
|
return this.program.instruction.updatePerpMarketLpPoolPausedOperations(pausedOperations, {
|
|
3024
3024
|
accounts: {
|
|
3025
|
-
admin: this.
|
|
3026
|
-
? this.
|
|
3027
|
-
: this.
|
|
3025
|
+
admin: this.useHotWalletAdmin
|
|
3026
|
+
? this.wallet.publicKey
|
|
3027
|
+
: this.getStateAccount().admin,
|
|
3028
3028
|
state: await this.getStatePublicKey(),
|
|
3029
3029
|
perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
|
|
3030
3030
|
},
|
|
@@ -4484,27 +4484,6 @@
|
|
|
4484
4484
|
],
|
|
4485
4485
|
"args": []
|
|
4486
4486
|
},
|
|
4487
|
-
{
|
|
4488
|
-
"name": "deleteAmmCache",
|
|
4489
|
-
"accounts": [
|
|
4490
|
-
{
|
|
4491
|
-
"name": "admin",
|
|
4492
|
-
"isMut": true,
|
|
4493
|
-
"isSigner": true
|
|
4494
|
-
},
|
|
4495
|
-
{
|
|
4496
|
-
"name": "state",
|
|
4497
|
-
"isMut": false,
|
|
4498
|
-
"isSigner": false
|
|
4499
|
-
},
|
|
4500
|
-
{
|
|
4501
|
-
"name": "ammCache",
|
|
4502
|
-
"isMut": true,
|
|
4503
|
-
"isSigner": false
|
|
4504
|
-
}
|
|
4505
|
-
],
|
|
4506
|
-
"args": []
|
|
4507
|
-
},
|
|
4508
4487
|
{
|
|
4509
4488
|
"name": "updateInitialAmmCacheInfo",
|
|
4510
4489
|
"accounts": [
|
package/lib/node/adminClient.js
CHANGED
|
@@ -309,9 +309,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
309
309
|
return await this.program.instruction.updateInitialAmmCacheInfo({
|
|
310
310
|
accounts: {
|
|
311
311
|
state: await this.getStatePublicKey(),
|
|
312
|
-
admin: this.
|
|
313
|
-
? this.
|
|
314
|
-
: this.
|
|
312
|
+
admin: this.useHotWalletAdmin
|
|
313
|
+
? this.wallet.publicKey
|
|
314
|
+
: this.getStateAccount().admin,
|
|
315
315
|
ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
|
|
316
316
|
},
|
|
317
317
|
remainingAccounts,
|
|
@@ -334,9 +334,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
334
334
|
}, params), {
|
|
335
335
|
accounts: {
|
|
336
336
|
state: await this.getStatePublicKey(),
|
|
337
|
-
admin: this.
|
|
338
|
-
? this.
|
|
339
|
-
: this.
|
|
337
|
+
admin: this.useHotWalletAdmin
|
|
338
|
+
? this.wallet.publicKey
|
|
339
|
+
: this.getStateAccount().admin,
|
|
340
340
|
ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
|
|
341
341
|
},
|
|
342
342
|
});
|
|
@@ -351,9 +351,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
351
351
|
return this.program.instruction.resetAmmCache({
|
|
352
352
|
accounts: {
|
|
353
353
|
state: await this.getStatePublicKey(),
|
|
354
|
-
admin: this.
|
|
355
|
-
? this.
|
|
356
|
-
: this.
|
|
354
|
+
admin: this.useHotWalletAdmin
|
|
355
|
+
? this.wallet.publicKey
|
|
356
|
+
: this.getStateAccount().admin,
|
|
357
357
|
ammCache: (0, pda_1.getAmmCachePublicKey)(this.program.programId),
|
|
358
358
|
systemProgram: anchor.web3.SystemProgram.programId,
|
|
359
359
|
},
|
|
@@ -2610,9 +2610,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
2610
2610
|
return await this.program.instruction.updateConstituentPausedOperations(pausedOperations, {
|
|
2611
2611
|
accounts: {
|
|
2612
2612
|
constituent,
|
|
2613
|
-
admin: this.
|
|
2614
|
-
? this.
|
|
2615
|
-
: this.
|
|
2613
|
+
admin: this.useHotWalletAdmin
|
|
2614
|
+
? this.wallet.publicKey
|
|
2615
|
+
: this.getStateAccount().admin,
|
|
2616
2616
|
state: await this.getStatePublicKey(),
|
|
2617
2617
|
},
|
|
2618
2618
|
});
|
|
@@ -3005,9 +3005,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
3005
3005
|
async getUpdatePerpMarketLpPoolFeeTransferScalarIx(marketIndex, lpFeeTransferScalar, lpExchangeFeeExcluscionScalar) {
|
|
3006
3006
|
return this.program.instruction.updatePerpMarketLpPoolFeeTransferScalar(lpFeeTransferScalar !== null && lpFeeTransferScalar !== void 0 ? lpFeeTransferScalar : null, lpExchangeFeeExcluscionScalar !== null && lpExchangeFeeExcluscionScalar !== void 0 ? lpExchangeFeeExcluscionScalar : null, {
|
|
3007
3007
|
accounts: {
|
|
3008
|
-
admin: this.
|
|
3009
|
-
? this.
|
|
3010
|
-
: this.
|
|
3008
|
+
admin: this.useHotWalletAdmin
|
|
3009
|
+
? this.wallet.publicKey
|
|
3010
|
+
: this.getStateAccount().admin,
|
|
3011
3011
|
state: await this.getStatePublicKey(),
|
|
3012
3012
|
perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
|
|
3013
3013
|
},
|
|
@@ -3022,9 +3022,9 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
3022
3022
|
async getUpdatePerpMarketLpPoolPausedOperationsIx(marketIndex, pausedOperations) {
|
|
3023
3023
|
return this.program.instruction.updatePerpMarketLpPoolPausedOperations(pausedOperations, {
|
|
3024
3024
|
accounts: {
|
|
3025
|
-
admin: this.
|
|
3026
|
-
? this.
|
|
3027
|
-
: this.
|
|
3025
|
+
admin: this.useHotWalletAdmin
|
|
3026
|
+
? this.wallet.publicKey
|
|
3027
|
+
: this.getStateAccount().admin,
|
|
3028
3028
|
state: await this.getStatePublicKey(),
|
|
3029
3029
|
perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
|
|
3030
3030
|
},
|
package/lib/node/idl/drift.json
CHANGED
|
@@ -4484,27 +4484,6 @@
|
|
|
4484
4484
|
],
|
|
4485
4485
|
"args": []
|
|
4486
4486
|
},
|
|
4487
|
-
{
|
|
4488
|
-
"name": "deleteAmmCache",
|
|
4489
|
-
"accounts": [
|
|
4490
|
-
{
|
|
4491
|
-
"name": "admin",
|
|
4492
|
-
"isMut": true,
|
|
4493
|
-
"isSigner": true
|
|
4494
|
-
},
|
|
4495
|
-
{
|
|
4496
|
-
"name": "state",
|
|
4497
|
-
"isMut": false,
|
|
4498
|
-
"isSigner": false
|
|
4499
|
-
},
|
|
4500
|
-
{
|
|
4501
|
-
"name": "ammCache",
|
|
4502
|
-
"isMut": true,
|
|
4503
|
-
"isSigner": false
|
|
4504
|
-
}
|
|
4505
|
-
],
|
|
4506
|
-
"args": []
|
|
4507
|
-
},
|
|
4508
4487
|
{
|
|
4509
4488
|
"name": "updateInitialAmmCacheInfo",
|
|
4510
4489
|
"accounts": [
|
package/package.json
CHANGED
package/src/adminClient.ts
CHANGED
|
@@ -736,9 +736,9 @@ export class AdminClient extends DriftClient {
|
|
|
736
736
|
return await this.program.instruction.updateInitialAmmCacheInfo({
|
|
737
737
|
accounts: {
|
|
738
738
|
state: await this.getStatePublicKey(),
|
|
739
|
-
admin: this.
|
|
740
|
-
? this.
|
|
741
|
-
: this.
|
|
739
|
+
admin: this.useHotWalletAdmin
|
|
740
|
+
? this.wallet.publicKey
|
|
741
|
+
: this.getStateAccount().admin,
|
|
742
742
|
ammCache: getAmmCachePublicKey(this.program.programId),
|
|
743
743
|
},
|
|
744
744
|
remainingAccounts,
|
|
@@ -796,9 +796,9 @@ export class AdminClient extends DriftClient {
|
|
|
796
796
|
{
|
|
797
797
|
accounts: {
|
|
798
798
|
state: await this.getStatePublicKey(),
|
|
799
|
-
admin: this.
|
|
800
|
-
? this.
|
|
801
|
-
: this.
|
|
799
|
+
admin: this.useHotWalletAdmin
|
|
800
|
+
? this.wallet.publicKey
|
|
801
|
+
: this.getStateAccount().admin,
|
|
802
802
|
ammCache: getAmmCachePublicKey(this.program.programId),
|
|
803
803
|
},
|
|
804
804
|
}
|
|
@@ -820,9 +820,9 @@ export class AdminClient extends DriftClient {
|
|
|
820
820
|
return this.program.instruction.resetAmmCache({
|
|
821
821
|
accounts: {
|
|
822
822
|
state: await this.getStatePublicKey(),
|
|
823
|
-
admin: this.
|
|
824
|
-
? this.
|
|
825
|
-
: this.
|
|
823
|
+
admin: this.useHotWalletAdmin
|
|
824
|
+
? this.wallet.publicKey
|
|
825
|
+
: this.getStateAccount().admin,
|
|
826
826
|
ammCache: getAmmCachePublicKey(this.program.programId),
|
|
827
827
|
systemProgram: anchor.web3.SystemProgram.programId,
|
|
828
828
|
},
|
|
@@ -5545,9 +5545,9 @@ export class AdminClient extends DriftClient {
|
|
|
5545
5545
|
{
|
|
5546
5546
|
accounts: {
|
|
5547
5547
|
constituent,
|
|
5548
|
-
admin: this.
|
|
5549
|
-
? this.
|
|
5550
|
-
: this.
|
|
5548
|
+
admin: this.useHotWalletAdmin
|
|
5549
|
+
? this.wallet.publicKey
|
|
5550
|
+
: this.getStateAccount().admin,
|
|
5551
5551
|
state: await this.getStatePublicKey(),
|
|
5552
5552
|
},
|
|
5553
5553
|
}
|
|
@@ -6435,9 +6435,9 @@ export class AdminClient extends DriftClient {
|
|
|
6435
6435
|
lpExchangeFeeExcluscionScalar ?? null,
|
|
6436
6436
|
{
|
|
6437
6437
|
accounts: {
|
|
6438
|
-
admin: this.
|
|
6439
|
-
? this.
|
|
6440
|
-
: this.
|
|
6438
|
+
admin: this.useHotWalletAdmin
|
|
6439
|
+
? this.wallet.publicKey
|
|
6440
|
+
: this.getStateAccount().admin,
|
|
6441
6441
|
state: await this.getStatePublicKey(),
|
|
6442
6442
|
perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
|
|
6443
6443
|
},
|
|
@@ -6466,9 +6466,9 @@ export class AdminClient extends DriftClient {
|
|
|
6466
6466
|
pausedOperations,
|
|
6467
6467
|
{
|
|
6468
6468
|
accounts: {
|
|
6469
|
-
admin: this.
|
|
6470
|
-
? this.
|
|
6471
|
-
: this.
|
|
6469
|
+
admin: this.useHotWalletAdmin
|
|
6470
|
+
? this.wallet.publicKey
|
|
6471
|
+
: this.getStateAccount().admin,
|
|
6472
6472
|
state: await this.getStatePublicKey(),
|
|
6473
6473
|
perpMarket: this.getPerpMarketAccount(marketIndex).pubkey,
|
|
6474
6474
|
},
|
package/src/idl/drift.json
CHANGED
|
@@ -4484,27 +4484,6 @@
|
|
|
4484
4484
|
],
|
|
4485
4485
|
"args": []
|
|
4486
4486
|
},
|
|
4487
|
-
{
|
|
4488
|
-
"name": "deleteAmmCache",
|
|
4489
|
-
"accounts": [
|
|
4490
|
-
{
|
|
4491
|
-
"name": "admin",
|
|
4492
|
-
"isMut": true,
|
|
4493
|
-
"isSigner": true
|
|
4494
|
-
},
|
|
4495
|
-
{
|
|
4496
|
-
"name": "state",
|
|
4497
|
-
"isMut": false,
|
|
4498
|
-
"isSigner": false
|
|
4499
|
-
},
|
|
4500
|
-
{
|
|
4501
|
-
"name": "ammCache",
|
|
4502
|
-
"isMut": true,
|
|
4503
|
-
"isSigner": false
|
|
4504
|
-
}
|
|
4505
|
-
],
|
|
4506
|
-
"args": []
|
|
4507
|
-
},
|
|
4508
4487
|
{
|
|
4509
4488
|
"name": "updateInitialAmmCacheInfo",
|
|
4510
4489
|
"accounts": [
|