Skip to content

deriveEd25519StealthPrivateKey()

SIP Protocol API Reference v0.15.1


SIP Protocol API Reference / deriveEd25519StealthPrivateKey

Function: deriveEd25519StealthPrivateKey()

Section titled “Function: deriveEd25519StealthPrivateKey()”

deriveEd25519StealthPrivateKey(stealthAddress, spendingPrivateKey, viewingPrivateKey): StealthAddressRecovery

Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:4039

Derive the private key for an ed25519 stealth address (canonical EIP-5564)

Requires BOTH the spending and viewing private keys (spending authority).

IMPORTANT: Derived Key Format

The returned privateKey is a raw scalar in little-endian format, NOT a standard ed25519 seed. To compute the public key from the derived private key:

const scalar = bytesToBigIntLE(hexToBytes(privateKey.slice(2)))
const publicKey = ed25519.ExtendedPoint.BASE.multiply(scalar)

StealthAddress

`0x${string}`

`0x${string}`

StealthAddressRecovery