Skip to content

fix: preserve wallet bytes across every Electron bridge route - #79

Draft
ty-everett wants to merge 3 commits into
masterfrom
codex/fix-wallet-byte-json-bridge
Draft

fix: preserve wallet bytes across every Electron bridge route#79
ty-everett wants to merge 3 commits into
masterfrom
codex/fix-wallet-byte-json-bridge

Conversation

@ty-everett

@ty-everett ty-everett commented Aug 15, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • normalize byte fields across every Electron HTTP wallet route, including BRC-100, STAS, BSV-21, peer-token, and generic token APIs
  • recover historical numeric-key JSON while preserving current arrays, typed arrays, ambiguous empty containers, and unrelated numeric records
  • serialize successful results, structured review errors, and all other bridge responses through the same portable boundary
  • enforce the boundary with a source-level recurrence guard and an end-to-end historical-request/current-response test

Validation

Exact head: ffc7200

  • required PR suite: 4 files / 37 tests passed
  • full repository suite: 26 files / 204 tests passed
  • STAS database suite: 7 files / 32 tests passed
  • multi-protocol token suite: 6 files / 58 tests passed
  • current master renderer and Electron production build passed
  • forward compatibility: current master + dependency PR fix(deps): bump @bsv/wallet-toolbox to 2.10.1 for both proof-task deadlock fixes #78 (@bsv/sdk 2.4.0 and @bsv/wallet-toolbox 2.10.1) passed the 37-test required suite and the renderer/Electron production build
  • diff check passed

The recurrence guard rejects any raw JSON.parse or JSON.stringify use in the Electron HTTP handler and verifies that every request-body and response-body boundary uses the compatibility helper. Current master has 30 request parsing sites and 126 portable serialization sites.

Dependency PR #78 currently needs a lockfile refresh before npm ci can run because encoding@0.1.13 is missing from its submitted lockfile; forward validation used npm install in a disposable worktree. The repository reports 39 npm audit findings on both current master and the combined dependency graph; these are the existing dependency baseline and are not introduced by this dependency-free patch. This complements bsv-blockchain/ts-stack#482.

@ty-everett ty-everett changed the title fix: preserve BRC-100 bytes across the Electron bridge fix: preserve wallet bytes across every Electron bridge route Aug 15, 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