Provider methods
Every method returns a Promise. Unless stated otherwise, methods require a connected origin and an unlocked wallet.
Account and network
| Method | Returns | Approval |
|---|---|---|
connect() | string[] containing the active Ark address | First time per origin only |
disconnect() | true | No |
isConnected() | boolean | No |
getAccounts() | string[] | No |
getProviderState() | ProviderState | No |
getAddress() | Active Ark address | No |
getBoardingAddress() | On-chain address for entering Ark | No |
getXOnlyPublicKey() | Hex-encoded x-only public key | No |
getNetwork() | NetworkInfo | No |
const [address, boardingAddress, publicKey, network] = await Promise.all([
window.arkade.getAddress(),
window.arkade.getBoardingAddress(),
window.arkade.getXOnlyPublicKey(),
window.arkade.getNetwork(),
]);Balance, assets, and history
| Method | Returns |
|---|---|
getBalance() | Available and total balance, VTXOs, and boarding funds |
getAssets() | Held Ark assets and their metadata |
getTransactionHistory() | Ark, on-chain, and Lightning transactions |
const [balance, assets, history] = await Promise.all([
window.arkade.getBalance(),
window.arkade.getAssets(),
window.arkade.getTransactionHistory(),
]);Send BTC
sendToAddress(address, amount) accepts an Ark address and a positive integer amount in satoshis. Every call opens an approval window.
const txid = await window.arkade.sendToAddress('ark1q…', 1000);WARNING
An App cannot use this method for on-chain Bitcoin or Lightning destinations.
Send assets
sendAsset(address, assets, bitcoinAmount?) sends one or more assets and optionally sends satoshis in the same transaction.
const txid = await window.arkade.sendAsset(
'ark1q…',
[
{ assetId: 'asset-id', amount: 500 },
],
1000,
);Each asset amount uses raw units without applying decimals. Read metadata.decimals from getAssets() when building your interface.
Settlement
settle() renews spendable VTXOs and returns the batch txid. Every call requires approval.
const batchTxid = await window.arkade.settle();Sign a message
signMessage(message) creates a BIP-322 signature with the key for the returned BIP86 Taproot address. The message must be a non-empty string no longer than 1,024 characters.
const signed = await window.arkade.signMessage('Sign in to example.com');
console.log(signed.message);
console.log(signed.signature);
console.log(signed.address); // bc1p… or tb1p…Every signature requires explicit user approval.
