@0dotxyz/p0-ts-sdk 2.2.0 → 2.2.2
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/{dto-rate-model.types-gN82ZYyC.d.cts → dto-rate-model.types-AQ40wS-P.d.cts} +2 -46
- package/dist/{dto-rate-model.types-gN82ZYyC.d.ts → dto-rate-model.types-AQ40wS-P.d.ts} +2 -46
- package/dist/index-BDDVBMdM.d.cts +48 -0
- package/dist/index-BDDVBMdM.d.ts +48 -0
- package/dist/index.cjs +8 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +8 -15390
- package/dist/index.d.ts +8 -15390
- package/dist/index.js +8 -5
- package/dist/index.js.map +1 -1
- package/dist/instructions.cjs +344 -0
- package/dist/instructions.cjs.map +1 -0
- package/dist/instructions.d.cts +371 -0
- package/dist/instructions.d.ts +371 -0
- package/dist/instructions.js +338 -0
- package/dist/instructions.js.map +1 -0
- package/dist/types-DGWxbPM1.d.ts +15392 -0
- package/dist/types-ZvnTjjh4.d.cts +15392 -0
- package/dist/vendor.d.cts +3 -2
- package/dist/vendor.d.ts +3 -2
- package/package.json +6 -1
package/dist/index.js
CHANGED
|
@@ -21347,7 +21347,10 @@ function computeProjectedActiveBalancesNoCpi(balances, instructions2, program, b
|
|
|
21347
21347
|
if (!bank) {
|
|
21348
21348
|
throw Error(`Bank ${targetBank.toBase58()} not found in bankMap`);
|
|
21349
21349
|
}
|
|
21350
|
-
const
|
|
21350
|
+
const isKaminoWithdraw = decoded.name === "kaminoWithdraw";
|
|
21351
|
+
const assetShareValueMultiplier = isKaminoWithdraw ? new BigNumber3(1) : assetShareValueMultiplierByBank.get(targetBank.toBase58()) ?? new BigNumber3(1);
|
|
21352
|
+
const cTokenAmount = withdrawTokenAmount.div(assetShareValueMultiplier);
|
|
21353
|
+
const withdrawShares = getAssetShares(bank, cTokenAmount);
|
|
21351
21354
|
targetBalance.assetShares = BigNumber3.max(
|
|
21352
21355
|
0,
|
|
21353
21356
|
targetBalance.assetShares.minus(withdrawShares)
|
|
@@ -47984,7 +47987,7 @@ async function buildSwapCollateralFlashloanTx({
|
|
|
47984
47987
|
authority: marginfiAccount.authority,
|
|
47985
47988
|
reserve,
|
|
47986
47989
|
withdrawAll: isFullWithdraw,
|
|
47987
|
-
isSync:
|
|
47990
|
+
isSync: false,
|
|
47988
47991
|
opts: {
|
|
47989
47992
|
createAtas: false,
|
|
47990
47993
|
wrapAndUnwrapSol: false,
|
|
@@ -48059,7 +48062,7 @@ async function buildSwapCollateralFlashloanTx({
|
|
|
48059
48062
|
marginfiAccount,
|
|
48060
48063
|
authority: marginfiAccount.authority,
|
|
48061
48064
|
withdrawAll: isFullWithdraw,
|
|
48062
|
-
isSync:
|
|
48065
|
+
isSync: false,
|
|
48063
48066
|
opts: {
|
|
48064
48067
|
createAtas: false,
|
|
48065
48068
|
wrapAndUnwrapSol: false,
|
|
@@ -48222,7 +48225,7 @@ async function buildSwapCollateralFlashloanTx({
|
|
|
48222
48225
|
addressLookupTableAccounts: luts,
|
|
48223
48226
|
blockhash,
|
|
48224
48227
|
ixs: allNonFlIxs,
|
|
48225
|
-
isSync:
|
|
48228
|
+
isSync: false
|
|
48226
48229
|
});
|
|
48227
48230
|
const txSize = getTxSize(flashloanTx);
|
|
48228
48231
|
const totalKeys = getTotalAccountKeys(flashloanTx);
|
|
@@ -49126,7 +49129,7 @@ function computeMaxWithdrawForBank(params) {
|
|
|
49126
49129
|
const maxWithdraw = initUntiedCollateralForBank.div(initWeightedPrice);
|
|
49127
49130
|
return maxWithdraw;
|
|
49128
49131
|
}
|
|
49129
|
-
var TITAN_FEE_WALLET = new PublicKey("
|
|
49132
|
+
var TITAN_FEE_WALLET = new PublicKey("FEES6XLN7dMz2iBwKab9Hri9Kwc4WJ6TmDAiT4BNhyej");
|
|
49130
49133
|
var getTitanFeeAccount = (mint) => {
|
|
49131
49134
|
return getAssociatedTokenAddressSync(mint, TITAN_FEE_WALLET, true);
|
|
49132
49135
|
};
|