@0dotxyz/p0-ts-sdk 1.1.0-alpha.8 → 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 CHANGED
@@ -274,6 +274,12 @@ var DISABLED_FLAG = 1 << 0;
274
274
  var FLASHLOAN_ENABLED_FLAG = 1 << 2;
275
275
  var TRANSFER_ACCOUNT_AUTHORITY_FLAG = 1 << 3;
276
276
  var MARGINFI_PROGRAM = new web3_js.PublicKey("MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA");
277
+ var MARGINFI_PROGRAM_STAGING = new web3_js.PublicKey(
278
+ "stag8sTKds2h4KzjUw3zKTsxbqvT4XKHdaR9X9E6Rct"
279
+ );
280
+ var MARGINFI_PROGRAM_STAGING_ALT = new web3_js.PublicKey(
281
+ "5UDghkpgW1HfYSrmEj2iAApHShqU44H6PKTAar9LL9bY"
282
+ );
277
283
  var ADDRESS_LOOKUP_TABLE_FOR_GROUP = {
278
284
  "4qp6Fx6tnZkY5Wropq9wUYgtFxXKwE6viZxFHg3rdAG8": [
279
285
  new web3_js.PublicKey("BrWF8J3CEuHaXsWk3kqGZ6VHvRp4SJuG9AzvB6ei2kbV"),
@@ -13019,7 +13025,6 @@ async function makeKaminoDepositIx(mfProgram, accounts, args, remainingAccounts
13019
13025
  bank,
13020
13026
  signerTokenAccount,
13021
13027
  lendingMarket,
13022
- reserveLiquidityMint,
13023
13028
  lendingMarketAuthority,
13024
13029
  reserveLiquiditySupply,
13025
13030
  reserveCollateralMint,
@@ -18422,6 +18427,8 @@ function computeProjectedActiveBanksNoCpi(balances, instructions2, program) {
18422
18427
  switch (decoded.name) {
18423
18428
  case "lendingAccountBorrow":
18424
18429
  case "kaminoDeposit":
18430
+ case "driftDeposit":
18431
+ case "solendDeposit":
18425
18432
  case "lendingAccountDeposit": {
18426
18433
  const targetBank = new web3_js.PublicKey(ix?.keys[3].pubkey);
18427
18434
  const targetBalance = projectedBalances.find((b) => b.bankPk.equals(targetBank));
@@ -18437,6 +18444,8 @@ function computeProjectedActiveBanksNoCpi(balances, instructions2, program) {
18437
18444
  }
18438
18445
  case "lendingAccountRepay":
18439
18446
  case "kaminoWithdraw":
18447
+ case "driftWithdraw":
18448
+ case "solendWithdraw":
18440
18449
  case "lendingAccountWithdraw": {
18441
18450
  const targetBank = new web3_js.PublicKey(ix.keys[3].pubkey);
18442
18451
  const targetBalance = projectedBalances.find((b) => b.bankPk.equals(targetBank));
@@ -18479,6 +18488,8 @@ function computeProjectedActiveBalancesNoCpi(balances, instructions2, program, b
18479
18488
  switch (decoded.name) {
18480
18489
  // Instructions that open or add to a position
18481
18490
  case "lendingAccountDeposit":
18491
+ case "driftDeposit":
18492
+ case "solendDeposit":
18482
18493
  case "kaminoDeposit": {
18483
18494
  const targetBank = new web3_js.PublicKey(ix.keys[3].pubkey);
18484
18495
  impactedAssetsBanks.add(targetBank.toBase58());
@@ -18562,6 +18573,8 @@ function computeProjectedActiveBalancesNoCpi(balances, instructions2, program, b
18562
18573
  break;
18563
18574
  }
18564
18575
  case "lendingAccountWithdraw":
18576
+ case "driftWithdraw":
18577
+ case "solendWithdraw":
18565
18578
  case "kaminoWithdraw": {
18566
18579
  const targetBank = new web3_js.PublicKey(ix.keys[3].pubkey);
18567
18580
  impactedAssetsBanks.add(targetBank.toBase58());
@@ -40704,7 +40717,7 @@ var DISCRIMINATORS = {
40704
40717
  LENDING_ACCOUNT_PULSE_HEALTH: Buffer.from([186, 52, 117, 97, 34, 74, 39, 253]),
40705
40718
  LENDING_ACCOUNT_SORT_BALANCES: Buffer.from([187, 194, 110, 84, 82, 170, 204, 9]),
40706
40719
  DRIFT_DEPOSIT: Buffer.from([252, 63, 250, 201, 98, 55, 130, 12]),
40707
- DRIFT_WITHDRAW: Buffer.from([178, 238, 229, 72, 126, 212, 78, 103])
40720
+ DRIFT_WITHDRAW: Buffer.from([86, 59, 186, 123, 183, 181, 234, 137])
40708
40721
  };
40709
40722
  function makeInitMarginfiAccountIx2(programId, accounts) {
40710
40723
  const keys = [
@@ -40885,11 +40898,6 @@ function makeKaminoDepositIx2(programId, accounts, args, remainingAccounts = [])
40885
40898
  },
40886
40899
  { pubkey: accounts.integrationAcc1, isSigner: false, isWritable: true },
40887
40900
  { pubkey: accounts.mint, isSigner: false, isWritable: false },
40888
- {
40889
- pubkey: accounts.reserveLiquidityMint,
40890
- isSigner: false,
40891
- isWritable: true
40892
- },
40893
40901
  {
40894
40902
  pubkey: accounts.reserveLiquiditySupply,
40895
40903
  isSigner: false,
@@ -41051,16 +41059,11 @@ function makelendingAccountWithdrawEmissionIx2(programId, accounts) {
41051
41059
  { pubkey: accounts.group, isSigner: false, isWritable: false },
41052
41060
  { pubkey: accounts.marginfiAccount, isSigner: false, isWritable: true },
41053
41061
  { pubkey: accounts.authority, isSigner: true, isWritable: false },
41054
- { pubkey: accounts.destinationAccount, isSigner: false, isWritable: true },
41055
41062
  { pubkey: accounts.bank, isSigner: false, isWritable: true },
41056
41063
  { pubkey: accounts.emissionsMint, isSigner: false, isWritable: false },
41057
41064
  { pubkey: accounts.emissionsAuth, isSigner: false, isWritable: false },
41058
- {
41059
- pubkey: accounts.emissionsTokenAccount,
41060
- isSigner: false,
41061
- isWritable: false
41062
- },
41063
41065
  { pubkey: accounts.emissionsVault, isSigner: false, isWritable: true },
41066
+ { pubkey: accounts.destinationAccount, isSigner: false, isWritable: true },
41064
41067
  { pubkey: accounts.tokenProgram, isSigner: false, isWritable: false }
41065
41068
  ];
41066
41069
  return new web3_js.TransactionInstruction({
@@ -41229,7 +41232,7 @@ function makeDriftWithdrawIx2(programId, accounts, args, remainingAccounts = [])
41229
41232
  const DRIFT_PROGRAM_ID2 = new web3_js.PublicKey("dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH");
41230
41233
  const SYSTEM_PROGRAM_ID2 = new web3_js.PublicKey("11111111111111111111111111111111");
41231
41234
  const keys = [
41232
- { pubkey: accounts.group, isSigner: false, isWritable: false },
41235
+ { pubkey: accounts.group, isSigner: false, isWritable: true },
41233
41236
  { pubkey: accounts.marginfiAccount, isSigner: false, isWritable: true },
41234
41237
  { pubkey: accounts.authority, isSigner: true, isWritable: false },
41235
41238
  { pubkey: accounts.bank, isSigner: false, isWritable: true }
@@ -42227,7 +42230,6 @@ async function makeKaminoDepositIx3({
42227
42230
  bank: bank.address,
42228
42231
  signerTokenAccount: userTokenAtaPk,
42229
42232
  lendingMarket: reserve.lendingMarket,
42230
- reserveLiquidityMint: bank.mint,
42231
42233
  integrationAcc2: bank.kaminoIntegrationAccounts.kaminoObligation,
42232
42234
  integrationAcc1: bank.kaminoIntegrationAccounts.kaminoReserve,
42233
42235
  mint: bank.mint,
@@ -42249,7 +42251,6 @@ async function makeKaminoDepositIx3({
42249
42251
  bank: bank.address,
42250
42252
  signerTokenAccount: userTokenAtaPk,
42251
42253
  lendingMarket: reserve.lendingMarket,
42252
- reserveLiquidityMint: bank.mint,
42253
42254
  lendingMarketAuthority,
42254
42255
  reserveLiquiditySupply,
42255
42256
  reserveCollateralMint,
@@ -42669,7 +42670,7 @@ async function buildLoopFlashloanTx({
42669
42670
  amount: borrowOpts.borrowAmount,
42670
42671
  marginfiAccount,
42671
42672
  authority: marginfiAccount.authority,
42672
- isSync: true,
42673
+ isSync: false,
42673
42674
  opts: {
42674
42675
  createAtas: false,
42675
42676
  wrapAndUnwrapSol: false,
@@ -43057,7 +43058,7 @@ async function buildRepayWithCollatFlashloanTx({
43057
43058
  withdrawOpts.withdrawAmount,
43058
43059
  withdrawOpts.withdrawBank.mintDecimals
43059
43060
  ),
43060
- isSync: true,
43061
+ isSync: false,
43061
43062
  opts: {
43062
43063
  createAtas: false,
43063
43064
  wrapAndUnwrapSol: false,
@@ -43093,7 +43094,7 @@ async function buildRepayWithCollatFlashloanTx({
43093
43094
  withdrawOpts.withdrawAmount,
43094
43095
  withdrawOpts.withdrawBank.mintDecimals
43095
43096
  ),
43096
- isSync: true,
43097
+ isSync: false,
43097
43098
  opts: {
43098
43099
  createAtas: false,
43099
43100
  wrapAndUnwrapSol: false,
@@ -43119,7 +43120,7 @@ async function buildRepayWithCollatFlashloanTx({
43119
43120
  withdrawOpts.withdrawAmount,
43120
43121
  withdrawOpts.withdrawBank.mintDecimals
43121
43122
  ),
43122
- isSync: true,
43123
+ isSync: false,
43123
43124
  opts: {
43124
43125
  createAtas: false,
43125
43126
  wrapAndUnwrapSol: false,
@@ -43146,7 +43147,7 @@ async function buildRepayWithCollatFlashloanTx({
43146
43147
  amountToRepay,
43147
43148
  repayOpts.repayBank.mintDecimals
43148
43149
  ),
43149
- isSync: true,
43150
+ isSync: false,
43150
43151
  opts: {
43151
43152
  wrapAndUnwrapSol: false,
43152
43153
  overrideInferAccounts
@@ -48023,6 +48024,8 @@ exports.JUP_SWAP_LUT_PROGRAM_AUTHORITY_INDEX = JUP_SWAP_LUT_PROGRAM_AUTHORITY_IN
48023
48024
  exports.LST_MINT = LST_MINT;
48024
48025
  exports.MARGINFI_IDL = MARGINFI_IDL;
48025
48026
  exports.MARGINFI_PROGRAM = MARGINFI_PROGRAM;
48027
+ exports.MARGINFI_PROGRAM_STAGING = MARGINFI_PROGRAM_STAGING;
48028
+ exports.MARGINFI_PROGRAM_STAGING_ALT = MARGINFI_PROGRAM_STAGING_ALT;
48026
48029
  exports.MARGINFI_SPONSORED_SHARD_ID = MARGINFI_SPONSORED_SHARD_ID;
48027
48030
  exports.MAX_CONFIDENCE_INTERVAL_RATIO = MAX_CONFIDENCE_INTERVAL_RATIO;
48028
48031
  exports.MAX_TX_SIZE = MAX_TX_SIZE;