Invalid Path Exception
class InvalidPathException(val path: String, message: String = "Invalid BIP-32 derivation path: ") : Sep05Exception
Exception thrown when a BIP-32 derivation path is invalid.
SEP-5 uses BIP-32 hierarchical deterministic key derivation with SLIP-10. The standard Stellar path is "m/44'/148'/0'" where:
m: master node
44': BIP-44 purpose (hardened)
148': Stellar coin type (hardened)
0': account index (hardened)
Valid path format:
Must start with "m/"
Path components separated by "/"
Each component is a 31-bit unsigned integer (0 to 2147483647)
Hardened derivation indicated by "'" or "h" suffix
For Stellar, all derivation should be hardened
Common causes:
Missing "m/" prefix
Invalid characters in path
Index out of valid range
Empty path components
Example:
try {
val keypair = wallet.deriveKeyPair("invalid/path")
} catch (e: InvalidPathException) {
println("Invalid path: ${e.path}")
println("Error: ${e.message}")
println("Use format: m/44'/148'/0'")
}Content copied to clipboard
See also:
Parameters
message
Description of the path validation failure