targetPublicKey
Initializes the iframe stamper and returns its public key.
Import
Usage
import { class AlchemySignerWebClientA lower level client used by the AlchemySigner used to communicate with Alchemy's signer service.
AlchemySignerWebClient } from "@account-kit/signer";
const const client: AlchemySignerWebClientclient = new new AlchemySignerWebClient(params: AlchemySignerClientParams): AlchemySignerWebClientInitializes a new instance with the given parameters, setting up the connection, iframe configuration, and WebAuthn stamper.
AlchemySignerWebClient({
connection: {
apiKey: string;
rpcUrl?: undefined;
jwt?: undefined;
} | {
jwt: string;
rpcUrl?: undefined;
apiKey?: undefined;
} | {
rpcUrl: string;
apiKey?: undefined;
jwt?: undefined;
} | {
rpcUrl: string;
jwt: string;
apiKey?: undefined;
}connection: {
apiKey: stringapiKey: "your-api-key",
},
iframeConfig: {
iframeContainerId: string;
iframeElementId?: string | undefined;
}iframeConfig: {
iframeContainerId: stringiframeContainerId: "signer-iframe-container",
},
});
const const publicKey: stringpublicKey = await const client: AlchemySignerWebClientclient.AlchemySignerWebClient.targetPublicKey: () => Promise<string>Initializes the iframe stamper and returns its public key.
targetPublicKey();
Returns
Promise<string>
A promise that resolves with the target public key when the iframe stamper is successfully initialized, or throws an error if the target public key is not supported.