AptosStealthService
SIP Protocol API Reference v0.7.0
SIP Protocol API Reference / AptosStealthService
Class: AptosStealthService
Section titled “Class: AptosStealthService”Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:2589
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-BYZbDjal.d.ts:2596
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-BYZbDjal.d.ts:2603
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-BYZbDjal.d.ts:2612
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,spendingPrivateKey,viewingPrivateKey):boolean
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:2626
Check if a stealth address belongs to this recipient
Parameters
Section titled “Parameters”stealthAddress
Section titled “stealthAddress”Stealth address to check
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”boolean
true if the address belongs to this recipient
isValidAddress()
Section titled “isValidAddress()”isValidAddress(
address):boolean
Defined in: @sip-protocol/sdk/dist/index-BYZbDjal.d.ts:2633
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