Commit graph

512 commits

Author SHA1 Message Date
orbitalturtle
e0b23440a3
Merge pull request #253 from vincenzopalazzo/claude/hardcore-mclaren
fix: reject offers with offer_amount=0 per BOLT 12
2026-04-14 14:55:45 -05:00
Vincenzo Palazzo
1b28412f6a fix: reject offers with offer_amount=0 per BOLT 12 spec
Validate that offer_amount is non-zero when parsing bolt12 offers,
rejecting malformed offers early per the BOLT 12 specification. Also
update CLI help text to note the amount requirement.

Closes #251.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 07:48:12 +02:00
orbitalturtle
833a540b27
Merge pull request #255 from orbitalturtle/fix-cargo-audit-workflow
fix: resolve CI workflow errors
2026-03-31 16:49:26 -05:00
Orbital
aef4d27b60
fix: resolve clippy warnings 2026-03-27 17:25:35 -05:00
Orbital
b2b1500d9f
chore: upgrade rust in nix flake 2026-03-24 19:09:56 -05:00
Orbital
971d192764
chore: update dependency versions to satisfy cargo audit 2026-03-24 16:51:40 -05:00
Orbital
ffda24ea29
fix: resolve cargo audit CI workflow error 2026-03-24 16:20:37 -05:00
orbitalturtle
971f69fc5a
Merge pull request #252 from diegorodriguezv/patch-1
Update README with v0.4.0 milestone details
2026-03-16 15:23:30 -05:00
diegorodriguezv
bb9caa5c47
Update README with v0.4.0 milestone details
Fix blank checkbox formatting.
2026-03-09 11:13:40 -05:00
Maurice Poirrier
3c20b5187b
Merge pull request #248 from niteshbalusu11/patch-1
Update Rust base image version to 1.85
2025-11-13 16:45:21 -03:00
Nitesh
7e78a6efc4
Update Rust base image version to 1.85
Match rust image version to toolchain version.
2025-11-13 11:43:05 -05:00
Maurice Poirrier
25ca60add6
Merge pull request #245 from a-mpch/2025-10-update-docs
docs: add v0.3.0 specifics in documentation
2025-10-04 13:23:51 +02:00
Maurice
10193e6686
docs: add v0.3.0 specifics in documentation
This commit updates README and docs folder that not updated on
how can an offer be made and how LNDK now can use other data path
for storing logs and TLS certs.
2025-10-03 12:12:24 +02:00
Maurice Poirrier
406b2a08f9
Merge pull request #244 from benthecarman/positial-args
refactor: require named arguments for CreateOffer CLI options
2025-10-01 14:56:58 +02:00
benthecarman
4d22162385
refactor: require named arguments for CreateOffer CLI options
Change all CreateOffer command arguments to use long-form flags (--amount,
--description, --issuer, --expiry, --quantity) instead of positional
arguments. This is needed otherwise you cannot for example create an
offer with a quantity of Some(0), without having to specify all the
other arguments because they were positional.
2025-10-01 08:07:20 +02:00
Maurice Poirrier
ac719ea70c
Merge pull request #243 from a-mpch/2025-09-cli-docs
cli: add docs for macaroon and grpc options
2025-09-30 16:17:43 +02:00
Maurice
12be7cae75
cli: add docs for macaroon and grpc options 2025-09-30 15:54:43 +02:00
Maurice Poirrier
b50e09c338
Merge pull request #242 from a-mpch/2025-09-fix-dist-dependency
chore: update protobuf version on ci release
2025-09-29 10:56:16 +02:00
Maurice
28b5597563
chore: update protobuf version on ci release 2025-09-29 10:41:59 +02:00
Maurice Poirrier
7e15ab221d
Merge pull request #241 from lndk-org/release-0.3.0
Release 0.3.0
2025-09-29 10:04:33 +02:00
Maurice
b02313f637
chore: Release lndk version 0.3.0 2025-09-29 09:48:31 +02:00
Maurice
384dbd5ffd
chore: Prepare 0.3.0 release 2025-09-29 09:48:31 +02:00
Maurice Poirrier
933d68bfa8
Merge pull request #238 from IgnacioPorte/master
Improve CLI error messages
2025-09-27 10:14:41 +02:00
Ignacio Porte
9a214bda78 chore: replace nested LndStatus with String messages in error enums
Replace LndStatus variants with String in OfferError and LndError enums, updating all error handling to extract message from LndStatus before converting to String. This simplifies error handling and provides cleaner error messages to users.
2025-09-26 12:51:15 -03:00
Ignacio Porte
efe5688552 refactor(cli): extract repeated gRPC client setup and metadata handling
Extracted duplicated gRPC channel creation, client authentication, and metadata handling code into reusable functions to reduce code duplication and improve error handling.
2025-09-26 12:45:46 -03:00
Ignacio Porte
e990a6cde2 chore: use machine error codes in cli
Unify error handling across CLI commands by introducing consistent error message formatting and using machine-readable codes
2025-09-26 12:45:46 -03:00
Maurice Poirrier
1bb99f47f9
Merge pull request #240 from a-mpch/2025-09-fix-nix-ci
chore: bump install-nix-action to v31.7.0
2025-09-26 11:52:40 +02:00
Maurice
f849e2b068
chore: bump install-nix-action to v31.7.0 2025-09-26 11:24:44 +02:00
Maurice Poirrier
f7c5a03af9
Merge pull request #235 from f3r10/2025-09-better-peer-selection-for-offers
Better peer selection for offers
2025-09-25 23:31:22 +02:00
f3r10
4556ea16e6
itest: testing same node with multiple channels
If a node has multiple channels open, only one them has to be used as a
blinded path, ignoring the rest.
2025-09-25 23:14:11 +02:00
f3r10
ad575148df
tests: Add integration test for check pay offer
This commit adds an integration test for checking the pay offer
feature using 3 available blinded paths, which nodes support onion messages
and are connected to more channels.
2025-09-25 23:14:11 +02:00
f3r10
b4cbe4e770
offers: better peer selection for offers
The current approach uses random peers. These random peers may be
temporary connections, so that if someone tries to pay and offer, the
selected peers may not be connected anymore, and the payment will fail.
Instead of choosing random peers, this commit will select public
open channels, creating long-lived offers. It tries to choose three
different channels at most. In order for these channels to be valid, the node
has to have onion support, and the node has to be connect to more public
channels. This new logic is only for creating offers.

The current logic of choosing random peers is better for outgoing payments
and remains as such.
2025-09-25 23:14:11 +02:00
dunxen
822fe82302
Merge pull request #239 from a-mpch/2025-09-upgrade-dist
chore: bump dist from 0.28.0 to 0.30.0
2025-09-22 23:06:18 +02:00
Maurice
415594d9b7
docs: change link to cargo-dist 2025-09-22 17:47:03 -03:00
Maurice
590c5b2264
chore: bump dist from 0.28.0 to 0.30.0
In order to release v0.3 we upgrade dist to latest version.
2025-09-22 16:23:55 -03:00
Maurice Poirrier
109c2ac154
Merge pull request #234 from f3r10/2025-09-add-retry-intents-on-connect-to-peer
Add retry intents on connect to peer
2025-09-18 10:18:05 -03:00
f3r10
e47bfa5b14 messenger: add retry intents on connect to peer
If the `connect_to_peer` task fails somehow, it won't retry the connection
probably missing the connection to the peer. Therefore, this commit adds
a exponential back off strategy for the retries of `connect_to_peer`.
2025-09-18 06:18:33 -05:00
Maurice Poirrier
3ddf4aaeb2
Merge pull request #227 from IgnacioPorte/master
Add error codes to responses
2025-09-17 14:50:03 -03:00
Maurice Poirrier
832d2cb0a6
Merge pull request #237 from a-mpch/2025-09-fix-flaky-test-retry
Fix flaky test on building network test payment retry
2025-09-17 12:44:27 -03:00
Maurice
661b50d641
itest: fix flaky test on building network test payment retry
Mine and confirm channel to LND one by one instead of batching to
ensure all channels are open when creating the blinded path and
then closing channels.

LND force close channels when wallet is not in sync with the
blockchain.
2025-09-17 12:12:11 -03:00
Ignacio Porte
53f0e3a969 docs: add error handling guide with grpcurl examples
Add concise error documentation showing how to use grpcurl with LNDK and what clients need to access structured error details.
2025-09-17 11:58:23 -03:00
Ignacio Porte
e9b29f4eb8 fix: use correct google.rpc.Status with structured error details
Replace custom JSON error info format with tonic_types ErrorDetails. Add missing import for google/rpc/error_details.proto in lndkrpc.proto to enable proper decoding of ErrorInfo messages in grpcurl and other clients.
2025-09-17 11:58:23 -03:00
Ignacio Porte
09be515d6d refactor: improve error handling in Bolt12InvoiceString conversion
Change error type from DecodeError to OfferError and replace unwrap() with proper error handling for hex decode failures.
2025-09-16 00:30:16 -03:00
Ignacio Porte
f285034cbd refactor(server): simplify quantity parsing by removing error handling
Remove unreachable error handling since NonZeroU64::new() can never return None
after the earlier quantity == 0 check.
2025-09-16 00:30:16 -03:00
Ignacio Porte
741b6acf5a chore: add LndError enum for improved LND error handling
Create new LndError enum with ConnectError, NetworkParseError,
NetworkNotConnected, and ServiceUnavailable variants to provide
structured error handling for LND operations. Replace ad-hoc error
handling in server.rs with proper error types and gRPC status
mapping, improving error consistency across the codebase.
2025-09-16 00:30:16 -03:00
Ignacio Porte
bc0668f3ab refactor: move TLS utilities from server to main module
Move TLS certificate generation, reading, and related utilities from
server.rs to main.rs where they are actually used. This improves
separation of concerns by keeping application startup logic in main
and focusing server.rs on gRPC service implementation.
2025-09-16 00:30:16 -03:00
Ignacio Porte
e44d422108 chore: standardize error responses, adding stable machine codes
Add stable, machine-readable error codes responses alongside
human-readable messages for better error handling and processing.
2025-09-16 00:30:16 -03:00
Maurice Poirrier
24f3f0ff5a
Merge pull request #236 from a-mpch/2025-09-refactor-logs
multi: add logs when tracking payments
2025-09-15 17:42:52 -03:00
Maurice Poirrier
70de1ea1fd
Merge pull request #219 from a-mpch/2025-07-retry-payment-blinded-paths
Retry payments on failure
2025-09-15 17:41:15 -03:00
Maurice
cec09ba828
multi: add logs when tracking payments
Add more logs when tracking a payment and remove unneeded verbose
information on existing logs.
2025-09-15 17:19:39 -03:00