Skip to content

feat(hd): recover a parent from its child - #215

Merged
oritwoen merged 1 commit into
mainfrom
feat/bip32-parent-recover
Oct 2, 2026
Merged

oritwoen merged 1 commit into
mainfrom
feat/bip32-parent-recover

Conversation

@aeitwoen

@aeitwoen aeitwoen commented Oct 2, 2026

Copy link
Copy Markdown
Collaborator

Closes #197

A leaked normal child plus its xpub gives the parent away, so keys_bip32_parent_recover and recoverParent in @agntn/keys/bip32 hand that parent back. Its nine private prefixes were checked by hand against the SLIP-0132 table.

@aeitwoen
aeitwoen requested a review from oritwoen as a code owner October 2, 2026 07:57
@aeitwoen aeitwoen self-assigned this Oct 2, 2026
@coldtea-pr-lens

coldtea-pr-lens Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

◈ PR Lens

🟢 +0 new · 🟠 ~9 changed · 🔴 -0 removed · 1 flow · 24 files · commit ce917f9


Architecture

Architecture diagram for agntn/keys at ce917f9

9 components touched across 6 lanes.

Play the interactive walkthrough


Inside the changed components — 2 views

Component view — BIP32 parent recovery

Mathematical recovery of parent private keys from extended public keys and leaked child scalars

Architecture view of Component view — BIP32 parent recovery in agntn/keys

Component view — Agent tool dispatch and interfaces

Tool schema validation, dispatch, and safety controls across MCP and Pi interfaces

Architecture view of Component view — Agent tool dispatch and interfaces in agntn/keys

Data flow

Data flow diagram for agntn/keys at ce917f9

Recovering parent private key from xpub and leaked child

Follow each request, response and payload


View

  • Architecture lens
  • Data flow lens
  • Expand every detail

Tip

The diagrams are links. Click one to open it on the canvas, then press W or click play to walk through the change

🪧 More tips
  • Run npx skills add coldteadotai/pr-lens, then tell your coding agent: "Diagram the change you just made with PR Lens and attach it to the pull request."
  • Run npx @coldtea/pr-lens-cli analyze --base origin/main on a branch, then npx @coldtea/pr-lens-cli render .pr-lens/graph.json. Same lenses, your own model key, before the pull request exists
  • Untick Architecture lens or Data flow lens under View to hide a diagram, or tick Expand every detail to open every section. The comment redraws in a few seconds
  • Click the link under each diagram to open it on a canvas you can zoom, pan and step through
  • Open a diagram on the canvas, then press W or click play to walk through the change one step at a time
  • The CLI's render reads .github/pr-lens.yml and applies your renames, exclusions and lane pins at draw time
  • Set github.comment.collapsed: true in .github/pr-lens.yml to fold the comment behind one View architecture and data flow row. Drawing still runs as before
  • Set github.draw: on-demand in .github/pr-lens.yml and PR Lens stops drawing pull requests on its own. Comment @pr-lens draw on a pull request when you want that one drawn
  • Add .github/workflows/pr-lens.yml with coldteadotai/pr-lens/packages/action@v0 and your model provider's key as its api-key to run PR Lens from your own CI. Any /chat/completions endpoint works
  • Push a commit and the drawing stays, with a note that it is out of date. Tick Redraw in the note to draw the new head
  • Switch GitHub to dark mode and the diagrams follow. The moving dots are this pull request's data in motion

Thanks for using PR Lens! It's built by Coldtea, free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://feat-bip32-parent-recover-agntn-keys.oritwoen.workers.dev (commit ce917f9)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://1b4c04bb-agntn-keys.oritwoen.workers.dev ce917f9 2026-10-02T08:00:20.856Z Visit the dashboard ↗

@oritwoen
oritwoen merged commit b6c2ccb into main Oct 2, 2026
4 checks passed
@oritwoen
oritwoen deleted the feat/bip32-parent-recover branch October 2, 2026 08:03
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.

Recover a parent key from an xpub and a child

2 participants