Introducing a new way to review your PRs.

Read the announcement

jamaljsr / polar

One-click Bitcoin Lightning networks for local app development & testing

View on GitHub

19 documents · Updated Oct 19, 2026

docs / tap-asset-interactions

Tap asset interactions

Tap asset interactions give the network designer a focused way to inspect Taproot Assets and use them on a local network. An engineer can open a Tap node, review its state, create an asset address, mint an asset, send an asset, and change the LND backend that supports the Tap node. For the wider designer model, see Network designer experience. Lightning channels and payments are described in Lightning connections and payments.

Tap node view

The Tap node view groups node state, connection data, and user actions into three tabs. It reads live asset data only when the node is running, so the view can distinguish saved node settings from data reported by the Tap service.

flowchart LR
    Select[Select Tap node] --> View[Open node view]
    View --> Info[Inspect node and assets]
    View --> Connect[View connection data]
    View --> Actions[Open asset actions]
    Actions --> Address[Create address]
    Actions --> Mint[Mint asset]
    Actions --> Send[Send asset]

Asset inspection

The Info tab shows the node type, Tap implementation, version, and current status. When the node is running, the designer loads its asset balances and lists each asset with its displayed amount. A node that has no reported assets shows an empty state, while a failed query shows the service error.

Selecting an asset opens a detail drawer. The drawer relates the current balance to the asset identity and its on-chain records. It can show the asset type, asset ID, genesis point, decimal setting, emission group key when present, and the anchor outpoints for the asset's UTXOs. Long IDs remain copyable even when the view shortens them for display.

References: src/…/TapDetails.tsx• L18-37 src/…/InfoTab.tsx• L16-59 src/…/AssetsList.tsx• L24-62 src/…/AssetInfoDrawer.tsx• L18-100

Connection information

The Connect tab helps an engineer use a running standalone Tapd node from another tool. It shows the local REST and gRPC endpoints, links to the Tap API documentation, and presents the admin certificate and macaroon as file paths or encoded strings. A stopped node does not expose connection details in the designer.

References: src/…/ConnectTab.tsx• L32-72 src/…/ConnectTab.tsx• L75-131

Node actions

The Actions tab exposes asset actions only while the node is started. Node maintenance actions remain available outside that state, which lets an engineer restart, rename, edit, or remove a node even when asset work is not possible.

References: src/…/ActionsTab.tsx• L21-44 src/…/SendAssetButton.tsx• L13-35 src/…/NewAddressButton.tsx• L13-35 src/…/MintAssetButton.tsx• L13-35

Asset address flow

An asset address identifies the asset and amount that a recipient wants to receive. The designer creates the address from an asset known by the selected node, then presents the encoded value for copying.

Address generation

The Create Asset Address action lets the engineer select an asset root and enter a human-readable amount. The form uses the asset's decimal setting to convert that amount to asset units before it asks the Tap service for an address. The result includes a success message and a copyable encoded address.

The form can sync asset roots from another Tap-capable node in the same network before selection. This supports local network experiments where the receiving node must first learn about an asset held by another node.

References: src/…/NewAddressModal.tsx• L47-57 src/…/NewAddressModal.tsx• L64-125 src/…/NewAddressModal.tsx• L133-214 src/…/tap.ts• L303-313

Address validation

The Send Asset action decodes the entered address as the engineer types. A valid address shows its asset name, type, and amount. If the selected node does not know the asset, the form shows the asset ID instead so the engineer can see why local asset data is incomplete.

References: src/…/SendAssetModal.tsx• L74-104 src/…/SendAssetModal.tsx• L106-161 src/…/tap.ts• L366-381

Asset minting

Minting creates a new Taproot Asset on a selected Tap-capable node. The designer supports normal assets with a supply and decimal display, plus collectibles whose supply is one and whose decimal display is zero.

The mint form also controls whether the mint batch is finalized and whether the node receives an automatic Bitcoin deposit when its LND wallet balance is low. Finalization is followed by local block mining so the new asset can reach a confirmed state. Asset group creation is represented in the request model, but its form control is not currently exposed in the designer.

References: src/…/MintAssetModal.tsx• L27-95 src/…/MintAssetModal.tsx• L97-181 src/…/tap.ts• L240-301

Asset sending

Sending transfers an asset from the selected Tap node to a decoded Taproot Asset address. The engineer enters the address, checks the decoded asset details, and submits only after the address is valid.

When the supporting LND wallet has too little Bitcoin, the modal warns the engineer and offers an automatic deposit option. After the transfer, the local network mines confirmation blocks and refreshes Tap data until the sender balance reflects the change. This makes the designer result track the state of the local test network rather than only the initial transfer response.

References: src/…/SendAssetModal.tsx• L23-72 src/…/SendAssetModal.tsx• L129-195 src/…/tap.ts• L315-364

Tap backend selection

A standalone Tapd node uses an LND node as its backend. The designer shows this relationship in the link view and lets the engineer choose a different LND node when the network state allows the change.

Backend relationship

The Tap backend link presents the Tap node and its LND backend together with their names, implementations, versions, and statuses. The Change Backend action starts with that relationship, then opens a form with one Tap node and one LND choice so the new connection is explicit.

References: src/…/TapBackend.tsx• L14-43 src/…/ChangeTapBackendButton.tsx• L16-38 src/…/ChangeTapBackendModal.tsx• L95-146

Backend change guards

Backend selection is a setup action rather than a live migration. The designer blocks the action after the Tap node has started and created its admin macaroon because changing the backend could make its asset state unusable. The network must also be stopped, and the selected LND version must meet the Tap version requirement. A backend change updates the saved node relationship and the runtime description, then refreshes the designer link.

References: src/…/ChangeTapBackendButton.tsx• L26-38 src/…/ChangeTapBackendModal.tsx• L43-84 src/…/network.ts• L678-702 src/…/setTapBackend.ts• L76-107

Change checklist

When these files or sections are changed, remember to consider these:

  • Keep the asset fields used by the balance list, detail drawer, address decoder, and amount formatter aligned. A change to asset IDs or decimal data can make displayed amounts or address checks incorrect.
  • Keep the Tap node selector and the Tap-capable node mapping aligned so standalone Tapd and integrated Litd nodes resolve to the same asset actions.
  • Keep backend compatibility rules consistent between the designer warning, the saved network update, and any external backend-selection action.
  • Keep the confirmation and refresh behavior after minting or sending aligned with the local Bitcoin mining flow. Otherwise the UI can show stale balances.
  • Keep connection labels and credential views aligned with the endpoint and credential data exposed by the selected Tap implementation.

Important failure modes

TriggerConsequenceGuard
The Tap node is stopped or cannot answer asset queriesThe designer cannot show live balances or perform asset actionsStart the node and surface the service error before relying on asset data
A send address is invalid or names an unknown assetThe transfer cannot be submitted, or the form cannot identify the assetDecode the address before enabling submit and show the asset ID when local metadata is missing
The supporting LND wallet has too little BitcoinMinting or sending can fail because the Tap node cannot fund its Bitcoin workWarn about the low balance and offer automatic funding
A backend is changed after Tap state existsExisting assets can become unusableRequire a stopped network and reject changes when the Tap admin macaroon exists
The selected LND version is below the Tap node requirementThe Tap node may not start correctly with its backendCheck compatibility before enabling or applying the backend change

Key files

FileWhy to read it
src/…/TapDetails.tsxEntry point for the Tap node view and its live-data loading behavior
src/…/InfoTab.tsxDefines the node and asset summary shown to the engineer
src/…/AssetInfoDrawer.tsxShows the relationship between an asset balance and its on-chain records
src/…/NewAddressModal.tsxExplains asset selection, Universe sync, amount conversion, and address copying
src/…/MintAssetModal.tsxDefines the normal-asset and collectible minting choices
src/…/SendAssetModal.tsxDefines address decoding, low-balance handling, and transfer submission
src/…/ChangeTapBackendModal.tsxShows the designer flow for selecting a new LND backend
src/…/TapBackend.tsxShows how the Tap-to-LND relationship appears in the network designer
src/…/tap.tsCoordinates Tap data refresh, minting, address work, sending, and confirmation updates
src/…/network.tsPersists Tap backend relationships and updates the runtime network description
src/…/tapFactory.tsShows how Tap-capable node types reach the shared asset service