deriveSuiStealthPrivateKey()
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / deriveSuiStealthPrivateKey
Function: deriveSuiStealthPrivateKey()
Section titled “Function: deriveSuiStealthPrivateKey()”deriveSuiStealthPrivateKey(
stealthAddress,spendingPrivateKey,viewingPrivateKey):object
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:2766
Derive the private key for a Sui stealth address
This allows the recipient to claim funds sent to a stealth address. Uses the standard ed25519 stealth key derivation.
Parameters
Section titled “Parameters”stealthAddress
Section titled “stealthAddress”The stealth address data (from announcement)
spendingPrivateKey
Section titled “spendingPrivateKey”`0x${string}`
Recipient’s spending private key
viewingPrivateKey
Section titled “viewingPrivateKey”`0x${string}`
Recipient’s viewing private key
Returns
Section titled “Returns”object
Derived private key (raw scalar, little-endian format)
stealthAddress
Section titled “stealthAddress”stealthAddress:
`0x${string}`
ephemeralPublicKey
Section titled “ephemeralPublicKey”ephemeralPublicKey:
`0x${string}`
privateKey
Section titled “privateKey”privateKey:
`0x${string}`
suiAddress
Section titled “suiAddress”suiAddress:
string
Throws
Section titled “Throws”If any input is invalid
Example
Section titled “Example”const recovery = deriveSuiStealthPrivateKey( stealthAddress, spendingPrivKey, viewingPrivKey)// Use recovery.privateKey to sign transactions