{
    "meta": {
        "title": "D-Central — BOLT11 Lightning Invoice Tagged-Field Reference",
        "description": "All 11 currently defined BOLT11 tagged fields (p/s/d/n/h/x/c/f/r/9/m) with type values, lengths, meanings and required/optional rules, plus the human-readable-part prefixes and multipliers.",
        "generated": "2026-07-26T06:16:35+00:00",
        "version": "1.0",
        "as_of": "2026-07-26",
        "license": "https://creativecommons.org/licenses/by/4.0/",
        "license_name": "CC BY 4.0",
        "source": "https://d-central.tech/bolt11-invoice-reference/",
        "method": "Extracted from the canonical lightning/bolts 11-payment-encoding.md (raw, fetched 2026-07-26; 52,334 bytes). Field meanings are faithful compressions of the spec text; defaults (x=3600, c=18) and fixed lengths (p/h/s=52, n=53) cross-checked against the reader requirements section.",
        "provenance": "lightning/bolts (github.com/lightning/bolts) BOLT #11.",
        "record_count": 11
    },
    "rows": [
        {
            "tag": "p",
            "type_value": 1,
            "len": "52 x 5 bits (fixed)",
            "name": "payment_hash",
            "meaning": "256-bit SHA256 payment hash; the preimage of this hash provides proof of payment.",
            "rule": "REQUIRED — exactly one"
        },
        {
            "tag": "s",
            "type_value": 16,
            "len": "52 x 5 bits (fixed)",
            "name": "payment_secret",
            "meaning": "256-bit secret that prevents forwarding nodes from probing the payment recipient; used as payment_secret in the onion payload.",
            "rule": "REQUIRED — exactly one; reader MUST fail the payment without a valid s"
        },
        {
            "tag": "d",
            "type_value": 13,
            "len": "variable",
            "name": "description",
            "meaning": "Short description of the purpose of payment, valid UTF-8.",
            "rule": "Exactly one of d or h REQUIRED (both or neither = invalid)"
        },
        {
            "tag": "n",
            "type_value": 19,
            "len": "53 x 5 bits (fixed)",
            "name": "payee node id",
            "meaning": "33-byte public key of the payee node. If provided, the reader MUST validate the signature against it (low-S required) instead of performing public-key recovery.",
            "rule": "OPTIONAL"
        },
        {
            "tag": "h",
            "type_value": 23,
            "len": "52 x 5 bits (fixed)",
            "name": "description_hash",
            "meaning": "256-bit SHA256 of a longer description of the payment purpose, served out-of-band; commits to descriptions over the 639-byte field limit.",
            "rule": "Exactly one of d or h REQUIRED"
        },
        {
            "tag": "x",
            "type_value": 6,
            "len": "variable (minimal encoding)",
            "name": "expiry",
            "meaning": "Expiry time in seconds, big-endian. Default 3600 (1 hour) if not specified.",
            "rule": "OPTIONAL"
        },
        {
            "tag": "c",
            "type_value": 24,
            "len": "variable (minimal encoding)",
            "name": "min_final_cltv_expiry_delta",
            "meaning": "Minimum CLTV expiry delta for the last HTLC in the route. Default 18 if absent; the reader MUST use at least 18.",
            "rule": "OPTIONAL (writer SHOULD include one)"
        },
        {
            "tag": "f",
            "type_value": 9,
            "len": "variable, by address version",
            "name": "fallback on-chain address",
            "meaning": "Fallback address for on-chain payment: a 5-bit version + witness program, or 17 + pubkey hash (P2PKH), or 18 + script hash (P2SH). Readers MUST skip f fields with unknown versions.",
            "rule": "OPTIONAL (one or more, most-preferred first)"
        },
        {
            "tag": "r",
            "type_value": 3,
            "len": "variable; entries of 264+64+32+32+16 bits",
            "name": "route hint (private route)",
            "meaning": "One or more ordered entries (pubkey, short_channel_id, fee_base_msat, fee_proportional_millionths, cltv_expiry_delta) giving the forward route from a public node to the destination; multiple r fields allowed.",
            "rule": "REQUIRED (at least one) if no public channel is associated with the payee key"
        },
        {
            "tag": "9",
            "type_value": 5,
            "len": "variable (minimal encoding)",
            "name": "feature bits",
            "meaning": "Big-endian feature vector (BOLT 9) of features supported or required for receiving this payment; follows the it's-ok-to-be-odd rule. Unknown EVEN bits make the reader fail the payment; unknown odd bits are ignored.",
            "rule": "OPTIONAL — MUST be omitted entirely if all-zero"
        },
        {
            "tag": "m",
            "type_value": 27,
            "len": "variable (limited by hop payload size)",
            "name": "metadata",
            "meaning": "Additional metadata attached to the payment; the reader MUST send it as payment_metadata in the onion payload. Supports recipients that keep no per-payment state.",
            "rule": "OPTIONAL"
        }
    ]
}