@drift-labs/sdk-browser 2.122.0-beta.0 → 2.122.0-beta.1
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 +4 -4
- package/lib/node/adminClient.js +4 -4
- package/package.json +1 -1
- package/src/adminClient.ts +16 -16
package/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.122.0-beta.
|
|
1
|
+
2.122.0-beta.1
|
|
@@ -1739,14 +1739,14 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
1741
|
async updateSpotMarketFuel(spotMarketIndex, fuelBoostDeposits, fuelBoostBorrows, fuelBoostTaker, fuelBoostMaker, fuelBoostInsurance) {
|
|
1742
|
-
const updateSpotMarketFuelIx = await this.getUpdateSpotMarketFuelIx(spotMarketIndex, fuelBoostDeposits
|
|
1742
|
+
const updateSpotMarketFuelIx = await this.getUpdateSpotMarketFuelIx(spotMarketIndex, fuelBoostDeposits !== null && fuelBoostDeposits !== void 0 ? fuelBoostDeposits : null, fuelBoostBorrows !== null && fuelBoostBorrows !== void 0 ? fuelBoostBorrows : null, fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostInsurance !== null && fuelBoostInsurance !== void 0 ? fuelBoostInsurance : null);
|
|
1743
1743
|
const tx = await this.buildTransaction(updateSpotMarketFuelIx);
|
|
1744
1744
|
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1745
1745
|
return txSig;
|
|
1746
1746
|
}
|
|
1747
1747
|
async getUpdateSpotMarketFuelIx(spotMarketIndex, fuelBoostDeposits, fuelBoostBorrows, fuelBoostTaker, fuelBoostMaker, fuelBoostInsurance) {
|
|
1748
1748
|
const spotMarketPublicKey = await (0, pda_1.getSpotMarketPublicKey)(this.program.programId, spotMarketIndex);
|
|
1749
|
-
return await this.program.instruction.updateSpotMarketFuel(fuelBoostDeposits
|
|
1749
|
+
return await this.program.instruction.updateSpotMarketFuel(fuelBoostDeposits !== null && fuelBoostDeposits !== void 0 ? fuelBoostDeposits : null, fuelBoostBorrows !== null && fuelBoostBorrows !== void 0 ? fuelBoostBorrows : null, fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostInsurance !== null && fuelBoostInsurance !== void 0 ? fuelBoostInsurance : null, {
|
|
1750
1750
|
accounts: {
|
|
1751
1751
|
admin: this.isSubscribed
|
|
1752
1752
|
? this.getStateAccount().admin
|
|
@@ -1757,14 +1757,14 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
1757
1757
|
});
|
|
1758
1758
|
}
|
|
1759
1759
|
async updatePerpMarketFuel(perpMarketIndex, fuelBoostTaker, fuelBoostMaker, fuelBoostPosition) {
|
|
1760
|
-
const updatePerpMarketFuelIx = await this.getUpdatePerpMarketFuelIx(perpMarketIndex, fuelBoostTaker
|
|
1760
|
+
const updatePerpMarketFuelIx = await this.getUpdatePerpMarketFuelIx(perpMarketIndex, fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostPosition !== null && fuelBoostPosition !== void 0 ? fuelBoostPosition : null);
|
|
1761
1761
|
const tx = await this.buildTransaction(updatePerpMarketFuelIx);
|
|
1762
1762
|
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1763
1763
|
return txSig;
|
|
1764
1764
|
}
|
|
1765
1765
|
async getUpdatePerpMarketFuelIx(perpMarketIndex, fuelBoostTaker, fuelBoostMaker, fuelBoostPosition) {
|
|
1766
1766
|
const perpMarketPublicKey = await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex);
|
|
1767
|
-
return await this.program.instruction.updatePerpMarketFuel(fuelBoostTaker
|
|
1767
|
+
return await this.program.instruction.updatePerpMarketFuel(fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostPosition !== null && fuelBoostPosition !== void 0 ? fuelBoostPosition : null, {
|
|
1768
1768
|
accounts: {
|
|
1769
1769
|
admin: this.isSubscribed
|
|
1770
1770
|
? this.getStateAccount().admin
|
package/lib/node/adminClient.js
CHANGED
|
@@ -1739,14 +1739,14 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
1739
1739
|
});
|
|
1740
1740
|
}
|
|
1741
1741
|
async updateSpotMarketFuel(spotMarketIndex, fuelBoostDeposits, fuelBoostBorrows, fuelBoostTaker, fuelBoostMaker, fuelBoostInsurance) {
|
|
1742
|
-
const updateSpotMarketFuelIx = await this.getUpdateSpotMarketFuelIx(spotMarketIndex, fuelBoostDeposits
|
|
1742
|
+
const updateSpotMarketFuelIx = await this.getUpdateSpotMarketFuelIx(spotMarketIndex, fuelBoostDeposits !== null && fuelBoostDeposits !== void 0 ? fuelBoostDeposits : null, fuelBoostBorrows !== null && fuelBoostBorrows !== void 0 ? fuelBoostBorrows : null, fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostInsurance !== null && fuelBoostInsurance !== void 0 ? fuelBoostInsurance : null);
|
|
1743
1743
|
const tx = await this.buildTransaction(updateSpotMarketFuelIx);
|
|
1744
1744
|
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1745
1745
|
return txSig;
|
|
1746
1746
|
}
|
|
1747
1747
|
async getUpdateSpotMarketFuelIx(spotMarketIndex, fuelBoostDeposits, fuelBoostBorrows, fuelBoostTaker, fuelBoostMaker, fuelBoostInsurance) {
|
|
1748
1748
|
const spotMarketPublicKey = await (0, pda_1.getSpotMarketPublicKey)(this.program.programId, spotMarketIndex);
|
|
1749
|
-
return await this.program.instruction.updateSpotMarketFuel(fuelBoostDeposits
|
|
1749
|
+
return await this.program.instruction.updateSpotMarketFuel(fuelBoostDeposits !== null && fuelBoostDeposits !== void 0 ? fuelBoostDeposits : null, fuelBoostBorrows !== null && fuelBoostBorrows !== void 0 ? fuelBoostBorrows : null, fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostInsurance !== null && fuelBoostInsurance !== void 0 ? fuelBoostInsurance : null, {
|
|
1750
1750
|
accounts: {
|
|
1751
1751
|
admin: this.isSubscribed
|
|
1752
1752
|
? this.getStateAccount().admin
|
|
@@ -1757,14 +1757,14 @@ class AdminClient extends driftClient_1.DriftClient {
|
|
|
1757
1757
|
});
|
|
1758
1758
|
}
|
|
1759
1759
|
async updatePerpMarketFuel(perpMarketIndex, fuelBoostTaker, fuelBoostMaker, fuelBoostPosition) {
|
|
1760
|
-
const updatePerpMarketFuelIx = await this.getUpdatePerpMarketFuelIx(perpMarketIndex, fuelBoostTaker
|
|
1760
|
+
const updatePerpMarketFuelIx = await this.getUpdatePerpMarketFuelIx(perpMarketIndex, fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostPosition !== null && fuelBoostPosition !== void 0 ? fuelBoostPosition : null);
|
|
1761
1761
|
const tx = await this.buildTransaction(updatePerpMarketFuelIx);
|
|
1762
1762
|
const { txSig } = await this.sendTransaction(tx, [], this.opts);
|
|
1763
1763
|
return txSig;
|
|
1764
1764
|
}
|
|
1765
1765
|
async getUpdatePerpMarketFuelIx(perpMarketIndex, fuelBoostTaker, fuelBoostMaker, fuelBoostPosition) {
|
|
1766
1766
|
const perpMarketPublicKey = await (0, pda_1.getPerpMarketPublicKey)(this.program.programId, perpMarketIndex);
|
|
1767
|
-
return await this.program.instruction.updatePerpMarketFuel(fuelBoostTaker
|
|
1767
|
+
return await this.program.instruction.updatePerpMarketFuel(fuelBoostTaker !== null && fuelBoostTaker !== void 0 ? fuelBoostTaker : null, fuelBoostMaker !== null && fuelBoostMaker !== void 0 ? fuelBoostMaker : null, fuelBoostPosition !== null && fuelBoostPosition !== void 0 ? fuelBoostPosition : null, {
|
|
1768
1768
|
accounts: {
|
|
1769
1769
|
admin: this.isSubscribed
|
|
1770
1770
|
? this.getStateAccount().admin
|
package/package.json
CHANGED
package/src/adminClient.ts
CHANGED
|
@@ -3769,11 +3769,11 @@ export class AdminClient extends DriftClient {
|
|
|
3769
3769
|
): Promise<TransactionSignature> {
|
|
3770
3770
|
const updateSpotMarketFuelIx = await this.getUpdateSpotMarketFuelIx(
|
|
3771
3771
|
spotMarketIndex,
|
|
3772
|
-
fuelBoostDeposits
|
|
3773
|
-
fuelBoostBorrows
|
|
3774
|
-
fuelBoostTaker
|
|
3775
|
-
fuelBoostMaker
|
|
3776
|
-
fuelBoostInsurance
|
|
3772
|
+
fuelBoostDeposits ?? null,
|
|
3773
|
+
fuelBoostBorrows ?? null,
|
|
3774
|
+
fuelBoostTaker ?? null,
|
|
3775
|
+
fuelBoostMaker ?? null,
|
|
3776
|
+
fuelBoostInsurance ?? null
|
|
3777
3777
|
);
|
|
3778
3778
|
|
|
3779
3779
|
const tx = await this.buildTransaction(updateSpotMarketFuelIx);
|
|
@@ -3796,11 +3796,11 @@ export class AdminClient extends DriftClient {
|
|
|
3796
3796
|
);
|
|
3797
3797
|
|
|
3798
3798
|
return await this.program.instruction.updateSpotMarketFuel(
|
|
3799
|
-
fuelBoostDeposits
|
|
3800
|
-
fuelBoostBorrows
|
|
3801
|
-
fuelBoostTaker
|
|
3802
|
-
fuelBoostMaker
|
|
3803
|
-
fuelBoostInsurance
|
|
3799
|
+
fuelBoostDeposits ?? null,
|
|
3800
|
+
fuelBoostBorrows ?? null,
|
|
3801
|
+
fuelBoostTaker ?? null,
|
|
3802
|
+
fuelBoostMaker ?? null,
|
|
3803
|
+
fuelBoostInsurance ?? null,
|
|
3804
3804
|
{
|
|
3805
3805
|
accounts: {
|
|
3806
3806
|
admin: this.isSubscribed
|
|
@@ -3821,9 +3821,9 @@ export class AdminClient extends DriftClient {
|
|
|
3821
3821
|
): Promise<TransactionSignature> {
|
|
3822
3822
|
const updatePerpMarketFuelIx = await this.getUpdatePerpMarketFuelIx(
|
|
3823
3823
|
perpMarketIndex,
|
|
3824
|
-
fuelBoostTaker
|
|
3825
|
-
fuelBoostMaker
|
|
3826
|
-
fuelBoostPosition
|
|
3824
|
+
fuelBoostTaker ?? null,
|
|
3825
|
+
fuelBoostMaker ?? null,
|
|
3826
|
+
fuelBoostPosition ?? null
|
|
3827
3827
|
);
|
|
3828
3828
|
|
|
3829
3829
|
const tx = await this.buildTransaction(updatePerpMarketFuelIx);
|
|
@@ -3844,9 +3844,9 @@ export class AdminClient extends DriftClient {
|
|
|
3844
3844
|
);
|
|
3845
3845
|
|
|
3846
3846
|
return await this.program.instruction.updatePerpMarketFuel(
|
|
3847
|
-
fuelBoostTaker
|
|
3848
|
-
fuelBoostMaker
|
|
3849
|
-
fuelBoostPosition
|
|
3847
|
+
fuelBoostTaker ?? null,
|
|
3848
|
+
fuelBoostMaker ?? null,
|
|
3849
|
+
fuelBoostPosition ?? null,
|
|
3850
3850
|
{
|
|
3851
3851
|
accounts: {
|
|
3852
3852
|
admin: this.isSubscribed
|