V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
爱意满满的作品展示区。
zealic
V2EX  ›  分享创造

vanitygen-hd:比特币个性化 HD/HDM 钱包生成器

  •  
  •   zealic ·
    zealic · 2020-04-26 05:09:49 +08:00 · 1043 次点击
    这是一个创建于 1670 天前的主题,其中的信息可能已经有所发展或是发生改变。

    在 Bitcoin 中,个性地址又叫虚荣地址

    Archive.org 的捐助地址就是 1Archive1n2C579dMsAu3iC6tWzuQJz8dN 。

    最早的生成器可以追溯到 vanitygen, 而后又有支持 GPU 的 vanitygen-plus

    因为自己需要,主要是方便快速辨识,所以写了 vanitygen-hd

    vanitygen-hd 支持生成 HD 钱包及 HDM (多重签名) 钱包。

    完全开源,参见 Github: https://github.com/zealic/vanitygen-hd

    重要:不要把你生成的钱包助记词分享给任何人,否则会丢失你的钱包。

    Quickstart

    HD Wallet

    Hierarchical Deterministic Wallet generated vanity address path is m/44'/0'/0'/0/0.

    Using Docker to run:

    docker run -it --rm --network=none zealic/vanitygen-hd generate HDD BTC 999 666
    

    You will got below vanity address with prefix HDD:

    - address: 1HDDGgRFrtY38ZVVTtkgbBS4aUwE2rwUhz
      mnemonic: behave crack outer fine rude dwarf verb prosper because split loyal blue cream jar merge cupboard prize normal subway celery unfold alarm blue fetch
    

    According to your CPU frequency and vanity address requirements, the time to generate mnemonic will gradually become longer. Generally, 3~4 length addresses are recommended.

    HDM Wallet

    If you want generate Multisig Hierarchical Deterministic Wallet, use --co-signers and --co-members.
    Multisig Hierarchical Deterministic Wallet generated vanity address path is m/45'/<CO_SIGNER_INDEX>/0/0.

    Prepare co-signers public keys file co-signers.yml:

    # Public key of co-signer-1, path is "m/45'/1"
    - xpub68RRmuSKe9yhgCoVr7pLaRTPZrDwekTbvpMGC9iSukzFYSbQJZusJRiLr8zYfRiZRJV2wauwWo1jnBMDDGz5ZGhfvB5UKvAzHdvtF6qNHaW
    # Public key of co-signer-2, path is "m/45'/2"
    - xpub68uxBBwmt9cY6RY1BVHHUwH7dLC2G98QPHpABi71eaDZuGWxZHEB4UAFVgawcuTysnnq82CJP28uEzzCRSQQYZX6sAxKsSR9RqNauA3YVaH
    

    Generate with HDM wallet

    docker run -it --rm --network=none \
      -v $PWD/co-signers.yml:/co-signers.yml \
      zealic/vanitygen-hd \
      generate --co-signers=/co-signers.yml HDD BTC 999 666
    

    Got vanity address, that public key path is "m/45'/0":

    - address: 3666kmVbsBF6K5Di8sUef1Qg9fp2wxFYxC
      parentAddress: 1LFsUUBtEg2PS8HALDi48fSUcjVcF6Htpg
      mnemonic: detail walnut stock this history ivory stamp leaf half marine inspire fitness erase apple flee bird length dizzy rubber open index print crystal boring
    

    Usage

    Usage: vanitygen-hd [options] [command]
    
    Options:
      -V, --version                   output the version number
      -h, --help                      display help for command
    
    Commands:
      generate [options] [rule-list]
        Options:
          -b, --bits <int>               BIP32 specifies the entropy length to be tween 128 and 256 bits and a multiple of 32 bits. (default: 256)
          -w, --workers <int>            Numeber of parallel worker, use 0 as CPU num. (default: 0)
          -s, --co-signers <yaml-file>   Co-signers YAML file, include m/45'/{1-n} public key array.
          -m, --co-members <int>         Co-signers member num, use 0 as 'MAX(1,LEN(co_signers))'. (default: 0)
          -f, --rules-file <rules-file>  One rule per line, allowing '#' to be a comment. (default: "rules.txt")
          -h, --help                     display help for command
      help [command]                  display help for command
    
    1 条回复    2020-04-27 11:58:08 +08:00
    MarsWang
        1
    MarsWang  
       2020-04-27 11:58:08 +08:00
    原理是碰撞出来的吗?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3262 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 23ms · UTC 11:52 · PVG 19:52 · LAX 03:52 · JFK 06:52
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.