Skip to main content
Class
class KeystoreKeyStorage : DeviceSignerKeyStorage

Constructors

constructor()

Functions

deleteKey

open suspend override fun deleteKey(address: String): Result<Unit>
Deletes the signing key for the given wallet address.

deletePendingKey

open suspend override fun deletePendingKey(publicKeyBase64: String): Result<Unit>
Deletes a pending key that was never mapped to a wallet address.

generateKey

open suspend override fun generateKey(address: String?): Result<String>
Generates a new P-256 signing key and stores it.

getKey

open suspend override fun getKey(address: String): String?
Returns the base64-encoded uncompressed public key for the given wallet address, or null if not found.

getSecurityLevel

open suspend override fun getSecurityLevel(address: String): String?
Returns a human-readable string describing the security level of the key for the given wallet address (e.g. “StrongBox”, “TEE”, “Software”), or null if the key is not found.

hasKey

open suspend override fun hasKey(publicKeyBase64: String): Boolean
Returns true if this storage holds a key for the given uncompressed public key (base64-encoded). Used during wallet initialization to detect whether a registered device signer belongs to this device.

isAvailable

open suspend override fun isAvailable(): Boolean
Returns true if this storage backend is available on the current device/platform.

mapAddressToKey

open suspend override fun mapAddressToKey(address: String, publicKeyBase64: String): Result<Unit>
Associates a previously generated pending key with a wallet address.

signHexMessage

open suspend override fun signHexMessage(address: String, hexMessage: String): Result<Pair<String, String>>
Signs a hex-encoded message using the key for the given wallet address.

signHexMessageWithPendingKey

open suspend override fun signHexMessageWithPendingKey(publicKeyBase64: String, hexMessage: String): Result<Pair<String, String>>
Signs a hex-encoded message using a pending key (not yet mapped to a wallet address).

signMessage

open suspend override fun signMessage(address: String, message: String): Result<Pair<String, String>>
Signs a base64-encoded message using the key for the given wallet address.