targetPublicKey

Initializes the iframe stamper and returns its public key.

Import

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

Usage

import { 
class AlchemySignerWebClient

A lower level client used by the AlchemySigner used to communicate with Alchemy's signer service.

AlchemySignerWebClient
} from "@account-kit/signer";
const
const client: AlchemySignerWebClient
client
= new
new AlchemySignerWebClient(params: AlchemySignerClientParams): AlchemySignerWebClient

Initializes 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: string
apiKey
: "your-api-key",
},
iframeConfig: { iframeContainerId: string; iframeElementId?: string | undefined; }
iframeConfig
: {
iframeContainerId: string
iframeContainerId
: "signer-iframe-container",
}, }); const
const publicKey: string
publicKey
= await
const client: AlchemySignerWebClient
client
.
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.