@sip-protocol/sdk 0.2.1 → 0.2.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/browser.d.mts +2 -1
- package/dist/browser.d.ts +2 -1
- package/dist/browser.js +6662 -7442
- package/dist/browser.mjs +22 -20
- package/dist/chunk-DU7LQDD2.mjs +10148 -0
- package/dist/chunk-UHZKNGIT.mjs +223 -0
- package/dist/chunk-VITVG25F.mjs +982 -0
- package/dist/index.d.mts +4 -466
- package/dist/index.d.ts +4 -466
- package/dist/index.js +3 -1762
- package/dist/index.mjs +17 -17
- package/dist/noir-BHQtFvRk.d.mts +467 -0
- package/dist/noir-BHQtFvRk.d.ts +467 -0
- package/dist/proofs/noir.d.mts +2 -0
- package/dist/proofs/noir.d.ts +2 -0
- package/dist/proofs/noir.js +1862 -0
- package/dist/proofs/noir.mjs +790 -0
- package/package.json +8 -3
- package/src/index.ts +5 -3
- package/src/proofs/index.ts +6 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.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",
|
|
@@ -25,6 +25,11 @@
|
|
|
25
25
|
"types": "./dist/browser.d.ts",
|
|
26
26
|
"import": "./dist/browser.mjs",
|
|
27
27
|
"require": "./dist/browser.js"
|
|
28
|
+
},
|
|
29
|
+
"./proofs/noir": {
|
|
30
|
+
"types": "./dist/proofs/noir.d.ts",
|
|
31
|
+
"import": "./dist/proofs/noir.mjs",
|
|
32
|
+
"require": "./dist/proofs/noir.js"
|
|
28
33
|
}
|
|
29
34
|
},
|
|
30
35
|
"files": [
|
|
@@ -57,8 +62,8 @@
|
|
|
57
62
|
],
|
|
58
63
|
"license": "MIT",
|
|
59
64
|
"scripts": {
|
|
60
|
-
"build": "tsup src/index.ts src/browser.ts --format cjs,esm --dts",
|
|
61
|
-
"dev": "tsup src/index.ts src/browser.ts --format cjs,esm --dts --watch",
|
|
65
|
+
"build": "tsup src/index.ts src/browser.ts src/proofs/noir.ts --format cjs,esm --dts",
|
|
66
|
+
"dev": "tsup src/index.ts src/browser.ts src/proofs/noir.ts --format cjs,esm --dts --watch",
|
|
62
67
|
"lint": "eslint --ext .ts src/",
|
|
63
68
|
"typecheck": "tsc --noEmit",
|
|
64
69
|
"clean": "rm -rf dist",
|
package/src/index.ts
CHANGED
|
@@ -164,11 +164,13 @@ export {
|
|
|
164
164
|
} from './validation'
|
|
165
165
|
|
|
166
166
|
// Proof providers
|
|
167
|
-
// NOTE: BrowserNoirProvider
|
|
168
|
-
//
|
|
167
|
+
// NOTE: NoirProofProvider and BrowserNoirProvider are NOT exported here
|
|
168
|
+
// to avoid bundling WASM in server builds (e.g., Next.js SSR).
|
|
169
|
+
// For ZK proof generation:
|
|
170
|
+
// - Browser: import { BrowserNoirProvider } from '@sip-protocol/sdk/browser'
|
|
171
|
+
// - Node.js: import { NoirProofProvider } from '@sip-protocol/sdk/proofs/noir'
|
|
169
172
|
export {
|
|
170
173
|
MockProofProvider,
|
|
171
|
-
NoirProofProvider,
|
|
172
174
|
ProofGenerationError,
|
|
173
175
|
// Browser utilities (safe - no WASM)
|
|
174
176
|
isBrowser,
|
package/src/proofs/index.ts
CHANGED
|
@@ -47,8 +47,12 @@ export { ProofGenerationError } from './interface'
|
|
|
47
47
|
// Mock provider (testing only)
|
|
48
48
|
export { MockProofProvider } from './mock'
|
|
49
49
|
|
|
50
|
-
//
|
|
51
|
-
|
|
50
|
+
// NOTE: NoirProofProvider is NOT exported from main entry to avoid bundling WASM
|
|
51
|
+
// in server-side builds (e.g., Next.js SSR). Import directly if needed:
|
|
52
|
+
//
|
|
53
|
+
// import { NoirProofProvider } from '@sip-protocol/sdk/proofs/noir'
|
|
54
|
+
//
|
|
55
|
+
// Types are safe to export (no runtime WASM dependency)
|
|
52
56
|
export type { NoirProviderConfig } from './noir'
|
|
53
57
|
|
|
54
58
|
// Browser utilities (no WASM dependencies - safe for all environments)
|