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 (The private key is used as the seed to generate the private key again)-

    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

    XLM: Generates a private key with m/44'/148'/0'/0/0, which generates the ed25519 private key as a seed.

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

    XLM: This private key acts as a seed to generate the ed25519 private key.

    Import BTC 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-N
    ETH--
    ETC--
    USDT--
    DCR-N
    DASH-N
    DOGE-N
    DGB-N
    ZEN-N
    XZC-N
    RVN-N
    GO--
    POA--
    XRP--
    XLM--

    XLM: This private key acts as a seed to generate the ed25519 private key.

    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

    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

  • BTC MultiSig address generation

    BTC MultiSig is implemented by P2SH, and the address is created by calling the bitcoind 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)

    BTC MultiSig public key order

    - The initiator's public key is ranked first.

    - The order of the public keys for other people is sorted in lexicographic order according to the public key itself (hexadecimal string as an ASCII string).

    - For example: A is the initiator, A's pubkey: c0f832..., B's pubkey: aaff01..., C's pubkey: b8facc..., then: redeemScript = <OP_2> <A pubkey> <B pubkey> <C pubkey> <OP_3> <OP_CHECKMULTISIG>

    Other currency MultiSig address generation and public key order (LTC, DGB)

    - The address generation logic is the same as BTC.

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