Commit graph

511 commits

Author SHA1 Message Date
Bufo
12cb6340b6 chore: temp 2026-04-13 16:04:12 +02:00
Bufo
8400ef5051
refactor: consolidate getTapOffers args into input object 2026-04-08 09:54:32 +02:00
Bufo
d940f37dc9
refactor: extract magma trading into separate module
Move all Magma/trading code out of the tapd module into a dedicated
`src/server/modules/api/magma/` module. The tapd module now only handles
local tapd node operations (assets, balances, minting, channels, universe).
2026-04-08 09:47:08 +02:00
Bufo
67f21b06ea
feat: add setupTradePartner mutation and TradeSheet UI
Add the Magma order flow for Taproot Asset trading: setupTradePartner
mutation orchestrates peer connection, Magma channel order creation,
invoice payment, and outbound channel opening using async.auto.

- Add TradeSheet component for executing trades from offer list
- Add getPeerChannels query with partner_public_key filter
- Add magmaOfferId and sockets to trade offer responses
- Make ambossAuth optional for offer/asset queries
- Add createMagmaOrderMutation GraphQL operation
- Inject NodeService and AmbossService into TapdResolver
- Add disabled state with tooltip for Trading nav when tapd unavailable
2026-04-07 22:34:43 +02:00
Michael G
9fcdbea766
feat: portfolio distribution card in assets tab (AMB-2390) (#687)
* feat: add portfolio distribution card to assets tab (AMB-2390)

Shows total USD value and per-asset breakdown (stacked bar chart + legend)
for Taproot Assets + BTC holdings. Percentages calculated client-side
from existing cached queries — no server changes required.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* refactor: extract colorFromString and formatUsd to lib utilities

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* fix: add aria-labels to bar segments and remove -mb-px scroll overflow

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Rajat Khanduri <38693805+wthrajat@users.noreply.github.com>
2026-04-07 09:06:22 -06:00
Anthony Potdevin
c30eb47a75
chore: edit and delete db nodes 2026-04-06 19:53:11 -06:00
Rajat Khanduri
178c12dc48
chore: add TH instructions in Trading view [AMB-2415] (#686)
* chore: add docs in trading view

* chore: just link to the docs
2026-04-06 09:08:15 -06:00
Anthony Potdevin
62ab375290
feat: add db nodes and switch in ui 2026-04-03 15:57:57 -06:00
Anthony Potdevin
dbc0f223c1
chore: connect db to login 2026-04-02 17:46:57 -06:00
Anthony Potdevin
51f09e2e23
chore: use url slug 2026-04-02 17:07:13 -06:00
Anthony Potdevin
129d094156
feat: node tables 2026-04-02 14:28:13 -06:00
Michael G
e3f882b329
Feat/amb 2389/asset usd balances (#684)
* feat: show asset balances in USD (AMB-2389)

Add prices { usd } to the getTapSupportedAssets query via the Amboss
trade API. Wire the price data through the server types and resolver,
then display a USD equivalent (≈ $X.XX) per balance entry in AssetsList.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: format balance using precision and display USD value

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Bufo <32884105+bufo24@users.noreply.github.com>
Co-authored-by: Rajat Khanduri <38693805+wthrajat@users.noreply.github.com>
2026-04-02 11:33:41 -06:00
Anthony Potdevin
87f4fe59fa
chore: handle db jwt auth 2026-04-01 21:56:54 -06:00
Anthony Potdevin
90dfdae4e3
chore: initial user setup 2026-04-01 20:36:28 -06:00
Anthony Potdevin
c63ea0d76f
chore: initial user and team tables 2026-04-01 17:31:01 -06:00
Anthony Potdevin
11178793b9
feat: db initial setup 2026-04-01 13:54:23 -06:00
Bufo
50302b82f4
feat: add taproot asset invoice creation (#671)
* feat: add taproot asset invoice creation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* add validation and tests for addTapAssetInvoice

- Validate at least one of assetId/groupKey is provided
- Validate assetAmount is positive
- Wrap service call with toWithError for consistent error handling
- Add tests covering: validation, success paths, fallbacks, error propagation

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: address comments

---------

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-31 10:01:31 +02:00
Bufo
72431bd1e2
feat: add trading offers section for taproot assets (#667)
* feat: add trading offers section for taproot assets

Query liquidity offers from an external API showing lightning nodes
that provide exchange between taproot assets and bitcoin. Each node
advertises their own exchange rate.

- Add TRADE_API_URL env var for configurable API endpoint
- Server proxies external GraphQL API via FetchService (same pattern as Amboss)
- Trading tab with asset selector, buy/sell toggle, sortable offers list
- Each offer shows node alias/pubkey, exchange rate, available amount

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: improve trading offers with auth, filtering, and API updates

- Update supported assets query path (public.assets.supported)
- Add Amboss auth to trade API calls via context
- Add configurable AMBOSS_AUTH_URL env var
- Wire up min amount filter with debounced input
- Format available capacity with thousand separators
- Add Amboss login banner for unauthenticated users
- Use host.docker.internal for Docker trade/auth URLs
- Remove unused assetIdToGroupKey map

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add small copy

* feat: add node capabilities query and disable tapd nav when unavailable

Add getNodeCapabilities GraphQL query that exposes provider capabilities.
Use it in the sidebar to gray out Assets and Trading nav items when
taproot_assets is not available, with a tooltip explaining how to enable it.
Also show a message when user has no supported assets to sell.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: lnd capabilities

* feat: hide Assets nav when tapd unavailable, keep Trading disabled

Assets is removed from sidebar when taproot_assets capability is missing.
Trading remains visible but grayed out with an explanatory tooltip.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: address comments

* fix: copy

* chore: address comments

* chore: nullable + security changes

---------

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 15:53:42 +00:00
Bufo
57d36eaa28
fix: patch tapd-api to make TLS cert optional (#678)
Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 13:54:22 +01:00
Bufo
581b3014a5
feat: add transfers, mint, burn, channels, universe management (#665)
* chore: align ui

* chore: reduce wait

* feat: add transfers, mint, burn, channels, universe management

- Transfers tab: history with inputs/outputs, chain fees, timestamps
- Channels tab: open taproot asset channels with peer pubkey and group key
- Advanced tab:
  - Mint: create assets with group key selection (new or existing)
  - Burn: destroy assets with confirmation checkbox
  - Universe: node address (copyable), add/remove/sync federation servers

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: address PR review feedback for mint and burn components

- Remove redundant groupKey balance query in BurnAsset (assetId query
  already provides names)
- Add support for minting non-grouped assets via new `grouped` parameter
- Use typed TapBalanceGroupBy enum instead of raw strings
- Regenerate GraphQL codegen output for all tapd mutations/queries

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use typed GraphQL enums and regenerate codegen output

Replace raw string literals with TapBalanceGroupBy and TapAssetType
enums across all tapd view components. Regenerate types via codegen
to pick up the new `grouped` mutation field.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: address asset comments

---------

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Rajat Khanduri <38693805+wthrajat@users.noreply.github.com>
2026-03-25 11:41:25 +00:00
Bufo
67551f93bd
fix: allow Boltz WebSocket in Content-Security-Policy (#676)
The default CSP blocked wss://api.boltz.exchange/v2/ws connections
needed for Boltz swap status updates.

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-25 12:20:23 +01:00
Bufo
00f248a2ea
feat: add taproot assets page with list, send, receive (#664)
* feat: update docker setup for tapd testing

- Add taproot asset flags to litd config (simple-taproot-chans, custom protocol)
- Entrypoint mines 6 blocks on startup for wallet funding
- Enable universe public access and proof courier config
- Update README with tapd workflow and universe federation docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: update docker setup for tapd testing

- Add taproot asset flags to litd config (simple-taproot-chans, custom protocol)
- Entrypoint mines 6 blocks on startup for wallet funding
- Enable universe public access and proof courier config
- Update README with tapd workflow and universe federation docs

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* feat: add taproot assets page with list, send, receive

- Add /assets route and Assets nav item
- Assets tab: list with balances, group by toggle, copyable group keys
- Send tab: paste address with auto-decode preview showing asset details
- Receive tab: group key dropdown (owned + universe assets), V2 address generation
- Hand-written GraphQL hooks (replaceable by codegen later)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: align ui

* chore: align ui

* chore: reduce wait

* chore: align client queries with updated GraphQL schema

- Remove filter param from getTapBalances query
- Use TapBalanceGroupBy enum instead of String
- Update groupBy values to GROUP_KEY/ASSET_ID
- Regenerate types from schema

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: remove unreachable assetId display in GROUP_KEY mode

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: remove accidental pnpm-lock.yaml

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* fix: use useRef instead of useState for decode timer

Fixes stale closure in useEffect cleanup function.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-authored-by: Rajat Khanduri <38693805+wthrajat@users.noreply.github.com>
2026-03-25 10:40:58 +01:00
Rajat Khanduri
7723781eca
chore: fix two factor authentication (#674)
* chore: fix two factor authentication

* chore: add thunderhub homepage

* chore: update lib version

* chore: revert lib version bump
2026-03-24 12:11:02 -06:00
Bufo
dbe7b1afe7
chore: generate types (#673)
Co-authored-by: Bufo <bufo24@users.noreply.github.com>
2026-03-24 14:34:43 +00:00
Bufo
c7f5ea1c50
feat: add tapd GraphQL API (#663)
* feat: add tapd GraphQL API

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: better types + logic changes

* chore: address comments

* chore: address comments

* feat: add name resolution for groupKey balances and utility functions

- Resolve asset names in groupKey balance mode via parallel assetId lookup
- Extract buildXCoordToFullKeyMap utility for universe root key mapping
- Add resolveFullGroupKey with 02-prefix fallback for unowned assets
- Add unit tests for both utility functions

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>

* chore: add test

* chore: return multiple namse

---------

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 15:16:23 +01:00
Bufo
81ed04e557
feat: add tapd server infrastructure and provider (#662)
Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 14:22:27 +00:00
Bufo
d3bc744460
feat: add litd as a backend provider (#660)
Add Lightning Terminal (litd) as an alternative backend alongside LND.
Users set `type: litd` in their YAML config to connect through litd's
gRPC proxy with the super macaroon. All existing LND features work
through litd — no new UI or dependencies.

- Add LightningProvider interface and ProviderRegistryService
- Add LitdService implementing LightningProvider, delegating to LndService
- getCertificate/getMacaroon resolve from litDir for litd accounts
- Update subscriptions to support litd nodes
- SSO supports litd via SSO_NODE_TYPE env var

Co-authored-by: Bufo <bufo24@users.noreply.github.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-20 11:35:21 +01:00
Anthony Potdevin
2cca730383
feat: allow for other LN providers 2026-03-17 18:15:21 -06:00
Anthony Potdevin
121f12b313
chore: cleanup sidebar sections 2026-03-17 10:36:50 -06:00
Anthony Potdevin
d70def4633
chore: better error handling 2026-03-17 10:30:55 -06:00
Anthony Potdevin
94b12c6641
chore: skip query when not expanded 2026-03-16 18:06:04 -06:00
Anthony Potdevin
11921effe0
feat: deposit and withdraw flows 2026-03-16 18:01:02 -06:00
Anthony Potdevin
026e905b34
chore: expandable sidebar items 2026-03-15 23:47:36 -06:00
Anthony Potdevin
efcb28d587
feat: rework boltz swaps 2026-03-15 23:36:03 -06:00
Anthony Potdevin
eeca15378a
chore: buy inbound cleanup 2026-03-15 12:33:49 -06:00
Anthony Potdevin
d6729d4409
chore: cleanup table stylings 2026-03-13 23:32:41 -06:00
Anthony Potdevin
fdcd6dafaa
chore: sidebar events 2026-03-13 23:19:25 -06:00
Anthony Potdevin
fd3387ae4e
chore: styles cleanup 2026-03-13 22:21:35 -06:00
Anthony Potdevin
1ae151ccdf
chore: homepage cleanup 2026-03-13 13:49:38 -06:00
Anthony Potdevin
6df966b22a
chore: quick action changes 2026-03-13 11:27:50 -06:00
Anthony Potdevin
7bf7b995f7
chore: small cleanup 2026-03-13 00:37:11 -06:00
Anthony Potdevin
4f8e249af7
chore: more views 2026-03-13 00:14:33 -06:00
Anthony Potdevin
1f416e9501
chore: stats page changes 2026-03-12 23:28:34 -06:00
Anthony Potdevin
6b7577e290
chore: page styling changes 2026-03-12 23:05:09 -06:00
Anthony Potdevin
d7f7c343a3
chore: swap styling changes 2026-03-12 22:46:06 -06:00
Anthony Potdevin
cc7999dda0
chore: login view styling 2026-03-12 22:01:40 -06:00
Anthony Potdevin
018c033aea
chore: homepage style changes 2026-03-12 21:54:00 -06:00
Anthony Potdevin
9c72a21bd7
chore: cleanup channels view 2026-03-12 20:18:08 -06:00
Anthony Potdevin
cb676a4b33
chore: more styling changes 2026-03-12 18:37:08 -06:00
Anthony Potdevin
555d4f976b
chore: font change 2026-03-12 16:48:40 -06:00