lightning-parsefeerate

lightning-parsefeerate -- Command for parsing a feerate string to a feerate

SYNOPSIS

parsefeerate feerate_str

DESCRIPTION

The parsefeerate command returns the current feerate for any valid feerate_str. This is useful for finding the current feerate that a fundpsbt or utxopsbt command might use.

  • feerate_str (string): The feerate string to parse.

RETURN VALUE

On success, an object is returned, containing:

  • perkw (u32, optional): Value of feerate_str in kilosipa.

ERRORS

The parsefeerate command will error if the feerate_str format is not recognized.

  • -32602: If the given parameters are wrong.

TRIVIA

In CLN we like to call the weight unit "sipa" in honor of Pieter Wuille, who uses the name "sipa" on IRC and elsewhere. Internally we call the perkw style as "feerate per kilosipa".

RESOURCES

Main web site: https://github.com/ElementsProject/lightning

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
}

Core Lightning (previously c-lightning) is a lightweight, highly customizable and standard compliant implementation of the Lightning Network protocol.

© 2023 Core Lightning
All rights reserved.

Discussion Forum

The official Core Lightning forum is hosted at discuss.corelightning.org

BuildonL2 Community

The official BuildOnL2 community lives at community.corelightning.org. Join us and build the future of bitcoin on lightning.

Mailing List

For general discussions about CLN implementation, use [email protected]. For the Lightning Network, use [email protected]

Telegram

Community-driven telegram group where most of the node operators hang out. Go to https://t.me/lightningd to join.

Discord

Community-driven discord server where the devs flock together. Go to https://discord.gg/w27fMFESMN to join.

Internet Relay Chat

Don't hesitate to reach out to us on IRC at #lightning-dev @ libera.chat, #c-lightning @ libera.chat.