@lavarage/sdk 6.1.3 → 6.1.9

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/index.ts CHANGED
@@ -200,11 +200,12 @@ export const openTradeV1 = async (lavarageProgram: Program<Lavarage>, offer: Pro
200
200
  clock: SYSVAR_CLOCK_PUBKEY,
201
201
  randomAccountAsId: randomSeed.publicKey.toBase58(),
202
202
  feeReceipient: '6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF',
203
- }).remainingAccounts(partnerFeeRecipient ? [{
204
- pubkey: partnerFeeRecipient,
205
- isSigner: false,
206
- isWritable: true,
207
- }] : [])
203
+ })
204
+ // .remainingAccounts(partnerFeeRecipient ? [{
205
+ // pubkey: partnerFeeRecipient,
206
+ // isSigner: false,
207
+ // isWritable: true,
208
+ // }] : [])
208
209
  .instruction()
209
210
 
210
211
  const openAddCollateralInstruction = await lavarageProgram.methods
@@ -333,11 +334,12 @@ export const openTradeV2 = async (lavarageProgram: Program<LavarageV2>, offer: P
333
334
  toTokenAccount: getAssociatedTokenAddressSync(quoteToken, lavarageProgram.provider.publicKey!, true, quoteTokenProgram),
334
335
  tokenProgram: tokenProgram!,
335
336
  fromTokenAccount: getAssociatedTokenAddressSync(quoteToken, offer.account.nodeWallet, true, tokenProgram),
336
- }).remainingAccounts(partnerFeeRecipient ? [{
337
- pubkey: partnerFeeRecipient,
338
- isSigner: false,
339
- isWritable: true,
340
- }] : [])
337
+ })
338
+ // .remainingAccounts(partnerFeeRecipient ? [{
339
+ // pubkey: partnerFeeRecipient,
340
+ // isSigner: false,
341
+ // isWritable: true,
342
+ // }] : [])
341
343
  .instruction()
342
344
 
343
345
  const openAddCollateralInstruction = await lavarageProgram.methods
@@ -533,7 +535,7 @@ export const partialRepayV2 = async (lavarageProgram: Program<LavarageV2>, posit
533
535
  clock: SYSVAR_CLOCK_PUBKEY,
534
536
  randomAccountAsId: position.account.seed,
535
537
  fromTokenAccount: getAssociatedTokenAddressSync(pool.qtType, lavarageProgram.provider.publicKey!),
536
- toTokenAccount: getAssociatedTokenAddressSync(pool.qtType, pool.nodeWallet),
538
+ toTokenAccount: getAssociatedTokenAddressSync(pool.qtType, pool.nodeWallet, true),
537
539
  mint: pool.qtType,
538
540
  feeTokenAccount: getAssociatedTokenAddressSync(pool.qtType, new PublicKey('6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF')),
539
541
  tokenProgram: TOKEN_PROGRAM_ID,
@@ -658,11 +660,12 @@ export const closeTradeV1 = async (lavarageProgram: Program<Lavarage>, position:
658
660
  clock: SYSVAR_CLOCK_PUBKEY,
659
661
  randomAccountAsId: position.account.seed,
660
662
  feeReceipient: '6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF',
661
- }).remainingAccounts(partnerFeeRecipient ? [{
662
- pubkey: partnerFeeRecipient,
663
- isSigner: false,
664
- isWritable: true,
665
- }] : [])
663
+ })
664
+ // .remainingAccounts(partnerFeeRecipient ? [{
665
+ // pubkey: partnerFeeRecipient,
666
+ // isSigner: false,
667
+ // isWritable: true,
668
+ // }] : [])
666
669
  .instruction()
667
670
  } else {
668
671
  repaySolIx = await lavarageProgram.methods
@@ -676,11 +679,12 @@ export const closeTradeV1 = async (lavarageProgram: Program<Lavarage>, position:
676
679
  clock: SYSVAR_CLOCK_PUBKEY,
677
680
  randomAccountAsId: position.account.seed,
678
681
  feeReceipient: '6JfTobDvwuwZxZP6FR5JPmjdvQ4h4MovkEVH2FPsMSrF',
679
- }).remainingAccounts(partnerFeeRecipient ? [{
680
- pubkey: partnerFeeRecipient,
681
- isSigner: false,
682
- isWritable: true,
683
- }] : [])
682
+ })
683
+ // .remainingAccounts(partnerFeeRecipient ? [{
684
+ // pubkey: partnerFeeRecipient,
685
+ // isSigner: false,
686
+ // isWritable: true,
687
+ // }] : [])
684
688
  .instruction()
685
689
  const { setupInstructions, swapInstruction: swapInstructionPayload, cleanupInstruction, addressLookupTableAddresses } = jupiterSellIx!
686
690
  jupiterIxs = [
@@ -824,11 +828,12 @@ export const closeTradeV2 = async (lavarageProgram: Program<LavarageV2>, positio
824
828
  tokenProgram: quoteTokenProgram!,
825
829
  toTokenAccount: getAssociatedTokenAddressSync(quoteToken, pool.account.nodeWallet, true, quoteTokenProgram),
826
830
  mint: quoteToken,
827
- }).remainingAccounts(partnerFeeRecipient ? [{
828
- pubkey: partnerFeeRecipient,
829
- isSigner: false,
830
- isWritable: true,
831
- }] : [])
831
+ })
832
+ // .remainingAccounts(partnerFeeRecipient ? [{
833
+ // pubkey: partnerFeeRecipient,
834
+ // isSigner: false,
835
+ // isWritable: true,
836
+ // }] : [])
832
837
  .instruction()
833
838
  } else {
834
839
  repaySolIx = await lavarageProgram.methods
@@ -846,11 +851,12 @@ export const closeTradeV2 = async (lavarageProgram: Program<LavarageV2>, positio
846
851
  tokenProgram: quoteTokenProgram!,
847
852
  toTokenAccount: getAssociatedTokenAddressSync(quoteToken, pool.account.nodeWallet, true, quoteTokenProgram),
848
853
  mint: quoteToken,
849
- }).remainingAccounts(partnerFeeRecipient ? [{
850
- pubkey: partnerFeeRecipient,
851
- isSigner: false,
852
- isWritable: true,
853
- }] : [])
854
+ })
855
+ // .remainingAccounts(partnerFeeRecipient ? [{
856
+ // pubkey: partnerFeeRecipient,
857
+ // isSigner: false,
858
+ // isWritable: true,
859
+ // }] : [])
854
860
  .instruction()
855
861
  const { setupInstructions, swapInstruction: swapInstructionPayload, cleanupInstruction, addressLookupTableAddresses } = jupiterSellIx!
856
862
  jupiterIxs = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lavarage/sdk",
3
- "version": "6.1.3",
3
+ "version": "6.1.9",
4
4
  "description": "Lavarage SDK",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",