targetPublicKey
Initializes the iframe stamper and returns its public key.
Import
import { AlchemySignerWebClient } from "@account-kit/signer";
Usage
import { AlchemySignerWebClient } from "@account-kit/signer";
const client = new AlchemySignerWebClient({
connection: {
apiKey: "your-api-key",
},
iframeConfig: {
iframeContainerId: "signer-iframe-container",
},
});
const 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.