<>ts-stack
Get StartedArchitecturePackagesSpecsGuides
⌘K
Reference
Home
Get StartedOverviewInstallChoose your stackKey concepts
ArchitectureOverviewStack layersBEEF (BRC-62)BRC-100 Wallet InterfaceIdentity & AuthConformance pipeline
PackagesOverviewSDKWallet
@bsv/wallet-toolbox@bsv/btms@bsv/btms-permission-module@bsv/wallet-relay@bsv/wallet-toolbox-examples
NetworkOverlaysMessagingMiddlewareHelpers
InfrastructureOverviewmessage-box-serveroverlay-serveruhrp-server-basicuhrp-server-cloud-bucketwabwallet-infrachaintracks-serverwebrtpay-relay
SpecsOverviewBRC-100 Wallet InterfaceOverlay HTTPMessage-box HTTPAuthsocket (WebSocket)BRC-31 Auth HandshakeBRC-29 Peer PaymentBRC-121 / HTTP 402ARC BroadcastMerkle ServiceStorage AdapterGASP SyncUHRPAir-Gap Optical (BRC-141)
ConformanceOverviewVector catalogTS runnerContributing vectors
GuidesOverviewIdentity, DIDs and credentialsIdentity migrationBuild a wallet-aware appRun an overlay nodePeer-to-peer messagingHTTP 402 payments
ReferenceOverviewBRC indexRepository health
AboutVersioningContributingDoc agentDocumentation sources
npmhttps://www.npmjs.com/package/@bsv/wallet-toolbox-mobilev2.18.1API reference (TypeDoc) ↗
Loading…
Edit this page on GitHub
© 2026 BSV Blockchain. ts-stack is open-source.
GitHubContributingVersioning

@bsv/wallet-toolbox-mobile

nLockTime finality

The 2.18.1 source candidate makes nLockTimeIsFinal apply the node's rule for the next block: a height lock time below tip + 1 and a time lock time below the median time past of the last eleven headers (BIP113), instead of the tip height and the wall clock. Inputs with an omitted sequence count as final. No API, wire or schema migration is required. Source is not publication or deployment.

Broadcaster service errors

The 2.18.1 source candidate scores broadcaster answers that judge nothing about the transaction as service errors: ARC HTTP 401 and 403 (a keyless request to the default arc.taal.com, or a refused key), WhatsOnChain 401, 403, 408, exhausted 429 and 5xx answers that relay no node refusal, and a Bitails per- transaction connection reset. Such a transaction now stays queued for retry or fails over instead of being marked invalid with its inputs released. No API, wire, configuration or schema migration is required. Source is not publication or deployment.

sendMax from unproven change

The 2.18.1 source candidate lets a sendMax (maxPossibleSatoshis) createAction be funded from unproven change when the wallet holds no confirmed coins, instead of failing with an invalid output amount. No API, wire or schema migration is required. Source is not publication or deployment.

Certificate pagination

The 2.17.0 source candidate reports listCertificates totalCertificates as the size of the matching set at every offset, including full and empty later pages in IndexedDB. Non-empty final pages use the skipped rows plus the page; other pages count without a page window. User, deletion, type and certifier filters and returned certificate fields are unchanged. Upgrade the affected local storage package or remote Storage service to receive corrected totals. No API, wire or schema migration is required.

Permission-module spending authorization

Spending authorization accounts for the inputs and outputs that permission modules pass to the wallet, including token funding and change. Caller input descriptions remain attached to their outpoints when a module reorders inputs. Output descriptions follow the metadata retained by copied or reordered outputs, including outputs with identical scripts and amounts. New module entries with no caller description use the existing description fallback. Requested-output verification, exact wallet-spend checks and storage service-charge accounting remain enforced. No API, wire or stored-data migration is required.

Coordinated 2.17.0 version

The 2.17.0 source candidate preserves the required version lockstep with the core and browser client distributions. The new setup-factory actionBatchMode option belongs to those distributions; the mobile entry point exports neither Setup nor SetupClient. Existing mobile Wallet construction, its actionBatchMode option and default auto behavior remain unchanged. No mobile consumer or storage migration is required. Publication is separate from this source candidate.

The 2.15.3 source candidate restores ordinary import of exactly framed legacy AtomicBEEF with surplus unrelated branches. It retains the declared payment and its dependencies, reruns strict SDK argument validation, and preserves native proof, ownership and receipt checks. Truncated, trailing and incomplete inputs remain rejected. No API, wire or schema migration is required. Upgrade the host and remote Storage separately; reconcile and retry the original import instead of creating or broadcasting a replacement payment. Source is not publication or deployment.

The candidate now captures immutable journal field artifacts with a distinct metadata/extent encoding and version-four binding. The actual pinned source hashes every field, stores repeated content once, rehashes its replay and captures streamed notification identities in bounded profile-filtered batches. Content-index metadata enters the artifact hash chain, and READY waits for physical source closure. The existing archive quotas, row/version-three APIs and HTTP advertisements remain unchanged. Remote field transport, destination cache/semantic promotion and primary handoff still require integration and full qualification.

The held #569 candidate adds an internal bounded logical journal-field source and verified native content-staging connection. Client/mobile journal artifact capability and packet encoding remain unchanged; remote field transfer/promotion and remote primary handoff still need implementation. Exact leading U+FEFF, NUL and astral SQL text survives the existing journal frame format. This component does not establish complete large-field sync or production readiness.

The unpublished 2.15 candidate exports the portable resumable sync API. Remote destinations retain exclusive execution unless a future capability explicitly guarantees safe concurrency; this package does not acquire a local native database. See the sync contract and rollout guide.

@bsv/wallet-toolbox-mobile is the React Native and mobile-safe Wallet Toolbox distribution. It includes wallet, signer, services, monitoring, and remote storage surfaces without Knex, SQLite/MySQL, IndexedDB, or Node-only IO. BRC-177 anchors cover both the delivery and an economic reclaim. When the reclaim floor is larger, the protected action pays the bounded surplus as miner fee while retaining no wallet change. Upgrade the active storage implementation to receive this funding fix; no wire or database migration is required.

Prepared BEEF persistence remains a server-side Knex capability. Mobile remote storage uses the canonical path, and compatible remote servers can enable the optimization without a mobile configuration or wire change.

The built-in BRC-177 p nosend expiry module delegates durable expiry monitoring and pre-signed reclaim submission to its 2.11-compatible active remote storage service, so mobile process suspension does not restart or lose an expiry. Wallet snapshots are wallet-equivalent secrets and belong only in the iOS Keychain, Android Keystore-backed encrypted storage, or a comparably trusted store, never ordinary AsyncStorage, logs, analytics, or unprotected backups. Remote storage and credential-bearing Arcade SSE require HTTPS except for explicit loopback development, and transport debugging cannot expose credentials. Spending approvals are never cached or coalesced; certificate acquisition and identity discovery require valid certifier signatures before storage or trust scoring. Related mobile noSend chains retain local action batching, while unrelated actions cannot join or commit the active workspace. Supported remote providers can resume a soft-expired workspace using its exact persisted inputs. WalletStorageManager.getStores() retains each remote provider's configured endpointURL after production bundlers minify class names, so backup selection and make-primary flows remain stable. Immediate mobile actions can chain wallet-managed change from a delayed parent; the wallet first exhausts completed and unproven liquidity and uses exact serialized-cost comparison only for pathological settled plans. Pending funds are never hidden. New and migrated wallets progressively prefer useful 5,000-satoshi liquidity units without gathering inputs merely to create them. Durable permission tokens retain delayed broadcast so permission approval does not inherit network latency. Opt-in remote-storage timing spans retain trace and parent-span correlation in the telemetry sink without adding headers to authenticated requests.

The mobile distribution also exposes the WAB UMP ambiguity fallback and OTP-verified startPhoneNumberChange / completePhoneNumberChange flow. A settings UI may submit the current number to force a fresh presentation hash; it must persist the wallet snapshot immediately after success. Mobile authentication accepts one verified matching UMP token as an existing account. When no token verifies, one clean empty overlay response establishes a new account even if other hosts fail or return malformed records.

The mobile build includes the fetch-based, credential-free ChainTracks v2 client and reconnecting SSE adapter without Node-only modules. Public defaults cover mainnet, testnet, and TerraTestNet; STN/TSTN and regtest use an injected or configured endpoint.

The portable local controller coalesces stale height refresh and immutable object loads, applies failed-load backoff, and validates through the asynchronous InlineBulkFileDataValidator without importing Node worker or filesystem code.

Local recovery capability boundary

The coordinated 2.15.0 candidate preserves this wrapper's ordinary API and SDK peer range. The core package's new SQLite action/funding controllers are separate Node deep imports. This wrapper does not expose them or grant IndexedDB, mobile or remote storage a durable operation journal. If a host separately adopts core recovery, preserve its complete wallet database and keys and reconcile outstanding operations before rollback; ordinary entity export/sync omits that auxiliary state. See local action recovery.

Broadcast result completion in the 2.14.9 source candidate preserves an already unmined or completed request while returning the actual provider outcome. A successful first receipt without a mining proof therefore no longer fails with an internal unknown-status error on shared storage or after concurrent storage-worker progress. Negative provider outcomes still reject that receipt; repeat successful receipt remains idempotent. Upgrade the implementation performing broadcast/internalization after protected publication. No public API or wire migration is required. Remote SQL storage adds a durable user/TXID receipt claim while preserving historical rows; back up and preflight before coordinating all serving storage instances in the rollout. This candidate does not deploy hosted storage or repair older partial receipts automatically.

Backup and recovery

Recover both key material and wallet records; a manager snapshot or device keystore alone is not a complete data backup. App removal or device loss can remove locally retained secrets and state. Test the independent key and data recovery paths on a replacement device. Use the recovery guide, BRC-38/39 integration and recovery drill. The portable helpers require a concrete provider and a tested consistency/resource-limit strategy.

Install

bash
npm install @bsv/wallet-toolbox-mobile @bsv/sdk

Use

ts
import {
  Services,
  StorageClient,
  Wallet,
  WalletSigner,
  WalletStorageManager
} from '@bsv/wallet-toolbox-mobile'

The package publishes react-native, import ESM, and CommonJS conditions with matching declarations. Its installed-consumer gate bundles the exact tarball with Metro, checks the mobile-safe module boundary, compiles optimized Hermes bytecode, validates source maps, and enforces size budgets.

This single bundle also exports WalletMonitorTask (the base class for a custom task passed to Monitor.addTask), attemptToPostReqsToNetwork with its PostReqsToNetworkResult type, parseJsonRpc / stringifyJsonRpc (the storage remoting wire format), and verifyUnlockScripts with its UnlockScriptVerificationResult type, so a host no longer needs an unsupported deep import to reach them:

ts
import {
  WalletMonitorTask,
  attemptToPostReqsToNetwork,
  parseJsonRpc,
  stringifyJsonRpc,
  verifyUnlockScripts
} from '@bsv/wallet-toolbox-mobile'

Native requests are not governed by browser CORS, while WebView and hybrid clients can be. Remote Storage should remain reachable by intended public clients unless an operator explicitly configures an allowlist. Authentication and authorization remain service-layer controls.

See the package README for remote storage setup and supported runtime assumptions.

License

Apache License 2.0. See the package license.

Faucet output authorization

The source candidate adds exact completed-action binding for independently validated local storage fees and change. The SDK capability marker is completeBoundAction.outputAuthorizationVersion=1; upgrade the wallet and SDK together. Existing SDK2 peers retain strict behavior. The separate SDK3 migration still applies; SDK2 consumers need an additive backport or that migration. Serialized wallet results do not carry local authority. The fee fix does not change signup persistence or interrupted-funding reconciliation. See the package README and release and migration ledger.