@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sip-protocol/sdk",
3
- "version": "0.2.1",
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 is NOT exported here to avoid bundling WASM in server builds.
168
- // Import from '@sip-protocol/sdk/browser' for browser environments.
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,
@@ -47,8 +47,12 @@ export { ProofGenerationError } from './interface'
47
47
  // Mock provider (testing only)
48
48
  export { MockProofProvider } from './mock'
49
49
 
50
- // Noir provider (production - Node.js only)
51
- export { NoirProofProvider } from './noir'
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)