SuiStealthService
SIP Protocol API Reference v0.15.1
SIP Protocol API Reference / SuiStealthService
Class: SuiStealthService
Section titled “Class: SuiStealthService”Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5886
Sui Stealth Service
Provides a convenient class-based interface for Sui stealth address operations. This is useful when you need to perform multiple operations or want to encapsulate the logic in a service object.
Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new SuiStealthService():
SuiStealthService
Returns
Section titled “Returns”SuiStealthService
Methods
Section titled “Methods”generateStealthAddress()
Section titled “generateStealthAddress()”generateStealthAddress(
recipientMetaAddress):SuiStealthResult
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5893
Generate a stealth address for a Sui recipient
Parameters
Section titled “Parameters”recipientMetaAddress
Section titled “recipientMetaAddress”Recipient’s stealth meta-address
Returns
Section titled “Returns”Complete stealth address result
stealthKeyToSuiAddress()
Section titled “stealthKeyToSuiAddress()”stealthKeyToSuiAddress(
publicKey):string
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5900
Convert an ed25519 public key to Sui address format
Parameters
Section titled “Parameters”publicKey
Section titled “publicKey”`0x${string}`
32-byte ed25519 public key
Returns
Section titled “Returns”string
Sui address string
deriveStealthPrivateKey()
Section titled “deriveStealthPrivateKey()”deriveStealthPrivateKey(
stealthAddress,spendingPrivateKey,viewingPrivateKey):object
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5909
Derive the private key for a stealth address
Parameters
Section titled “Parameters”stealthAddress
Section titled “stealthAddress”Stealth address data
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
Recovery data with derived private key
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
checkStealthAddress()
Section titled “checkStealthAddress()”checkStealthAddress(
stealthAddress,viewingPrivateKey,spendingPublicKey):boolean
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5926
Check if a stealth address belongs to this recipient
Canonical EIP-5564 view-only check: requires only the recipient’s viewing private key plus their spending PUBLIC key (no spending private key needed).
Parameters
Section titled “Parameters”stealthAddress
Section titled “stealthAddress”Stealth address to check
viewingPrivateKey
Section titled “viewingPrivateKey”`0x${string}`
Recipient’s viewing private key
spendingPublicKey
Section titled “spendingPublicKey”`0x${string}`
Recipient’s spending public key (meta-address spendingKey)
Returns
Section titled “Returns”boolean
true if the address belongs to this recipient
isValidAddress()
Section titled “isValidAddress()”isValidAddress(
address):boolean
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5933
Validate a Sui address format
Parameters
Section titled “Parameters”address
Section titled “address”string
Address to validate
Returns
Section titled “Returns”boolean
true if valid format