@bsv/expo-wallet-toolbox 0.4.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +547 -0
- package/README.md +19 -1
- package/assets/sounds/vault-deposit.wav +0 -0
- package/assets/sounds/vault-withdraw.wav +0 -0
- package/core/amountFormatHelpers.ts +238 -34
- package/core/backup/RemoteSyncReader.ts +2 -5
- package/core/backup/codec.ts +2 -2
- package/core/backup/push.ts +1 -1
- package/core/config.tsx +16 -1
- package/core/contacts/contactActivity.ts +153 -0
- package/core/contacts/contactCache.ts +41 -0
- package/core/contacts/contactsStore.ts +183 -0
- package/core/context/VaultContext.tsx +8 -11
- package/core/context/WalletConnectionContext.tsx +137 -52
- package/core/context/WalletContext.tsx +464 -30
- package/core/demo/demoAssets.ts +60 -0
- package/core/demo/demoLedger.ts +240 -0
- package/core/demo/demoMandalaRuntime.ts +96 -0
- package/core/demo/demoMode.ts +38 -0
- package/core/demo/demoWallet.ts +25 -0
- package/core/demo/index.ts +26 -0
- package/core/demo/useDemo.ts +59 -0
- package/core/headers/OfflineFirstChaintracks.ts +52 -14
- package/core/headers/headerStore.ts +7 -10
- package/core/hooks/useConfirmationSound.ts +14 -8
- package/core/i18n/translations.tsx +4562 -986
- package/core/identity/contactLink.ts +36 -0
- package/core/identity/handleRegistry/client.ts +285 -0
- package/core/identity/handleRegistry/profileCert.ts +254 -0
- package/core/identity/handleRegistry/registration.ts +559 -0
- package/core/identity/handleRegistry/resolver.ts +247 -0
- package/core/identity/handleRegistry/rules.ts +104 -0
- package/core/index.ts +116 -15
- package/core/localpay/build.ts +674 -37
- package/core/localpay/codec.ts +68 -5
- package/core/localpay/pending.ts +240 -22
- package/core/localpay/pendingAborts.ts +5 -1
- package/core/localpay/settlementAck.ts +149 -0
- package/core/localpay/types.ts +14 -1
- package/core/localpay/verify.ts +118 -69
- package/core/mandala/abortGuard.ts +134 -0
- package/core/mandala/basketMigration.ts +166 -0
- package/core/mandala/bundle.ts +244 -0
- package/core/mandala/createRuntime.ts +2437 -0
- package/core/mandala/drain.ts +670 -0
- package/core/mandala/permissionModule.ts +642 -0
- package/core/mandala/resendTransfer.ts +175 -0
- package/core/mandala/runtime.ts +357 -0
- package/core/mandala/settlementStore.ts +412 -0
- package/core/mandala/types.ts +290 -0
- package/core/monitor/MonitorSupervisor.ts +121 -0
- package/core/monitor/TaskBackupPush.ts +1 -1
- package/core/monitor/TaskCreditInbox.ts +1 -1
- package/core/monitor/TaskDrainOutbox.ts +1 -1
- package/core/monitor/TaskSendOffline.ts +1 -1
- package/core/net/online.ts +49 -0
- package/core/numberFormat.ts +19 -0
- package/core/offline/cancelParked.ts +94 -1
- package/core/offline/payerHold.ts +152 -12
- package/core/offline/plan.ts +1 -1
- package/core/offline/tokenFrames.ts +197 -0
- package/core/parsePeerPayURI.ts +70 -17
- package/core/pay/rails/address.ts +51 -3
- package/core/pay/rails/handle.ts +88 -9
- package/core/pay/rails/index.ts +16 -6
- package/core/pay/rails/nearby.ts +114 -4
- package/core/pay/recordProof.ts +2 -6
- package/core/services/arcadeBroadcastProvider.ts +1 -4
- package/core/services/capWalletArgs.ts +8 -9
- package/core/services/exchangeRate.ts +1 -1
- package/core/services/externalOrigin.ts +42 -0
- package/core/services/vault/VaultKeyService.ts +912 -251
- package/core/services/vault/ceremony.ts +435 -367
- package/core/services/vault/ceremonyHost.ts +27 -21
- package/core/services/vault/devMock.ts +30 -7
- package/core/services/vault/driver.ts +95 -41
- package/core/services/vault/guard.ts +514 -56
- package/core/services/vault/hardwareLease.ts +22 -0
- package/core/services/vault/mockYubiKey.ts +258 -90
- package/core/services/vault/pivReset.ts +145 -0
- package/core/services/vault/r1comb.ts +976 -0
- package/core/services/vault/session.ts +93 -26
- package/core/services/vault/transfers.ts +2617 -747
- package/core/services/vault/types.ts +100 -43
- package/core/services/vault/vaultStore.ts +991 -74
- package/core/services/walletConnectionValidation.ts +293 -0
- package/core/services/walletServiceConfig.ts +31 -20
- package/core/storage/StorageExpoSQLite.ts +420 -87
- package/core/storage/dbImage.ts +48 -0
- package/core/storage/methods/findSql.ts +3 -54
- package/core/storage/methods/listActionsSql.ts +8 -5
- package/core/storage/methods/listOutputsSql.ts +9 -5
- package/core/storage/methods/offlineActions.ts +15 -0
- package/core/storage/methods/processOfflineActions.ts +265 -9
- package/core/storage/methods/reviewStatusSql.ts +7 -2
- package/core/storage/methods/walletBalanceSql.ts +16 -4
- package/core/storage/schema/createTables.ts +152 -0
- package/core/storage/sqlUpdateValue.ts +24 -0
- package/core/toolboxConfig.ts +182 -1
- package/core/toolboxTypes.ts +40 -0
- package/core/userAvatar.ts +79 -0
- package/core/walletMonitor.ts +8 -3
- package/core/walletRepair/runWalletCheck.ts +19 -2
- package/package.json +31 -30
- package/ui/activityFilter.ts +115 -0
- package/ui/components/QRScanner.tsx +1 -1
- package/ui/components/pay/AdmissionNotice.tsx +99 -0
- package/ui/components/pay/AssetPicker.tsx +184 -0
- package/ui/components/pay/AvailableBalance.tsx +33 -2
- package/ui/components/pay/HandleReceive.tsx +213 -50
- package/ui/components/pay/NearbyFlow.tsx +616 -69
- package/ui/components/pay/PayForm.tsx +73 -8
- package/ui/components/pay/PaymentSuccessOverlay.tsx +89 -8
- package/ui/components/pay/RecipientField.tsx +132 -73
- package/ui/components/pay/RequestHub.tsx +68 -8
- package/ui/components/pay/ResultBanner.tsx +41 -4
- package/ui/components/pay/StepBar.tsx +32 -0
- package/ui/components/pay/UniversalSend.tsx +1118 -86
- package/ui/components/pay/tokenSendCopy.ts +116 -0
- package/ui/components/pay/useRecipientInput.ts +36 -7
- package/ui/components/ui/PencilEditField.tsx +109 -0
- package/ui/components/ui/PermissionSheet.tsx +65 -4
- package/ui/components/ui/Sheet.tsx +9 -2
- package/ui/components/ui/SlideOverFromRight.tsx +86 -0
- package/ui/components/vault/EnrollWizard.tsx +1432 -488
- package/ui/components/vault/KeyChooser.tsx +96 -0
- package/ui/components/vault/VaultCeremonySheet.tsx +107 -43
- package/ui/components/vault/vaultErrorCopy.ts +145 -0
- package/ui/components/wallet/ActivityRow.tsx +283 -97
- package/ui/components/wallet/AmountInput.tsx +92 -28
- package/ui/components/wallet/AssetAmount.tsx +95 -0
- package/ui/components/wallet/AssetSwitcherDropdown.tsx +261 -0
- package/ui/components/wallet/ContactActivityList.tsx +149 -0
- package/ui/components/wallet/ContactSigil.tsx +49 -0
- package/ui/components/wallet/EditPictureSheet.tsx +99 -0
- package/ui/components/wallet/FitAmount.tsx +148 -0
- package/ui/components/wallet/IconPickerSheet.tsx +168 -0
- package/ui/components/wallet/IdentifierRow.tsx +69 -0
- package/ui/components/wallet/ImportFromBackupPrompt.tsx +35 -13
- package/ui/components/wallet/ProfileButton.tsx +62 -0
- package/ui/components/wallet/UserAvatar.tsx +85 -0
- package/ui/components/wallet/avatarIcons.ts +122 -0
- package/ui/components/wallet/tokenEviction.ts +65 -0
- package/ui/hooks/useContactsStore.ts +10 -0
- package/ui/hooks/useExportWalletData.ts +39 -0
- package/ui/hooks/useMandala.ts +320 -0
- package/ui/hooks/useOnline.ts +65 -20
- package/ui/hooks/useVaultBalance.ts +105 -7
- package/ui/hooks/useVaultCoverage.ts +52 -0
- package/ui/importDatabases.ts +7 -3
- package/ui/index.ts +75 -7
- package/ui/screens/ConnectionsScreen.tsx +46 -29
- package/ui/screens/ContactScreen.tsx +289 -0
- package/ui/screens/ContactsScreen.tsx +373 -0
- package/ui/screens/IdentifierScreen.tsx +234 -0
- package/ui/screens/NewContactScreen.tsx +362 -0
- package/ui/screens/PairScreen.tsx +12 -12
- package/ui/screens/PayScreen.tsx +145 -12
- package/ui/screens/ProfileScreen.tsx +783 -0
- package/ui/screens/SettingsScreen.tsx +18 -9
- package/ui/screens/TransactionDetailScreen.tsx +419 -0
- package/ui/screens/TrustScreen.tsx +1 -1
- package/ui/screens/VaultScreen.tsx +925 -171
- package/ui/screens/VaultTransferScreen.tsx +376 -123
- package/ui/screens/WalletCheckScreen.tsx +10 -1
- package/ui/screens/WalletConfigScreen.tsx +80 -16
- package/ui/screens/WalletHomeScreen.tsx +915 -139
- package/ui/screens/homeBadges.ts +9 -1
- package/ui/screens/tokenRowTitle.ts +68 -0
- package/ui/tokenFormat.ts +108 -0
- package/ui/tokenSeen.ts +75 -0
- package/ui/tokenStatus.ts +100 -0
- package/ui/txStatus.ts +43 -5
- package/assets/sounds/vault-close.wav +0 -0
- package/assets/sounds/vault-open.wav +0 -0
- package/core/services/vault/k1.ts +0 -75
- package/core/services/vault/sealing.ts +0 -84
- package/core/services/vault/vaultDerivation.ts +0 -152
- package/core/services/vault/vaultPassphrase.ts +0 -287
- package/ui/components/vault/PassphraseField.tsx +0 -306
- package/ui/components/vault/PhraseBackupSheet.tsx +0 -227
- package/ui/screens/VaultRecoverScreen.tsx +0 -226
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,552 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.0
|
|
4
|
+
|
|
5
|
+
0.6.0 was tagged in this file but never published to npm. Hosts upgrading from
|
|
6
|
+
0.5.0 should read both sections.
|
|
7
|
+
|
|
8
|
+
### @bsv dependency bump (breaking for hosts)
|
|
9
|
+
|
|
10
|
+
Peer ranges move to `@bsv/sdk` ^2.8.2, `@bsv/wallet-toolbox-mobile` ^2.14.0,
|
|
11
|
+
`@bsv/message-box-client` ^2.5.3, `@bsv/templates` ^1.10.3,
|
|
12
|
+
`@bsv/btms-permission-module` ^1.2.1 and `@bsv/air-gap` ^0.1.3.
|
|
13
|
+
|
|
14
|
+
`@bsv/wallet-toolbox-mobile` now ships as one bundle whose exports map exposes
|
|
15
|
+
only its root, so this package imports everything from the root. Types the
|
|
16
|
+
toolbox exports only under its `sdk` namespace come through
|
|
17
|
+
`core/toolboxTypes.ts`. From 2.14.0 the toolbox exports `WalletMonitorTask`,
|
|
18
|
+
`attemptToPostReqsToNetwork`, `parseJsonRpc`, `stringifyJsonRpc` and
|
|
19
|
+
`verifyUnlockScripts` itself, and ships the permissions-manager sendMax fix,
|
|
20
|
+
the relinquish and internalize basket checks and best-effort Monitor
|
|
21
|
+
subscriptions, so none of that is patched any more.
|
|
22
|
+
|
|
23
|
+
Hosts must carry this repo's two remaining `patches/` for those exact
|
|
24
|
+
versions: `@bsv+sdk+2.8.2.patch` (native secp256k1 and transaction-engine
|
|
25
|
+
routing) and `@bsv+wallet-toolbox-mobile+2.14.0.patch` (the Vault authorization
|
|
26
|
+
hooks, the Vault deposit funding plan, batched native key derivation and shadow
|
|
27
|
+
engine verification). The `@bsv/message-box-client` and `@bsv/templates`
|
|
28
|
+
patches are gone: 2.5.3 reports a send failure as
|
|
29
|
+
`Message Box send failed with HTTP 400 (ERR_DUPLICATE_MESSAGE).`, which
|
|
30
|
+
`isDuplicateMessageError` recognises, and both packages' CommonJS builds load
|
|
31
|
+
under Node again.
|
|
32
|
+
|
|
33
|
+
- `ADMIN_ORIGINATOR` is now `internal-admin.bsv-wallet.invalid`. @bsv/sdk 2.8
|
|
34
|
+
accepts only canonical hostnames as originators, so the old
|
|
35
|
+
`urn:bsv-wallet:internal-admin` label rejected every internal wallet call.
|
|
36
|
+
`parseExternalOrigin` refuses the whole `.invalid` TLD, and pending aborts
|
|
37
|
+
queued under the old label replay under the new one
|
|
38
|
+
(`LEGACY_ADMIN_ORIGINATOR`).
|
|
39
|
+
- `OfflineFirstChaintracks` takes an optional third `chain` argument and
|
|
40
|
+
answers `getChain` from it, and forwards the remote's `supportsReorgEvents`,
|
|
41
|
+
so the toolbox Monitor does not subscribe through the HTTP client at all. A
|
|
42
|
+
subscription that fails anyway resolves to an inert id instead of throwing,
|
|
43
|
+
so the Monitor's subscriptions settle once instead of failing, and fetching
|
|
44
|
+
the chain over the network, on every tick while offline.
|
|
45
|
+
- Header validation uses the toolbox's `validateHeaderProofOfWork`, which
|
|
46
|
+
checks the compact target encoding and honours its consensus exceptions.
|
|
47
|
+
|
|
48
|
+
### Transaction detail and activity words (breaking for direct callers)
|
|
49
|
+
|
|
50
|
+
- Tapping an activity row opens a full-screen transaction detail view, pushed
|
|
51
|
+
in from the right, instead of expanding the row in place. The utilities that
|
|
52
|
+
used to unfold under a row live in the view's overflow menu. New `ui`
|
|
53
|
+
exports: `TransactionDetailScreen` (default) with its `TransactionDetailParams`
|
|
54
|
+
and `TransactionAction` types, and `SlideOverFromRight` (default, props
|
|
55
|
+
`{ visible, onClosed?, children }`). `ActivityRow` takes an optional
|
|
56
|
+
`onOpen?: (action: ActivityAction) => void`; when given, a tap calls it and
|
|
57
|
+
the old inline expansion is not rendered. Its `token` prop gains an optional
|
|
58
|
+
`status?: TxStatusView`.
|
|
59
|
+
- The detail view's headline is the exact satoshi count the transaction moved,
|
|
60
|
+
never shortened or converted to BSV. When the display currency is fiat, the
|
|
61
|
+
fiat amount is a separate line beneath it. A `Block` row shows the block
|
|
62
|
+
height from local storage (one-row query, no network); an unproven
|
|
63
|
+
transaction reads "Waiting for a block." `StorageExpoSQLite` gains
|
|
64
|
+
`getProvenTxHeight(txid): Promise<number | null>`.
|
|
65
|
+
- A BSV row says what it did from the moment it is handed to the network:
|
|
66
|
+
`completed`, `unproven` and `sending` all read "Sent" or "Received" instead
|
|
67
|
+
of "Confirmed", "Accepted" and "Broadcasting". An outgoing action that no
|
|
68
|
+
Pay / Get paid rail made (no `peerpay`, `localpay`, `legacy` or `mandala`
|
|
69
|
+
label: a connected app or the wallet itself) reads "Spent". Vault deposits,
|
|
70
|
+
withdrawals and relocks read "Transferred" in either direction.
|
|
71
|
+
- `txStatusView(status, offlineStatus?, incoming?, labels?)` takes two new
|
|
72
|
+
optional arguments. **A host calling it directly must pass `incoming` (and
|
|
73
|
+
`labels`)**: without them, `completed`, `unproven` and `sending` now resolve
|
|
74
|
+
to "Spent". New exports from `ui/txStatus.ts`: `activityKind(incoming,
|
|
75
|
+
labels)`, the one place a row's word is decided, returning the new
|
|
76
|
+
`ActivityKind` (`'sent' | 'received' | 'spent' | 'transferred'`), and
|
|
77
|
+
`isPaymentAction(labels)`.
|
|
78
|
+
- Token (Mandala) rows use the same words: "Sent" or "Received" once settled,
|
|
79
|
+
"Pending" while settling. Only `refused`, `reversed` and `stuck` keep their
|
|
80
|
+
own word. New `ui` export `tokenRowStatusView(status, incoming)`.
|
|
81
|
+
- A row shows its status dot only when its tone is not the quiet settled one
|
|
82
|
+
(in flight, needs attention, failed), so a normal history is no longer a
|
|
83
|
+
column of dots.
|
|
84
|
+
|
|
85
|
+
### Activity filter and search
|
|
86
|
+
|
|
87
|
+
- A filter button beside Export opens a search field with All / Sent /
|
|
88
|
+
Received / Spent / Transferred chips; the list narrows as the user types or
|
|
89
|
+
picks a chip. Search matches every typed word, in any order, case- and
|
|
90
|
+
accent-insensitive, against the row's note (or the name recorded at send)
|
|
91
|
+
and a saved contact's name and handle for its counterparty. It is local only:
|
|
92
|
+
no network lookups, so a non-contact's handle is found only if the note says
|
|
93
|
+
it. A leading `@` is ignored. While a filter is active the list pages into
|
|
94
|
+
older history, and "No matching activity" shows only once history is
|
|
95
|
+
exhausted. Closing the panel clears the search and resets to All.
|
|
96
|
+
- The Export button reads "Export" (`tx_export`); its accessibility label is
|
|
97
|
+
still `tx_export_csv`. CSV export ignores the filter and writes the full
|
|
98
|
+
history.
|
|
99
|
+
|
|
100
|
+
### Amounts
|
|
101
|
+
|
|
102
|
+
- New `core` exports: `formatSatoshisExact(satoshis, showPlus?)`, the exact
|
|
103
|
+
satoshi count for the detail view; `splitAmountFraction(value)`, which splits
|
|
104
|
+
a formatted amount so its minor units can be drawn smaller; and
|
|
105
|
+
`getNumberLocale()`, the device locale every amount formatter prints through.
|
|
106
|
+
- `AmountFormatOptions` gains an optional `compact`, and `formatSatoshisAsBsv`
|
|
107
|
+
and `formatSatoshisAsFiat` gain a trailing `compact = false` parameter. With
|
|
108
|
+
it, large figures shorten to k / M / B (`$1.2k`, `1.5M BSV`), and a value
|
|
109
|
+
that rounds to 1000 of a unit promotes to the next one. Only activity rows
|
|
110
|
+
pass it. `abbreviate` still shortens only the unit word ("sats"), as in
|
|
111
|
+
0.6.0, so existing calls are unchanged.
|
|
112
|
+
- Currency symbols come from the toolbox's own table (`$` for USD, AUD, CAD and
|
|
113
|
+
NZD; `£`, `¥`, `₹`, `₽`, `zł`, `R$`, `Rp`) with `narrowSymbol`, not from
|
|
114
|
+
whatever the device language implies: a device that printed "US$" or "NZ$"
|
|
115
|
+
now prints `$`. Where `Intl.NumberFormat` throws (seen on Hermes), the
|
|
116
|
+
fallback prints that symbol before locale-formatted digits instead of the ISO
|
|
117
|
+
code ("USD 3.45"). Hosts with snapshot tests on formatted currency should
|
|
118
|
+
expect the symbol change.
|
|
119
|
+
|
|
120
|
+
### Home screen
|
|
121
|
+
|
|
122
|
+
- The balance stays on one line at any length: its type shrinks to fit the
|
|
123
|
+
available width, down to a 12pt floor, and grows back when a shorter value
|
|
124
|
+
follows. This replaces `adjustsFontSizeToFit`, which on iOS Fabric ignores
|
|
125
|
+
`minimumFontScale` and bottoms out at 4pt.
|
|
126
|
+
- Its minor units are drawn smaller and raised, price-tag style. Abbreviated
|
|
127
|
+
figures and whole amounts render as one run.
|
|
128
|
+
- Tapping the balance to switch currency has a descriptive accessibility label
|
|
129
|
+
naming the destination unit (`wallet_balance_show_in`, e.g. "Show in USD").
|
|
130
|
+
- Pay and Get paid show their icon beside the label, in pill-shaped buttons.
|
|
131
|
+
The import-from-backup card's icon sits in a filled circle, with corners
|
|
132
|
+
concentric with the screen's.
|
|
133
|
+
|
|
134
|
+
### Profile picture
|
|
135
|
+
|
|
136
|
+
- The user can pick an icon as their profile picture; Home's profile button
|
|
137
|
+
shows it, falling back to the previous person glyph when none is chosen.
|
|
138
|
+
New `core` exports: `getUserAvatarIcon`, `setUserAvatarIcon`,
|
|
139
|
+
`loadUserAvatarIcon`, `subscribeUserAvatar`, `useUserAvatarIcon`, and the
|
|
140
|
+
`AvatarIcon` / `AvatarIconFamily` types. New `ui` exports: `UserAvatar`
|
|
141
|
+
(default), `AvatarGlyph`, `AVATAR_ICON_GROUPS` with the `AvatarIconOption` /
|
|
142
|
+
`AvatarIconGroup` types, `IconPickerSheet` (default, props
|
|
143
|
+
`{ visible, onClose }`) and `EditPictureSheet` (default, props
|
|
144
|
+
`{ visible, options: EditPictureOption[], onClose }`) with
|
|
145
|
+
`EditPictureOption`.
|
|
146
|
+
|
|
147
|
+
### Handle registry fixes
|
|
148
|
+
|
|
149
|
+
- A typed `handle@domain` whose domain is complete in its own right resolves
|
|
150
|
+
as that domain: `alice@deggen.co` is no longer answered as a prefix of
|
|
151
|
+
`deggen.com`, which returned every `*@deggen.com` neighbour for an address
|
|
152
|
+
on someone else's registry.
|
|
153
|
+
- A half-typed prefix of the pinned domain that matches nothing returns an
|
|
154
|
+
empty result instead of the "search unavailable" banner.
|
|
155
|
+
- Registry search results are capped at 10 rows (`MAX_SEARCH_RESULTS`) before
|
|
156
|
+
any certificate is verified, so an uncapped response from a foreign registry
|
|
157
|
+
cannot freeze recipient search.
|
|
158
|
+
- A handle arriving through a deep-linked `/contact/add?handle=…` is checked
|
|
159
|
+
against the registry for the key it claims before it is written to
|
|
160
|
+
`cachedHandle`; an unproven one is left blank for the background refresh.
|
|
161
|
+
- Registry requests bound the response body by the same ~8s deadline as the
|
|
162
|
+
headers. Writes are serialized, so a stalled body used to block every later
|
|
163
|
+
write for the life of the process.
|
|
164
|
+
- An outstanding registration journal takes priority at every entry point
|
|
165
|
+
(`registerHandle`, `updateProfile`, `changeHandle`), not only on resume, so a
|
|
166
|
+
retried claim and release can no longer leave the user holding neither
|
|
167
|
+
handle.
|
|
168
|
+
- A rollback that finishes on a later launch still names the handle the user
|
|
169
|
+
tried to claim (`attemptedPaymail` in the pending journal).
|
|
170
|
+
- Failed writes carry a `code` (`invalid_handle`, `wrong_domain`,
|
|
171
|
+
`same_handle`, `clock_ahead`). Profile shows `clock_ahead` and `wrong_domain`
|
|
172
|
+
in the user's language; the other two still show the diagnostic message.
|
|
173
|
+
- A contact's screen tracks its avatar refresh and registry refresh
|
|
174
|
+
separately, so a registry lookup no longer suppresses the avatar refresh.
|
|
175
|
+
- In Pay, a registry display name that contains `@` is not shown as the
|
|
176
|
+
recipient's name (it falls back to the handle); the review card shows the
|
|
177
|
+
recipient's `handle@domain` rather than an abbreviated key; identity-search
|
|
178
|
+
and registry-search errors share one dismissible banner.
|
|
179
|
+
|
|
180
|
+
### Copy and translations
|
|
181
|
+
|
|
182
|
+
- 17 new keys, in all 12 languages, none removed: `tx_status_received`,
|
|
183
|
+
`tx_status_sent`, `tx_status_spent`, `tx_status_transferred`,
|
|
184
|
+
`tx_status_pending`, `tx_export`, `activity_filter`, `activity_filter_all`,
|
|
185
|
+
`activity_search_placeholder`, `activity_search_clear`,
|
|
186
|
+
`activity_filter_no_match`, `wallet_balance_show_in`, `tx_detail_block`,
|
|
187
|
+
`tx_detail_block_pending`, `profile_handle_clock_ahead`,
|
|
188
|
+
`profile_handle_wrong_registry`, `profile_display_name_publish_failed`.
|
|
189
|
+
`tx_status_confirmed`, `tx_status_accepted` and `tx_status_broadcasting` are
|
|
190
|
+
kept but no longer used by default.
|
|
191
|
+
- `biometric_advisory_body` is shorter in every language: "Protect your assets
|
|
192
|
+
with Face ID or your fingerprint".
|
|
193
|
+
|
|
194
|
+
### Fixes
|
|
195
|
+
|
|
196
|
+
- `TransactionDetailScreen` loads Ionicons lazily, like the rest of the
|
|
197
|
+
package, so importing the `ui` barrel under Jest no longer fails on
|
|
198
|
+
expo-font's ESM.
|
|
199
|
+
|
|
200
|
+
## 0.6.0
|
|
201
|
+
|
|
202
|
+
### Handle registry (breaking)
|
|
203
|
+
|
|
204
|
+
Handle registration talks to go-message-box-server's paymail profile registry
|
|
205
|
+
instead of a certifier that was never deployed. A handle is now
|
|
206
|
+
`handle@domain`: a self-signed BRC-52 profile certificate the registry stores
|
|
207
|
+
and anybody can verify. Spec:
|
|
208
|
+
`docs/superpowers/specs/2026-09-18-handle-registry-client-design.md`.
|
|
209
|
+
|
|
210
|
+
Removed exports and configuration:
|
|
211
|
+
|
|
212
|
+
- `core/identity/handleCertificate.ts` in full — `HANDLE_CERT_TYPE`,
|
|
213
|
+
`HandleCertWallet`, `isValidHandleFormat` (the 3-20 rule),
|
|
214
|
+
`HandleAvailability`, `checkHandleAvailability`, `registerHandle`,
|
|
215
|
+
`RegisterHandleResult`.
|
|
216
|
+
- `ToolboxConfig.handleCertifier`, `HandleCertifierConfig`,
|
|
217
|
+
`getHandleCertifierConfig`. Neither the type nor the getter was on the
|
|
218
|
+
public barrel; the config key was.
|
|
219
|
+
|
|
220
|
+
New:
|
|
221
|
+
|
|
222
|
+
- `ToolboxConfig.handleRegistry?: Partial<Record<AppChain, HandleRegistryConfig>>`
|
|
223
|
+
and `getHandleRegistryConfig(chain)`, both exported from the `core` barrel.
|
|
224
|
+
Fail-closed: a malformed or half-stated entry reads as no registry. `https`
|
|
225
|
+
is required except for localhost and RFC 1918 hosts in development.
|
|
226
|
+
- `mergeContactCache` / `ContactCache` (`core/contacts/contactCache.ts`).
|
|
227
|
+
- `core/identity/handleRegistry/` — `rules`, `profileCert`, `resolver`,
|
|
228
|
+
`client`, `registration`. Not on the barrel: the UI in this package is the
|
|
229
|
+
only consumer, and the surface is still settling.
|
|
230
|
+
|
|
231
|
+
Behaviour:
|
|
232
|
+
|
|
233
|
+
- The display name is **public** when set: a plaintext field of the profile
|
|
234
|
+
certificate, and the default name someone sees when they add you. The
|
|
235
|
+
in-app hint says so, in all 12 languages.
|
|
236
|
+
- Profile shows `handle@domain`, and the registry — not
|
|
237
|
+
`profile_registered_handle` — is the source of truth for which handle this
|
|
238
|
+
key holds, so a restored wallet gets its handle back.
|
|
239
|
+
- Every write is journaled in `key_value_store` (`profile_handle_pending`) and
|
|
240
|
+
replayed on the next Profile mount, so a crash, a double tap or a lost
|
|
241
|
+
response settles to the same state.
|
|
242
|
+
- Pay's recipient search gains a registry tier between contacts and the
|
|
243
|
+
overlay, and `RecipientField` shows its loading spinner as a footer instead
|
|
244
|
+
of replacing the list — the local contacts tier is no longer hidden for the
|
|
245
|
+
whole debounce.
|
|
246
|
+
- A query that is a complete `handle@domain` answers that row and nothing
|
|
247
|
+
else. The registry's own search is a prefix, skeleton and substring search,
|
|
248
|
+
so a typed address would otherwise be answered with its neighbours and its
|
|
249
|
+
look-alikes.
|
|
250
|
+
- `contacts.cachedHandle` has a production writer for the first time: the
|
|
251
|
+
`handle` route param on `/contact/add` (validated as a paymail — the route
|
|
252
|
+
is deep-linkable), and `ContactScreen`'s background refresh, which
|
|
253
|
+
distinguishes "the registry says there is none" from "the registry did not
|
|
254
|
+
answer" and only clears the column for the first.
|
|
255
|
+
- A handle is displayed without a prepended `@` wherever it already carries
|
|
256
|
+
its own domain: Profile, Contacts, a contact, and the Identifier QR screen.
|
|
257
|
+
|
|
258
|
+
## 0.5.0
|
|
259
|
+
|
|
260
|
+
### 1-of-N YubiKey vault (breaking)
|
|
261
|
+
|
|
262
|
+
The vault is rebuilt around the P-256 comb verifier: each enrolled YubiKey
|
|
263
|
+
signs vault inputs on the card, and the K1 sealed-seed design is gone. Spec:
|
|
264
|
+
`docs/superpowers/specs/2026-09-09-r1-comb-vault-design.md`.
|
|
265
|
+
|
|
266
|
+
Removed exports (`core` barrel):
|
|
267
|
+
|
|
268
|
+
- `sealing` (`SEAL_INFO`, `softwareEcdh`, `sealVaultKey`, `unsealVaultKey`);
|
|
269
|
+
`vaultDerivation` (`deriveVaultSeed`, `BIP32_KEYID_PREFIX`, `bip32KeyID`,
|
|
270
|
+
`indexFromKeyID`, `randomDepositStartIndex`, `deriveVaultHD`,
|
|
271
|
+
`depositPrivKey`, `depositPubKeyHash`); `vaultPassphrase`
|
|
272
|
+
(`VAULT_PASSPHRASE_MIN_BITS`, `RECOMMENDED_WORD_COUNT`,
|
|
273
|
+
`MINIMUM_WORD_COUNT`, `generatePassphrase`, `PassphraseVerdict`,
|
|
274
|
+
`PassphraseTier`, `PassphraseStrength`, `normalizeVaultPassphrase`,
|
|
275
|
+
`passphraseEntropyBits`, `checkVaultPassphrase`, `crackTimeSeconds`,
|
|
276
|
+
`formatCrackTime`, `passphraseStrength`); `k1` (`K1_LOCK_LEN`,
|
|
277
|
+
`K1_UNLOCK_LEN`, `VaultInstructions`, `encodeVaultInstructions`,
|
|
278
|
+
`decodeVaultInstructions`, `buildVaultLockingScript`).
|
|
279
|
+
- `SealedBlob`; the error codes `seal-corrupt`, `bad-passphrase`,
|
|
280
|
+
`bad-mnemonic`, `bad-derivation-index`, `backup-required`.
|
|
281
|
+
- `VaultKeyHandle`, `CeremonyController.requestKey`, `requestVaultKey`;
|
|
282
|
+
`CeremonyStoreView.getSeal`.
|
|
283
|
+
- `enrollVault`, `recoverVaultHD`, `resealToNewKey`, `PendingEnrollment`.
|
|
284
|
+
- `sweepVaultWithHD`; `VaultSpendResult.remainingInputs`; the `reason`
|
|
285
|
+
parameter of `depositToVault`; `VaultDriver.ecdh`; `vaultStore.getSeal` /
|
|
286
|
+
`setSeal` / `takeNextIndex`; meta v4 (`VaultMetaV4`).
|
|
287
|
+
|
|
288
|
+
New:
|
|
289
|
+
|
|
290
|
+
- `r1comb`: `buildLock`, `bakedCommitments`, `commitment`, `buildUnlock`,
|
|
291
|
+
`verifyVaultInput`, `sighashPreimage`, `signerDigest`, `pushTxDerCheck`,
|
|
292
|
+
`compressPubkey`, the exact v6 `VaultInstructions` codec, `R1C_LOCK_LEN`,
|
|
293
|
+
`R1C_UNLOCK_LEN` (on-chain format: spec
|
|
294
|
+
`docs/superpowers/specs/2026-09-09-r1-comb-vault-design.md` §2; codec in
|
|
295
|
+
`core/services/vault/r1comb.ts`).
|
|
296
|
+
- `vaultStore` meta v6: wallet-and-network-scoped `VaultKeyRecord`, recovery
|
|
297
|
+
adoption state, two-phase removal tombstones, enrollment drafts and
|
|
298
|
+
quarantine state; `isEnrolled()` is meta-only.
|
|
299
|
+
- `VaultKeyService`: `enrollKey`, `finalizeEnrollment(records)`,
|
|
300
|
+
`addVaultKey`, `VAULT_MIN_KEYS`, `VAULT_MAX_KEYS`, `EnrollPhase`.
|
|
301
|
+
- Ceremony: `VaultSigner { serial, pubkey, sign(digest, progress?), release() }`,
|
|
302
|
+
`CeremonyController.requestSigner(reason, chosenSerial)`,
|
|
303
|
+
`requestVaultSigner`, `VAULT_INPUTS_PER_TAP`, `CeremonyState.progress`,
|
|
304
|
+
`VaultProgress.signed/total`.
|
|
305
|
+
- Transfers: `depositToVault(w, adminOriginator, satoshis, opts?)` needs no
|
|
306
|
+
hardware; `withdrawFromVault(w, adminOriginator, amount, reason,
|
|
307
|
+
chosenSerial, opts?)`; `previewVaultWithdrawal(w, adminOriginator,
|
|
308
|
+
chosenSerial, amount)` — the chosen key's selectable total, capped count
|
|
309
|
+
and unreachable set without reserving or tapping, for the remainder
|
|
310
|
+
confirmation before the tap; `relockVault`; `estimateRelockFee`;
|
|
311
|
+
`getVaultKeyCoverage`; `orphanedIfRemoved`;
|
|
312
|
+
`VaultSpendResult { txid, cappedInputs, unreachable }`;
|
|
313
|
+
`VaultTransferOptions.vaultEnabled` and `backupEnabled`; error codes
|
|
314
|
+
`not-released`, `backup-off`, `not-enough-keys`, `key-already-enrolled`,
|
|
315
|
+
`too-many-keys`, `last-keys`, `relock-required`, `key-not-committed`,
|
|
316
|
+
`key-cannot-cover`, `too-small-to-relock`, `bad-version`; `VaultError.details`.
|
|
317
|
+
- `configureToolbox({ vaultEnabled })` and `isVaultEnabled()` — the release
|
|
318
|
+
gate (default off).
|
|
319
|
+
- `withKeySession(driver, work, onWaiting?, { nfcMessage?, attachTimeoutMs? })`
|
|
320
|
+
rejects on `session-failed`, `detached` and the attach timeout instead of
|
|
321
|
+
waiting forever; `VaultDriver.start` takes an optional `message`.
|
|
322
|
+
- Native: `startDiscovery(message)` sets the iOS NFC alert text from JS.
|
|
323
|
+
- `devMock`: `setMockPresentKey`, `getMockPresentKey`, `MockPresentKey` —
|
|
324
|
+
switch which of three dev keys is "held to the phone" without hardware.
|
|
325
|
+
|
|
326
|
+
Behaviour changes:
|
|
327
|
+
|
|
328
|
+
- Vault outputs and spends use transaction version 1. The exact lock is about
|
|
329
|
+
45 KB and commits to every enrolled key. `VAULT_DEPOSIT_MIN` is 100,000 sat.
|
|
330
|
+
- Every output gets a 32-byte salt from wallet `createHmac` under
|
|
331
|
+
`[2, "vault salt"]`, using counterparty `self`, the next canonical decimal
|
|
332
|
+
key ID (`"1"`, `"2"`, ...), and the canonically framed ordered YubiKey
|
|
333
|
+
serials as data. Authenticated current and historical scans rederive every
|
|
334
|
+
claimed HMAC before its index can advance the high-water mark. Output records
|
|
335
|
+
used for recovery or lifecycle mutation must also pass exact
|
|
336
|
+
instructions-to-lock validation and wallet HMAC rederivation before cleanup,
|
|
337
|
+
finalization, or metadata deletion. The in-process FIFO serializes simultaneous
|
|
338
|
+
calls. Disconnected devices sharing a mnemonic can select the same next index;
|
|
339
|
+
the same wallet/index/key set can therefore
|
|
340
|
+
reproduce a script, including across networks. Such outputs remain separate
|
|
341
|
+
UTXOs spendable only by their committed keys. The lock contains only
|
|
342
|
+
`HASH160(salt || canonicalTable(Q))` commitments; its 71-push unlock reveals
|
|
343
|
+
the salt as a final, exact 32-byte item. The salt is a privacy aid, not an
|
|
344
|
+
access-control requirement, and the HMAC is one-way: it does not recover its
|
|
345
|
+
serial-number input. Exact lock sizes are 45,199 bytes for one key and
|
|
346
|
+
`45,175 + 25N` for two through five keys; the measured unlock maximum is
|
|
347
|
+
2,539 bytes under the existing 2,560-byte declaration.
|
|
348
|
+
- Inventory scans consume each page as it arrives: current-output BEEF pages use
|
|
349
|
+
64 outputs, script-bearing action-history pages use 8 rows, and lightweight
|
|
350
|
+
action-history pages use 200 rows. A withdrawal retains full proofs only for
|
|
351
|
+
its at most 32 selected inputs. Compact identity, salt and pagination sets can
|
|
352
|
+
still grow with history; there is deliberately no total-history cap that can
|
|
353
|
+
hide an otherwise valid Vault output.
|
|
354
|
+
- Vault output creation requires a configured private-backup endpoint and
|
|
355
|
+
enabled encrypted backup push. This configuration gate does not prove that
|
|
356
|
+
the exact new record reached the backup host; the asynchronous backup system
|
|
357
|
+
exposes no per-action receipt. A deposit or output-producing spend is built
|
|
358
|
+
and signed as `noSend`, its exact
|
|
359
|
+
signed AtomicBEEF is revalidated, and that exact txid is then released with
|
|
360
|
+
`sendWith`. A signed held action discovered after a crash is neither aborted
|
|
361
|
+
nor automatically rebroadcast; it requires manual network-state
|
|
362
|
+
reconciliation. The toolbox release flag still defaults off (`not-released`);
|
|
363
|
+
the app's EAS production profile now enables it explicitly for TestFlight and
|
|
364
|
+
production builds.
|
|
365
|
+
- Vault recovery ignores completed pre-release Vault action history before
|
|
366
|
+
interpreting source scripts, so historical labels cannot make the newly
|
|
367
|
+
enabled Vault screen fail on entry. Pending current-template actions remain
|
|
368
|
+
subject to exact-script validation.
|
|
369
|
+
- Disabling a drained Vault reads only live actions as reservations. Storage
|
|
370
|
+
restores the sources of a terminally failed action and clears their
|
|
371
|
+
`spentBy`, so an aborted withdrawal or re-lock lists no inputs at all;
|
|
372
|
+
requiring exact R1C sources from it reported empty history as malformed
|
|
373
|
+
(`template-invalid`) and refused to disable an empty Vault for good. Exact
|
|
374
|
+
source-script validation and the failed-action blocker now apply to pending
|
|
375
|
+
actions and to failed actions that still list inputs — the shapes that can
|
|
376
|
+
actually hide a Vault output. Completed history no longer has its inputs
|
|
377
|
+
interpreted; its outputs are still authenticated. A failed disable check
|
|
378
|
+
also reports its own error instead of claiming the Vault still holds funds.
|
|
379
|
+
- HMAC salt derivation requires the wallet root, numeric ID, and complete
|
|
380
|
+
ordered serial list, and does not reconstruct an exact lock by itself.
|
|
381
|
+
Clean-device recovery also needs the ordered historical P-256 YubiKey
|
|
382
|
+
public-key descriptor and transaction discovery; current recovery obtains
|
|
383
|
+
that data from authenticated wallet history.
|
|
384
|
+
- Withdrawals name a key before the tap; only outputs committed to that key
|
|
385
|
+
are spent, each checked against its real lock; the card signs one digest
|
|
386
|
+
per input in batches of 16 per NFC tap, resuming after a dropped tap.
|
|
387
|
+
- Enrollment always generates a fresh P-256 key in PIV slot `0x82`.
|
|
388
|
+
`generateVaultKey` verifies the same-session pinned Yubico attestation, exact
|
|
389
|
+
key and PIN-once/touch-cached policy. The enclosing enrollment flow changes a
|
|
390
|
+
factory-default PIN when needed, rotates the PUK, replaces the default
|
|
391
|
+
management key and proves possession. Recovery adopts a surviving card only
|
|
392
|
+
after a fresh possession challenge.
|
|
393
|
+
- `enrollKey` refuses a serial already in the stored key list itself
|
|
394
|
+
(meta ∪ `pendingSerials`), inside the card session and before the PIN is
|
|
395
|
+
spent or the slot is regenerated; `finalizeEnrollment` refuses
|
|
396
|
+
(`key-already-enrolled`) while a vault is already enrolled, so Finish never
|
|
397
|
+
replaces a live key list.
|
|
398
|
+
- Vault format v6 is future-only. Earlier experimental metadata and outputs are
|
|
399
|
+
rejected; there is no decoder, migration, staging reclaim or compatibility
|
|
400
|
+
spend path.
|
|
401
|
+
|
|
402
|
+
### Vault UI (breaking)
|
|
403
|
+
|
|
404
|
+
- `EnrollWizard` is the sequential multi-key wizard (`mode: 'enroll' | 'add-key'`):
|
|
405
|
+
intro with the acknowledgement, one card session per
|
|
406
|
+
key with the PIN gathered before the tap, naming, Add another / Finish with
|
|
407
|
+
two keys minimum, leave-confirm while keys are pending.
|
|
408
|
+
- `VaultScreen` shows the key list (`nickname · …serialTail4`), coverage badges,
|
|
409
|
+
add / rename / remove (refused when a re-lock is needed first), the re-lock
|
|
410
|
+
sheet, an **Export wallet data** row with its explainer, the footnote and
|
|
411
|
+
disable-when-empty. Deposit runs the lazy wallet-creation path.
|
|
412
|
+
- `VaultTransferScreen` renders the deposit floor and fee inline, confirms the
|
|
413
|
+
first deposit and a below-floor remainder, lets the user choose the key
|
|
414
|
+
before a withdrawal, and reports unreachable and capped outputs as alerts.
|
|
415
|
+
- `VaultCeremonySheet` shows `Signed k of n` and the batch number between taps.
|
|
416
|
+
- New exports: `KeyChooser`, `vaultKeyLabel`, `vaultErrorCopy`,
|
|
417
|
+
`RETRYABLE_VAULT_ERRORS`, `useExportWalletData`, `useVaultCoverage`.
|
|
418
|
+
- Removed exports: `PassphraseField`, `PhraseBackupSheet`, `VaultRecoverScreen`
|
|
419
|
+
(there is no phrase path). Hosts must drop their `vault-recover` route.
|
|
420
|
+
- The home Vault button and the Settings Vault row render only when the host
|
|
421
|
+
passes `vaultEnabled: true` to `configureToolbox`.
|
|
422
|
+
- i18n: the wizard, key-management, transfer-confirmation and error keys added
|
|
423
|
+
in all twelve locales; the K1/passphrase-era keys removed.
|
|
424
|
+
|
|
425
|
+
### Expo SDK 57 (breaking)
|
|
426
|
+
|
|
427
|
+
Peer ranges move to Expo SDK 57 / React Native 0.86: every `expo-*` peer is
|
|
428
|
+
`~57.x`, `react-native` `^0.86.3`, `react-i18next` `^16.6.6` (TypeScript 6
|
|
429
|
+
peer range), `@react-native-community/netinfo` `^12`,
|
|
430
|
+
`react-native-gesture-handler` `~2.32`, `react-native-safe-area-context`
|
|
431
|
+
`~5.7`. New peer: `@bsv/mandala` `^0.2.0`. iOS deployment target is 16.4, the
|
|
432
|
+
SDK 57 minimum. `StyleSheet.absoluteFillObject` is gone in RN 0.86; this
|
|
433
|
+
package uses `absoluteFill`.
|
|
434
|
+
|
|
435
|
+
### Stablecoins (Mandala)
|
|
436
|
+
|
|
437
|
+
Stablecoin acceptance and transfer on top of the `@bsv/mandala` token client,
|
|
438
|
+
pay-first UX, recipient-submits offline settlement (specs:
|
|
439
|
+
`docs/superpowers/specs/2026-09-15-mandala-*`).
|
|
440
|
+
|
|
441
|
+
- **Host config.** `configureToolbox({ mandala })` takes a per-chain map of
|
|
442
|
+
`MandalaEndpointConfig` (`overlayUrl`, `overlayIdentityKey` — the only key
|
|
443
|
+
an admission signature may come from — and `messageBoxUrl`). The map is
|
|
444
|
+
the whole policy: a chain with no entry has no runtime, no drain and no
|
|
445
|
+
token asset offered; nothing is hardcoded to mainnet. `getMandalaEndpoints`,
|
|
446
|
+
`isMandalaAvailable`, `isVaultAvailable` exported.
|
|
447
|
+
- **Storage.** Four settlement tables (`token_settlements`,
|
|
448
|
+
`token_admissions`, `token_admission_edges`, `token_linkage_payloads`),
|
|
449
|
+
created by `createTables`; `ensureTokenSettlementColumns`,
|
|
450
|
+
`createMandalaSettlementTables`, `createSettlementStore`,
|
|
451
|
+
`TokenTransactionRepair`, `findOfflineActionByTxid`, `OfflineTokenDeps`.
|
|
452
|
+
Basket `p mandala` behind `MandalaTokenModule` with a one-time basket
|
|
453
|
+
migration; paired apps are prompted for list, spend, credit and relinquish
|
|
454
|
+
and never receive unlocking derivations.
|
|
455
|
+
- **Settlement.** The drain submits ancestors parents-first and broadcasts
|
|
456
|
+
only after admission; three structural guards keep token transactions away
|
|
457
|
+
from any plain broadcast, including the receiver's first internalize.
|
|
458
|
+
`abortAction` on the published manager refuses a reference whose settlement
|
|
459
|
+
row is held, handed_over, submitting, admitted or broadcast
|
|
460
|
+
(`wrapAbortActionForSettlements`, `abortIsBlockedBy`); an admitted answer
|
|
461
|
+
with no verifying σ_I is never `admitted`; every held coin gets a verified
|
|
462
|
+
admission fetched and cached on the tick; `repairAdmittedAborted` re-attaches
|
|
463
|
+
a transaction the wallet failed but the overlay admitted.
|
|
464
|
+
- **Rails.** Handle rail is hand-over-first: build and sign (noSend), assemble
|
|
465
|
+
the admission bundle from local evidence, post the v2 MessageBox body; the
|
|
466
|
+
send path never contacts the overlay. An online payer then settles at once
|
|
467
|
+
(`MandalaRuntime.settleNow`); offline, the drain finishes later.
|
|
468
|
+
PaymentFrame v4: `admissions[]` replaces `recipientLinkage`; the payee runs
|
|
469
|
+
COVER at hand-over against its own configured overlay key and refuses frames
|
|
470
|
+
naming another. Nearby token payments are denominated in the asset, labelled
|
|
471
|
+
`mandala` on both sides, and a payee-first submit is resolved via
|
|
472
|
+
`GET /admin/admission/:txid` instead of looping.
|
|
473
|
+
- **Runtime and UI.** `MandalaRuntime` is the one surface the UI reads
|
|
474
|
+
(`useMandala`, `MandalaProvider`, `useTokenActivity`); nothing above it
|
|
475
|
+
imports `@bsv/mandala`. New `ui` exports: `AssetAmount`, `AssetPicker`,
|
|
476
|
+
`AdmissionNotice`, `tokenFormat` (`formatTokenAmount`, `parseTokenAmount`,
|
|
477
|
+
…), `tokenStatus`, `tokenSeen`, `tokenEviction`, `tokenSendCopy`,
|
|
478
|
+
`tokenRowTitle`. Balances read every page of the basket, not the first
|
|
479
|
+
1000 outputs. Sent token rows carry a minus sign.
|
|
480
|
+
- **Core exports.** `./mandala/types`, `drain`, `bundle`, `createRuntime`,
|
|
481
|
+
`abortGuard`, `settlementStore`; `./offline/tokenFrames`;
|
|
482
|
+
`cancelParkedPayment`; `./services/externalOrigin`.
|
|
483
|
+
|
|
484
|
+
### Payments
|
|
485
|
+
|
|
486
|
+
- **Sender note** on nearby (BLE/QR), address and message-box token payments;
|
|
487
|
+
the note becomes the recipient's activity description. Nearby
|
|
488
|
+
`FRAME_VERSION` 4 → 5 with an optional `note`; `sendToAddress` takes a
|
|
489
|
+
`note` (local only); `sendToHandle` forwards it to `transferTokens`. Token
|
|
490
|
+
activity rows now show the note instead of a fixed ticker template.
|
|
491
|
+
- **Token requests in peerpay links**: `asset=<txid.vout>` names a token by
|
|
492
|
+
genesis outpoint, `amount=` its base units; `sats=` selects BSV; mixing is
|
|
493
|
+
refused. Get paid emits them for a selected token. `PeerPayRequest` exported.
|
|
494
|
+
- **Resend a token transfer** over the message box from the activity row,
|
|
495
|
+
rebuilt from the payer's blinding journal and cached admission, journaled
|
|
496
|
+
first so a failed send is retried by the drain.
|
|
497
|
+
|
|
498
|
+
### Home screen
|
|
499
|
+
|
|
500
|
+
- Coin switcher is a filled accent pill in the top bar (the title doubles as
|
|
501
|
+
the control) opening a dropdown card with a tail; the bottom drawer and the
|
|
502
|
+
Balances section are gone. Token holdings remain in Pay's asset picker and
|
|
503
|
+
Activity. Pay form order: Recipient, Paying with, Amount, Pay.
|
|
504
|
+
- `useWalletStatus` / `WalletStatusSlice` exported from `core`.
|
|
505
|
+
|
|
506
|
+
### Storage
|
|
507
|
+
|
|
508
|
+
- `listOutputs` and the wallet balance count outputs of a transaction at
|
|
509
|
+
`sending` (already posted, not yet `unproven`), matching what
|
|
510
|
+
`allocateChangeInput` was already willing to spend; `listOutputsSql` shares
|
|
511
|
+
`walletBalanceSql`'s one status list. A vault re-lock remainder no longer
|
|
512
|
+
reads as 0 for a few seconds.
|
|
513
|
+
- Received token frames round-trip every byte field through the pending
|
|
514
|
+
queue; the settlement store refuses non-byte or empty payloads and reads
|
|
515
|
+
back the TEXT rows already on Android devices; `build.ts` aborts its own
|
|
516
|
+
noSend action when a step after `createAction` fails.
|
|
517
|
+
|
|
518
|
+
### Vault fixes
|
|
519
|
+
|
|
520
|
+
- A key can be removed while the vault holds a balance: broadcast statuses
|
|
521
|
+
(`sending`, `unproven`) no longer block `beginVaultKeyRemoval`; the re-lock
|
|
522
|
+
sheet names the remaining keys.
|
|
523
|
+
- Enrollment names keys itself (Key 1, Key 2, …) instead of stopping on a
|
|
524
|
+
naming page; rename from the vault screen. `vault_name_title` /
|
|
525
|
+
`vault_name_hint` removed from all locales.
|
|
526
|
+
- A re-lock records `Vault relock` as its action description instead of the
|
|
527
|
+
NFC prompt copy.
|
|
528
|
+
- Guarded in-app PIV application reset for a previously used key
|
|
529
|
+
(`./services/vault/pivReset`), refused for keys mid-removal, on other
|
|
530
|
+
chains, or holding an unknown vault key. The vault is mainnet-only.
|
|
531
|
+
|
|
532
|
+
### Fixes
|
|
533
|
+
|
|
534
|
+
- **Short nearby-payment notes** no longer fail internalize forever. A note
|
|
535
|
+
under 5 characters (a lone 🪿) is truthy after trim, so the fixed fallback
|
|
536
|
+
never applied and `internalizeAction` rejected the description on every
|
|
537
|
+
retry; `processPending` now pads to 5 like `build.ts` and `handle.ts`.
|
|
538
|
+
- **Import wallet data** works again for files exported since the wallet
|
|
539
|
+
database moved to WAL mode (`9ef35665`, 2026-09-02). Every export — the iOS
|
|
540
|
+
byte copy and the Android `serializeAsync` image — carries SQLite header
|
|
541
|
+
bytes 18/19 = 2 (WAL). `deserializeDatabaseAsync` loads the image under
|
|
542
|
+
SQLite's memdb VFS, which has no `xShmMap`, so the pager's WAL open failed
|
|
543
|
+
with SQLITE_CANTOPEN "unable to open database file", surfacing from
|
|
544
|
+
`backupDatabaseAsync`. The import now runs the bytes through the new
|
|
545
|
+
`prepareSqliteImageForDeserialize` (`core` barrel), which returns a copy
|
|
546
|
+
with those two bytes set to rollback-journal mode; the image is already
|
|
547
|
+
complete (export checkpoints first), so nothing is lost. Non-SQLite input
|
|
548
|
+
passes through untouched so SQLite still reports the real error.
|
|
549
|
+
|
|
3
550
|
## 0.4.0
|
|
4
551
|
|
|
5
552
|
### Host-supplied configuration (breaking)
|
package/README.md
CHANGED
|
@@ -194,6 +194,25 @@ handshake posts to the origin root, so a path, query or fragment is rejected.
|
|
|
194
194
|
Every `services` field is optional and falls back to the built-in public
|
|
195
195
|
endpoint for that chain. Chains are `main`, `test` and `teratest`.
|
|
196
196
|
|
|
197
|
+
`handleRegistry` names the paymail domain this build's handles live under and
|
|
198
|
+
the host that serves it, per chain:
|
|
199
|
+
|
|
200
|
+
```tsx
|
|
201
|
+
configureToolbox({
|
|
202
|
+
backupUrl: null,
|
|
203
|
+
handleRegistry: {
|
|
204
|
+
test: { domain: 'deggen.com', url: 'https://messagebox.bsvblockchain.tech' }
|
|
205
|
+
}
|
|
206
|
+
})
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
Both fields are required together — a domain with no URL is a registry nothing
|
|
210
|
+
can reach, and a URL with no domain is a host whose certificates nothing can be
|
|
211
|
+
checked against — and the URL must be `https` unless it points at `localhost`,
|
|
212
|
+
`127.0.0.1`, `10.0.2.2` or RFC 1918 space, which is a development allowance. A
|
|
213
|
+
chain with no complete entry shows "not available yet" on the Profile screen
|
|
214
|
+
and adds no registry tier to Pay's recipient search.
|
|
215
|
+
|
|
197
216
|
Reading configuration before `configureToolbox` has run **throws**. An
|
|
198
217
|
unconfigured build fails loudly rather than behaving like a deliberately
|
|
199
218
|
disabled one.
|
|
@@ -288,7 +307,6 @@ export { WalletHomeScreen as default } from '@bsv/expo-wallet-toolbox/ui'
|
|
|
288
307
|
| `SettingsScreen` | `app/settings.tsx` |
|
|
289
308
|
| `WalletConfigScreen` | `app/wallet-config.tsx` |
|
|
290
309
|
| `VaultScreen` | `app/vault.tsx` |
|
|
291
|
-
| `VaultRecoverScreen` | `app/vault-recover.tsx` |
|
|
292
310
|
| `VaultTransferScreen` | `app/vault-transfer.tsx` |
|
|
293
311
|
| `ConnectionsScreen` | `app/connections.tsx` |
|
|
294
312
|
| `PairScreen` | `app/pair.tsx` |
|
|
Binary file
|
|
Binary file
|