{"_id":"@arkade-os/wdk","_rev":"8-598570b3869a4fa36271c763e60498f3","name":"@arkade-os/wdk","dist-tags":{"latest":"0.1.4"},"versions":{"0.1.0":{"name":"@arkade-os/wdk","version":"0.1.0","keywords":["bitcoin","ark","wallet","wdk","arkade","cryptocurrency","blockchain"],"author":"","license":"MIT","_id":"@arkade-os/wdk@0.1.0","maintainers":[{"name":"pietro909","email":"dev@pietro.uno"},{"name":"kukks","email":"evilkukka@gmail.com"},{"name":"tiero","email":"marco@vulpem.com"},{"name":"louisark","email":"louis@arklabs.to"},{"name":"altafan","email":"pietro@vulpem.com"},{"name":"bordalix","email":"joao.bordalo@gmail.com"}],"dist":{"shasum":"eabb71273bde1f31ca785f436a2699d539de283c","tarball":"https://registry.npmjs.org/@arkade-os/wdk/-/wdk-0.1.0.tgz","fileCount":33,"integrity":"sha512-Ig6YisrxGsgRWqQ3MTsdd5PrvocuOZRVTK1N1cTc6RQyK+9wtoLo+RHPAIBa1EKGuQ9RLDwgJDE78gom1W1IuQ==","signatures":[{"sig":"MEYCIQDXHNmzYTk1L39A5z/tVuSGuTx+mIAqVl77KYsHDPG3+QIhAJiOsJDh/Q9gBqhGFGsYsfX6wY0cpD51UZBAtYPmqhcT","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":107608},"main":"src/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"}},"gitHead":"c5f4bd978b6243eb0653d0c1aa8addda91db5923","scripts":{"lint":"eslint src --ext .js && npm run typecheck","test":"node --test src/__tests__/*.test.js","format":"prettier --write \"src/**/*.js\"","lint:fix":"eslint src --ext .js --fix","setup:dev":"node scripts/setup-dev.js","typecheck":"tsc -p jsconfig.json --noEmit","test:watch":"node --test --watch src/__tests__/*.test.js","build:types":"tsc -p tsconfig.json","prepublishOnly":"npm run build:types"},"_npmUser":{"name":"pietro909","email":"dev@pietro.uno"},"_npmVersion":"10.9.3","description":"WDK (Wallet Development Kit) implementation using Arkade Bitcoin SDK with Ark protocol support","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/base":"^2.0.0","@scure/bip32":"^2.0.1","@arkade-os/sdk":"0.4.25","sodium-universal":"^5.0.1","@tetherto/wdk-wallet":"^1.0.0-beta.5","light-bolt11-decoder":"^3.2.0","@arkade-os/boltz-swap":"0.3.29"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","prettier":"^3.2.4","typescript":"^5.3.3","@tetherto/wdk":"^1.0.0-beta.4"},"_npmOperationalInternal":{"tmp":"tmp/wdk_0.1.0_1778159322293_0.3043843689247212","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@arkade-os/wdk","version":"0.1.1","keywords":["bitcoin","ark","wallet","wdk","arkade","cryptocurrency","blockchain"],"author":"","license":"MIT","_id":"@arkade-os/wdk@0.1.1","maintainers":[{"name":"pietro909","email":"dev@pietro.uno"},{"name":"kukks","email":"evilkukka@gmail.com"},{"name":"tiero","email":"marco@vulpem.com"},{"name":"louisark","email":"louis@arklabs.to"},{"name":"altafan","email":"pietro@vulpem.com"},{"name":"bordalix","email":"joao.bordalo@gmail.com"}],"dist":{"shasum":"b2a8e1498e64f860e2cd1996f90ab7f6f6f50a22","tarball":"https://registry.npmjs.org/@arkade-os/wdk/-/wdk-0.1.1.tgz","fileCount":33,"integrity":"sha512-JQCZEh/OK5Z2on1wzexYQa59U2Hawo1/qrIsJ4elXqyX/386gAga+keClUbWDd6Sx7HYJL65t152sh3voCz4mA==","signatures":[{"sig":"MEUCIDz4T3lx/pMGTLBMmlLvKkLJBLfQIvHVCUYs0S5H/cJGAiEAsSQIINvtc9wqam0bXuyvlLuWCw6SGlp5PA8+VLeToFQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":106467},"main":"src/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"}},"gitHead":"8125479f5c201b6bab57b1bc7fc13b62364b8e0d","scripts":{"lint":"eslint src --ext .js && npm run typecheck","test":"node --test src/__tests__/*.test.js","format":"prettier --write \"src/**/*.js\"","lint:fix":"eslint src --ext .js --fix","setup:dev":"node scripts/setup-dev.js","typecheck":"tsc -p jsconfig.json --noEmit","test:watch":"node --test --watch src/__tests__/*.test.js","build:types":"tsc -p tsconfig.json","prepublishOnly":"npm run build:types"},"_npmUser":{"name":"pietro909","email":"dev@pietro.uno"},"_npmVersion":"10.9.3","description":"WDK (Wallet Development Kit) implementation using Arkade Bitcoin SDK with Ark protocol support","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/base":"^2.0.0","@scure/bip32":"^2.0.1","@arkade-os/sdk":"0.4.25","sodium-universal":"^5.0.1","@tetherto/wdk-wallet":"^1.0.0-beta.5","light-bolt11-decoder":"^3.2.0","@arkade-os/boltz-swap":"0.3.29"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","prettier":"^3.2.4","typescript":"^5.3.3","@tetherto/wdk":"^1.0.0-beta.4"},"_npmOperationalInternal":{"tmp":"tmp/wdk_0.1.1_1778243022441_0.8021631023351232","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@arkade-os/wdk","version":"0.1.2","keywords":["bitcoin","ark","wallet","wdk","arkade","cryptocurrency","blockchain"],"author":"","license":"MIT","_id":"@arkade-os/wdk@0.1.2","maintainers":[{"name":"pietro909","email":"dev@pietro.uno"},{"name":"kukks","email":"evilkukka@gmail.com"},{"name":"tiero","email":"marco@vulpem.com"},{"name":"louisark","email":"louis@arklabs.to"},{"name":"altafan","email":"pietro@vulpem.com"},{"name":"bordalix","email":"joao.bordalo@gmail.com"}],"dist":{"shasum":"ec711a5212830a793e711506b2ec214afa739b60","tarball":"https://registry.npmjs.org/@arkade-os/wdk/-/wdk-0.1.2.tgz","fileCount":33,"integrity":"sha512-rAv4aJIJfOjK725xx0bkusLNRwgs9n3XGl8skJr1tngliA1S1A+Jxisip47yMaLN5d2sF6kPiwTXSS8eLK8VKQ==","signatures":[{"sig":"MEYCIQDoMj/hnTmN0lxoLnNkWzvXIlarRT5B0jIfsBXPlEO6HwIhAPOLb+Skhv4bWUfNX9QVYuVWyqT0YystXeofN7+kgrrm","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116906},"main":"src/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"}},"gitHead":"519d9097d3692a23b04d51ed568e653c3832f124","scripts":{"lint":"eslint src --ext .js && npm run typecheck","test":"node --test src/__tests__/*.test.js","format":"prettier --write \"src/**/*.js\"","release":"node scripts/release.js","lint:fix":"eslint src --ext .js --fix","setup:dev":"node scripts/setup-dev.js","typecheck":"tsc -p jsconfig.json --noEmit","test:watch":"node --test --watch src/__tests__/*.test.js","build:types":"tsc -p tsconfig.json","prepublishOnly":"npm run build:types"},"_npmUser":{"name":"pietro909","email":"dev@pietro.uno"},"_npmVersion":"10.9.3","description":"WDK (Wallet Development Kit) implementation using Arkade Bitcoin SDK with Ark protocol support","directories":{},"_nodeVersion":"22.18.0","dependencies":{"@scure/base":"^2.0.0","@scure/bip32":"^2.0.1","@arkade-os/sdk":"0.4.25","sodium-universal":"^5.0.1","@tetherto/wdk-wallet":"^1.0.0-beta.5","light-bolt11-decoder":"^3.2.0","@arkade-os/boltz-swap":"0.3.29"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","prettier":"^3.2.4","typescript":"^5.3.3","@tetherto/wdk":"^1.0.0-beta.4"},"_npmOperationalInternal":{"tmp":"tmp/wdk_0.1.2_1778489162255_0.8470458909677916","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@arkade-os/wdk","version":"0.1.3","keywords":["bitcoin","ark","wallet","wdk","arkade","cryptocurrency","blockchain"],"author":"","license":"MIT","_id":"@arkade-os/wdk@0.1.3","maintainers":[{"name":"pietro909","email":"dev@pietro.uno"},{"name":"kukks","email":"evilkukka@gmail.com"},{"name":"tiero","email":"marco@vulpem.com"},{"name":"louisark","email":"louis@arklabs.to"},{"name":"altafan","email":"pietro@vulpem.com"},{"name":"bordalix","email":"joao.bordalo@gmail.com"}],"dist":{"shasum":"4e2ecf3418f389abf8d8cdfe8f432bfa9b65ecfc","tarball":"https://registry.npmjs.org/@arkade-os/wdk/-/wdk-0.1.3.tgz","fileCount":33,"integrity":"sha512-hffJR+3pIe4+8V6J/K4x5fziot7YBuTbLjGxgswGi/NnonCCS6H8pBTC9obUF26ki0cwBAn5rjv2hGgxL35NIQ==","signatures":[{"sig":"MEUCIQDtUo1H9ahvhgbd1R93iEiE+xwFDOfRKxaP33/RIM3lhQIgFB5j3mSUDsmQziUvt3Tb/OE0Ni7P1lIxTwwjuOIiuPw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116914},"main":"src/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"}},"gitHead":"f24a17340cdcbfd88c147494c7a6d746e63e8b2a","scripts":{"lint":"eslint src --ext .js && npm run typecheck","test":"node --test src/__tests__/*.test.js","format":"prettier --write \"src/**/*.js\"","release":"node scripts/release.js","lint:fix":"eslint src --ext .js --fix","setup:dev":"node scripts/setup-dev.js","typecheck":"tsc -p jsconfig.json --noEmit","test:watch":"node --test --watch src/__tests__/*.test.js","build:types":"tsc -p tsconfig.json","prepublishOnly":"npm run build:types"},"_npmUser":{"name":"pietro909","email":"dev@pietro.uno"},"_npmVersion":"11.12.1","description":"WDK (Wallet Development Kit) implementation using the Arkade Bitcoin SDK","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@scure/base":"^2.0.0","@scure/bip32":"^2.0.1","@arkade-os/sdk":"0.4.25","sodium-universal":"^5.0.1","@tetherto/wdk-wallet":"^1.0.0-beta.5","light-bolt11-decoder":"^3.2.0","@arkade-os/boltz-swap":"0.3.29"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","prettier":"^3.2.4","typescript":"^5.3.3","@tetherto/wdk":"^1.0.0-beta.4"},"_npmOperationalInternal":{"tmp":"tmp/wdk_0.1.3_1779741873066_0.22512313211217627","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@arkade-os/wdk","version":"0.1.4","keywords":["bitcoin","ark","wallet","wdk","arkade","cryptocurrency","blockchain"],"author":"","license":"MIT","_id":"@arkade-os/wdk@0.1.4","maintainers":[{"name":"pietro909","email":"dev@pietro.uno"},{"name":"tiero","email":"marco@vulpem.com"},{"name":"louisark","email":"louis@arklabs.to"},{"name":"altafan","email":"pietro@vulpem.com"},{"name":"bordalix","email":"joao.bordalo@gmail.com"}],"dist":{"shasum":"b4e8dc600628ae80c96e7fbaad988e8869caadab","tarball":"https://registry.npmjs.org/@arkade-os/wdk/-/wdk-0.1.4.tgz","fileCount":33,"integrity":"sha512-VnxJka5J3yTGn0vkNiMb8z3ahUE0Lvpqd6MiLKLTPd5ZXBnVJ0PNO4EI6puLuQatoszsc1aeGaFRnBIqbZdEUQ==","signatures":[{"sig":"MEUCIGCDUIXlzQajl2R5zukgqzKKgWIC3VIF86oBb0Ep5VvPAiEAj9P7Z3HEqoVKTlL1ZfneMsfABGH7q4uCYerXtfs71FY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":120638},"main":"src/index.js","type":"module","types":"./types/index.d.ts","engines":{"node":">=18.0.0"},"exports":{".":{"types":"./types/index.d.ts","default":"./src/index.js"}},"gitHead":"7c218d77732d613850779dfc08e1831c64f4e9bb","scripts":{"lint":"eslint src --ext .js && npm run typecheck","test":"node --test src/__tests__/*.test.js","format":"prettier --write \"src/**/*.js\"","release":"node scripts/release.js","lint:fix":"eslint src --ext .js --fix","setup:dev":"node scripts/setup-dev.js","typecheck":"tsc -p jsconfig.json --noEmit","test:watch":"node --test --watch src/__tests__/*.test.js","build:types":"tsc -p tsconfig.json","prepublishOnly":"npm run build:types"},"_npmUser":{"name":"pietro909","email":"dev@pietro.uno"},"_npmVersion":"11.12.1","description":"WDK (Wallet Development Kit) implementation using the Arkade Bitcoin SDK","directories":{},"_nodeVersion":"24.15.0","dependencies":{"@scure/base":"^2.0.0","@scure/bip32":"^2.0.1","@arkade-os/sdk":"0.4.35","sodium-universal":"^5.0.1","@tetherto/wdk-wallet":"^1.0.0-beta.5","light-bolt11-decoder":"^3.2.0","@arkade-os/boltz-swap":"0.3.40"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"^8.56.0","prettier":"^3.2.4","typescript":"^5.3.3","@tetherto/wdk":"^1.0.0-beta.4"},"_npmOperationalInternal":{"tmp":"tmp/wdk_0.1.4_1781605295455_0.13040873039134193","host":"s3://npm-registry-packages-npm-production"}}},"time":{"created":"2026-05-07T13:08:42.168Z","modified":"2026-09-08T19:29:46.484Z","0.1.0":"2026-05-07T13:08:42.550Z","0.1.1":"2026-05-08T12:23:42.596Z","0.1.2":"2026-05-11T08:46:02.384Z","0.1.3":"2026-05-25T20:44:33.212Z","0.1.4":"2026-06-16T10:21:35.632Z"},"license":"MIT","keywords":["bitcoin","ark","wallet","wdk","arkade","cryptocurrency","blockchain"],"description":"WDK (Wallet Development Kit) implementation using the Arkade Bitcoin SDK","maintainers":[{"email":"dev@pietro.uno","name":"pietro909"},{"email":"gringokiwi@icloud.com","name":"gringokiwi"},{"email":"evilkukka@gmail.com","name":"kukks"},{"email":"marco@vulpem.com","name":"tiero"},{"email":"louis@arklabs.to","name":"louisark"},{"email":"pietro@vulpem.com","name":"altafan"},{"email":"joao.bordalo@gmail.com","name":"bordalix"}],"readme":"# @arkade-os/wdk\n\nWDK-compatible Bitcoin wallet manager/account implementation built on top of `@arkade-os/sdk`, with optional Lightning support through `@arkade-os/boltz-swap`.\n\n## Current Status\n\nImplemented:\n- WDK `WalletManager` integration (`getAccount`, `getAccountByPath`, `getFeeRates`, `dispose`)\n- WDK account methods for send/sign/verify/quote, BIP-322 message signing, and read-only conversion\n- Destination auto-detection in `sendTransaction()` for Arkade addresses, BTC addresses, BOLT11 invoices, Lightning addresses, LNURL, and BIP21 URIs\n- Optional Lightning receive via `createLightningInvoice()` (Boltz reverse swap)\n- Optional Lightning send via `sendTransaction()` (Boltz submarine swap)\n- Transaction history via `getTransactionHistory()` (delegates to the SDK)\n- Subscription to incoming VTXOs via `subscribeToIncomingFunds()`\n\n## Account Model\n\nEach call to `getAccount(index)` returns one account derived at BIP-86 path `m/86'/<coin>/0'/0/<index>` (`coin = 0` for bitcoin, `1` for any other network). The index is just a key-derivation leaf — there is no per-index role.\n\nEvery account exposes three receive surfaces from the same underlying wallet:\n\n| Surface | API | Used when |\n|---------|-----|-----------|\n| Arkade address (offchain) | `getAddress()` | Receiving VTXO transfers from other Arkade users |\n| Boarding address (on-chain) | `getBoardingAddress()` | Funding the wallet by depositing on-chain BTC |\n| Lightning invoice | `createLightningInvoice(amount, description?)` | Receiving Lightning payments via Boltz reverse swap |\n\nLightning is only available when `swapProviderUrl` is set in the wallet config; otherwise `createLightningInvoice` throws. `getAddress()` always returns the Arkade address — do not use it as a QR code for Lightning receives.\n\n## Repository Structure\n\n```text\narkade-wdk/\n├── src/\n│   ├── lib/                      # address, bip21, bolt11, lnurl, fees, formatting, send routing\n│   ├── wallet-manager-arkade.js  # WDK wallet manager implementation\n│   ├── wallet-account-arkade.js  # WDK account implementation\n│   ├── wallet-account-read-only-arkade.js  # WDK read-only account implementation\n│   ├── types.js                  # ArkadeWalletConfig type\n│   └── index.js                  # package exports\n├── packages/\n│   ├── pear-wrk-wdk/             # submodule: bare-kit worklet runtime (HRPC schema + handlers)\n│   └── wdk-react-native-provider/# submodule: React Native provider (WDK service, contexts, UI wiring)\n├── examples/\n│   └── wdk-starter-react-native/ # submodule: Expo example app\n├── patches/\n│   ├── pear-wrk-wdk.patch\n│   ├── wdk-react-native-provider.patch\n│   └── wdk-starter-react-native.patch\n└── scripts/\n    ├── setup-dev.js              # local dev setup helper\n    ├── apply-patches.js          # apply ./patches to each submodule\n    └── generate-patches.js       # regenerate ./patches from submodule diffs\n```\n\n## Installation\n\n```bash\nnpm install @arkade-os/wdk @tetherto/wdk\n```\n\n`@arkade-os/sdk` and `@arkade-os/boltz-swap` are not required as a direct install for normal usage of this adapter.\nThey are pulled transitively by `@arkade-os/wdk`.\nIf your app imports `@arkade-os/sdk` or `@arkade-os/boltz-swap` directly, add them explicitly to your app dependencies.\n\nFor local monorepo development with submodules and links:\n\n```bash\nnpm run setup:dev\n```\n\n## Quick Start\n\n```typescript\nimport WdkManager from '@tetherto/wdk'\nimport WalletManagerArkade from '@arkade-os/wdk'\n\nconst seedPhrase = 'your twelve word seed phrase here'\nconst wdk = new WdkManager(seedPhrase)\n\nwdk.registerWallet('bitcoin', WalletManagerArkade, {\n  arkServerUrl: 'https://arkade.computer',\n})\n\nconst account = await wdk.getAccount('bitcoin', 0)\n\nconst arkAddress = await account.getAddress()\nconst balance = await account.getBalance()\n\nconst quote = await account.quoteSendTransaction({\n  to: arkAddress,\n  value: 1000n,\n})\n\nconst tx = await account.sendTransaction({\n  to: arkAddress,\n  value: 1000n,\n})\n\nconsole.log({ balance, quoteFee: quote.fee, txid: tx.hash })\n```\n\n## Lightning and LNURL\n\nCreate Lightning invoice (enabled only when `swapProviderUrl` is configured):\n\n```typescript\nconst { invoice, paymentHash } = await account.createLightningInvoice(50_000, 'Payment for coffee')\nconsole.log(invoice) // BOLT11 invoice string\n```\n\nPay to Lightning address / LNURL:\n\n```typescript\nawait account.sendTransaction({ to: 'user@wallet.com', value: 1000n })\n```\n\n## Arkade-Specific Account Methods\n\nThe adapter does not expose the underlying `@arkade-os/sdk` wallet instance.\nUse the account methods instead:\n\n```typescript\nconst balance = await account.getBalance()\nconst unsubscribe = await account.subscribeToIncomingFunds(() => {\n  console.log('New Arkade funds detected')\n})\nconst history = await account.getTransactionHistory()\n\nunsubscribe()\n```\n\n## API Reference (Current)\n\n### WalletManagerArkade\n\n```typescript\nclass WalletManagerArkade extends WalletManager {\n  // inherited from @tetherto/wdk-wallet WalletManager\n  static getRandomSeedPhrase(wordCount?: 12 | 24): string\n  static isValidSeedPhrase(seedPhrase: string): boolean\n\n  constructor(seed: string | Uint8Array, config?: ArkadeWalletConfig)\n  getAccount(index?: number): Promise<WalletAccountArkade>\n  getAccountByPath(path: string): Promise<WalletAccountArkade>\n  getFeeRates(): Promise<{ normal: bigint; fast: bigint }>\n  dispose(): Promise<void>\n}\n```\n\n### WalletAccountReadOnlyArkade\n\n```typescript\nclass WalletAccountReadOnlyArkade {\n  getAddress(): Promise<string>\n  getBoardingAddress(): Promise<string>\n  getBalance(): Promise<bigint>\n  getTransactionHistory(): Promise<ArkTransaction[]>\n  verify(message: string, signature: string): Promise<boolean>\n  getTransactionReceipt(hash: string): Promise<unknown | null>\n  getTokenBalance(tokenAddress: string): Promise<bigint>\n  quoteSendTransaction(tx: Transaction): Promise<{ fee: bigint }>\n  quoteTransfer(options: TransferOptions): Promise<{ fee: bigint }>\n}\n```\n\n### WalletAccountArkade\n\n```typescript\nclass WalletAccountArkade extends WalletAccountReadOnlyArkade {\n  readonly path: string             // full BIP-86 derivation path\n  readonly index: number            // path leaf (last segment)\n  readonly keyPair: { publicKey: Uint8Array; privateKey: Uint8Array | null }\n  readonly arkadeSwaps: ArkadeSwaps | null\n\n  sendTransaction(tx: Transaction): Promise<{ hash: string; fee: bigint }>\n  quoteSendTransaction(tx: Transaction): Promise<{ fee: bigint }>\n  transfer(options: TransferOptions): Promise<TransferResult>\n  sign(message: string): Promise<string>\n  subscribeToIncomingFunds(callback: (coins: IncomingFunds) => void): Promise<() => void>\n  toReadOnlyAccount(): Promise<WalletAccountReadOnlyArkade>\n  dispose(): void\n  createLightningInvoice(amount: number, description?: string): Promise<{ invoice: string; paymentHash: string }>\n  waitForLightningPayment(invoice: string): Promise<{ txid: string }>\n  getPendingLightningReceives(): Promise<PendingReverseSwap[]>\n  getPendingLightningSends(): Promise<PendingSubmarineSwap[]>\n  getSwapHistory(): Promise<(PendingReverseSwap | PendingSubmarineSwap | PendingChainSwap)[]>\n  getLightningLimits(): Promise<LimitsResponse>\n  getLightningFees(): Promise<FeesResponse>\n}\n```\n\n### Package Exports\n\n`@arkade-os/wdk` exports three values:\n\n- `default` — `WalletManagerArkade`\n- `WalletAccountArkade`\n- `WalletAccountReadOnlyArkade`\n\nThe modules under `src/lib/` (address detection, BIP21, BOLT11, LNURL, fees, formatting, send routing) back the destination auto-detection that `sendTransaction()` performs and are not part of the package's public API.\n\n## Configuration\n\n```typescript\nimport type { ArkadeWalletConfig } from '@arkade-os/wdk'\n\nconst config: ArkadeWalletConfig = {\n  arkServerUrl: 'https://arkade.computer',\n  // Optional: enables Lightning send/receive.\n  // swapProviderUrl: 'https://api.boltz.exchange',\n}\n```\n\n`ArkadeWalletConfig` extends the WDK `WalletConfig` and the `@arkade-os/sdk` `WalletConfig` (minus `identity`, which the manager fills in from the derived HD key) plus an optional `swapProviderUrl`.\n\nCommon fields:\n\n| Field | Required                      | Purpose |\n|-------|-------------------------------|---------|\n| `arkServerUrl` | either this or `arkProvider`  | URL used to construct a `RestArkProvider`. |\n| `arkProvider` | either this or `arkServerUrl` | A pre-built `ArkProvider` instance — useful for tests or custom transports. |\n| `swapProviderUrl` | optional                      | Boltz API URL. Enables `createLightningInvoice`, Lightning send via `sendTransaction`, and the swap query methods. |\n| `storage` | optional                      | `{ walletRepository, contractRepository }`. Defaults to in-memory repositories; pass persistent ones (e.g. SQLite-backed) to keep VTXO state across restarts. |\n| `swapRepository` | optional                      | Boltz swap state storage. Forwarded into `ArkadeSwaps` when `swapProviderUrl` is set. |\n\nThe manager fetches `arkProvider.getInfo()` once at construction time (with a single retry on failure) and reuses the result for fee rates, network detection, and wallet initialization. `Wallet.create` is wrapped in a 30-second timeout; the rejection mentions the unreachable Arkade server so misconfigurations surface quickly.\n\n## Temporary Workarounds\n\n### Arkade balances resolve on the RN side\n\nThe normal WDK path for balances is: RN provider -> HRPC `getAddressBalance` -> worklet. Arkade now takes a different route: the RN provider initializes an `@arkade-os/wdk` account locally with Expo adapters and asks that account for its total balance.\n\nCurrent Arkade balance path:\n- RN provider -> `WalletAccountArkade.getBalance()`\n- `getBalance()` -> SDK `wallet.getBalance().total`\n- provider may subtract current boarding UTXOs via `getBoardingAddress()` and `esploraUrl` before presenting spendable Arkade / Lightning balance\n\nThis keeps the SDK wallet encapsulated inside the account classes and leaves Arkade-specific balance shaping in the provider layer instead of expanding the wallet API.\n\n### Transaction history uses HRPC (not a workaround)\n\nUnlike balances, transaction history goes through the full HRPC path: RN provider -> HRPC `getTransactionHistory` -> worklet -> SDK `wallet.getTransactionHistory()`. The SDK returns `ArkTransaction[]` which is serialized as JSON through HRPC and mapped to the provider's `Transaction` interface on the RN side.\n\n## Git Submodules and Patches\n\nThe `packages/` and `examples/` directories are git submodules pointing at upstream repositories we don't have write access to. Local modifications are stored as patch files under `./patches/` and applied on top of pinned upstream commits.\n\n### Submodules\n\n| Path | Pinned at |\n|------|-----------|\n| `packages/pear-wrk-wdk` | one commit before `v2.0.0-beta.1` (commit `ed8cd00`) |\n| `packages/wdk-react-native-provider` | one commit past `v1.0.0-beta.3` (commit `79462d4`) |\n| `examples/wdk-starter-react-native` | `develop` (commit `f010fda`) |\n\nRun `git submodule status` to confirm the pinned commit hashes in the parent repo.\n\n### After cloning\n\nUse the setup script — it initializes submodules, applies all patches, installs dependencies, builds the root package, and links everything for local development:\n\n```bash\nnpm run setup:dev\n```\n\n> [!TIP]\n> To run the example app: `cd examples/wdk-starter-react-native && npm run android # or ios`\n\nIf you only need to (re-)apply patches without running the rest of the setup:\n\n```bash\nnode scripts/apply-patches.js          # apply all patches\nnode scripts/apply-patches.js --check  # dry-run (verify they apply cleanly)\n```\n\n### Editing a submodule\n\nSubmodule working trees are kept dirty: the patches in `./patches/` are applied on top of the pinned upstream commits. To make a change:\n\n1. Edit files inside the submodule directly:\n   ```bash\n   cd packages/wdk-react-native-provider\n   # ... edit files ...\n   ```\n\n2. From the parent repo, regenerate the patch:\n   ```bash\n   cd ../..\n   node scripts/generate-patches.js\n   ```\n   The script defaults to the SHA the parent repo has pinned for each submodule, so the patch only captures your local changes — not divergence from upstream.\n\n3. Commit the updated patch in the parent repo:\n   ```bash\n   git add patches/wdk-react-native-provider.patch\n   git commit -m \"Update wdk-react-native-provider patch\"\n   ```\n\n### Provider build\n\nAfter editing provider source, regenerate bundles and type definitions before committing:\n\n```bash\ncd packages/wdk-react-native-provider\nnpm run prepare   # runs bob build + gen:secret-manager-bundle + gen:worker-bundle\n```\n\nThis re-bundles the worklet (picking up any HRPC schema changes from `pear-wrk-wdk`) and type-checks with the stricter `bob build` settings.\n\n## Releasing to npm\n\nReleases are driven from a local workstation by `scripts/release.js` (invoked through `npm run release`). There is no automated release pipeline.\n\n### Prerequisites\n\n- npm account with access to the `@arkade-os` org\n- Logged in: `npm login`\n- Working tree on the commit you want to publish (the release script does not bump the version itself)\n\n### Steps\n\n1. Bump the version with `--no-git-tag-version` (the release script creates the tag itself; using plain `npm version` would create the tag twice and the script would refuse to run):\n   ```bash\n   npm version --no-git-tag-version patch   # or minor / major\n   git commit -am \"Bump version\"\n   git push\n   ```\n\n2. Run the release script:\n   ```bash\n   npm run release\n   ```\n   It reads the version from `package.json`, creates the `vX.Y.Z` tag locally, runs `npm publish` (which fires the `prepublishOnly` hook that regenerates type declarations in `types/`), and pushes the tag to `origin`. If publish fails the tag is removed so a retry can re-tag the same commit.\n\nOnly `src/` and `types/` are included in the tarball (per the `files` field in `package.json`).\n\n## CI\n\n`.github/workflows/ci.yml` runs on every push and pull request targeting `master`. The job uses Node.js 22 and runs:\n\n```bash\nnpm ci\nnpm run lint    # eslint + tsc --noEmit via jsconfig.json\nnpm test        # node --test src/__tests__/*.test.js\n```\n\nTests use Node's built-in test runner — no extra framework or runtime dependency is required.\n\n## Development\n\n```bash\nnpm install\nnpm run lint\nnpm run format\n```\n\nTesting:\n\n```bash\nnpm test\n```\n\n## License\n\nMIT\n\n## Resources\n\n- [WDK Documentation](https://docs.wallet.tether.io/sdk)\n- [Arkade SDK](https://github.com/arkade-os/ts-sdk)\n- [Arkade Documentation](https://docs.arkadeos.com)\n- [Boltz Exchange](https://boltz.exchange)\n","readmeFilename":"README.md"}