Skip to content

deriveAptosStealthPrivateKey()

SIP Protocol API Reference v0.7.0


SIP Protocol API Reference / deriveAptosStealthPrivateKey

deriveAptosStealthPrivateKey(stealthAddress, spendingPrivateKey, viewingPrivateKey): object

Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:2553

Derive the private key for an Aptos stealth address

This allows the recipient to claim funds sent to a stealth address. Uses the standard ed25519 stealth key derivation.

StealthAddress

The stealth address data (from announcement)

`0x${string}`

Recipient’s spending private key

`0x${string}`

Recipient’s viewing private key

object

Derived private key (raw scalar, little-endian format)

stealthAddress: `0x${string}`

ephemeralPublicKey: `0x${string}`

privateKey: `0x${string}`

aptosAddress: string

If any input is invalid

const recovery = deriveAptosStealthPrivateKey(
stealthAddress,
spendingPrivKey,
viewingPrivKey
)
// Use recovery.privateKey to sign transactions