Skip to content

Provider methods ​

Every method returns a Promise. Unless stated otherwise, methods require a connected origin and an unlocked wallet.

Account and network ​

MethodReturnsApproval
connect()string[] containing the active Ark addressFirst time per origin only
disconnect()trueNo
isConnected()booleanNo
getAccounts()string[]No
getProviderState()ProviderStateNo
getAddress()Active Ark addressNo
getBoardingAddress()On-chain address for entering ArkNo
getXOnlyPublicKey()Hex-encoded x-only public keyNo
getNetwork()NetworkInfoNo
js
const [address, boardingAddress, publicKey, network] = await Promise.all([
  window.arkade.getAddress(),
  window.arkade.getBoardingAddress(),
  window.arkade.getXOnlyPublicKey(),
  window.arkade.getNetwork(),
]);

Balance, assets, and history ​

MethodReturns
getBalance()Available and total balance, VTXOs, and boarding funds
getAssets()Held Ark assets and their metadata
getTransactionHistory()Ark, on-chain, and Lightning transactions
js
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.

js
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.

js
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.

js
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.

js
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.

Open-source products for programmable Bitcoin.