Commit graph

47 commits

Author SHA1 Message Date
Roland
e3373474f8
chore: remove json tags from lnclient models (#2375)
* chore: remove json tags from lnclient models

these should not be passed through the API directly

* fix: properly return not implemented errors

* fix: json tags on TLVRecord
2026-05-25 20:26:07 +05:30
Adithya Vardhan
0c421375e5
chore: update to use sat/msat suffixes everywhere (#2271)
* chore: align internal models and methods to use sat/msat suffixes

* chore: update request structs to use sat/msat suffixes

* fix: default max amount to 0 during app creation

* fix: simplify helper functions

* chore: remove unused lnclient probing methods

* chore: remove unused json tags on swap struct

* chore: update frontend to use sat/msat suffixes everywhere

* chore: use request types in frontend

* fix: linting

* fix: remove deprecated sat and msat fields in frontend

* chore: further changes

* fix: avoid sat/msat resolver variable shadowing

* fix: validate Support Alby amounts
2026-05-01 15:41:56 +05:30
Anshuman
1d3f9ecd41
feat: suffix balance/amount fields with explicit unit (Sat or Msat) (#2153)
* feat: add both Sat and Msat companion fields for all ambiguous balance/amount properties

* feat: add sat and msat companion fields to backend API responses

* chore: align frontend types and other missing fields

* chore: keep old formula for calculating total fee sat

* chore: remove unnecessary balance assignments in cashu and phoenix

* chore: add deprecated comment to non unit fields

* chore: rename callers and variable to specify units

* chore: remove msat fields for channel size and liquidity fields

* chore: drop msat fields from onchain channel size and liquidity responses

* chore: further changes

* chore: remove amount msat field onchain tx

* chore: remove msats from onchain balance response

* chore: remove msat fields for swaps

* chore: remove msat fields for punishment reserves

* chore: simplify rebalancing fee calculation

* chore: remove unnecessary fields

* chore: mark deprecated fields in frontend types

---------

Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
2026-04-17 13:53:28 +05:30
frnandu
928246d472
feat: add minCltvExpiryDelta for LND (#2139)
* feat: add minCltvExpiryDelta for LND

* feat: improve

* feat: test LastMinCltvExpiryDelta

* feat: fixes

* feat: fixes

* chore: address minor naming issue

* chore: run mockery

---------

Co-authored-by: anon <anon@anon.com>
Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
2026-03-25 23:06:57 +05:30
klabo
801f517478
refactor: remove unused LNClient.ListTransactions method (#2046)
Transactions are listed from the database via transactionsService, not
from the LN backend. The LNClient.ListTransactions method was never
called and each backend's implementation was dead code.

Closes #2045

Co-authored-by: Joel Klabo <max@klabo.world>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-10 21:01:32 +05:30
Roland
a294e1b169
feat: rebalance through node pubkey (#1731)
* feat: rebalance through node pubkey (WIP)

* fix: check if remote channel policy exists
2025-09-19 12:30:51 +07:00
Roland
3787f54006
Fix: use LNClient payment context (#1728)
* fix: mark failed payment as settled

* fix: use lnclient context for paying instead of request context
2025-09-16 20:53:02 +07:00
Roland
16eff34b8a
feat: track forwards to display on a home page widget (#1623)
* feat: track forwards to display on a home page widget

* fix: test

* chore: improve copy

* feat: configure PPM routing fees
2025-08-21 16:39:03 +05:30
Roland
46246b05d1
chore: remove payment timeout (#1592) 2025-08-11 22:06:49 +07:00
Adithya Vardhan
c653ae9090
feat: add BOLT-12 offers (#1242)
* feat: add BOLT-12 offers

* chore: display incoming bolt 12 payments in tx list

* chore: show bolt 12 button for users without alby account

* fix: check if bolt12payment fields are nil before assigning

* chore: do not pass in expiry

* fix: use checkLDKerr for error handling

* chore: add wails support

* chore: ui improvements

* chore: show bolt-12 for LDK backend type only

* chore: add offer info to tx metadata

* chore: use bolt12Offer

* fix: make offer description optional

* fix: remove incorrect log line

* chore: minor updates to node payBOLT12Offer command

* chore: remove unnecessary BOLT-12 offer copy

* chore: remove unused quantity

* chore: cleanup bolt12Offer usage in TransactionItem

* chore: prioritize lightning address, make bolt-12 copy consistent

* chore: rename generate offer to make offer

* fix: error handling

* chore: move payment hash into pay offer response

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-06-04 22:28:19 +07:00
Adithya Vardhan
9b6e88f1cc
feat: add option to edit fee while withdrawing (#1044)
* feat: add option to edit fee while withdrawing

* chore: add alert if fee rate exceeds fastest fee

* fix: tests

* feat: add support for LDK

* chore: do not accept decimal fee rates in frontend

* chore: minor withdraw UI improvements

* chore: make fee rate optional and update mockery

* chore: remove unnecessary else

* chore: do not format lottie files

* feat: add lotties files to prettier ignore

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-05-29 23:38:46 +07:00
frnandu
04fc9c90dc
feat: add hold invoices support for LND & LDK (#1298)
* feat: add LND hold invoices support

* fix: add HOLD_INVOICE_ACCEPTED_NOTIFICATION to notifications list returned by get_info

* fix: revert

* fix: remove unneeded null checks

* docs: add extra event type to README

* feat: add LND hold invoices support

* fix: add HOLD_INVOICE_ACCEPTED_NOTIFICATION to notifications list returned by get_info

* fix: revert

* fix: remove unneeded null checks

* docs: add extra event type to README

* fix: remove 0 expiry checking in the make_hold_invoice_controller

* fix: use JSON logging

* revert fly.toml

* fix: duplicated check

* fix: move publishing nwc_hold_invoice_accepted out of the transaction

* fix: move publishing nwc_hold_invoice_accepted out of the transaction

* fix: check the invoice state ACCEPTED before calling the lnClient.SettleHoldInvoice

* fix: check the invoice state ACCEPTED before calling the lnClient.SettleHoldInvoice

* fix: check the invoice state ACCEPTED before calling the lnClient.SettleHoldInvoice

* fix: check the invoice state ACCEPTED before calling the lnClient.SettleHoldInvoice

* fix: cancel hold invoice tests

* fix: make hold invoice tests

* fix: make hold invoice tests

* fix: settle hold invoice tests

* fix: resubscribe to pending hold invoices

* fix: missing WatchHoldInvoice
 in the mocks

* feat: add LDK impl

* fix: cleanup

* fix: payment_hash

* fix: remove unneeded update

* feat: add support for self payments for hold invoices (#1304)

Co-authored-by: frnandu <frnandu@gmail.com>

* fix: remove hold invoices scope

* fix: remove hold invoices scope

* fix: mock hold bolt11 expiry to 10 years

* fix: sleep 1 second to give a change of lookupinvoice to read cancelled

* fix: missing timeout param

* feat: add hold invoice settle deadline to transactions (#1324)

* chore: update mockery, remove unused hold invoice method

* chore: remove unnecessary comment

* chore: remove unused code

* fix: do not return hold transaction if lookup failed

* chore: remove unused code

* fix: return correct errors from nip47 controllers, remove unused code

* fix: failing test

* chore: remove unnecessary code

* fix: make error message more general

* chore: remove unused code

* fix: use correct context in lnd service

* fix: unstable hold payments test

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
2025-05-26 16:51:23 +07:00
im-adithya
75794f4146 chore: change timeout seconds param to pointer 2025-05-14 18:32:52 +05:30
im-adithya
54e8616a3f chore: change param from isHoldInvoice to timeoutSeconds 2025-05-09 17:47:45 +05:30
im-adithya
c47810b7e6 chore: add support to pay hold invoices without cancelling 2025-05-08 16:54:30 +05:30
im-adithya
839f072f5e chore: remove updated_at field 2025-05-05 13:40:59 +05:30
Roland Bewick
153da0ee12 feat: add on-chain transactions to node page 2025-05-02 13:51:37 +07:00
Adithya Vardhan
ae87f3a36f
fix: return offline channel balance in get_balance nwc call (#1217) 2025-03-24 19:40:07 +07:00
Roman D
0f3f03caad
feat: return pending sweep balance details in LDK (#1087)
* feat: return pending sweep balance details in LDK

* fix: filter out empty values in pending sweep details

* chore: also show pending sweep balances on the node page

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-02-14 15:12:14 +07:00
Roman D
d799bdff76
feat: proposal: custom node commands (#1007)
* feat: custom node command execution models and methods

* feat: implement custom node command handlers for HTTP server and Wails

* chore: expose GetNodeCommands API methods in HTTP and Wails

* chore: add sample custom node command implementation for Cashu restore

* feat: add frontend for custom node commands

* chore: consistent naming of custom node command entities

* chore: consistent naming of custom node command entities

* chore: return interface{} as custom node command execution result

* test: add tests for ParseCommandLine

* chore: add extra ParseCommandLine tests for json

* test: add API tests and mocks

* fix: stabilize order of arguments when invoking custom node commands

* test: add test for unsupported custom node command argument

* chore: add the mockery configuration file and move mocks to tests/mocks

* docs: document mockery usage

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-01-30 18:20:17 +07:00
Roman D
ff9ef56f43
feat: health check endpoint (#971)
* chore: move Nostr relay readiness methods to service.go

* feat: basic health checks implemented

* chore: rename alby info variable

* feat: add basic health check ui, remove unnecessary alarms

* fix: health indicator layout on mobile

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-01-17 15:29:20 +07:00
Roland
dcfd016455
feat: include funding transaction in pending closing channel message (#941)
also includes vout in funding tx links
2025-01-06 23:33:13 +07:00
Roman D
321fb8ddf0
feat: balance details for pending channel closures (#932)
* feat: balance details for pending channel closures

* feat: display counterparty and amount for each pending closed channel

* feat: lnd get pending balance details

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-12-31 11:49:06 +07:00
Roland
044e0c3ad1
feat: pay 0-amount invoices (#860)
* feat: pay 0-amount invoices

* chore: update lightning-tools dependency

* feat: pay 0 amount invoices in LND

* chore: typo

* fix: lightning-tools dependency version

---------

Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
2024-12-17 11:58:43 +07:00
Roland
102f29b541
chore: update LDK-node dependency to 0.4.2 (#753)
* chore: update LDK-node dependency to 0.4.1

* fix: set node alias to open public channels

* chore: update ldk-node-go dependency

* chore: set 100x higher dust exposure for trusted peers

* fix: change dust multiplier for trusted peers to 10x

* fix: do not show pending balance from closed channels for ClaimableAwaitingConfirmations
2024-11-05 15:12:10 +07:00
Roland Bewick
7456a8880a fix: do not show duplicated incoming funds from channel closures
There is overlap in balance from pending closed channels and total onchain balance.

They will show as incoming in the total onchain balance once the channel becomes sweepable.

This PR also adds extra balance info that can be retrieved from debug tools -> get balances
2024-10-24 16:49:21 +07:00
Adithya Vardhan
02d9d26ef3
chore: remove get balance method from LN client (#672) 2024-09-20 23:27:04 +07:00
Roland
ae430991c7
feat: withdraw custom amount from savings (#597)
* feat: withdraw custom amount from savings

* feat: simplify withdraw onchain funds ui
2024-09-04 11:44:58 +07:00
Roland
6e78d81a1a
feat: show pending balances from channel closures (LDK) (#602)
* feat: show pending balances from channel closures (LDK)

* chore: improve pending balances copy

Co-authored-by: Michael Bumann <hello@michaelbumann.com>

* chore: format

---------

Co-authored-by: Michael Bumann <hello@michaelbumann.com>
2024-09-04 10:57:47 +07:00
Roland
5f1b0decdf
feat: move events to transactions service (#510)
* feat: move events to transactions service (WIP)

* fix: tests

* chore: improve quota exceeded error message

* fix: list transactions offset

* fix: add nwc_permission_denied events in transactions service

* fix: check for duplicate payment

* fix: unstable test

* chore: add payment settled tests

* fix: tests race condition

* fix: internal keysend support

* chore: add tests for check unsettled transactions fallback

* chore: add extra tests

* chore: extra tests

* fix: pass metadata in keysend self payments

* fix: throw error if transaction is already marked as sent

* fix: mark transaction settled

* fix: consume events in alby oauth service

* chore: add TODOs

* fix: do not fire duplicate failed payment events

* docs: add basic architecture docs to readme
2024-08-23 11:52:47 +07:00
Adithya Vardhan
b112484990
chore: add other lnd methods (#490)
* chore: add other lnd methods

* feat(lnd): add sendcoins and debuginfo

* chore: always return pubkey in GetNodeConnectionInfo
2024-08-22 19:59:51 +07:00
Adithya Vardhan
67ca173261
feat: show tlv records in transaction popup (#365)
* feat: show tlv records in transaction popup

* chore: add podcastinginfo component

* chore: remove ? in podcasting info component

* chore: decode tlv record values in backend

* chore: add backup for tx description

* feat: add boostagram column and use jsonb in metadata

* chore: do not modify metadata while parsing

* chore: combine boostagram and metadata migration

* feat: extract description from custom records

* chore: fix keysend tests

* chore: change metadata param type in makeinvoice

* chore: fix make invoice tests

* chore: metadata fixes

* fix: boostragram and metadata migration

- only migrate values that are non-empty
- wrap in db transaction

* chore: set metadata json column to null if empty

* fix: remove jsonb from migration

* chore: code cleanup, rename api models, fix metadata usage

* fix: metadata format

* chore: remove unused contant

* fix: tests

* chore: improve tests

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-08-09 22:30:49 +07:00
Roland
4489bdca90
fix: do not allow creating another outgoing channel while one has 0 confirmations (#420) 2024-08-08 13:01:24 +07:00
Roland
c79e11e6f7
fix: duplicate transaction entry in keysend payments (#385)
* fix: duplicate transaction entry in keysend payments

* chore: update ldk-node-go dependency

* fix: tests

* fix: remove pay_keysend supported method in breez LNClient

* feat: include fees paid in pay_keysend and multi_pay_keysend response

* chore: add extra multi_keysend test

* chore: add extra assertions in keysend tests
2024-08-02 20:45:54 +07:00
René Aaron
e1adbe78c9
fix: improvements for smaller screens (#260)
* fix: scrollable sidebar

* fix: 2 rows of buttons on wallet page

* fix: try to make table scrollable

* feat: add channels cards on mobile (#368)

* feat: add channels cards on mobile

* feat: improve card design, reduce duplication

* fix: border rounding

* fix: badge styles

* fix: move link

* fix: move link to context menu

* fix: add positive colors to other themes

* fix: logo clipPath

* fix: introduce warning color + badge

* fix: nesting warning

---------

Co-authored-by: René Aaron <rene@twentyuno.net>

* fix: app header content alignment

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
2024-07-31 14:10:26 +07:00
Roland
f63429f5e5
chore: add transaction indexes, make fees non-nullable (#305) 2024-07-22 11:45:11 +07:00
Roland
1391119eb9
Feat: dynamic budgets (#226)
* feat: add transactions table

* feat: add transactions service with makeinvoice method

* feat: use internal transactions WIP

* feat: check unsettled transactions

* feat: use transactions service in nip47 package WIP

* feat: use transactions service in NIP-47 handlers

* fix: transaction list colors

* fix: tests

* chore: remove old payments table

* fix: return budget usage as sats

* feat: use internal transactions table for keysend payments

* feat: consume nwc_payment_received event in transaction service (WIP)

* feat: update existing transaction from nwc_payment_received event in transactions service

* feat: update existing transaction from nwc_payment_sent event in transactions service

* feat: handle async payment failed events in transactions service

* fix: tests

* feat: correctly implement NIP-47 NOT_FOUND error code

* feat: intercept self payments

* feat: isolated balance and visibility

* feat: validate keysend payment does not exceed app internal balance

* feat: budget check in transactions service, correctly pass payment errors to NIP-47 response

also reduce query duplication

* fix: order transactions when looking up transaction

* feat: add fee reserves to unsettled outgoing transactions

* chore: rename app permissions max amount field

* chore: rename transaction amount values to be clearly millisats

* chore: merge balance type and visibility into isolated property on apps table

* chore: move duplicated permission check from nip-47 controllers to handler

* fix: app name in transaction list

* Feat: permissions revamp v2 (#273)

* feat: revamp permissions component

* chore: changes

* chore: changes

* chore: add view mode for show app screen

* chore: further changes

* feat: new illustration for linking account (#254)

* feat: new illustration for linking account

* fix: update paths

* fix: icon props (#256)

* fix: use date from frontend

* chore: add expiryselect component

* chore: further changes

* chore: further changes

* chore: add date-fns for date picker

* chore: further changes

* chore: further changes

* fix: add central LDK gossip node to help gossip new public channels (#262)

* fix: make dialog responsive (#258)

* chore: further changes

* typo

* chore: spacing issues

* chore: use scopes from capabilities

* chore: change scope type descriptions

* chore: styling fixes

* chore: fix typings

* chore: budget renewal component

* fix: LDK mark channel as inactive and show error if counterparty forwarding info missing (#267)

fix: mark channel as inactive and show error if counterparty forwarding info missing

* chore: remove unnecessary dark classes (#255)

* fix: links to open first channel in sidebar and onboarding checklist (#268)

* feat: improve migrate node UI (#269)

* fix: migrate node copy (#270)

* fix: stop nostr when app is shutdown and use context to stop lnclient (#271)

* fix: permissions revamp WIP

* feat: basic isolated apps UI

* fix: new app connection, edit app connection, deep linking

---------

Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
Co-authored-by: René Aaron <100827540+reneaaron@users.noreply.github.com>
Co-authored-by: Michael Bumann <hello@michaelbumann.com>

* fix: make transactions table ID autoincrement

* fix: do not send unrelated notifications to isolated apps

* fix: nip-47 notifications not receiving updated transaction state

* fix: migrate existing tables to have autoincrementing primary keys (#274)

* fix: migrate existing tables to have autoincrementing primary keys

* fix: recreate request and response event tables after apps

* fix: remove null from request_events app_id

* fix: do not crash when reloading app created page

* chore: update pragma commands, add busy_timeout

* fix: remove unnecessary migration of user_configs table

* chore: update comment on autoincrement migration

* feat: sqlite database config improvements

* fix: autoincrement migration to delete unlinked app permissions

* chore: update tests for dynamic budgets (WIP)

* fix: get balance tests

* chore: add extra event handler tests

* chore: add extra event handler test

* chore: add extra multi_pay_invoice tests

* chore: transactions service tests (WIP)

* chore: add transactions service payment tests

* chore: add tests for self payments

* fix: notifications tests

* chore: add notifications tests for transactions service

* chore: add fee reserve tests for transactions service

* chore: add list transactions tests

* chore: add keysend tests for transactions service

* feat: subscribe for payments and invoices (#281)

* fix: db transaction should be passed as pointer

* feat(lnd): subscribe for payments and invoices

* chore: rearrange check for settled

* chore: remove TODO

* chore: retry on error and add select

* chore: publish payment failed event

* chore: use json logging

* feat: add lnd notification types

* chore: remove sleep

* fix: incorrect key on transaction list items

* fix: test

* fix: disable isolated app type on non-supported backends

---------

Co-authored-by: im-adithya <imadithyavardhan@gmail.com>
Co-authored-by: René Aaron <100827540+reneaaron@users.noreply.github.com>
Co-authored-by: Michael Bumann <hello@michaelbumann.com>
2024-07-19 23:30:22 +07:00
Roland
7a3a8a2bbe
fix: LDK mark channel as inactive and show error if counterparty forwarding info missing (#267)
fix: mark channel as inactive and show error if counterparty forwarding info missing
2024-07-13 12:00:22 +07:00
Roland
12412ff399
feat: backend-specific capabilities (#508)
Co-authored-by: Adithya Vardhan <imadithyavardhan@gmail.com>
2024-07-01 20:30:40 +07:00
Adithya Vardhan
6a56ea40b5
feat: send and receive functionality (#465)
Co-authored-by: René Aaron <rene@twentyuno.net>
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-06-28 12:02:36 +07:00
Roland
fa2e70f285
feat: channel liquidity alerts on liquidity page (#521) 2024-06-28 08:57:12 +07:00
René Aaron
7d470584b6
feat: channel visualization (#498)
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-06-25 21:20:03 +07:00
Roland
93d70f67fa
feat: update channel (#457)
Co-authored-by: Adithya Vardhan <imadithyavardhan@gmail.com>
2024-06-18 15:22:19 +07:00
Michael Bumann
6bf900e806
chore: rename custom_records to tlv_records (#448)
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-06-17 19:43:50 +07:00
Roland
d06b421769
Split service into packages (#435) 2024-06-17 19:42:09 +07:00
Roland
16dc19e8b5
feat: peers page and disconnect peer (#356) 2024-05-30 23:04:32 +07:00
Roland
073d669e03
Refactor: API cleanup (#338) 2024-05-30 00:06:06 +07:00
Renamed from models/lnclient/lnclient.go (Browse further)