From d04a9e37ee02641a199e2e5315bf86acd77d3604 Mon Sep 17 00:00:00 2001 From: xjd Date: Wed, 8 May 2024 13:22:50 +0800 Subject: [PATCH 1/3] Add details to supported BTC addresses in omnilock --- rfcs/0042-omnilock/0042-omnilock.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rfcs/0042-omnilock/0042-omnilock.md b/rfcs/0042-omnilock/0042-omnilock.md index 50c5e6fb..c07445e3 100644 --- a/rfcs/0042-omnilock/0042-omnilock.md +++ b/rfcs/0042-omnilock/0042-omnilock.md @@ -94,7 +94,12 @@ Depending on the value of the flag, the auth content has the following interpret ``` "CKB (Bitcoin Layer) transaction: 0x" + hex(signing message hash) ``` - In this way, it can show message on wallets(e.g. UniSat, OKX) nicely. + In this way, it can show message on wallets(e.g. UniSat, OKX) nicely. + + It supports three types of BTC addresses: Native segwit (P2WPKH), Nested + segwit (P2SH-P2WPKH), and Legacy (P2PKH). A 20-byte hash can be decoded from a + BTC address using bech32m/bech32 or base58. This hash exactly corresponds to + the auth content. Note that the Taproot (P2TR) address is not supported. * 0x05: It follows the unlocking method used by dogecoin. The signing message hash is converted as following: From 1b6748e281e25613e9fe665be3dcc0dcf4895c93 Mon Sep 17 00:00:00 2001 From: xjd Date: Wed, 8 May 2024 16:49:24 +0800 Subject: [PATCH 2/3] More details to P2SH --- rfcs/0042-omnilock/0042-omnilock.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rfcs/0042-omnilock/0042-omnilock.md b/rfcs/0042-omnilock/0042-omnilock.md index c07445e3..d8fd187b 100644 --- a/rfcs/0042-omnilock/0042-omnilock.md +++ b/rfcs/0042-omnilock/0042-omnilock.md @@ -100,6 +100,8 @@ Depending on the value of the flag, the auth content has the following interpret segwit (P2SH-P2WPKH), and Legacy (P2PKH). A 20-byte hash can be decoded from a BTC address using bech32m/bech32 or base58. This hash exactly corresponds to the auth content. Note that the Taproot (P2TR) address is not supported. + Generic P2SH is not supported; only P2SH-P2WPKH is acceptable. If an address + is described as P2SH but does not include P2WPKH, it is advised not to use it. * 0x05: It follows the unlocking method used by dogecoin. The signing message hash is converted as following: From fc715eb7f8d1f9995d62aed2a05aa63554490d47 Mon Sep 17 00:00:00 2001 From: xjd Date: Wed, 8 May 2024 16:55:44 +0800 Subject: [PATCH 3/3] Add details to P2SH --- rfcs/0042-omnilock/0042-omnilock.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/rfcs/0042-omnilock/0042-omnilock.md b/rfcs/0042-omnilock/0042-omnilock.md index d8fd187b..5135b3e9 100644 --- a/rfcs/0042-omnilock/0042-omnilock.md +++ b/rfcs/0042-omnilock/0042-omnilock.md @@ -100,8 +100,10 @@ Depending on the value of the flag, the auth content has the following interpret segwit (P2SH-P2WPKH), and Legacy (P2PKH). A 20-byte hash can be decoded from a BTC address using bech32m/bech32 or base58. This hash exactly corresponds to the auth content. Note that the Taproot (P2TR) address is not supported. - Generic P2SH is not supported; only P2SH-P2WPKH is acceptable. If an address - is described as P2SH but does not include P2WPKH, it is advised not to use it. + Generic P2SH is not supported; only P2SH-P2WPKH is acceptable. It's not + allowed to use an address (e.g. P2SH-multisig) described as P2SH but does not + include P2WPKH. + * 0x05: It follows the unlocking method used by dogecoin. The signing message hash is converted as following: