targetPublicKey

Initializes the iframe stamper and returns its public key.

Import

1import { AlchemySignerWebClient } from "@account-kit/signer";

Usage

1import { AlchemySignerWebClient } from "@account-kit/signer";
2
3const client = new AlchemySignerWebClient({
4 connection: {
5 apiKey: "your-api-key",
6 },
7 iframeConfig: {
8 iframeContainerId: "signer-iframe-container",
9 },
10});
11
12const publicKey = await client.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.