Skip to Content
dApps
On this page

getPublicKey

Get the public key of the current account.

Method

declare function getPublicKey(): Promise<string>;

Response

The public key as a string.

Example

const provider = (window.$onekey && window.$onekey.btc) || window.unisat; const publicKey = await provider.getPublicKey();

Demo

Open example 

Last updated on