@lavarage/sdk 6.4.0 → 6.4.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/dist/index.d.mts +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -0
- package/dist/index.mjs.map +1 -1
- package/index.ts +4 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -2718,6 +2718,7 @@ declare const closeTradeV1: (lavarageProgram: Program<Lavarage$1>, position: Pro
|
|
|
2718
2718
|
swapInstruction: Record<string, unknown>;
|
|
2719
2719
|
cleanupInstruction: Record<string, unknown>;
|
|
2720
2720
|
addressLookupTableAddresses: string[];
|
|
2721
|
+
tokenLedgerInstruction?: Record<string, unknown>;
|
|
2721
2722
|
};
|
|
2722
2723
|
quoteResponse: any;
|
|
2723
2724
|
}, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number) => Promise<VersionedTransaction>;
|
|
@@ -2736,6 +2737,7 @@ declare const closeTradeV2: (lavarageProgram: Program<Lavarage>, position: Progr
|
|
|
2736
2737
|
swapInstruction: Record<string, unknown>;
|
|
2737
2738
|
cleanupInstruction: Record<string, unknown>;
|
|
2738
2739
|
addressLookupTableAddresses: string[];
|
|
2740
|
+
tokenLedgerInstruction?: Record<string, unknown>;
|
|
2739
2741
|
};
|
|
2740
2742
|
quoteResponse: any;
|
|
2741
2743
|
}, quoteToken: PublicKey, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number) => Promise<VersionedTransaction>;
|
package/dist/index.d.ts
CHANGED
|
@@ -2718,6 +2718,7 @@ declare const closeTradeV1: (lavarageProgram: Program<Lavarage$1>, position: Pro
|
|
|
2718
2718
|
swapInstruction: Record<string, unknown>;
|
|
2719
2719
|
cleanupInstruction: Record<string, unknown>;
|
|
2720
2720
|
addressLookupTableAddresses: string[];
|
|
2721
|
+
tokenLedgerInstruction?: Record<string, unknown>;
|
|
2721
2722
|
};
|
|
2722
2723
|
quoteResponse: any;
|
|
2723
2724
|
}, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number) => Promise<VersionedTransaction>;
|
|
@@ -2736,6 +2737,7 @@ declare const closeTradeV2: (lavarageProgram: Program<Lavarage>, position: Progr
|
|
|
2736
2737
|
swapInstruction: Record<string, unknown>;
|
|
2737
2738
|
cleanupInstruction: Record<string, unknown>;
|
|
2738
2739
|
addressLookupTableAddresses: string[];
|
|
2740
|
+
tokenLedgerInstruction?: Record<string, unknown>;
|
|
2739
2741
|
};
|
|
2740
2742
|
quoteResponse: any;
|
|
2741
2743
|
}, quoteToken: PublicKey, partnerFeeRecipient?: PublicKey, partnerFeeMarkup?: number) => Promise<VersionedTransaction>;
|
package/dist/index.js
CHANGED
|
@@ -3110,6 +3110,7 @@ var partialRepayV2 = (lavarageProgram, position, repaymentBps) => __async(void 0
|
|
|
3110
3110
|
return new import_web3.VersionedTransaction(messageV0);
|
|
3111
3111
|
});
|
|
3112
3112
|
var closeTradeV1 = (lavarageProgram, position, offer, jupInstruction, partnerFeeRecipient, partnerFeeMarkup) => __async(void 0, null, function* () {
|
|
3113
|
+
var _a;
|
|
3113
3114
|
let partnerFeeMarkupAsPkey;
|
|
3114
3115
|
if (partnerFeeMarkup) {
|
|
3115
3116
|
const feeBuffer = Buffer.alloc(8);
|
|
@@ -3218,6 +3219,7 @@ var closeTradeV1 = (lavarageProgram, position, offer, jupInstruction, partnerFee
|
|
|
3218
3219
|
}
|
|
3219
3220
|
const profit = new import_anchor.BN(jupInstruction.quoteResponse.outAmount).sub(position.account.amount).sub(position.account.userPaid);
|
|
3220
3221
|
const allInstructions = [
|
|
3222
|
+
((_a = jupInstruction.instructions) == null ? void 0 : _a.tokenLedgerInstruction) ? deserializeInstruction(jupInstruction.instructions.tokenLedgerInstruction) : null,
|
|
3221
3223
|
toTokenAccount.instruction,
|
|
3222
3224
|
closePositionIx,
|
|
3223
3225
|
...jupiterIxs,
|
|
@@ -3232,6 +3234,7 @@ var closeTradeV1 = (lavarageProgram, position, offer, jupInstruction, partnerFee
|
|
|
3232
3234
|
return tx;
|
|
3233
3235
|
});
|
|
3234
3236
|
var closeTradeV2 = (lavarageProgram, position, offer, jupInstruction, quoteToken, partnerFeeRecipient, partnerFeeMarkup) => __async(void 0, null, function* () {
|
|
3237
|
+
var _a;
|
|
3235
3238
|
let partnerFeeMarkupAsPkey;
|
|
3236
3239
|
if (partnerFeeMarkup) {
|
|
3237
3240
|
const feeBuffer = Buffer.alloc(8);
|
|
@@ -3350,6 +3353,7 @@ var closeTradeV2 = (lavarageProgram, position, offer, jupInstruction, quoteToken
|
|
|
3350
3353
|
}
|
|
3351
3354
|
const profit = new import_anchor.BN(jupInstruction.quoteResponse.outAmount).sub(position.account.amount).sub(position.account.userPaid);
|
|
3352
3355
|
const allInstructions = [
|
|
3356
|
+
((_a = jupInstruction.instructions) == null ? void 0 : _a.tokenLedgerInstruction) ? deserializeInstruction(jupInstruction.instructions.tokenLedgerInstruction) : null,
|
|
3353
3357
|
toTokenAccount.instruction,
|
|
3354
3358
|
closePositionIx,
|
|
3355
3359
|
...jupiterIxs,
|