Skip to main content
This page has been updated for Wallets SDK V1. If you are using the previous version, see the previous version docs or the V1 migration guide.
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:7

Extended by

Constructors

new DeviceSignerKeyStorage()

new DeviceSignerKeyStorage(apiKey): DeviceSignerKeyStorage
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:8

Parameters

Returns

DeviceSignerKeyStorage

Methods

deleteKey()

abstract deleteKey(address): Promise<void>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:66 Delete the key pair associated with the given wallet address.

Parameters

Returns

Promise<void>

generateKey()

Call Signature

abstract generateKey(params): Promise<string>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:17 Generate a new P-256 key pair and persist it.
Parameters
Returns
Promise<string> The uncompressed public key encoded as a base64 string.

Call Signature

abstract generateKey(params): Promise<string>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:21 Generate a new P-256 key pair and persist it.
Parameters
Returns
Promise<string> The uncompressed public key encoded as a base64 string.

Call Signature

abstract generateKey(params): Promise<string>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:26 Generate a new P-256 key pair and persist it.
Parameters
Returns
Promise<string> The uncompressed public key encoded as a base64 string.

getDeviceName()

abstract getDeviceName(): string
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:73 Get a human-readable name for this device (e.g. “MacBook Pro”, “iPhone 15”). Used to label device signers in the API for identification purposes.

Returns

string A descriptive name for the current device.

getKey()

abstract getKey(address): Promise<string | null>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:45 Retrieve the public key for a given wallet address.

Parameters

Returns

Promise<string | null> The base64-encoded public key, or null if no key is found for the address.

hasKey()

abstract hasKey(publicKeyBase64): Promise<boolean>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:52 Check if a key with the given public key exists on this device.

Parameters

Returns

Promise<boolean> true if the key exists on the device, false otherwise.

mapAddressToKey()

abstract mapAddressToKey(address, publicKeyBase64): Promise<void>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:38 Associate an already-generated key pair with a wallet address. Used when the wallet address is not yet known at the time of key generation.

Parameters

Returns

Promise<void>

signMessage()

abstract signMessage(address, message): Promise<{ r: string; s: string; }>
Defined in: packages/wallets/src/utils/device-signers/DeviceSignerKeyStorage.ts:60 Sign a message using the private key associated with the given wallet address.

Parameters

Returns

Promise<{ r: string; s: string; }> The ECDSA signature split into its r and s components, each as a hex string.