Prerequisites
Ensure you have the following installed before getting started:
Installation
npm install @arkade-os/sdk
Arkade Operator Instances
To test your integration against a live environment, you can connect to the following live Arkade Operator instances:
Basic Setup
When creating a wallet, you can use an existing private key or generate a new one. For production applications, always use a secure key management solution rather than hardcoded keys.
import { SingleKey, Wallet } from '@arkade-os/sdk'
// use your private key in hex format
const identity = SingleKey.fromHex('secret')
// create a wallet instance
const wallet = await Wallet.create({
identity,
arkServerUrl: 'https://arkade.computer',
})
// You can receive bitcoin offchain instantly! No inbound liquidity!
const address = await wallet.getAddress()
console.log('Ark Address:', address)
Local Arkade Operator
If you want to run Arkade locally for testing, you can start a Nigiri environment with Arkade support enabled:
Once running, Nigiri will spin up a local Bitcoin regtest network with an Arkade Operator instance. You can connect your SDK to it using the following URL:
| Network | URL | Status |
|---|
| Regtest | http://localhost:7070 | Self-deployed |
This lets you test wallet creation, offchain payments, and unilateral exits without touching public test networks.
Next Steps
Now that you have set up your Arkade wallet, you can: