Skip to content

Give the web wallet a way to answer a key rotation - #67

Merged
TheCryptoDonkey merged 1 commit into
mainfrom
fix/pwa-key-rotation
Sep 6, 2026
Merged

Give the web wallet a way to answer a key rotation#67
TheCryptoDonkey merged 1 commit into
mainfrom
fix/pwa-key-rotation

Conversation

@TheCryptoDonkey

Copy link
Copy Markdown
Member

#66 made an announced signing-key rotation a decision rather than something the wallet takes on its own. It gave the CLI a flag and left the browser with a refusal it could not show.

main.ts catches BadSignatureError and rethrows anything else, so a KeyRotationError left take() as an unhandled rejection. The receive would fail with nothing on screen and no way past it. That is a regression #66 introduced and this closes it before either half ships.

Why it is a separate card, not the signature card with new words

The two refusals differ in kind.

A signature that does not verify is a fact about the note in your hand. A mint presenting a new signing key is a question about the mint, and one the wallet genuinely cannot answer: a mint rotating properly and a mint somebody else now runs publish the same two claims from the same server.

The card says exactly that, and says the one thing a holder can actually do about it - check the new key by some route that is not this mint. It also says notes already held keep working, because the old key is kept, so the decision is not being made under a false clock.

Two taps to accept, matching the signature override, and for the same reason: the honest case for overriding is that you already know something the wallet does not.

Verification

324 tests pass, npm run check and typecheck:web clean.

#66 made an announced signing-key rotation a decision rather than something
the wallet takes on its own. It gave the CLI a flag and left the browser with
a refusal it could not show: main.ts catches BadSignatureError and rethrows
anything else, so a KeyRotationError left `take()` as an unhandled rejection.
The receive would fail with nothing on screen and no way past it.

So the PWA gets its own refusal card. It is deliberately not the signature
card with different words, because the two refusals are different in kind. A
signature that does not verify is a fact about the note in your hand. A mint
presenting a new signing key is a question about the mint, and one the wallet
genuinely cannot answer: a mint rotating properly and a mint somebody else now
runs publish the same two claims from the same server.

The card says exactly that, and says the one thing a holder can actually do
about it - check the new key by some route that is not this mint. It also says
that notes already held keep working, because the old key is kept, so the
decision is not being made under a false clock.

Two taps to accept, matching the signature override, and for the same reason:
the honest case for overriding is that you already know something the wallet
does not.

324 tests pass, web typecheck clean.
@TheCryptoDonkey
TheCryptoDonkey merged commit 73a894e into main Sep 6, 2026
2 checks passed
@TheCryptoDonkey
TheCryptoDonkey deleted the fix/pwa-key-rotation branch September 6, 2026 09:45
@TheCryptoDonkey TheCryptoDonkey mentioned this pull request Sep 6, 2026
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