Giter Site home page Giter Site logo

Comments (3)

afk11 avatar afk11 commented on August 18, 2024

This is something that should be addressed soon.. The private_key_to_WIF function calls a function get_private_key_address_version.. which is not compatible with some altcoins, which deviate from how bitcoin does it I think. (It adds 0x80 to the address version)

Looking into ways to change the coin networks at the moment, but for now I would do this instead of your line: $wif = .....

    $_privkey_version = '??'; // not the regular address version, check out the templecoin-qt source
    $compressed = FALSE; // false because electrum uses 04... keys, not shorter ones. just bear this in mind!
for($i = $startidx; $i < $startidx+10; $i++){
                $privkey = Electrum::generate_private_key($seed, $i,0);
        $_to_wif = $_privkey_version . $privkey . (($compressed == TRUE) ? '01' : '');
        $wif = self::base58_encode_checksum($_to_wif);
}

from bitcoin-lib-php.

9cat avatar 9cat commented on August 18, 2024

thanks your reply, i would try out something a little bit later

However, what I mentioned that use "smart shut inside pride milk linger pretty happen stupid lung warmth zone" phrases also will hapeen for bitcoin to get an invalid WIF address.

I can't figure out on this too.

from bitcoin-lib-php.

rubensayshi avatar rubensayshi commented on August 18, 2024

in the #26 PR I still rely on the private key version being address version +0x80
we could also add the private key version to that instead of calculating it?

from bitcoin-lib-php.

Related Issues (20)

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.