Use Case
When building applications that need to verify signatures but don’t have access to wallet credentials:- Readonly wallet views
- Signature verification services
- Cross-chain verification (verifying Spark signatures from other chains)
- Server-side verification without sensitive key material
How It Works
Spark addresses encode the wallet’s identity public key. You can extract this key usingdecodeSparkAddress and verify signatures directly with secp256k1.
Implementation
Parameters
string
required
The Spark address to extract the identity public key from
NetworkType
required
The network type (
MAINNET, TESTNET, SIGNET, REGTEST, or LOCAL)Uint8Array | string
required
The signature to verify
Uint8Array | string
required
The original message that was signed
Full Example
Key Points
No Wallet Required
decodeSparkAddress is exported directly from the SDK and doesn’t require wallet initializationLightweight
Only needs the SDK and a secp256k1 library—no sensitive data or network calls
Related
- signMessageWithIdentityKey - Sign messages with wallet
- validateMessageWithIdentityKey - Validate with wallet instance
- getIdentityPublicKey - Get identity key from wallet