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).
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
* 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>
* 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>
* 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>
* 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>
* 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>
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>
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>