mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-27 17:54:20 +01:00
lightningd: deprecate p2sh-segwit addresses for newaddr addresstype
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Deprecated: JSON-RPC: `newaddr`: `addresstype` `p2sh-segwit` (use default, or `bech32`).
This commit is contained in:
6
cln-rpc/src/model.rs
generated
6
cln-rpc/src/model.rs
generated
@@ -809,8 +809,6 @@ pub mod requests {
|
||||
pub enum NewaddrAddresstype {
|
||||
#[serde(rename = "bech32")]
|
||||
BECH32,
|
||||
#[serde(rename = "p2sh-segwit")]
|
||||
P2SH_SEGWIT,
|
||||
#[serde(rename = "all")]
|
||||
ALL,
|
||||
}
|
||||
@@ -820,8 +818,7 @@ pub mod requests {
|
||||
fn try_from(c: i32) -> Result<NewaddrAddresstype, anyhow::Error> {
|
||||
match c {
|
||||
0 => Ok(NewaddrAddresstype::BECH32),
|
||||
1 => Ok(NewaddrAddresstype::P2SH_SEGWIT),
|
||||
2 => Ok(NewaddrAddresstype::ALL),
|
||||
1 => Ok(NewaddrAddresstype::ALL),
|
||||
o => Err(anyhow::anyhow!("Unknown variant {} for enum NewaddrAddresstype", o)),
|
||||
}
|
||||
}
|
||||
@@ -3165,6 +3162,7 @@ pub mod responses {
|
||||
pub struct NewaddrResponse {
|
||||
#[serde(alias = "bech32", skip_serializing_if = "Option::is_none")]
|
||||
pub bech32: Option<String>,
|
||||
#[deprecated]
|
||||
#[serde(alias = "p2sh-segwit", skip_serializing_if = "Option::is_none")]
|
||||
pub p2sh_segwit: Option<String>,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user