LIGHTNING-PARSEFEERATE(7)

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

πŸ’… lightning-parsefeerate(7) β€” okay so this is the glow-up guide

Hey bestie, welcome to the lightning-parsefeerate manual page, aka the little command that translates your feerate mood into actual numbers πŸ’–


✨ NAME ✨

parsefeerate β€” the command for parsing a feerate string into a feerate, no cap πŸŽ€


🌸 SYNOPSIS 🌸

parsefeerate feerate_str

πŸ¦‹ DESCRIPTION πŸ¦‹

Okay so parsefeerate literally returns the current feerate for any valid feerate_str. It's giving translator-girlie energy πŸ’…

And why do we care? Because it's genuinely useful for finding the current feerate that a fundpsbt or utxopsbt command might use. So if you're ever like "hmm what would they even do with this string", this command tells you fr fr ✨

  • feerate_str (string): the feerate string you wanna parse, bestie πŸ“

πŸ‘‘ RETURN VALUE πŸ‘‘

On success, you get an object back, containing:

  • perkw (u32, optional): the value of feerate_str in kilosipa. Slay πŸ’œ

πŸ’€ ERRORS πŸ’€

The parsefeerate command will error if the feerate_str format is not recognized. Rude, but fair πŸ™ˆ

  • -32602: if the given parameters are wrong. Not me getting the params wrong 😭

🧚 TRIVIA 🧚

Okay this is my favorite part β€” in CLN we like to call the weight unit "sipa" in honor of Pieter Wuille, who uses the name "sipa" on IRC and elsewhere πŸ‘‘ Iconic behavior tbh.

Internally we call the perkw style as "feerate per kilosipa". Periodt πŸ’…


🌈 RESOURCES 🌈

Main web site: https://github.com/ElementsProject/lightning β€” go look, iykyk πŸ¦‹


⭐ EXAMPLES ⭐

Example 1 πŸ’–

Request:

$ lightning-cli parsefeerate "unilateral_close"
{
  "id": "example:parsefeerate#1",
  "method": "parsefeerate",
  "params": [
    "unilateral_close"
  ]
}

Response:

{
  "perkw": 11000
}

Example 2 🌸

Request:

$ lightning-cli parsefeerate "9999perkw"
{
  "id": "example:parsefeerate#2",
  "method": "parsefeerate",
  "params": [
    "9999perkw"
  ]
}

Response:

{
  "perkw": 9999
}

Example 3 πŸŽ€

Request:

$ lightning-cli parsefeerate "10000"
{
  "id": "example:parsefeerate#3",
  "method": "parsefeerate",
  "params": [
    10000
  ]
}

Response:

{
  "perkw": 2500
}

Example 4 πŸ”₯

Request:

$ lightning-cli parsefeerate "urgent"
{
  "id": "example:parsefeerate#4",
  "method": "parsefeerate",
  "params": [
    "urgent"
  ]
}

Response:

{
  "perkw": 11000
}

Okay that's the whole page, bestie β€” every flag, every field, every example, all present and accounted for 🫢

This masterpiece is brought to you by Core Lightning v26.06.9 β€” catch you in the next manual page, mwah πŸ’‹βœ¨

πŸ“¦ where this page comes from