> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DeviceSignerKeyStorage

> Kotlin Interface

**Interface**

```kotlin theme={null}
interface DeviceSignerKeyStorage
```

## Functions

### deleteKey

```kotlin theme={null}
abstract suspend fun deleteKey(address: String): Result<Unit>
```

Deletes the signing key for the given wallet address.

### deletePendingKey

```kotlin theme={null}
abstract suspend fun deletePendingKey(publicKeyBase64: String): Result<Unit>
```

Deletes a pending key that was never mapped to a wallet address.

### generateKey

```kotlin theme={null}
abstract suspend fun generateKey(address: String?): Result<String>
```

Generates a new P-256 signing key and stores it.

### getKey

```kotlin theme={null}
abstract suspend fun getKey(address: String): String?
```

Returns the base64-encoded uncompressed public key for the given wallet address, or null if not found.

### getSecurityLevel

```kotlin theme={null}
abstract suspend 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

```kotlin theme={null}
abstract suspend 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

```kotlin theme={null}
abstract suspend fun isAvailable(): Boolean
```

Returns true if this storage backend is available on the current device/platform.

### mapAddressToKey

```kotlin theme={null}
abstract suspend fun mapAddressToKey(address: String, publicKeyBase64: String): Result<Unit>
```

Associates a previously generated pending key with a wallet address.

### signHexMessage

```kotlin theme={null}
abstract suspend fun signHexMessage(address: String, hexMessage: String): Result<Pair<String, String>>
```

Signs a hex-encoded message using the key for the given wallet address.

### signHexMessageWithPendingKey

```kotlin theme={null}
abstract suspend 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

```kotlin theme={null}
abstract suspend fun signMessage(address: String, message: String): Result<Pair<String, String>>
```

Signs a base64-encoded message using the key for the given wallet address.
