Technical Standards
Mnemonic standard
- The mnemonic complies with the BIP39 standard and generates a mnemonic of 12 words by default.
Generate seed by mnemonic
- Generate the seed using the BIP39 standard process.
- In the PBKDF2 algorithm, the mnemonic sentence is used as the password, "mnemonic" as the salt (passphrase is empty).
Mnemonic sentence
- English mnemonics: Remove head and tail spaces, add a space between each word.
- Chinese mnemonics: Remove head and tail spaces, add a space between each word.
Cointype and whether compressed for public key
By Mnemonic
coin BIP44 cointype Compressed for public key BTC 0 Y BCH 0 (same as BTC) Y BSV 0 (same as BTC) Y LTC 2 Y ETH 60 - ETC 60 (same as ETH) - USDT - (OmniLayer, based on BTC) - DCR 42 Y DASH 5 Y DOGE 3 Y DGB 20 Y ZEN 121 Y XZC 136 Y RVN 175 Y GO 60 (same as ETH) - POA 60 (same as ETH) - XRP 144 - XLM 148 (follows sep-0005) - Take BTC as an example.
The first receiving address's BIP44 path is: m/44'/0'/0'/0/0
The second receiving address: m/44'/0'/0'/0/1
The first change address: m/44'/0'/0'/1/0
The second change address: m/44'/0'/0'/1/1
Import ETH private key / Keystore
coin BIP44 cointype Compressed for public key BTC - N BCH - N BSV - N LTC - N ETH - - ETC - - USDT - - DCR - N DASH - N DOGE - N DGB - N ZEN - N XZC - N RVN - N GO - - POA - - XRP - - XLM - - Import WIF private key
coin BIP44 cointype Compressed for public key BTC - WIF starts with 5: N, WIF starts with K/L: Y BCH - (same as BTC) BSV - (same as BTC) LTC - (similar as BTC) ETH - - ETC - - USDT - - DCR - - DASH - (similar as BTC) DOGE - (similar as BTC) DGB - - ZEN - - XZC - - RVN - - GO - - POA - - XRP - - XLM - - MultiSig
coin BIP44 cointype Compressed for public key BTC 0 Y LTC 0(Generate MultiSig address with the same public key as BTC) Y DGB 0(Generate MultiSig address with the same public key as BTC) Y BCH 0(Generate MultiSig address with the same public key as BTC) Y BSV 0(Generate MultiSig address with the same public key as BTC) Y DASH 0(Generate MultiSig address with the same public key as BTC) Y DOGE 0(Generate MultiSig address with the same public key as BTC) Y The BIP44 path for the BTC MultiSig public key: m/44'/0'/0'/0/0
ETH MultiSig smart contract: https://github.com/bitbill/bitbill-multisig-contracts
MultiSig address generation
MultiSig is implemented by P2SH, and the address is created by calling the bitcoind (litecoind for LTC, etc.) createmultisig interface, or it is equivalent to the following logic (take 2-3 MultiSig as an example):
1. redeemScript = <OP_2> <A pubkey> <B pubkey> <C pubkey> <OP_3> <OP_CHECKMULTISIG>
2. redeemScriptHash = RIPEMD160(SHA256(redeemScript))
3. P2SHAddress = base58check.Encode("05", redeemScriptHash)
MultiSig public key order
- The order of the public keys is sorted in lexicographic order according to the public key itself (hexadecimal string as an ASCII string).
- For example: A's pubkey: c0f832..., B's pubkey: aaff01..., C's pubkey: b8facc..., then: redeemScript = <OP_2> <B pubkey> <C pubkey> <A pubkey> < OP_3> <OP_CHECKMULTISIG>
QR code format for Offline Signing
bb_watch: Create a new Watch Wallet
bb_addcoin: Add coin for Watch Wallet
bb_sign: Sign a transaction
bb_tx: broadcast the transaction to the network
Encoding/Decoding:zlibCompress + Base64