@@ -69,6 +69,7 @@ HD Wallet Seed: ac27495480225222079d7be181583751e86f571027b0497b5b5d11218e0a8a1
69
69
- XPrv and XPub Encoding
70
70
- _ Address Key_ Derivation
71
71
- WIF and Address Encoding
72
+ - [ Glossary] ( #glossary )
72
73
73
74
# Install
74
75
@@ -965,6 +966,320 @@ This is final piece, which you use for making and receiving payments.
965
966
let addr = DashKeys.toAddr(keys.publicKey); // " X ... "
966
967
```
967
968
969
+ # Glossary
970
+
971
+ See also [Dash Tools Glossary](https://github.com/dashhive/dash-tools#glossary).
972
+
973
+ - [Base2048](#base2048)
974
+ - [Base58Check](#base58Check)
975
+ - [BIPs](#bip)
976
+ - [BIP-32](#bip-32)
977
+ - [BIP-39](#bip-39)
978
+ - [BIP-43](#bip-43)
979
+ - [BIP-44](#bip-44)
980
+ - [Curve](#curve)
981
+ - [Derive (by Path)](#derive-by-path)
982
+ - [Derived Child Key](#derived-child)
983
+ - [Key Expansion](#key-expansion)
984
+ - [HD Account](#hd-account)
985
+ - [HD Address Key](#hd-address-key)
986
+ - [HD Keys](#hd-keys)
987
+ - [HD Passphrase Mnemonic](#hd-passphrase-mnemonic)
988
+ - [HD Path](#hd-path)
989
+ - [HD Wallet](#hd-wallet)
990
+ - [HD X Key](#hd-x-key)
991
+ - [Root Seed](#root-seed)
992
+ - [Root Key](#root-key)
993
+ - [Secp256k1](#secp256k1)
994
+ - [Test Vectors](#test-vectors)
995
+ - [XPrv](#xprv)
996
+ - [XPub](#xpub)
997
+ - [Zecret](#zecret)
998
+ - [Zeed](#zeed)
999
+ - [Zoomonic](#zoomonic)
1000
+
1001
+ ## Base2048
1002
+
1003
+ Also: Base2048, _BIP39_, _BIP-0039_
1004
+
1005
+ Rather than a bank of 2, 16, 32, 58, 62, or 64 characters, \
1006
+ you can encode data using a bank of whole words. \
1007
+ If you use 2048 words, each word represents 11 _bits_. \
1008
+ 12 words represent 131 _bits_ of information. \
1009
+ Any extra bits are used for checksumming the data. \
1010
+
1011
+ See [_HD Passphrase Mnemonic_](#hd-passphrase-mnemonic).
1012
+
1013
+ ## Base58Check
1014
+
1015
+ The encoding format used for sharing _XPrv_ and _XPub_ Keys (_X Keys_). \
1016
+ (among other things, such as _WIF_ and _Address_)
1017
+
1018
+ ```text
1019
+ xprvA2L7qar7dyJNhxnE47gK5J6cc1oEHQuAk8WrZLnLeHTtnkeyP4w6Eo6Tt65trtdkTRtx8opazGnLbpWrkhzNaL6ZsgG3sQmc2yS8AxoMjfZ
1020
+ ```
1021
+
1022
+ ```text
1023
+ xpub6FKUF6P1ULrfvSrhA9DKSS3MA3digsd27MSTMjBxCczsfYz7vcFLnbQwjP9CsAfEJsnD4UwtbU43iZaibv4vnzQNZmQAVcufN4r3pva8kTz
1024
+ ```
1025
+
1026
+ ## BIP
1027
+
1028
+ Also: BIPs
1029
+
1030
+ Bitcoin Improvement Proposal(s). \
1031
+ Specification Drafts / RFCs (Request For Comments).
1032
+
1033
+ ## BIP-32
1034
+
1035
+ See [_HD Keys_](#hd-keys).
1036
+
1037
+ ## BIP-39
1038
+
1039
+ Also: Base2048, _BIP39_, _BIP-0039_
1040
+
1041
+ BIP for [_HD Passphrase Mnemonic_](#hd-passphrase-mnemonic).
1042
+
1043
+ ## BIP-43
1044
+
1045
+ BIP for the _Purpose_ index of the _HD Path_.
1046
+
1047
+ ```js
1048
+ `m/${purpose}'`;
1049
+ ```
1050
+
1051
+ This is the basis of [BIP-44][#bip-44] defining HD Paths as `m/44'/`.
1052
+
1053
+ See [_HD Keys_](#hd-keys).
1054
+
1055
+ ## BIP-44
1056
+
1057
+ See [_HD Path_](#hd-path).
1058
+
1059
+ ## Curve
1060
+
1061
+ Related to parameters of Elliptic Curve (ECDSA) cryptography / algorithms.
1062
+
1063
+ A single X value produces two Y values on a curve (rather than 1 on a line).
1064
+
1065
+ In rare instances, an X value may produce **no points** on the curve.
1066
+
1067
+ ## Derive (by Path)
1068
+
1069
+ To split an HD Path by `/` and then iterate to derive each index (_Child_) in
1070
+ turn.
1071
+
1072
+ **Cannot be reversed**.
1073
+
1074
+ See [`derivePath(hdkey, hdpath)`][#derivePath-hdkey-hdpath].
1075
+
1076
+ ## Derived Child
1077
+
1078
+ A key directly derived from another key by an _HD Path_ index. \
1079
+ (typically referring to a single index of the path, not the whole)
1080
+
1081
+ See
1082
+ [`deriveChild(hdkey, index, isHardened)`][#derivePath-hdkey-index-ishardened].
1083
+
1084
+ ## Key Expansion
1085
+
1086
+ An algorithm that creates a larger (byte-size) output than its input. \
1087
+ Typically uses hashing algos: HMAC, SHA-2, SHA-3, etc. \
1088
+ May combine multiple algos together. \
1089
+ Usually intentionally slow. \
1090
+ May run a high number of " Rounds" in succession. \
1091
+ (typically hundreds or thousands).
1092
+
1093
+ _Passhrase Mnemonics_ to _Seed_ (BIP-39) uses _PBKDF2_. \
1094
+ _HD Keys_ (BIP-44) use HMAC and *Secp256k1 Tweak*ing for each index.
1095
+
1096
+ See also:
1097
+
1098
+ - `DashPhrase.toSeed(wordList)`
1099
+ - `DashHd.fromSeed(seedBytes)`
1100
+ - `DashHd.deriveChild(hdkey, index, isHardened)`
1101
+
1102
+ ## HD Account
1103
+
1104
+ An HD Key derived at `m/44'/5'/n'` (Depth 3) of the HD Path.
1105
+
1106
+ See [API: Key Types](#key-types).
1107
+
1108
+ ## HD Address Key
1109
+
1110
+ Also: _Key_, _HD Private Key_, _WIF_, _Address_
1111
+
1112
+ An HD Key at final depth `m/44'/5'/0'/0/0` (Depth 5) of an _HD Path_. \
1113
+ Can be encoded as _WIF_ or _Address_ for making or receiving payments.
1114
+
1115
+ See also [API: Key Types](#key-types).
1116
+
1117
+ ## HD Keys
1118
+
1119
+ Also: _Hierarchical Deterministic Keys_, _BIP-32_, _BIP-44_
1120
+
1121
+ Any of generic or purpose-specific keys derived deterministically form a seed.
1122
+
1123
+ See more at [API: Key Types](#key-types) (code above) and [HD Path](#hd-path).
1124
+
1125
+ ## HD Passphrase Mnemonic
1126
+
1127
+ Also: _Mnemonic for Generating Hierarchical Deterministic Keys_, _HD Wallet_,
1128
+ _BIP-39_
1129
+
1130
+ 12 words used to derive an HD Seed. \
1131
+ (11¾ for entropy, ¼ for checksum)
1132
+
1133
+ Ex: `zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong`
1134
+
1135
+ Not used _directly_ in this library, but...\
1136
+ it _is_ how the HD Seeds used here are typically generated.
1137
+
1138
+ See [DashPhrase.js](dash-phrase).
1139
+
1140
+ ## HD Path
1141
+
1142
+ The path that defines an HD Key - typically of the BIP-44 variety:
1143
+
1144
+ - a _Root_, ex: `m` (depth 0, the wallet, straight from the seed)
1145
+ - an _Coin Key_, ex: `m/44'/5'` (depth 2, sometimes called Wallet)
1146
+ - an _Account_, ex: `m/44'/5'/0'` (depth 3)
1147
+ - an _X Key_, ex: `m/44'/5'/0'/0` (depth 4, also the Use)
1148
+ - an _Address Key_, ex: `m/44'/5'/0'/0/0` (depth 5, the end)
1149
+
1150
+ In general:
1151
+
1152
+ ```js
1153
+ let hdpath = `m/${purpose}'/${coinType}'/${account}'/${use}/${index}`;
1154
+ ```
1155
+
1156
+ For DASH:
1157
+
1158
+ ```js
1159
+ let hdpath = `m/44'/5'/${account}'/${use}/${index}`;
1160
+ ```
1161
+
1162
+ See also [API: Key Types](#key-types) (code above).
1163
+
1164
+ ## HD Wallet
1165
+
1166
+ Either the _Root Key_ at `m` (Depth 0), directly from the _Seed_, \
1167
+ or the _Coin Key_ at `m/44'/5'` (Depth 2), of the _HD Path_. \
1168
+ Sometimes also used to mean _HD Account_ at `m/44'/5'/n'`.
1169
+
1170
+ Here we typically use it to mean the _Root Key_. \
1171
+ (because we're focus on DASH more so than other coins)
1172
+
1173
+ See also [API: Key Types](#key-types).
1174
+
1175
+ ## HD X Key
1176
+
1177
+ Also: _XKey_, _XPrv_, _XPub_, _Use Key_, _Use Index_, _Extended Key_.
1178
+
1179
+ An HD Key derived at `m/44'/5'/0'/n` (Depth 4), of the _HD Path_.
1180
+
1181
+ Here we typically use it to mean the _Root Key_. \
1182
+ (because we're focus on DASH more so than other coins)
1183
+
1184
+ See also [API: Key Types](#key-types).
1185
+
1186
+ ## Root Seed
1187
+
1188
+ Also: Master Seed, Seed, HD Seed
1189
+
1190
+ Either:
1191
+
1192
+ - 64 random bytes
1193
+ - a 64-byte hash derived from a _Passphrase Mnemonic_
1194
+
1195
+ **Cannot be reversed**.
1196
+
1197
+ ## Root Key
1198
+
1199
+ Also: _HD Wallet_, _Master Key_, _HD Master_
1200
+
1201
+ An HD Key of `m` (Depth 0), as derived directly from the Seed.
1202
+
1203
+ See also [API: Key Types](#key-types).
1204
+
1205
+ ## Secp256k1
1206
+
1207
+ A specific set of parameters " the curve" used by most cryptocurrencies.
1208
+
1209
+ See [Curve](#curve).
1210
+
1211
+ ## Test Vectors
1212
+
1213
+ The well-known values used for testing, demos, debugging, and development:
1214
+
1215
+ - DashPhrase / BIP-39:
1216
+ - <https://github.com/trezor/python-mnemonic/blob/master/vectors.json>
1217
+ - Includes the [_Zoomonic_](#zoomonic), [_Zecret_](#zecret), and
1218
+ [_Zeed_](#zeed).
1219
+ - Generic HD Key / BIP-32:
1220
+ - <https://github.com/bitcoin/bips/blob/master/bip-0032.mediawiki#test-vectors>
1221
+ - DashKeys / BIP-44:
1222
+ - [Zoomonic](#zoomonic)
1223
+
1224
+ ## XPrv
1225
+
1226
+ Also: _Extended Private Key_, _XPriv_, _X Prv_, _X Priv_
1227
+
1228
+ Specifically the Base58Check-encoded form of an HD Key at Depth 4. \
1229
+ (the _X Key_, a.k.a. _Use Key_, including the _Private Key_)\_ \
1230
+ Can be used to derive any number of *WIF*s and *Address*es.
1231
+
1232
+ ```text
1233
+ xprvA2L7qar7dyJNhxnE47gK5J6cc1oEHQuAk8WrZLnLeHTtnkeyP4w6Eo6Tt65trtdkTRtx8opazGnLbpWrkhzNaL6ZsgG3sQmc2yS8AxoMjfZ
1234
+ ```
1235
+
1236
+ See [HD X Key](#hd-x-key).
1237
+
1238
+ ## XPub
1239
+
1240
+ Also: _Extended Pubilc Key_, _X Pub_
1241
+
1242
+ Specifically the Base58Check-encoded form of an HD Key. \
1243
+ (just the public key) Can be used to derive any number of receiving *Address*es.
1244
+
1245
+ ```text
1246
+ xpub6FKUF6P1ULrfvSrhA9DKSS3MA3digsd27MSTMjBxCczsfYz7vcFLnbQwjP9CsAfEJsnD4UwtbU43iZaibv4vnzQNZmQAVcufN4r3pva8kTz
1247
+ ```
1248
+
1249
+ See [XPrv](#xprv), [HD X Key](#hd-x-key).
1250
+
1251
+ ## Zecret
1252
+
1253
+ The _Secret Salt_ used for the BIP-32 Test Vectors.
1254
+
1255
+ ```text
1256
+ TREZOR
1257
+ ```
1258
+
1259
+ ```js
1260
+ let secretSalt = " TREZOR " ;
1261
+ ```
1262
+
1263
+ Comes from the fact that the company Trezor (a hardware wallet) was involved in
1264
+ creating the reference implementation and Test Vectors.
1265
+
1266
+ ## Zeed
1267
+
1268
+ The canonical Seed (generated from the Zoomonic salted with " TREZOR " ), \
1269
+ to be used in documentation, examples, and test fixtures.
1270
+
1271
+ ```txt
1272
+ ac27495480225222079d7be181583751e86f571027b0497b5b5d11218e0a8a13332572917f0f8e5a589620c6f15b11c61dee327651a14c34e18231052e48c069
1273
+ ```
1274
+
1275
+ ## Zoomonic
1276
+
1277
+ ```txt
1278
+ Passphrase (Mnemonic) : zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo zoo wrong
1279
+ Secret (Salt Password) : TREZOR
1280
+ Seed : ac27495480225222079d7be181583751e86f571027b0497b5b5d11218e0a8a13332572917f0f8e5a589620c6f15b11c61dee327651a14c34e18231052e48c069
1281
+ ```
1282
+
968
1283
# References
969
1284
970
1285
- https://github.com/dashhive/dash-tools
0 commit comments