Skip to Content
dApp 接入
本页目录

getPublicKey

获取当前账户的公钥。

方法

declare function getPublicKey(): Promise<string>;

响应

字符串形式的公钥。

示例

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

演示

打开示例 

最后更新于