mirror of
https://github.com/bits-wallet/specs.git
synced 2025-12-17 05:34:21 +01:00
Update 02.md
This commit is contained in:
16
02.md
16
02.md
@@ -30,8 +30,8 @@ Inconvenient for onboarding new users who have no UTXO possession in the beginni
|
||||
- The nostr parent secret key _nsec_: a 32-byte array.
|
||||
- The nostr parent public key _npub_: _cbytes(int(nsec)⋅G)_.
|
||||
- The tweak derivation secret _ds_: a 32-byte array.
|
||||
- The number _u_ of child keys _2<sup>32</sup>_.
|
||||
- Let _ds_ = _hash<sub>BDS-02 dersec</sub>(nsec)_.
|
||||
- The number _u_ of child keys, _u = 2<sup>32</sup>_.
|
||||
- For _i = 1 .. u_:
|
||||
- - The BDS-02 child secret key _sk<sub>i</sub>_.
|
||||
- - The BDS-02 child public key _pk<sub>i</sub>_.
|
||||
@@ -39,3 +39,17 @@ Inconvenient for onboarding new users who have no UTXO possession in the beginni
|
||||
- - Let _t<sub>i</sub>_ = _hash<sub>BDS-02 tweak</sub>(ds || bytes(32, i))_.
|
||||
- - Let _pk<sub>i</sub>_ = _cbytes(npub + int(t<sub>i</sub>)⋅G)_.
|
||||
- - Let _sk<sub>i</sub>_ = _bytes(32, (int(nsec) + int(t<sub>i</sub> )) mod n)_.
|
||||
|
||||
- For _i = 1 < u< 2<sup>32</sup>_:
|
||||
- - The _to_self_ : 32-byte x-only child public key.
|
||||
- - The _ex_ : a 2-byte minimally encoded channel expiry as relative locktime.
|
||||
- - The _ts_ : a 39-byte raw tapscript for a non-interactive refund closure.
|
||||
- - The _chan<sub>pubkey</sub>_ : tweaked 2-of-2 common channel output
|
||||
- - The _chan<sub>address</sub>_ : expiring channel address
|
||||
- - Let _to_self_ = _xbytes(pk<sub>i</sub>)_.
|
||||
- - Let _ex_ = _CScriptNum(26280)_.
|
||||
- - Let _ts_ = `<ex> OP_CHECKSEQUENCEVERIFY OP_DROP <to_self> OP_CHECKSIG`.
|
||||
- - Let _s<sub>hash</sub>_ = _hash<sub>TapLeaf</sub>(0xc0 || 0x27 || s)_.
|
||||
- - Let _s<sub>tweak</sub>_ = _hash<sub>TapTweak</sub>(lift_x(pk<sub>agg</sub>) || s<sub>hash</sub>)_.
|
||||
- - Let _chan<sub>pubkey</sub>_ = _lift_x(pk<sub>agg</sub>) + int(s<sub>tweak</sub>)⋅G_.
|
||||
- - Let _chan<sub>address_ = _Bech32m(0x51 || 0x20 || x_bytes(c<sub>pubkey</sub>))_.
|
||||
|
||||
Reference in New Issue
Block a user