Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 6, 2026

  • Explore repository structure and understand existing node implementations (Strike, Speed, Blink, etc.)
  • Research CDK (Cashu Development Kit) API and wallet functionality
  • Create Cashu module structure (cashu/api.rs, cashu/lib.rs, cashu/types.rs)
  • Add CDK dependencies to Cargo.toml (cdk v0.14.2, cdk-sqlite v0.14.2, getrandom v0.2)
  • Implement CashuConfig and CashuNode structures
  • Implement LightningNode trait methods for CashuNode
    • get_info - Get wallet balance and mint info
    • create_invoice - Create mint quote (Lightning invoice to receive ecash)
    • pay_invoice - Create melt quote (Pay Lightning invoice with ecash)
    • lookup_invoice - Check mint quote status
    • list_transactions - List mint and melt quotes
    • decode - Decode Cashu tokens and BOLT11 invoices
    • on_invoice_events - Poll for invoice status changes
  • Add factory function create_cashu_node
  • Update lib.rs to include cashu module
  • Add tests for Cashu implementation (6 tests passing)
  • Build and verify changes compile
  • Run code review and address feedback
    • Fixed uniffi default inconsistency for accept_invalid_certs
    • Added sats_to_msats helper with overflow protection
    • Made conversion patterns consistent across all functions
  • Add Node.js bindings (bindings/lni_nodejs/src/cashu.rs)
  • Run security checks (CodeQL timed out)

Security Summary

  • No vulnerabilities discovered in the implementation
  • Added overflow protection for sat-to-msat conversions using clamping to prevent integer overflow
  • Uses getrandom for cryptographically secure random seed generation
  • CodeQL analysis timed out (common for large Rust projects)
Original prompt

can you implement cashu in lni similair to the others like stike, spark etc.. using cdk https://github.com/cashubtc/cdk


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@coderabbitai
Copy link

coderabbitai bot commented Jan 6, 2026

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.


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

Copilot AI and others added 2 commits January 6, 2026 20:00
Co-authored-by: ntheile <1273575+ntheile@users.noreply.github.com>
Co-authored-by: ntheile <1273575+ntheile@users.noreply.github.com>
Copilot AI changed the title [WIP] Implement Cashu in LNI using CDK Add Cashu ecash integration using CDK Jan 6, 2026
Copilot AI requested a review from ntheile January 6, 2026 20:12
@ntheile
Copy link
Contributor

ntheile commented Jan 6, 2026

@copilot we need a bindings/lni_nodejs/src/cashu.rs to handle uniffi bindings for nodejs. look at other example in this directory

Co-authored-by: ntheile <1273575+ntheile@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 6, 2026

@copilot we need a bindings/lni_nodejs/src/cashu.rs to handle uniffi bindings for nodejs. look at other example in this directory

Added bindings/lni_nodejs/src/cashu.rs with Node.js bindings for CashuNode following the pattern of other implementations (strike, blink, etc.). Also updated lib.rs to export the module. Build verified successfully. (80bc73a)

@ntheile ntheile closed this Jan 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.

2 participants