bit-wasp / multisig Goto Github PK
View Code? Open in Web Editor NEWDemonstration of multi-signature transactions
License: The Unlicense
Demonstration of multi-signature transactions
License: The Unlicense
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.