Skip to content

Enrich rustdoc across public API surface#50

Open
alltheseas wants to merge 5 commits intolightningdevkit:masterfrom
alltheseas:enrich-rustdoc
Open

Enrich rustdoc across public API surface#50
alltheseas wants to merge 5 commits intolightningdevkit:masterfrom
alltheseas:enrich-rustdoc

Conversation

@alltheseas
Copy link
Collaborator

Summary

  • Enriches doc comments on all public types and methods across orange-sdk, graduated-rebalancer, and the README
  • Adds detailed descriptions, cross-references, markdown tables, and usage context to Wallet, Balances, Tunables, WalletConfig, Event, Transaction, PaymentId, ExtraConfig, SparkWalletConfig, CashuConfig, and more
  • Documents the Cashu backend in the README (was previously undocumented despite being a first-class feature)
  • Adds comprehensive crate-level docs to graduated-rebalancer explaining the two rebalance paths
  • Fixes doc accuracy: close_channels force-close behavior, list_transactions exclusions, from_trusted amountless semantics
  • Uses plain backticks for cfg-gated items to avoid broken intra-doc links under default features
  • cargo doc --all-features --no-deps and cargo doc -p orange-sdk --no-deps both pass with zero warnings, including under RUSTDOCFLAGS='-D warnings'

Note: This PR was generated with the help of an AI coding agent (Claude). Doc comments describe behavior based on reading the source, but hallucinations are possible — please verify accuracy against the implementation.

Test plan

  • cargo doc --all-features --no-deps — zero warnings
  • cargo doc -p orange-sdk --no-deps (default features) — zero warnings
  • RUSTDOCFLAGS='-D warnings' cargo doc -p orange-sdk --no-deps — passes
  • RUSTDOCFLAGS='-D warnings' cargo doc --all-features --no-deps — passes
  • cargo check --all-features — passes
  • Review doc comments against implementation for accuracy

🤖 Generated with Claude Code

alltheseas and others added 5 commits March 5, 2026 13:50
Add detailed documentation with cross-references, tables, and context
to Balances, Seed, StorageConfig, ChainSource, WalletConfig, Tunables,
PaymentInfo, PaymentInfoBuildError, InitFailure, WalletError,
SingleUseReceiveUri, and all Wallet impl methods.

Accurately documents close_channels force-close behavior for non-usable
channels, list_transactions exclusion of pending inbound invoices and
pending rebalances, and from_trusted semantics for amountless receives.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add event type summary table, persistence semantics, usage guidance,
and cross-references to Wallet methods on Event and EventQueue docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace generic descriptions with precise documentation covering
lifecycle semantics, cross-references to Wallet methods, and
string format details for PaymentId.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add module-level docs explaining the graduated custody model and
available backends. Enrich TrustedWalletInterface, ExtraConfig,
TrustedError, SparkWalletConfig, and CashuConfig with detailed
docs, examples, and feature flag guidance.

Uses plain backtick references for cfg-gated items (cashu, dummy,
ExtraConfig::Cashu, ExtraConfig::Dummy) to avoid broken intra-doc
links under default features.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add comprehensive crate-level documentation to graduated-rebalancer
explaining the two rebalance paths, trait-based architecture, and
relationship to orange-sdk.

Add Cashu backend documentation and code examples to the README,
which was previously undocumented despite being a first-class feature.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@alltheseas
Copy link
Collaborator Author

gents @benthecarman @danieldaquino docs update ready for your review.

⚠️ hallucinations may be omnipresent ⚠️

Copy link
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

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

couple nits otherwise looks good

Spark uses the [Breez Spark SDK](https://breez.technology) for custodial Lightning payments with instant settlement and low fees. This is the default backend and is enabled via the `spark` feature flag.

```rust,no_run
use orange_sdk::trusted_wallet::spark::SparkWalletConfig;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this can be use orange_sdk::SparkWalletConfig

```

```rust,ignore
use orange_sdk::trusted_wallet::cashu::CashuConfig;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: this can be use orange_sdk::CashuConfig

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.

2 participants