From c9517ecf8708f9745cc9d608b7936dff6c541b57 Mon Sep 17 00:00:00 2001 From: Fonta1n3 Date: Wed, 16 Dec 2020 22:05:54 +0800 Subject: [PATCH] fixes --- .DS_Store | Bin 0 -> 18436 bytes bip-0048.mediawiki | 90 +++++++++++++++++++++++++++------------------ 2 files changed, 55 insertions(+), 35 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..6f80a1ec80f0b10f9fff8b6300c28c0adeff69b9 GIT binary patch literal 18436 zcmeHPJ&znk5Ush-JsSy&jEGGMfZN;q+H5gr2?9$9CnQMr*~qdu%ZM{r1W1<=6Olp& zA|mD|I3^+{CPE@R>eVbqRqaj93yfr$8Edw0XKP;fy!X1MyLZPT(p>-i-b7?BA|u^V zUVBLo>zlEb+q(a=;dAUu+o~REbpKKJH9cSCQ+Y$S_1}T)E=50o2UfI6*tPBQiX6*> z(Ec~&p?oa&^ynRVqOYIGgZEAz-90{ebgc1uu`BP3tUf)rO^=AI>ppTg6J=pHo+BTM zY(BX-=U=`KrMEtuyY~9Uxyx;y^%hRk zz`(!-1IQ0!-BHdLd+SqpYb_{(6;H{IyAOp<3%}NlxJ;er|LO&s+R4k&0>nt zw5RLwF~YT+FUqsFY)_Y_Jzbhb&6v1gYpixH$NEOMW^TpsGB7YOa0vr%=`la|wK*#{ zk970cWsE%nvJuO0LIiR|gRO79v0 zvg2ljF(ELZi^qs-8hf%6*ECE6A0Pds@%?qKK!XZnw;#has4xgmLW9xNX^^jdKVCcd z4)OWg2@f~QcZtDxSo=Z1$n8Fi?FQc=KDV3ne2GDNe)NswJGSFM7{5Y;3S-*u9n-*L zME-O=Gw}z$eSB^=;aAh3!XW$#&zJ2W{AZs3qtJlxg7t$6gYbfB(2a4(f{cXh7rz)1bm2`nhRPVG#Y?`bLF8^mEh2 zV`ML+`<-dvie_a=Nd-kL_J8fwm5S>U=mjMP(R)o7-;U_(S7=%BdOTh5`99NQlt6>^^->Ct9 z@kWh8*DDOdPo_bILHNlus4xgWnFbXGk@rjkkC8P3kN5Y8iLMV2{l@sNFo=Ew4K_Y%L6pk;d&?cRACwqmKPWNC zeo$hN{h+|0Ry?6gi9z_ubor%I7hUn>^3z6zLHGlGqr@QcB>G0ch<#%!m&`3feC!(< z-+%33p|KCu<>Ndyoe>e2GosQ@KEogWd7#J9M zF&Svqj&2=Y*K5Na?6M8d+KqL;tvfcvo#7AN^ly6#|M`P}SPR)^#}(x|1Uaq - Comments-Summary: Mixed review (one person) + Comments-Summary: No comments Comments-URI: https://github.com/bitcoin/bips/wiki/Comments:BIP-0048 Status: Proposed Type: Standards Track @@ -27,7 +27,7 @@ millions of addresses per chain. ==Key sorting== Any wallet that supports BIP48 inherently supports deterministic key sorting as per BIP67 so that all possible -multi-signature addresses/scripts are derived from deterministically ordered public keys. +multi-signature addresses/scripts are derived from deterministically sorted public keys. ==Path levels== @@ -37,7 +37,7 @@ We define the following 6 levels in BIP32 path: m / purpose' / coin_type' / account' / script_type' / change / address_index -`h` in the path indicates that BIP32 hardened derivation is used. +h or ' in the path indicates that BIP32 hardened derivation is used. Each level has a special meaning, described in the chapters below. @@ -55,7 +55,7 @@ Sharing the same space for various networks has some disadvantages. Avoiding reusing addresses across networks and improving privacy issues. -Coin type `0` for mainnet and `1` for testnet. +Coin type 0 for mainnet and 1 for testnet. Hardened derivation is used at this level. @@ -82,16 +82,18 @@ an external source. Such an algorithm is described in "Account discovery" chapte ===Script=== -This level splits the key space into three separate `script_type`(s). To provide +This level splits the key space into three separate script_type(s). To provide optimum backward compatibility. -The recommended default is pay to witness script hash `m/48'/0'/0'/2'`. +The recommended default is pay to witness script hash m/48'/0'/0'/2'. The following represent mainnet, account 0. -`1'`: Nested Segwit (p2sh-p2wsh) `m/48'/0'/0'/1'`
-`2'`: Native Segwit (p2wsh) `m/48'/0'/0'/2'`
-`3'`: Legacy (p2sh) `m/48'/0'/0'/3'`
+1': Nested Segwit (p2sh-p2wsh) m/48'/0'/0'/1'
+2': Native Segwit (p2wsh) m/48'/0'/0'/2'
+3': Legacy (p2sh) m/48'/0'/0'/3'
+ +Easily expanded to account for new script types. ===Change=== @@ -142,109 +144,127 @@ an external chain by generating a new address. ==Examples== {| -!coin -!account -!script -!chain -!address -!path +|network +|account +|script +|chain +|address +|path |- -|Bitcoin +|mainnet |first +|p2wsh |external |first |m / 48' / 0' / 0' / 2' / 0 / 0 |- -|Bitcoin +|mainnet |first +|p2wsh |external |second |m / 48' / 0' / 0' / 2' / 0 / 1 |- -|Bitcoin +|mainnet |first +|p2wsh |change |first |m / 48' / 0' / 0' / 2' / 1 / 0 |- -|Bitcoin +|mainnet |first +|p2wsh |change |second |m / 48' / 0' / 0' / 2' / 1 / 1 |- -|Bitcoin +|mainnet |second +|p2wsh |external |first |m / 48' / 0' / 1' / 2' / 0 / 0 |- -|Bitcoin +|mainnet |second +|p2wsh |external |second |m / 48' / 0' / 1' / 2' / 0 / 1 |- -|Bitcoin +|mainnet |second +|p2sh |change |first -|m / 48' / 0' / 1' / 2' / 1 / 0 +|m / 48' / 0' / 1' / 3' / 1 / 0 |- -|Bitcoin +|mainnet |second +|p2sh |change |second -|m / 48' / 1' / 1' / 2' / 1 / 1 +|m / 48' / 1' / 1' / 3' / 1 / 1 |- -|Bitcoin Testnet +|testnet |first +|p2sh-p2wsh |external |first -|m / 48' / 1' / 0' / 2' / 0 / 0 +|m / 48' / 1' / 0' / 1' / 0 / 0 |- -|Bitcoin Testnet +|testnet |first +|p2wsh |external |second |m / 48' / 1' / 0' / 2' / 0 / 1 |- -|Bitcoin Testnet +|testnet |first +|p2wsh |change |first |m / 48' / 1' / 0' / 2' / 1 / 0 |- -|Bitcoin Testnet +|testnet |first +|p2wsh |change |second |m / 48' / 1' / 0' / 2' / 1 / 1 |- -|Bitcoin Testnet +|testnet |second +|p2wsh |external |first |m / 48' / 1' / 1' / 2' / 0 / 0 |- -|Bitcoin Testnet +|testnet |second +|p2wsh |external |second |m / 48' / 1' / 1' / 2' / 0 / 1 |- -|Bitcoin Testnet +|testnet |second +|p2wsh |change |first |m / 48' / 1' / 1' / 2' / 1 / 0 |- -|Bitcoin Testnet +|testnet |second +|p2wsh |change |second |m / 48 h / 1' / 1' / 2' / 1 / 1 -|} +|- +}| + ==Reference==