mirror of
https://github.com/minibits-cash/minibits_wallet.git
synced 2026-10-06 03:38:24 +00:00
Each of these existed only because the library lacked something it now has. mintInfoSummary widened GetInfoResponse with icon_url, tos_url and urls — fields every mint publishes but cashu-ts did not type. 4.10 (#1004) carries all three plus time and max_array_length, so the intersection is gone and MintInfo is a plain alias. mintUrl reimplemented cashu-ts's canonical form because normalizeUrl was @internal; its docblock carried a standing obligation to keep the copy in step by hand. 4.8 (#845) renamed it normalizeMintUrl and made it public, so the copy is replaced by delegation and that obligation is gone. The https requirement is ours and stricter, so it stays, applied to the normalized url. A side effect worth naming: cashu-ts also rejects credentials, query strings, fragments and percent-encoded paths, which previously fell to the later new CashuMint() call — delegating moves those rejections strictly earlier. WalletStore read nuts['19'] behind four @ts-ignore comments to decide whether to record a NUT-19 in-flight request. isSupported(19).supported drops the ignores and is deliberately stricter: cashu-ts reports supported only when cached_endpoints is non-empty, whereas a bare truthy nuts.19 object also matched a mint advertising the key with no cache behind it. Recording an in-flight request there was never useful, since the replay it enables depends on the mint actually caching the response. Adds proofSelectionRotating.test.ts to pin the one behavior change 4.10 makes that a device cannot reach: the default selector moved to selectProofsRotating (#818), which force-includes whole stale keyset buckets. It is decision-neutral — it documents both selectors rather than blessing one — and guards the invariant that matters either way: with includeFees, the selected set must cover the target plus the input fee on itself. Verified: tsc --noEmit unchanged against baseline (89 pre-existing, none new), 46 suites / 629 tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>