Skip to main content
Receive BTC at an Arkade address without requiring the recipient to be online, or use a boarding address when the funds start on Bitcoin.

Setup

Load the mnemonic you stored when you created your wallet, for example from an environment variable. Never generate a new mnemonic on each run. Funds sent to the address of a mnemonic you did not store are lost. The snippet connects to mainnet. For Mutinynet, create the wallet as in Create Your Wallet. In Node.js, also pass storage and call configureEventSource before Wallet.create, as in the Node.js example: the payment notifications below need an EventSource.

Getting Your Arkade Address

Share the wallet’s Arkade address to receive BTC from other Arkade wallets. It starts with ark1 on mainnet and tark1 on test networks.

Receiving Assets

Arkade Assets arrive at the same Arkade address as BTC. Each virtual output lists the assets it holds in its assets field. Incoming-payment notifications include this field.

Detect Deposits

Watch an address for incoming units of one asset.

Receiving from Bitcoin

Generate a boarding address to move a confirmed Bitcoin output into Arkade.

Boarding

Onchain funding and confirmation flow.

Receiving over Lightning

To receive a Lightning payment into an Arkade balance, a solver mints a hold invoice against a hash you supply and funds the Arkade side once it is paid.

Receive Lightning

Preimage handling and claiming.
SDK 0.5: to give users Lightning addresses, or to receive while their wallet is offline, see Run Lightning Services.

Monitoring for Incoming Payments

Use waitForIncomingFunds() once or notifyIncomingFunds() for a subscription.

Wait for the Next Deposit

waitForIncomingFunds keeps a subscription open until funds arrive. If your app can stop waiting first, for example when the user leaves the screen, pass { timeoutMs } or { signal } from an AbortController. When the timeout ends or you call abort(), the SDK closes the subscription and the call rejects with an AbortError.

Subscribe to Live Updates

notifyIncomingFunds calls your function on every change to the wallet’s outputs, until you call the stop function it returns:
Your callback also runs for your own sends. A send reports the outputs it spent in spentVtxos, and its change arrives in newVtxos in a separate call. The same output can be reported more than once, so key your updates by txid:vout. The wallet stores every output itself. The SDK reconnects the subscription after a network drop. The subscription ends when your app stops, so call notifyIncomingFunds again at startup.