@sip-protocol/sdk 0.2.3 → 0.2.4
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/browser.js +5 -4
- package/dist/browser.mjs +1 -1
- package/dist/chunk-VXSHK7US.mjs +10158 -0
- package/dist/index.d.mts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +5 -4
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/sip.ts +6 -2
package/dist/browser.js
CHANGED
|
@@ -2885,9 +2885,10 @@ var SIP = class {
|
|
|
2885
2885
|
*
|
|
2886
2886
|
* @param params - Intent parameters (CreateIntentParams for production, ShieldedIntent/CreateIntentParams for demo)
|
|
2887
2887
|
* @param recipientMetaAddress - Optional stealth meta-address for privacy modes
|
|
2888
|
+
* @param senderAddress - Optional sender wallet address for cross-curve refunds
|
|
2888
2889
|
* @returns Array of quotes (with deposit info in production mode)
|
|
2889
2890
|
*/
|
|
2890
|
-
async getQuotes(params, recipientMetaAddress) {
|
|
2891
|
+
async getQuotes(params, recipientMetaAddress, senderAddress) {
|
|
2891
2892
|
if (this.isProductionMode()) {
|
|
2892
2893
|
if (!("input" in params)) {
|
|
2893
2894
|
throw new ValidationError(
|
|
@@ -2895,7 +2896,7 @@ var SIP = class {
|
|
|
2895
2896
|
"params"
|
|
2896
2897
|
);
|
|
2897
2898
|
}
|
|
2898
|
-
return this.getQuotesProduction(params, recipientMetaAddress);
|
|
2899
|
+
return this.getQuotesProduction(params, recipientMetaAddress, senderAddress);
|
|
2899
2900
|
}
|
|
2900
2901
|
return this.getQuotesDemo(params);
|
|
2901
2902
|
}
|
|
@@ -2935,7 +2936,7 @@ var SIP = class {
|
|
|
2935
2936
|
return this.config.network;
|
|
2936
2937
|
}
|
|
2937
2938
|
// ─── Production Mode Implementation ─────────────────────────────────────────
|
|
2938
|
-
async getQuotesProduction(params, recipientMetaAddress) {
|
|
2939
|
+
async getQuotesProduction(params, recipientMetaAddress, senderAddress) {
|
|
2939
2940
|
if (!this.intentsAdapter) {
|
|
2940
2941
|
throw new ValidationError(
|
|
2941
2942
|
"NEAR Intents adapter not configured. Set intentsAdapter in config for production mode.",
|
|
@@ -2962,7 +2963,7 @@ var SIP = class {
|
|
|
2962
2963
|
const prepared = await this.intentsAdapter.prepareSwap(
|
|
2963
2964
|
swapRequest,
|
|
2964
2965
|
metaAddr,
|
|
2965
|
-
this.wallet?.address
|
|
2966
|
+
senderAddress ?? this.wallet?.address
|
|
2966
2967
|
);
|
|
2967
2968
|
const rawQuote = await this.intentsAdapter.getQuote(prepared);
|
|
2968
2969
|
this.pendingSwaps.set(requestId, {
|