Code Monkey home page Code Monkey logo

multisig's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

multisig's Issues

Wrong address from XPUB

I've included your bitcoin libraries into my codeigniter 3 project and when I try to generate wallet addresses from the Electrum's XPUB, it gives me the right results most of the time, but sometimes it doesn't.

For example with the XPUB provided in the code, results for "m/0/2" and "m/0/14" are wrong, everything else is OK.

In case of "m/0/2" your code gives me 1B3RQ4QKocRE7MFVDpMMmgyswF2DeMEfS6 and Electrum gives me 16wjYM9D46xPYHHUQp7XwotgLwT56ZPZux

In case of "m/0/14" I'm getting 1JEKgyHAb4tx5EkPpMhWzACxTVGsW2Z7Xo but Electrum gives me 14tk9sYRDXXbya6Q2ZJLs1hHZ2mcpRbybS

<?php
$xpub = 'xpub661MyMwAqRbcGtMQDiA8n7E15sH2cA6qdE1kdiQuMjdnNoCwbFMuenQh29mrER4txDBDsuJUPAUZSd9J4qpxFtNBFEzep2cJVDku9UVVAfY';

$address = BIP32::build_address($xpub, "0/2");

echo $address[0]; // Outputs 1B3RQ4QKocRE7MFVDpMMmgyswF2DeMEfS6

I tried different PHP servers (OSX, ubuntu) because I thought it's perhaps an issue with php5-gmp library but it gives me the same wrong results.

I also tried using BitcoinLib and BIP32 to generate addresses for multisig wallets (of course with different XPUBs) and there are much more wrong results (~4 out of every 20 addresses).

BTW results with XPUB from my TREZOR wallet were OK. I also checked with http://bip32.org and it shows me same addresses as Electrum does, so it seems there are some issues with your code.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.