cryptkeeper.getConnectedIdentity()
Retrieves the connected identity metadata.
@src/providers/sdk/CryptKeeperInjectedProvider.ts
/**
* Retrieves the connected identity.
*
* @returns {Promise<IConnectedIdentity>} A Promise that resolves to the connected identity.
*/
async getConnectedIdentity(): Promise<ConnectedIdentityMetadata | undefined> {
return this.post({
method: RPCAction.GET_CONNECTED_IDENTITY_DATA,
}) as Promise<ConnectedIdentityMetadata>;
}
Usage
import { cryptkeeperConnect, type CryptKeeperInjectedProvider } from "@cryptkeeperzk/providers";
const client = await cryptkeeperConnect();
const { name, urlOrigin } = await client.getConnectedIdentity();