LIGHTNING-ASKRENE-RESERVE(7)

πŸ“¦
version 26.06.9 Β· 2 versions
, in nixpkgs unstable

πŸ’… LIGHTNING-ASKRENE-RESERVE(7) β€” the askrene-reserve manual, bestie edition πŸŽ€

okay so real talk, this is the manual page for lightning-askrene-reserve (that's the 7th section, obvs), and honestly? it's a whole vibe. it's short, it's sweet, and it's literally the "hey bestie i'm trying this path rn" of the Lightning world. let's get into it ✨


🌸 NAME 🌸

askrene-reserve β€” the command that's basically you tapping askrene on the shoulder like "bestie, just so you know, i'm trying a path rn πŸ‘€"


πŸ¦‹ SYNOPSIS πŸ¦‹

askrene-reserve path

that's it. that's the whole call. iconic, honestly πŸ’…


πŸ’– DESCRIPTION πŸ’–

so this command was added in v24.11 β€” mark your calendars πŸ“…βœ¨

the askrene-reserve RPC command is how you tell askrene that a path is currently being attempted. and like, why does that matter? because askrene then takes that into account when other getroutes calls happen later. it's giving "i'm holding this spot, don't give it away" energy, and honestly she ate πŸ”₯

⚠️ okay important: you should call askrene-unreserve after the attempt has finished β€” and you gotta do it before you call askrene-inform. don't leave a reservation hanging, that's a red flag fr fr 😭

also note that any additional properties inside the path elements are ignored β€” which is super useful when you're feeding it the result of getroutes, since that output brings extra stuff along and askrene is just like "cool, don't care, still works" 🫢

  • path (array of objects) β€” the path in question, bestie:
    • short_channel_id_dir (short_channel_id_dir) β€” the channel and the direction that joins these nodes together 🌈
    • amount_msat (msat) β€” the amount you're sending into this hop πŸ’Έ
    • layer (string, optional) β€” the layer to restrict this reservation to. and like, it's only useful for fake channels that aren't uniquely identified by short_channel_id_dir β€” because otherwise those fake channels would confuse multiple unrelated callers, which is a whole mess honestly πŸ’€ (added v25.12)

⭐ RETURN VALUE ⭐

on success? you get an empty object back. that's it. {} and done. no notes πŸ‘‘


🧚 AUTHOR 🧚

Rusty Russell rusty@rustcorp.com.au is mainly responsible for this one. king behavior, no cap πŸ‘‘πŸ’œ


πŸ”₯ SEE ALSO πŸ”₯

go read those too, they all click together iykyk 🫢


🌟 RESOURCES 🌟

main web site: https://github.com/ElementsProject/lightning β€” go poke around, it's cute over there πŸ¦‹


πŸ“ EXAMPLES πŸ“

Example 1

Request:

$ lightning-cli askrene-reserve -k "path"='[{"short_channel_id_dir": "109x1x1/1", "amount_msat": 1250000}, {"short_channel_id_dir": "123x1x1/0", "amount_msat": 1250001}]'

{
  "id": "example:askrene-reserve#1",
  "method": "askrene-reserve",
  "params": {
    "path": [
      {
        "short_channel_id_dir": "109x1x1/1",
        "amount_msat": 1250000
      },
      {
        "short_channel_id_dir": "123x1x1/0",
        "amount_msat": 1250001
      }
    ]
  }
}

Response:

{}

Example 2

Request:

$ lightning-cli askrene-reserve -k "path"='[{"short_channel_id_dir": "109x1x1/1", "amount_msat": 1250000000000}, {"short_channel_id_dir": "123x1x1/0", "amount_msat": 1250000000000}]'

{
  "id": "example:askrene-reserve#2",
  "method": "askrene-reserve",
  "params": {
    "path": [
      {
        "short_channel_id_dir": "109x1x1/1",
        "amount_msat": 1250000000000
      },
      {
        "short_channel_id_dir": "123x1x1/0",
        "amount_msat": 1250000000000
      }
    ]
  }
}

Response:

{}

bestie that's the whole page πŸ’– this came to you courtesy of Core Lightning v26.06.9 β€” stay slay, stay reserved, and don't forget to unreserve πŸŒΈβœ¨πŸŽ€

πŸ“¦ where this page comes from