AptosStealthService
SIP Protocol API Reference v0.15.1
SIP Protocol API Reference / AptosStealthService
Class: AptosStealthService
Section titled “Class: AptosStealthService”Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5667
Aptos Stealth Service
Provides a convenient class-based interface for Aptos 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 AptosStealthService():
AptosStealthService
Returns
Section titled “Returns”AptosStealthService
Methods
Section titled “Methods”generateStealthAddress()
Section titled “generateStealthAddress()”generateStealthAddress(
recipientMetaAddress):AptosStealthResult
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5674
Generate a stealth address for an Aptos recipient
Parameters
Section titled “Parameters”recipientMetaAddress
Section titled “recipientMetaAddress”Recipient’s stealth meta-address
Returns
Section titled “Returns”Complete stealth address result
stealthKeyToAptosAddress()
Section titled “stealthKeyToAptosAddress()”stealthKeyToAptosAddress(
publicKey):string
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5681
Convert an ed25519 public key to Aptos address format
Parameters
Section titled “Parameters”publicKey
Section titled “publicKey”`0x${string}`
32-byte ed25519 public key
Returns
Section titled “Returns”string
Aptos address string
deriveStealthPrivateKey()
Section titled “deriveStealthPrivateKey()”deriveStealthPrivateKey(
stealthAddress,spendingPrivateKey,viewingPrivateKey):object
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5690
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}`
aptosAddress
Section titled “aptosAddress”aptosAddress:
string
checkStealthAddress()
Section titled “checkStealthAddress()”checkStealthAddress(
stealthAddress,viewingPrivateKey,spendingPublicKey):boolean
Defined in: @sip-protocol/sdk/dist/index-GLbkPPho.d.ts:5707
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:5714
Validate an Aptos address format
Parameters
Section titled “Parameters”address
Section titled “address”string
Address to validate
Returns
Section titled “Returns”boolean
true if valid format