@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/browser.js +2 -1
- package/dist/browser.mjs +1 -1
- package/dist/chunk-O33JCQFJ.mjs +17032 -0
- package/dist/index.js +2 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/intent.ts +6 -1
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:
|
|
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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.6.
|
|
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:
|
|
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',
|