@sip-protocol/sdk 0.6.8 → 0.6.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/dist/index.js CHANGED
@@ -5426,7 +5426,8 @@ async function createShieldedIntent(params, options) {
5426
5426
  const effectiveAuthSig = authorizationSignature ?? new Uint8Array(64);
5427
5427
  const fundingResult = await proofProvider.generateFundingProof({
5428
5428
  balance: input.amount,
5429
- minimumRequired: output.minAmount,
5429
+ minimumRequired: input.amount,
5430
+ // Fix: Must be same units as balance (input asset)
5430
5431
  blindingFactor: hexToUint8(inputCommitment.blindingFactor),
5431
5432
  assetId: input.asset.symbol,
5432
5433
  userAddress: senderAddress ?? "0x0",
package/dist/index.mjs CHANGED
@@ -253,7 +253,7 @@ import {
253
253
  walletRegistry,
254
254
  withSecureBuffer,
255
255
  withSecureBufferSync
256
- } from "./chunk-25QRORO4.mjs";
256
+ } from "./chunk-O33JCQFJ.mjs";
257
257
  import {
258
258
  CryptoError,
259
259
  EncryptionNotImplementedError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sip-protocol/sdk",
3
- "version": "0.6.8",
3
+ "version": "0.6.9",
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",
package/src/intent.ts CHANGED
@@ -561,9 +561,14 @@ export async function createShieldedIntent(
561
561
  const effectiveAuthSig = authorizationSignature ?? new Uint8Array(64)
562
562
 
563
563
  // Generate funding proof
564
+ // Note: The funding proof proves balance >= minimumRequired
565
+ // - balance: In production, this should be the user's actual wallet balance
566
+ // For now, we use input.amount as a placeholder (proof will pass if amount >= amount)
567
+ // - minimumRequired: The amount needed for this swap (input.amount, not output.minAmount!)
568
+ // Using output.minAmount was a bug - it compared SOL lamports vs NEAR yoctoNEAR
564
569
  const fundingResult = await proofProvider.generateFundingProof({
565
570
  balance: input.amount,
566
- minimumRequired: output.minAmount,
571
+ minimumRequired: input.amount, // Fix: Must be same units as balance (input asset)
567
572
  blindingFactor: hexToUint8(inputCommitment.blindingFactor as HexString),
568
573
  assetId: input.asset.symbol,
569
574
  userAddress: senderAddress ?? '0x0',