@sip-protocol/sdk 0.6.23 → 0.6.25
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.d.mts +1 -1
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +60 -27
- package/dist/browser.mjs +1 -1
- package/dist/chunk-46TH5SRE.mjs +17077 -0
- package/dist/{chunk-CHC3HKUM.mjs → chunk-C7RM67TH.mjs} +9 -13
- package/dist/chunk-EMOAOF5P.mjs +17084 -0
- package/dist/chunk-GE566OLO.mjs +17059 -0
- package/dist/chunk-GFSLU6SP.mjs +17077 -0
- package/dist/chunk-JK4FDH74.mjs +17059 -0
- package/dist/chunk-TSOCBT73.mjs +17067 -0
- package/dist/index-BYZbDjal.d.ts +11390 -0
- package/dist/index-CRz9S3eE.d.mts +11390 -0
- package/dist/index-DO9Az5n4.d.ts +11390 -0
- package/dist/index-Dex_NSYv.d.mts +11390 -0
- package/dist/index-DhThjSB5.d.ts +11390 -0
- package/dist/index-xbWjohNq.d.mts +11390 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +60 -27
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/adapters/near-intents.ts +28 -5
- package/src/adapters/oneclick-client.ts +17 -2
- package/src/intent.ts +38 -19
- package/src/sip.ts +6 -2
- package/src/wallet/solana/adapter.ts +4 -1
|
@@ -1753,26 +1753,22 @@ async function createShieldedIntent(params, options) {
|
|
|
1753
1753
|
let validityProof;
|
|
1754
1754
|
const requiresProofs = privacy !== PrivacyLevelEnum.TRANSPARENT;
|
|
1755
1755
|
if (requiresProofs && proofProvider && proofProvider.isReady) {
|
|
1756
|
-
const
|
|
1757
|
-
const
|
|
1758
|
-
|
|
1756
|
+
const hasAllSignatures = ownershipSignature && senderSecret && authorizationSignature;
|
|
1757
|
+
const canGenerateSignatures = senderSecret && !ownershipSignature && !authorizationSignature;
|
|
1758
|
+
const hasValidConfig = hasAllSignatures || canGenerateSignatures || allowPlaceholders;
|
|
1759
|
+
if (!hasValidConfig) {
|
|
1759
1760
|
throw new ValidationError(
|
|
1760
|
-
"Proof generation requires signatures
|
|
1761
|
+
"Proof generation requires either: (1) senderSecret alone (SDK generates signatures), (2) all three: ownershipSignature, senderSecret, authorizationSignature, or (3) set allowPlaceholders: true for development/testing.",
|
|
1761
1762
|
"options",
|
|
1762
1763
|
{
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1764
|
+
provided: [
|
|
1765
|
+
ownershipSignature && "ownershipSignature",
|
|
1766
|
+
senderSecret && "senderSecret",
|
|
1767
|
+
authorizationSignature && "authorizationSignature"
|
|
1767
1768
|
].filter(Boolean)
|
|
1768
1769
|
}
|
|
1769
1770
|
);
|
|
1770
1771
|
}
|
|
1771
|
-
if (usingPlaceholders) {
|
|
1772
|
-
console.warn(
|
|
1773
|
-
"[createShieldedIntent] WARNING: Using placeholder signatures for proof generation. These proofs are NOT cryptographically valid. Do NOT use in production!"
|
|
1774
|
-
);
|
|
1775
|
-
}
|
|
1776
1772
|
const hexToUint8 = (hex) => {
|
|
1777
1773
|
const cleanHex = hex.startsWith("0x") ? hex.slice(2) : hex;
|
|
1778
1774
|
return hexToBytes4(cleanHex);
|