Skip to content

Harden the RGB Lightning wallet runtime - #41

Merged
Jainakin merged 35 commits into
UTEXO-Protocol:devfrom
Jainakin:hardik/mobile-wallet-wdk-runtime
Sep 1, 2026
Merged

Harden the RGB Lightning wallet runtime#41
Jainakin merged 35 commits into
UTEXO-Protocol:devfrom
Jainakin:hardik/mobile-wallet-wdk-runtime

Conversation

@Jainakin

@Jainakin Jainakin commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Summary

Publishes the WDK integration surface used by Iris Wallet for production-oriented Bitcoin, RGB, Lightning, VSS, and wallet lifecycle management.

This change keeps native work behind one typed account API and adds:

  • coherent, validated wallet snapshots with durable provenance
  • explicit RGB wallet UTXO preparation and receipt metadata
  • deterministic on-chain send plans and Lightning fee evidence
  • external-signer unlock start/status/adopt/cancel contracts
  • stable VLS signer storage identity and restart-safe manager disposal
  • LSP discovery policy parsing and supported-asset validation
  • bounded, exact-shape RGB contract and transfer-consignment import APIs
  • strict address-attested APay registration across Bare and Node
  • stricter native error propagation, backend configuration, and invoice metadata validation

Address-attested APay

enableLightningAddress() now resolves the LSP-provisioned address before submitting exactly one apayNewWithAddress(hostNodeId, username, domain) batch. The default path fails closed if the signed native capability is unavailable. Legacy apayNew remains available only through the explicit { requireAddressAttestation: false } compatibility policy.

The LSP address lookup tolerates the bounded provisioning window, while malformed or permanently missing addresses fail without registering a hash batch. The package smoke consumes the minimum published Node peer and asserts that its native SdkNode exposes apayNewWithAddress.

Native dependency status

  • rgb-lightning-node #144 is merged at f30a5393268de67c6bb5a1c525bc790c5b11afa2; RLN owns the signed APay implementation.
  • rgb-lightning-node-bare #19 is merged at bd11dad0b27b722cc868d79fff040420dccdd741 and released as @utexo/rgb-lightning-node-bare@0.1.0-beta.20.
  • rgb-lightning-node-nodejs #20 is merged at 2cb58b4611c687f77a3cf19c93348050907793de and released as @utexo/rgb-lightning-node-nodejs@0.1.0-beta.16.
  • rgb-lightning-node-nodejs #21 repairs release-time addon provenance recording without weakening the integrity check; it is merged at 1a446b9932c2dce5c40117bcaae752dd083edd80.
  • WDK minimum peers are now @utexo/rgb-lightning-node-bare >=0.1.0-beta.20 <0.2.0 and @utexo/rgb-lightning-node-nodejs >=0.1.0-beta.16 <0.2.0.

Validation

  • npm ci --ignore-scripts
  • npm run lint
  • npm run check:types
  • npm test -- --runInBand --no-watchman: 22 suites and 682 tests passed
  • npm run check:package
  • node scripts/verify-peer-releases.mjs: both exact minimum peers resolved from npm
  • npm audit --omit=dev --audit-level=high: 0 vulnerabilities
  • fresh WDK pull-request CI passed on a3370badc4279fa8dfb20c93eef2e02fa871c2bb
  • clean-consumer WDK smoke against the published Node beta.16 package passed and loaded the native signed-APay capability
  • Node release: five native targets built, smoke-tested, and published
  • Bare release: seven static libraries and seven Bare prebuilds built, smoke-tested where applicable, and published

Why this remains draft

The package chain is released, but Iris Wallet still pins older Git revisions and its LSP bootstrap currently invokes legacy apayNew directly. The app must repin the released native/WDK chain, resolve its LSP-provisioned address, persist registration intent, and invoke the signed API without creating a legacy batch first.

After that consumer migration, the remaining gates are fresh-create, restore, background, crash/restart, APay refill, and funded Signet interoperability tests on release-equivalent iOS and Android builds.

Jainakin added 30 commits July 28, 2026 19:38
# Conflicts:
#	tests/types-contract.ts
@Jainakin
Jainakin changed the base branch from main to dev September 1, 2026 18:04
@Jainakin
Jainakin marked this pull request as ready for review September 1, 2026 18:04
@Jainakin
Jainakin merged commit e467bdc into UTEXO-Protocol:dev Sep 1, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant