@sip-protocol/sdk 0.6.2 → 0.6.3
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.js +1 -1
- package/dist/browser.mjs +1 -1
- package/dist/chunk-AB3SCLVT.mjs +17026 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/intent.ts +10 -2
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 = {
|
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sip-protocol/sdk",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.3",
|
|
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 {
|
|
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
|
-
|
|
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
|