Skip to content

Restore upstream license headers; document the fingerprint argument - #138

Merged
BenWestgate merged 2 commits into
claude/remove-unused-apifrom
claude/v1-review-notices
Oct 8, 2026
Merged

BenWestgate merged 2 commits into
claude/remove-unused-apifrom
claude/v1-review-notices

Conversation

@BenWestgate

@BenWestgate BenWestgate commented Oct 7, 2026 •

Copy link
Copy Markdown
Owner

Before: v1's bech32.py and checksums.py had lost the license headers that master carries. Those headers credit Pieter Wuille (MIT) and Leon Olsson Curr and Pearlwort Sneed (BSD-3-Clause), whose code those files still derive from. Separately, api.md showed generate_master_seed without its fingerprint argument, which a fresh call needs unless identifier is set.

After: both files carry master's headers again, each credit naming its upstream source, and api.md documents fingerprint.

  • licensing: Restores master's headers. checksums.py now credits the polymod arithmetic instead of Bech32/Bech32m constants, because it no longer holds those constants. Each credit also names its source (sipa/bech32's ref/python/segwit_addr.py, or BIP-93), since CONTRIBUTING.md requires derived work to carry the original author's header with its source, and both licenses require the notice to ship with the code. Comments don't count toward the line budget.
  • docs: Adds fingerprint=None to the signature. It says the argument is a callable that returns the seed's four-byte BIP32 fingerprint, that this package has no secp256k1 arithmetic so the CLI gets it from Bitcoin Core, and that a fresh call with neither fingerprint nor identifier raises ValueError.

Both come from Codex's latest review of #94. Its fourth finding there, core_descriptors ignoring the seed, is already fixed by #130. This PR is stacked on #130 because both touch the same lines of checksums.py and api.md. The full suite passes (907 tests), and ruff is clean.

🤖 Generated with Claude Code

https://claude.ai/code/session_01T233rKgZqE5wzDm3EVTHL1

@BenWestgate BenWestgate self-assigned this Oct 7, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-08T02:02:37.233042Z 85119a2 New commits
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@BenWestgate
BenWestgate force-pushed the claude/remove-unused-api branch from 0c5d3f0 to c8bedfd Compare October 8, 2026 01:51
@BenWestgate
BenWestgate force-pushed the claude/v1-review-notices branch from a7969dc to ae6a5ca Compare October 8, 2026 01:56

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ae6a5ca912

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/codex32/checksums.py
Comment thread docs/developer/api.md Outdated
The v1 rewrite dropped the license headers that master carries in
bech32.py and checksums.py. bech32.py still derives convertbits from
Pieter Wuille's segwit_addr.py, and checksums.py keeps his polymod
arithmetic and Leon Olsson Curr and Pearlwort Sneed's codex32
generators. MIT and BSD-3-Clause both require the notice to travel with
the code, and CONTRIBUTING.md requires the original author's header on
derived work.

Restore master's headers, except that checksums.py now credits the
polymod arithmetic, since it no longer holds Bech32/Bech32m constants.
Each credit also names its upstream source, sipa/bech32's
ref/python/segwit_addr.py or BIP-93, as CONTRIBUTING.md asks. Comments
do not count toward the package line budget.

Claude-Session: https://claude.ai/code/session_01T233rKgZqE5wzDm3EVTHL1
The one-shot signature in api.md omitted generate_master_seed's
fingerprint argument. A fresh call that leaves identifier unset raises
ValueError unless that callable is supplied, so the documented defaults
could not generate a seed. Show the argument and its contract.

Claude-Session: https://claude.ai/code/session_01T233rKgZqE5wzDm3EVTHL1
@BenWestgate
BenWestgate force-pushed the claude/v1-review-notices branch from ae6a5ca to 85119a2 Compare October 8, 2026 02:00

@BenWestgate BenWestgate left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@BenWestgate
BenWestgate merged commit f823f25 into claude/remove-unused-api Oct 8, 2026
20 checks passed
@BenWestgate
BenWestgate deleted the claude/v1-review-notices branch October 8, 2026 07:24
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