Last updated 11 months ago
To begin interaction, you first need to obtain the appropriate permissions. Calling requestAccounts() will prompt the user to allow the use of the browser's web access feature. After this, you are free to call any other API methods.
async function requestAccounts(): string[]
const provider = (window.$onekey && window.$onekey.btc) || window.unisat; const accounts = async provider.requestAccounts()