@sip-protocol/sdk 0.2.2 → 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 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, {
@@ -3145,16 +3146,25 @@ var MockProofProvider = class {
3145
3146
  framework = "mock";
3146
3147
  _isReady = false;
3147
3148
  _warningShown = false;
3149
+ _silent;
3150
+ /**
3151
+ * Create a new MockProofProvider
3152
+ *
3153
+ * @param options - Configuration options
3154
+ */
3155
+ constructor(options) {
3156
+ this._silent = options?.silent ?? false;
3157
+ }
3148
3158
  get isReady() {
3149
3159
  return this._isReady;
3150
3160
  }
3151
3161
  /**
3152
3162
  * Initialize the mock provider
3153
3163
  *
3154
- * Logs a warning to console about mock usage.
3164
+ * Logs a warning to console about mock usage (unless silent mode is enabled).
3155
3165
  */
3156
3166
  async initialize() {
3157
- if (!this._warningShown) {
3167
+ if (!this._warningShown && !this._silent) {
3158
3168
  console.warn(WARNING_MESSAGE);
3159
3169
  this._warningShown = true;
3160
3170
  }
package/dist/browser.mjs CHANGED
@@ -197,7 +197,7 @@ import {
197
197
  walletRegistry,
198
198
  withSecureBuffer,
199
199
  withSecureBufferSync
200
- } from "./chunk-DU7LQDD2.mjs";
200
+ } from "./chunk-VXSHK7US.mjs";
201
201
  import {
202
202
  fulfillment_proof_default,
203
203
  funding_proof_default,