Skip to content

Improve docs - #11

Merged
praveenperera merged 2 commits into
masterfrom
improve-docs
May 5, 2026
Merged

Improve docs#11
praveenperera merged 2 commits into
masterfrom
improve-docs

Conversation

@praveenperera

Copy link
Copy Markdown
Member

No description provided.

@coderabbitai

coderabbitai Bot commented May 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@praveenperera has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 38 minutes and 9 seconds before requesting another review.

To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d48933aa-190d-4d13-8417-d2081e01971b

📥 Commits

Reviewing files that changed from the base of the PR and between 392f4b4 and 9c436ae.

📒 Files selected for processing (8)
  • README.md
  • src/descriptor.rs
  • src/descriptor/script_type.rs
  • src/formats.rs
  • src/json.rs
  • src/key_expression.rs
  • src/lib.rs
  • src/xpub.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch improve-docs

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

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@greptile-apps

greptile-apps Bot commented May 5, 2026

Copy link
Copy Markdown

Greptile Summary

This PR improves documentation across the entire codebase and refactors descriptor construction to use typed BIP32 values instead of string interpolation. The new DescriptorBuilder struct replaces several ad-hoc string-formatting patterns with a single, well-documented builder that works directly with Fingerprint, DerivationPath, and Xpub types.

  • New DescriptorBuilder (src/descriptor/builder.rs): constructs multipath <0;1>/* descriptors programmatically, then splits them into external/internal pairs; all previous call sites in descriptor.rs are updated to use it.
  • ScriptType refactor (src/descriptor/script_type.rs): descriptor_derivation_path_for_coin_type and wrap_with are replaced by purpose() and account_derivation_path_for_coin_type(), which return typed values instead of formatted strings.
  • Documentation sweep: #![warn(missing_docs)] is added to lib.rs and /// doc comments with doctests are added to every public item across all modules.

Confidence Score: 4/5

Safe to merge; the only finding is a stray closing parenthesis in a doc comment.

The refactoring replaces fragile string interpolation with typed BIP32 construction, and the new builder path is covered by dedicated unit tests for all four script types and multiple coin types. The one issue spotted is a dangling ) in the crate-level doc comment on line 18 of lib.rs, which will appear verbatim in rendered rustdocs but does not affect runtime behavior.

src/lib.rs has the stray parenthesis; all other files look clean.

Important Files Changed

Filename Overview
src/descriptor/builder.rs New DescriptorBuilder type that constructs multipath descriptors programmatically from typed BIP32 components instead of string interpolation; includes a passing doctest and clean error propagation.
src/descriptor.rs Refactored all descriptor-building call sites to use DescriptorBuilder and typed Fingerprint/DerivationPath values; extracted split_multipath_descriptor and parse_derivation_path helpers; added comprehensive doc comments and new unit tests.
src/descriptor/script_type.rs Replaced string-returning descriptor_derivation_path_for_coin_type and wrap_with helpers with typed purpose() and account_derivation_path_for_coin_type() methods returning DerivationPath; adds InvalidChildNumber error variant.
src/lib.rs Added #![warn(missing_docs)], improved crate-level doc comment, and added doc comments for re-exported type aliases and the parse_from_str function; contains one stray closing parenthesis in the module-level doc list.
src/formats.rs Added doc comments to Format, Error, and Json types and all their variants/fields; added a passing doctest for Format::try_new_from_str.
src/json.rs Added doc comments to all public JSON model types and their fields; minor trailing-period fix in a test comment.
src/key_expression.rs Improved module-level doc comment and moved misplaced struct-level doc comment before the derive attributes; added a doctest and doc comments for all Error variants and KeyExpression fields.
src/xpub.rs Added doc comments to all public types, variants, fields, and functions; added a doctest for to_standard_extended_public_key and deprecation notices for zpub_to_xpub/ypub_to_xpub.
README.md Crate description updated to match the new lib.rs doc comment; formatting changes to a note line (italic-bold syntax); removed a blank line before a code fence.

Reviews (1): Last reviewed commit: "Improve public docs" | Re-trigger Greptile

Comment thread src/lib.rs Outdated
Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
@praveenperera
praveenperera merged commit a675726 into master May 5, 2026
9 checks passed
@praveenperera
praveenperera deleted the improve-docs branch May 5, 2026 18:15
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