LIGHTNING-NEWADDR(7)

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

πŸ’– lightning-newaddr β€” a.k.a. the manual page formerly known as LIGHTNING-NEWADDR(7)

okay bestie, gather round, because this is the one where your node literally makes you an address πŸŽ€ (like, for money to land on. iconic behavior.)

✨ NAME ✨

newaddr β€” the command for generating a new address to be used by Core Lightning. yes that's it. that's the whole gig. slay. πŸ’…

πŸ¦‹ SYNOPSIS πŸ¦‹

newaddr [addresstype]

🌸 DESCRIPTION 🌸

so the newaddr RPC command generates a new address, and that address can then be used to fund channels managed by the Core Lightning node. that's the whole point. you get an address, you put coins on it, you get channels. the circle of life 🧚

heads up though: the funding transaction needs to be confirmed before funds can be used. so don't be out here refreshing like it's a text back, it's a blockchain, it takes a minute 😭

and if you wanna send an on-chain payment from the Core Lightning node wallet, that's a different girl β€” use withdraw for that. newaddr is the receiving side of the story, withdraw is the sending side. iykyk πŸ”₯

  • addresstype (string, optional) (one of "bech32", "p2tr", "all") β€” this bad boy specifies the type of address you want. currently that's bech32 (like, e.g. tb1qu9j4lg5f9rgjyfhvfd905vw46eg39czmktxqgg on bitcoin testnet or bc1qwqdg6squsna38e46795at95yu9atm8azzmyvckulcc7kytlcckxswvvzej on bitcoin mainnet) or p2tr taproot addresses. and then there's the special value all, which generates all known address types for the same underlying key β€” yeah, all of them, same key, she's multifunctional πŸ’œ The default is p2tr address. periodt.

πŸ‘‘ RETURN VALUE πŸ‘‘

on success you get an object back, containing:

  • p2tr (string, optional) β€” The taproot address. (added v23.08) ✨
  • bech32 (string, optional) β€” The bech32 (native segwit) address.

πŸ’€ ERRORS πŸ’€

if you ask for an unrecognized address type, an error message will be returned. that's it. don't make it weird. πŸ™ˆ

🫢 AUTHOR 🫢

Felix fixone@gmail.com is mainly responsible. thank you Felix, king behavior πŸ‘

🌈 SEE ALSO 🌈

like, go read your sisters, bestie. they're all in the same friend group πŸ’–

⭐ RESOURCES ⭐

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


πŸ“ EXAMPLES πŸ“

Example 1: the "just give me a default one" of it all

Request:

$ lightning-cli newaddr

{
  "id": "example:newaddr#1",
  "method": "newaddr",
  "params": {}
}

Response:

{
  "bech32": "bcrt1qwx6am26cuw38y4863pd6swrce2g8mzhaxr9xp8"
}

Example 2: the "i specifically want taproot" of it all

Request:

$ lightning-cli newaddr -k "addresstype"="p2tr"

{
  "id": "example:newaddr#2",
  "method": "newaddr",
  "params": {
    "addresstype": "p2tr"
  }
}

Response:

{
  "p2tr": "bcrt1p2gppccw6ywewmg74qqxxmqfdpjds3rpr0mf22y9tm9xcc0muggwsea9nkf"
}

and that's the tea β˜• β€” this page came to you straight from Core Lightning v26.06.9, so if you're out here on a different version, check your own docs bestie, ily, mwah πŸ’‹πŸ’–

πŸ“¦ where this page comes from