@0dotxyz/p0-ts-sdk 1.1.0-alpha.9 → 1.1.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/index.cjs +14 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +14 -6
- package/dist/index.js.map +1 -1
- package/dist/vendor.cjs +84 -87
- package/dist/vendor.cjs.map +1 -1
- package/dist/vendor.d.cts +46 -18
- package/dist/vendor.d.ts +46 -18
- package/dist/vendor.js +70 -74
- package/dist/vendor.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -18402,6 +18402,8 @@ function computeProjectedActiveBanksNoCpi(balances, instructions2, program) {
|
|
|
18402
18402
|
switch (decoded.name) {
|
|
18403
18403
|
case "lendingAccountBorrow":
|
|
18404
18404
|
case "kaminoDeposit":
|
|
18405
|
+
case "driftDeposit":
|
|
18406
|
+
case "solendDeposit":
|
|
18405
18407
|
case "lendingAccountDeposit": {
|
|
18406
18408
|
const targetBank = new PublicKey(ix?.keys[3].pubkey);
|
|
18407
18409
|
const targetBalance = projectedBalances.find((b) => b.bankPk.equals(targetBank));
|
|
@@ -18417,6 +18419,8 @@ function computeProjectedActiveBanksNoCpi(balances, instructions2, program) {
|
|
|
18417
18419
|
}
|
|
18418
18420
|
case "lendingAccountRepay":
|
|
18419
18421
|
case "kaminoWithdraw":
|
|
18422
|
+
case "driftWithdraw":
|
|
18423
|
+
case "solendWithdraw":
|
|
18420
18424
|
case "lendingAccountWithdraw": {
|
|
18421
18425
|
const targetBank = new PublicKey(ix.keys[3].pubkey);
|
|
18422
18426
|
const targetBalance = projectedBalances.find((b) => b.bankPk.equals(targetBank));
|
|
@@ -18459,6 +18463,8 @@ function computeProjectedActiveBalancesNoCpi(balances, instructions2, program, b
|
|
|
18459
18463
|
switch (decoded.name) {
|
|
18460
18464
|
// Instructions that open or add to a position
|
|
18461
18465
|
case "lendingAccountDeposit":
|
|
18466
|
+
case "driftDeposit":
|
|
18467
|
+
case "solendDeposit":
|
|
18462
18468
|
case "kaminoDeposit": {
|
|
18463
18469
|
const targetBank = new PublicKey(ix.keys[3].pubkey);
|
|
18464
18470
|
impactedAssetsBanks.add(targetBank.toBase58());
|
|
@@ -18542,6 +18548,8 @@ function computeProjectedActiveBalancesNoCpi(balances, instructions2, program, b
|
|
|
18542
18548
|
break;
|
|
18543
18549
|
}
|
|
18544
18550
|
case "lendingAccountWithdraw":
|
|
18551
|
+
case "driftWithdraw":
|
|
18552
|
+
case "solendWithdraw":
|
|
18545
18553
|
case "kaminoWithdraw": {
|
|
18546
18554
|
const targetBank = new PublicKey(ix.keys[3].pubkey);
|
|
18547
18555
|
impactedAssetsBanks.add(targetBank.toBase58());
|
|
@@ -41199,7 +41207,7 @@ function makeDriftWithdrawIx2(programId, accounts, args, remainingAccounts = [])
|
|
|
41199
41207
|
const DRIFT_PROGRAM_ID2 = new PublicKey("dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH");
|
|
41200
41208
|
const SYSTEM_PROGRAM_ID2 = new PublicKey("11111111111111111111111111111111");
|
|
41201
41209
|
const keys = [
|
|
41202
|
-
{ pubkey: accounts.group, isSigner: false, isWritable:
|
|
41210
|
+
{ pubkey: accounts.group, isSigner: false, isWritable: true },
|
|
41203
41211
|
{ pubkey: accounts.marginfiAccount, isSigner: false, isWritable: true },
|
|
41204
41212
|
{ pubkey: accounts.authority, isSigner: true, isWritable: false },
|
|
41205
41213
|
{ pubkey: accounts.bank, isSigner: false, isWritable: true }
|
|
@@ -42637,7 +42645,7 @@ async function buildLoopFlashloanTx({
|
|
|
42637
42645
|
amount: borrowOpts.borrowAmount,
|
|
42638
42646
|
marginfiAccount,
|
|
42639
42647
|
authority: marginfiAccount.authority,
|
|
42640
|
-
isSync:
|
|
42648
|
+
isSync: false,
|
|
42641
42649
|
opts: {
|
|
42642
42650
|
createAtas: false,
|
|
42643
42651
|
wrapAndUnwrapSol: false,
|
|
@@ -43025,7 +43033,7 @@ async function buildRepayWithCollatFlashloanTx({
|
|
|
43025
43033
|
withdrawOpts.withdrawAmount,
|
|
43026
43034
|
withdrawOpts.withdrawBank.mintDecimals
|
|
43027
43035
|
),
|
|
43028
|
-
isSync:
|
|
43036
|
+
isSync: false,
|
|
43029
43037
|
opts: {
|
|
43030
43038
|
createAtas: false,
|
|
43031
43039
|
wrapAndUnwrapSol: false,
|
|
@@ -43061,7 +43069,7 @@ async function buildRepayWithCollatFlashloanTx({
|
|
|
43061
43069
|
withdrawOpts.withdrawAmount,
|
|
43062
43070
|
withdrawOpts.withdrawBank.mintDecimals
|
|
43063
43071
|
),
|
|
43064
|
-
isSync:
|
|
43072
|
+
isSync: false,
|
|
43065
43073
|
opts: {
|
|
43066
43074
|
createAtas: false,
|
|
43067
43075
|
wrapAndUnwrapSol: false,
|
|
@@ -43087,7 +43095,7 @@ async function buildRepayWithCollatFlashloanTx({
|
|
|
43087
43095
|
withdrawOpts.withdrawAmount,
|
|
43088
43096
|
withdrawOpts.withdrawBank.mintDecimals
|
|
43089
43097
|
),
|
|
43090
|
-
isSync:
|
|
43098
|
+
isSync: false,
|
|
43091
43099
|
opts: {
|
|
43092
43100
|
createAtas: false,
|
|
43093
43101
|
wrapAndUnwrapSol: false,
|
|
@@ -43114,7 +43122,7 @@ async function buildRepayWithCollatFlashloanTx({
|
|
|
43114
43122
|
amountToRepay,
|
|
43115
43123
|
repayOpts.repayBank.mintDecimals
|
|
43116
43124
|
),
|
|
43117
|
-
isSync:
|
|
43125
|
+
isSync: false,
|
|
43118
43126
|
opts: {
|
|
43119
43127
|
wrapAndUnwrapSol: false,
|
|
43120
43128
|
overrideInferAccounts
|