@sip-protocol/sdk 0.6.2 → 0.6.4

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/index.js CHANGED
@@ -5383,7 +5383,7 @@ async function createShieldedIntent(params, options) {
5383
5383
  let recipientStealth;
5384
5384
  if (privacyConfig.useStealth && recipientMetaAddress) {
5385
5385
  const metaAddress = decodeStealthMetaAddress(recipientMetaAddress);
5386
- const { stealthAddress } = generateStealthAddress(metaAddress);
5386
+ const { stealthAddress } = isEd25519Chain(metaAddress.chain) ? generateEd25519StealthAddress(metaAddress) : generateStealthAddress(metaAddress);
5387
5387
  recipientStealth = stealthAddress;
5388
5388
  } else {
5389
5389
  recipientStealth = {
@@ -6669,7 +6669,9 @@ var SIP = class {
6669
6669
  async createIntent(params) {
6670
6670
  const intent = await createShieldedIntent(params, {
6671
6671
  senderAddress: this.wallet?.address,
6672
- proofProvider: this.proofProvider
6672
+ proofProvider: this.proofProvider,
6673
+ // Allow placeholder signatures in demo mode for development/testing
6674
+ allowPlaceholders: this.config.mode === "demo"
6673
6675
  });
6674
6676
  return trackIntent(intent);
6675
6677
  }
package/dist/index.mjs CHANGED
@@ -253,7 +253,7 @@ import {
253
253
  walletRegistry,
254
254
  withSecureBuffer,
255
255
  withSecureBufferSync
256
- } from "./chunk-GOOEOAMV.mjs";
256
+ } from "./chunk-H5W3IPDU.mjs";
257
257
  import {
258
258
  CryptoError,
259
259
  EncryptionNotImplementedError,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sip-protocol/sdk",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
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
@@ -20,7 +20,12 @@ import {
20
20
  type PrivacyLevel,
21
21
  type ChainId,
22
22
  } from '@sip-protocol/types'
23
- import { generateStealthAddress, decodeStealthMetaAddress } from './stealth'
23
+ import {
24
+ generateStealthAddress,
25
+ generateEd25519StealthAddress,
26
+ decodeStealthMetaAddress,
27
+ isEd25519Chain,
28
+ } from './stealth'
24
29
  import {
25
30
  createCommitment,
26
31
  generateIntentId,
@@ -496,7 +501,10 @@ export async function createShieldedIntent(
496
501
  let recipientStealth
497
502
  if (privacyConfig.useStealth && recipientMetaAddress) {
498
503
  const metaAddress = decodeStealthMetaAddress(recipientMetaAddress)
499
- const { stealthAddress } = generateStealthAddress(metaAddress)
504
+ // Use appropriate stealth address generator based on chain's curve type
505
+ const { stealthAddress } = isEd25519Chain(metaAddress.chain)
506
+ ? generateEd25519StealthAddress(metaAddress)
507
+ : generateStealthAddress(metaAddress)
500
508
  recipientStealth = stealthAddress
501
509
  } else {
502
510
  // For transparent mode, create a placeholder
package/src/sip.ts CHANGED
@@ -607,6 +607,8 @@ export class SIP {
607
607
  const intent = await createShieldedIntent(params, {
608
608
  senderAddress: this.wallet?.address,
609
609
  proofProvider: this.proofProvider,
610
+ // Allow placeholder signatures in demo mode for development/testing
611
+ allowPlaceholders: this.config.mode === 'demo',
610
612
  })
611
613
  return trackIntent(intent)
612
614
  }