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

    coinBIP44 cointypeCompressed for public key
    BTC0Y
    BCH0 (same as BTC)Y
    BSV0 (same as BTC)Y
    LTC2Y
    ETH60-
    ETC60 (same as ETH)-
    USDT- (OmniLayer, based on BTC)-
    DCR42Y
    DASH5Y
    DOGE3Y
    DGB20Y
    ZEN121Y
    XZC136Y
    RVN175Y
    GO60 (same as ETH)-
    POA60 (same as ETH)-
    XRP144-
    XLM148 (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

    coinBIP44 cointypeCompressed 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

    coinBIP44 cointypeCompressed 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

    coinBIP44 cointypeCompressed for public key
    BTC0Y
    LTC0(Generate MultiSig address with the same public key as BTC)Y
    DGB0(Generate MultiSig address with the same public key as BTC)Y
    BCH0(Generate MultiSig address with the same public key as BTC)Y
    BSV0(Generate MultiSig address with the same public key as BTC)Y
    DASH0(Generate MultiSig address with the same public key as BTC)Y
    DOGE0(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