Creates a new API key pair and returns the public key.
This function generates a new API key pair and stores it in the underlying key store (IndexedDB).
If an external key pair is provided, it will use that key pair for creation instead of generating a new one.
If storeOverride is set to true, the generated or provided public key will be set as the override key in the API key stamper, making it the active key for subsequent signing operations.
Ensures the API key stamper is initialized before proceeding.
Handles both native CryptoKeyPair objects and raw key material.
An externally generated key pair (either a CryptoKeyPair or an object with publicKey/privateKey strings) to use instead of generating a new one.
params.storeOverride
boolean
If true, sets the generated or provided public key as the override key in the API key stamper (defaults to false).
@returnparams.s A promise that resolves to the public key of the created or provided API key pair as a string.
Response
A successful response returns the following fields: