@sip-protocol/sdk 0.3.1 → 0.3.2

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.js CHANGED
@@ -4699,6 +4699,15 @@ var NEARIntentsBackend = class {
4699
4699
  "senderAddress"
4700
4700
  );
4701
4701
  }
4702
+ if (params.slippageTolerance !== void 0) {
4703
+ if (params.slippageTolerance < 0 || params.slippageTolerance > 1e4) {
4704
+ throw new ValidationError(
4705
+ "slippageTolerance must be between 0-10000 basis points (0-100%)",
4706
+ "slippageTolerance",
4707
+ { provided: params.slippageTolerance, validRange: "0-10000" }
4708
+ );
4709
+ }
4710
+ }
4702
4711
  if (!this.capabilities.supportedSourceChains.includes(params.fromChain)) {
4703
4712
  throw new ValidationError(
4704
4713
  `Source chain ${params.fromChain} is not supported`,
package/dist/index.mjs CHANGED
@@ -208,7 +208,7 @@ import {
208
208
  walletRegistry,
209
209
  withSecureBuffer,
210
210
  withSecureBufferSync
211
- } from "./chunk-YZCK337Y.mjs";
211
+ } from "./chunk-EU4UEWWG.mjs";
212
212
  import {
213
213
  CryptoError,
214
214
  EncryptionNotImplementedError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sip-protocol/sdk",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "description": "Core SDK for Shielded Intents Protocol - Privacy layer for cross-chain transactions",
5
5
  "author": "SIP Protocol <hello@sip-protocol.org>",
6
6
  "homepage": "https://sip-protocol.org",
@@ -448,6 +448,17 @@ export class NEARIntentsBackend implements SettlementBackend {
448
448
  )
449
449
  }
450
450
 
451
+ // Validate slippageTolerance bounds (0-10000 basis points = 0-100%)
452
+ if (params.slippageTolerance !== undefined) {
453
+ if (params.slippageTolerance < 0 || params.slippageTolerance > 10000) {
454
+ throw new ValidationError(
455
+ 'slippageTolerance must be between 0-10000 basis points (0-100%)',
456
+ 'slippageTolerance',
457
+ { provided: params.slippageTolerance, validRange: '0-10000' }
458
+ )
459
+ }
460
+ }
461
+
451
462
  // Validate supported chains
452
463
  if (!this.capabilities.supportedSourceChains.includes(params.fromChain)) {
453
464
  throw new ValidationError(