Original release notes
A maintenance release carrying the v5 release-candidate fixes that apply to the v4 line, with no breaking changes.
Couple of changes worth highlighting: a NUT-17 subscription whose socket closes now has its error callback invoked, so a long-lived watch can resubscribe instead of waiting on a dead connection. Requests now default to a 5 minute timeout (previously unbounded on some runtimes). New mnemonicToSeedSync function derives the BIP-39 seed from a phrase with no new dependency; validate the phrase first with @scure/bip39 or similar.
What's Changed
- fix(utils): resolve short keyset IDs in getDecodedTokenBinary [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1154
- test: raise the vitest timeout by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1158
- fix(utils): apply the keyset unit alphabet to version 01 ids too [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1166
- fix(mint): check a bolt11 melt preimage against the invoice payment hash [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1165
- fix(auth): check OIDC endpoint schemes against the discovery document [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1167
- refactor: route the last UTF-8 decodes through utils/bytes [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1169
- docs: say where transport policy lives [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1171
- fix(model): require boolean true for advertised NUT support [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1177
- fix(core): keep a token's witness verbatim when re-encoding [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1181
- fix(wallet): refuse pre-v3 locks the mint does not advertise [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1196
- fix(wallet): refuse keyset id versions this build cannot spend [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1200
- fix(core): warn on implicit numeric coercion of Amount [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1205
- fix(utils): refuse text with a lone surrogate in the CBOR and TLV encoders [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1210
- fix(wallet): verify the preimage on melt quote subscription updates [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1211
- fix(transport): log a failed unsubscribe at info [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1217
- fix(transport): export CallerAbortError and UncancellableReadError [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1219
- docs: document websocket teardown and injectWebSocketImpl [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1218
- feat(crypto): add mnemonicToSeedSync [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1225
- fix(wallet): refuse NUT-29 batch operations the mint does not advertise [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1226
- fix(transport): time out request attempts after 5 minutes by default [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1227
- fix(model): accept a structuredClone'd Amount in Amount.from [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1230
- fix(wallet): log a keyset summary on load instead of the whole cache [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1239
- fix(transport): quieter retry logging, slower backoff, and NetworkError names the mint [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1241
- chore(errors): move stray error classes into model/Errors [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1247
- fix(transport): drop the DOM CloseEvent type from the WSConnection public surface [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1250
- fix(transport): fail established subscriptions when the socket closes [backport v4-dev] by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1252
- chore(v4-dev): release 4.11.0 by @robwoodgate in https://github.com/cashubtc/cashu-ts/pull/1156
Full Changelog: https://github.com/cashubtc/cashu-ts/compare/v4.10.2...v4.11.0

