Commit graph

130 commits

Author SHA1 Message Date
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
Roland
73540ef38b
docs: add arm64 quick start to README (#1036) 2025-01-28 16:57:53 +07:00
Moritz Kaminski
fae02f39df
Rename "Isolated" app permission to "Sub-wallet" (#982)
* Rename "Isolated" app permission to "Sub-wallet"

* chore: undo comment

* chore: more renaming of isolated app to sub-wallet

---------

Co-authored-by: Roland <33993199+rolznz@users.noreply.github.com>
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-01-17 15:17:21 +07:00
Roman D
df9393194a
feat: PostgreSQL support (#922)
* feat: enable Postgres connections

* feat: implement migration templates

* feat: convert sqlite-specific migrations to migration templates; adjust SQL syntax

* fix: add migration to fix postgres incompatibilities in the DB schema

* fix: correct SQL syntax for comparisons in the transactions service

* feat: database migration tool

* chore: update tests for testing with Postgres

* fix: update test

* fix: explicitly store mock timestamps in UTC

* chore: add txdb to go.mod and run tidy

* fix: serialize concurrent transactions when running tests with txdb

* chore: update README to mention postgres

* fix: use timestamptz in Postgres

* test: add Github action for testing the backend with Postgres

* chore: fix migration name and add comments

* docs: add db migration notes to README

* fix: address PR feedback

* fix: rename the cmd/migrate tool to cmd/db_migrate

* feat: add schema check in the DB migration tool

* test: use testdb instead of txdb for testing with Postgresql

* fix: fix tests after merge

* chore: comment out unused VACUUM in migrations

* fix: reset Postgres sequences after migrating data

* docs: update migrate command in readme

* fix: do not allow backup for migration when postgres is enabled

* chore: add debug logs for db backend type

* chore: use Logrus instead of slog for db_migrate

* fix: initialize logger in the keys tests

* test: add db_migrate test

* fix: use transaction object in db_migrate function

* fix: txlock in db migration test

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2025-01-16 17:17:24 +07:00
Michael Bumann
ca0eaecc04
Add note about persistent docker volumes (#976)
Update README.md
2025-01-12 11:36:14 +07:00
Roland
2d1327ee2b
feat: make it easier to run multiple hubs locally (#861) 2024-12-17 11:48:03 +07:00
Jose M. Valera Reales
5ab1ed52ae
Fix typo on readme requirements (#885)
docs: fix typo on readme requirements
2024-12-16 15:27:23 +07:00
Roland
0063bf09cf
feat: add budget warning event, rename app events (#813) 2024-11-27 14:45:33 -06:00
Roland
187b0681da
feat: enable VSS for new hubs with alby subscription (#780)
* feat: auth with alby account before node setup

* fix: redirect to auth page from start page if auth is needed

* feat: enable VSS for new hubs with alby subscription (wip)

* fix: use correct vss auth token endpoint, pass vss node identifier

* chore: update log content

* fix: do not log vss token

* chore: rename variable in test

* fix: add error handling for requesting vss auth token

* fix: vss auth_tokens base url

* fix: add check to disable unlinking account while vss is activated

* fix: ldk vss node identifier algorithm

* chore: extract vss token code from launchLNBackend
2024-11-13 16:23:11 -08:00
frnandu
5fdc803f7a
feat: app child key derived from wallet master key (#736)
* feat(appwalletKey): add GetBIP32ChildKey

* feat: fix interface

* feat: adding subscription WiP

* feat: handle nostr subscriptions for lifecycle of apps

* Delete .idea/.gitignore

* Delete .idea/hub.iml

* Delete .idea/modules.xml

* Delete .idea/vcs.xml

* fix: remove unnecessary

* fix: missing handling legacy app

* fix: review fixes

* fix: use app.ID for key calculation instead of passing in event

* fix: add TODO

* fix: remove unnecessary check

* fix: improve err handling and remove check

* chore: store master nostr key to avoid deriving each time

* chore: rename app nostr_pubkey to app_pubkey, extract app consumers into separate files

* chore: finish renaming

* fix: update app wallet pubkey on app creation

* fix: not NULL check

* fix: fix HandleEvent

* fix: error handling

* fix: error handling

* fix: move StartSubscription to start.go

* fix: remove duplicated error check

* fix: make tests use AppsService for creating apps

* chore: remove unused code

* chore: minor event handler improvements

- fix error code response when failing to update request event
- fix log content when failing to decrypt request event
- move logging of app to correct place

* fix: add event_handler tests for legacy app

* chore: add comment about legacy apps in deleteAppConsumer

* fix: remove unused app from tests

* fix: error handling in startAppWalletSubscription

* fix: only create event info and nostr subscription for master key if there are legacy apps

* fix: add legacy tests

* fix: move fetching of Nip47 event info to deleteAppConsumer

* fix: fixed arguments

* fix: use require instead of assert

* fix: adapt GetAppWalletKey to use DeriveKey with path 1'

* fix: for backends that don't use a mnemonic, create appKey from nostrSecretKey

* fix: cleanup eventPublisher Subscribers when relay reconnects

* fix: bip32.FirstHardenedChild + appID

* fix: remove unused env vars

* fix: generate new mnemonic if empty

* fix: add tests.CreateTestServiceWithMnemonic to fix TestEncryptedBackup

* fix: handle both relay and main ctx Done

* chore: add keys tests

* chore: add extra assertions to keys test

* chore: log when legacy app subscription is created

* chore: remove unnecessary break

* chore: add log when relay is successfully connected

* fix: only auto-start node if it has been started before

---------

Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-11-07 19:06:01 +07:00
Michael Bumann
71183a131a
README: Deprecate breez/greenlight (#714) 2024-09-26 12:16:08 +07:00
Roland
1eee3892be
doc: simplify README (#680)
* doc: simplify README

This simplifies the top of the README and adds links for users to quickly get started. Development docs are moved further down.

* doc: add links to other quick start scripts
2024-09-20 15:55:36 +07:00
Michael Bumann
7137a502cd
docs: esplora config readme (#647) 2024-09-17 20:53:58 +07:00
Roland
51b88cad31
docs: nicer readme (#606) 2024-09-04 15:01:14 +07:00
Roland
b37879103a
feat: auto unlock on startup (#592) 2024-09-04 10:53:12 +07:00
Michael Bumann
5cc9f7500e
docs: always pull image with docker (#518) 2024-08-24 13:00:45 +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
Roland
da5acc2174
doc: add linux quick start to README 2024-08-18 14:40:33 +07:00
Roland
8c17360b4f
feat: JWT auth (#418)
* feat: jwt auth

* feat: add basic developer page

* fix: logout

* chore: add extra copy in developer settings

* fix: developer page ui & copy

* fix: move debug tools to settings layout

* fix: change jwt secret length

* fix: remove empty headers property

* fix: remove empty comment

* fix: use proper json object for auth token response

* chore: update bitcoin connect dependency

* feat: basic csp (#439)

* feat: basic csp

* fix: remove vaul to avoid injection of inline scripts and styles

* fix: images to work with CSP

* chore: remove posthog

* chore: remove chatwoot

* fix: image csp issues

---------

Co-authored-by: René Aaron <rene@twentyuno.net>
Co-authored-by: René Aaron <100827540+reneaaron@users.noreply.github.com>
2024-08-10 17:04:15 +07:00
Roland
5dc668b2c8
feat: add env variable for disabling advanced setup (#421) 2024-08-08 16:36:46 +07:00
Michael Bumann
fef85eba71
Update README.md 2024-08-02 18:12:14 +03:00
Michael Bumann
41d814a3b3
fix: remove DO and update deploy readme (#390)
new DO platform lacks a persistent volume
2024-08-02 22:08:54 +07:00
Roland
b86c39d542
feat: new first channel flow (#324)
* feat: new first channel flow

* chore: hide public channel checkbox behind advanced options

* chore: always use new channel flow

* chore: add extra links to other ways to open channels

* fix: check if payment exists on order response

* chore: remove request to pay channel with alby shared node funds, add error handling

* feat: use auto channel flow for first channel

* chore: better other options on channel purchase pages

* chore: add user agent to alby api requests

* chore: remove unused lsp types

* chore: remove unused constant

* fix: hide sidebar hint on first channel flow

* fix: sync wallet on opening page

* fix: do not shown 0 confirmations on opening first channel page

* fix: make sure confetti only shows once

* fix: only show transferred alby funds toast once

* feat: add minimum threshold, add illustration

* fix: add constant

* fix: spacing, illustrations, copy

* fix: copy

* fix: copy

* fix: exchange light / dark images

* chore: update first channel opened page CTA to go to wallet

---------

Co-authored-by: René Aaron <rene@twentyuno.net>
2024-07-25 20:57:16 +07:00
Michael Bumann
21b11ce9fb
fix typo - README.md (#301)
correct mis-spelling of phoenixd
2024-07-20 15:25:11 +03:00
Roland
d8ba37427f
fix: remove race flag from go test commands (#304)
* fix: remove race flag from go test commands

* fix: multi_ payments assertions
2024-07-20 17:31:17 +07:00
Bitkarrot
a1f5deb6b1
Update README.md
correct mis-spelling of phoenixd
2024-07-19 22:39:47 -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 Bewick
3088373477 chore: rename everything to alby hub 2024-07-05 20:32:40 +07:00
Roland
1ae0edef46
docs: update readme 2024-07-05 13:10:18 +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
b4dae446cd
chore: fix race condition in multi_ tests by adding mutex (#530) 2024-06-28 13:59:48 +07:00
Roland Bewick
044a477761 docs: add volume for docker commands 2024-06-24 15:13:12 +07:00
Roland
bd2903682d
Feat: version display (#475) 2024-06-22 12:22:01 +07:00
Roland
d06b421769
Split service into packages (#435) 2024-06-17 19:42:09 +07:00
Michael Bumann
b7fcca1947
feat: buy bitcoin link (#405)
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-06-11 10:49:13 +07:00
Roland Bewick
df5718ee2a docs: add one-click install instructions to README 2024-06-08 11:58:09 +07:00
Roman D
100a09da43
Add embedded Go pprof and DataDog profilers (#366)
Co-authored-by: Roman Dmitrienko <roman@dmitrienko.com>
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-06-04 16:45:34 +07:00
Roman D
c63c29b552
Basic backup method (#249)
Co-authored-by: Roman Dmitrienko <roman@dmitrienko.com>
Co-authored-by: pavanjoshi914 <pavanj914@gmail.com>
Co-authored-by: Roland Bewick <roland.bewick@gmail.com>
2024-05-10 14:14:44 +07:00
René Aaron
3531fafb68 fix: breadcrumb links 2024-05-06 22:12:54 +02:00
Michael Bumann
13548157de
Update README.md 2024-04-24 15:46:48 +02:00
im-adithya
809970d717 chore: add getting started with mutinynet 2024-04-17 12:23:53 +02:00
Roland Bewick
1c00f880a6 doc: add LDK_ESPLORA_SERVER notes to README 2024-04-05 12:31:38 +07:00
Roland
249ce69f5d
Merge pull request #156 from getAlby/bumi-patch-1
README formatting
2024-03-27 09:53:21 +07:00
Roland Bewick
b16ae8e8de Merge remote-tracking branch 'origin/master' into feat/migrate-funds 2024-03-26 12:48:28 +07:00
Roland Bewick
ee4e1293eb fix: remove hardcoded OAuth redirects, update README 2024-03-26 11:32:53 +07:00
Michael Bumann
271d4059ec
formatting 2024-03-26 00:20:04 +02:00
Roman Dmitrienko
b7ed09d86b Use $XDG_DATA_HOME as working directory root by default. 2024-03-22 21:45:10 +01:00
Roland Bewick
ffd2ebf0db chore: move testnet instructions to README, add mutinynet 2024-03-20 11:29:57 +07:00
Moritz Kaminski
23764b2af3
Update README.md
found that "control over Nostr" is not clear enough and puts it too much in the Nostr corner.
2024-03-06 10:20:15 +01:00
Roland Bewick
fb3e0885fe doc: add fly commands to view logs 2024-03-05 12:17:12 +07:00