@sip-protocol/sdk 0.5.1 → 0.6.1

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.
Files changed (76) hide show
  1. package/README.md +58 -0
  2. package/dist/TransportWebUSB-TQ7WZ4LE.mjs +3098 -0
  3. package/dist/browser.d.mts +4 -4
  4. package/dist/browser.d.ts +4 -4
  5. package/dist/browser.js +10133 -4664
  6. package/dist/browser.mjs +32 -1
  7. package/dist/chunk-7QZPORY5.mjs +15604 -0
  8. package/dist/chunk-C2NPCUAJ.mjs +17010 -0
  9. package/dist/chunk-FCVLFUIC.mjs +16699 -0
  10. package/dist/chunk-G5UHXECN.mjs +16340 -0
  11. package/dist/chunk-GEDEIZHJ.mjs +16798 -0
  12. package/dist/chunk-KBS3OMSZ.mjs +14737 -0
  13. package/dist/chunk-MTNYSNR7.mjs +16269 -0
  14. package/dist/chunk-O5PIB2EA.mjs +16698 -0
  15. package/dist/chunk-PCFM7FQO.mjs +17010 -0
  16. package/dist/chunk-QK464ARC.mjs +16946 -0
  17. package/dist/chunk-TK3FWQNC.mjs +14737 -0
  18. package/dist/chunk-UJCSKKID.mjs +30 -0
  19. package/dist/chunk-VNBMNGC3.mjs +16698 -0
  20. package/dist/chunk-W5TUELDQ.mjs +16947 -0
  21. package/dist/index-05W_S8A7.d.mts +9237 -0
  22. package/dist/index-C5ehlFhR.d.mts +9443 -0
  23. package/dist/index-CD_zShu-.d.ts +10870 -0
  24. package/dist/index-CNzhx-WH.d.mts +9316 -0
  25. package/dist/index-CQBYdLYy.d.mts +10976 -0
  26. package/dist/index-Cg9TYEPv.d.mts +11321 -0
  27. package/dist/index-CqSppS4i.d.ts +9237 -0
  28. package/dist/index-CqZJOO8C.d.mts +11323 -0
  29. package/dist/index-CywN9Bnp.d.ts +11321 -0
  30. package/dist/index-DBa_jiZF.d.mts +9606 -0
  31. package/dist/index-DHy5ZjCD.d.ts +10976 -0
  32. package/dist/index-DLNdSQFQ.d.ts +9316 -0
  33. package/dist/index-DfsVsmxu.d.ts +11323 -0
  34. package/dist/index-Ink8HnKW.d.ts +9606 -0
  35. package/dist/index-ObjwyVDX.d.mts +10870 -0
  36. package/dist/index-h7B23m5b.d.ts +9443 -0
  37. package/dist/index-m0xbSfmT.d.mts +11318 -0
  38. package/dist/index-rWLEgvhN.d.ts +11318 -0
  39. package/dist/index.d.mts +3 -3
  40. package/dist/index.d.ts +3 -3
  41. package/dist/index.js +10112 -4637
  42. package/dist/index.mjs +32 -1
  43. package/dist/noir-DKfEzWy9.d.mts +482 -0
  44. package/dist/noir-DKfEzWy9.d.ts +482 -0
  45. package/dist/proofs/noir.d.mts +1 -1
  46. package/dist/proofs/noir.d.ts +1 -1
  47. package/dist/proofs/noir.js +12 -3
  48. package/dist/proofs/noir.mjs +13 -3
  49. package/package.json +5 -3
  50. package/src/adapters/near-intents.ts +13 -3
  51. package/src/auction/index.ts +20 -0
  52. package/src/auction/sealed-bid.ts +1037 -0
  53. package/src/compliance/derivation.ts +13 -3
  54. package/src/compliance/reports.ts +5 -4
  55. package/src/cosmos/ibc-stealth.ts +2 -2
  56. package/src/cosmos/stealth.ts +2 -2
  57. package/src/crypto.ts +79 -9
  58. package/src/governance/index.ts +19 -0
  59. package/src/governance/private-vote.ts +1116 -0
  60. package/src/index.ts +50 -2
  61. package/src/intent.ts +227 -12
  62. package/src/nft/index.ts +27 -0
  63. package/src/nft/private-nft.ts +811 -0
  64. package/src/privacy.ts +88 -2
  65. package/src/proofs/browser-utils.ts +1 -7
  66. package/src/proofs/noir.ts +34 -7
  67. package/src/settlement/backends/direct-chain.ts +14 -3
  68. package/src/sip.ts +324 -25
  69. package/src/stealth.ts +120 -9
  70. package/src/types/browser.d.ts +67 -0
  71. package/src/validation.ts +4 -2
  72. package/src/wallet/bitcoin/adapter.ts +159 -15
  73. package/src/wallet/bitcoin/types.ts +340 -15
  74. package/src/wallet/cosmos/mock.ts +16 -12
  75. package/src/wallet/hardware/ledger.ts +83 -14
  76. package/src/wallet/hardware/types.ts +2 -0
package/README.md CHANGED
@@ -295,6 +295,64 @@ const result = await service.shieldedSend({
295
295
  | Bitcoin | Yes | Yes | - |
296
296
  | Zcash | Yes | Yes | - |
297
297
 
298
+ ## Configuration
299
+
300
+ ### Development Defaults
301
+
302
+ The SDK uses localhost endpoints by default for local development:
303
+
304
+ | Service | Default Endpoint | Environment Variable |
305
+ |---------|-----------------|---------------------|
306
+ | Zcash RPC | `127.0.0.1:8232` | `ZCASH_RPC_HOST`, `ZCASH_RPC_PORT` |
307
+ | Ethereum RPC | `localhost:8545` | `ETH_RPC_URL` |
308
+ | Solana RPC | `localhost:8899` | `SOL_RPC_URL` |
309
+ | Sui RPC | `localhost:9000` | `SUI_RPC_URL` |
310
+
311
+ These defaults allow you to run local nodes (Ganache, Hardhat, Solana Test Validator) without additional configuration.
312
+
313
+ ### Production Configuration
314
+
315
+ **Always configure endpoints explicitly in production:**
316
+
317
+ ```typescript
318
+ import { SIP } from '@sip-protocol/sdk'
319
+
320
+ const sip = new SIP({
321
+ network: 'mainnet',
322
+ mode: 'production',
323
+ rpcEndpoints: {
324
+ ethereum: process.env.ETH_RPC_URL, // e.g., Alchemy, Infura
325
+ solana: process.env.SOL_RPC_URL, // e.g., Helius, QuickNode
326
+ near: process.env.NEAR_RPC_URL, // e.g., NEAR RPC
327
+ },
328
+ })
329
+ ```
330
+
331
+ ### Zcash Configuration
332
+
333
+ ```typescript
334
+ import { ZcashRPCClient } from '@sip-protocol/sdk'
335
+
336
+ // Development (uses defaults)
337
+ const devClient = new ZcashRPCClient({
338
+ username: 'user',
339
+ password: 'pass',
340
+ })
341
+
342
+ // Production
343
+ const prodClient = new ZcashRPCClient({
344
+ host: process.env.ZCASH_RPC_HOST,
345
+ port: parseInt(process.env.ZCASH_RPC_PORT || '8232'),
346
+ username: process.env.ZCASH_RPC_USER,
347
+ password: process.env.ZCASH_RPC_PASS,
348
+ tls: true, // Enable for production
349
+ })
350
+ ```
351
+
352
+ ### Environment Variables
353
+
354
+ See [`.env.example`](https://github.com/sip-protocol/sip-protocol/blob/main/.env.example) for a complete list of configurable environment variables.
355
+
298
356
  ## Error Handling
299
357
 
300
358
  ```typescript