Assets
Asset support in Rails Yield — Bitcoin and optional Taproot Assets — and the GraphQL surface for enabling, configuring, and querying per-asset balances.
Rails Yield deploys Bitcoin natively, and optionally activates Taproot Assets on a per-node basis for nodes whose underlying daemon supports them (Litd).
Bitcoin
Bitcoin is the default and primary asset. Balances are reported in satoshis (string) with a USD conversion attached by the price oracle.
| Field | Description |
|---|---|
funds.total.sats | Total Bitcoin held by the node (on-chain + channel balances). |
funds.available.sats | Bitcoin that can be withdrawn without closing channels. |
funds.reserved.sats | Bitcoin currently committed to open channels. |
funds.earnings.sats | Lifetime earnings (routing + liquidity). |
balances.balances[].principal | The deposited amount, used to compute APY. |
See Liquidity API for the full field reference.
Taproot Assets
Taproot Assets (TA) lets a Lightning node hold and route assets other than Bitcoin on top of the same channels. Rails exposes per-node toggles to enable, configure, and disable TA, and surfaces balances for each asset alongside the BTC balance.
Taproot Assets requires Litd, not plain LND. Only nodes connected via the Litd connector or provisioned as Fully Managed Litd can enable TA.
Enabling Taproot Assets
The enable_taproot_assets mutation verifies that the node's stored macaroon has TA permissions, optionally accepts new gRPC/REST sockets, and flips the taproot_assets_enabled flag. After it returns, the node's watcher is reinitialized to begin tracking TA balances.
mutation EnableTaprootAssets($input: EnableTaprootAssetsInput!) {
node {
asset {
enable_taproot_assets(input: $input) {
success
}
}
}
}Variables:
{
"input": {
"node_id": "<NODE_ID>",
"rest": "https://your-litd:8443",
"grpc": "your-litd:10009"
}
}curl -X POST https://rails.amboss.tech/graphql \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $AMBOSS_DASHBOARD_TOKEN" \
-d '{
"query": "mutation($input: EnableTaprootAssetsInput!) { node { asset { enable_taproot_assets(input: $input) { success } } } }",
"variables": { "input": { "node_id": "<NODE_ID>" } }
}'await client.request(ENABLE_TAPROOT_ASSETS, {
input: { node_id: process.env.NODE_ID },
});rest and grpc are optional. Provide them only if you need to update the sockets at the same time you enable TA (e.g. you've migrated the daemon to a new host).
Per-asset automation
Once TA is enabled, you can selectively automate routing for specific assets using set_asset_config. Enabling automation on one asset disables it for any others on the node so the automation engine has a single target.
mutation SetAssetConfig($input: SetAutomatedAssetInput!) {
node {
asset {
set_asset_config(input: $input) {
success
}
}
}
}Variables:
{
"input": {
"node_id": "<NODE_ID>",
"asset_id": "<TAPROOT_ASSET_ID>",
"enabled": true
}
}Disabling Taproot Assets
mutation DisableTaprootAssets($input: DisableTaprootAssetsInput!) {
node {
asset {
disable_taproot_assets(input: $input) {
success
}
}
}
}Querying per-asset balances
liquidity_provider.assets returns the BTC entry plus each enabled Taproot Asset, including on-chain and channel-side balances, the asset's share of total value, and current oracle quotes.
query AssetBalances($input: LiquidityProviderInput) {
user {
liquidity_provider(input: $input) {
assets {
list {
balances {
asset { id name asset_id decimal_display ticker }
onchain_balance { amount { amount asset { ticker } } }
channel_balance { amount { amount asset { ticker } } }
total_balance { amount { amount asset { ticker } } }
percentage
is_automated
quotes { ask { amount asset { ticker } } bid { amount asset { ticker } } }
}
}
}
}
}
}const data = await client.request(ASSET_BALANCES, {
input: { node_id: process.env.NODE_ID },
});
for (const a of data.user.liquidity_provider.assets.list.balances) {
console.log(a.asset.ticker, a.total_balance.amount.amount, "automated:", a.is_automated);
}Asset prices come from the Amboss price oracle as non-binding offers. Use them for display and accounting; do not treat them as guaranteed swap rates.
Field reference
| Object | Field | Description |
|---|---|---|
AssetBalances | asset | The Bitcoin or Taproot Asset metadata (ID, ticker, decimals). |
onchain_balance | Balance held on-chain (UTXOs, including unspent TA outputs). | |
channel_balance | Balance held in Lightning channels for this asset. | |
total_balance | onchain_balance + channel_balance. | |
percentage | Share of the node's total notional value. | |
is_automated | Whether routing automation is currently enabled for this asset. | |
quotes.ask / bid | Latest oracle quote against BTC. |