Skip to content

Deriving public keys fails when given an xpub key #167

@thallium205

Description

@thallium205

Given an xpub key, one should be able to generate derived public keys from it in a simple m/i derivation path as done on http://bip32.org/. However, when trying to do so, a BigDecimal exception is thrown.

How to reproduce:

var bitcoin = require('bitcoinjs-lib');
new bitcoin.HDWallet.fromBase58('xpub6CxuB8ifZCMXeS3KbyNkYvrsJEHqxedCSiUhrNwH1nKtb8hcJpxDbDxkdoVCTR2bQ1G8hY4UMv85gef9SEpgFFUftBjt37FUSZxVx4AU9Qh').derive(0);

Error:

TypeError: Object (55066263022277343669578718895168534326250603453777594175500187360389116729240,32670510020758816978083085130507043184471273380659243275938904335757337482424) has no method 'abs'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions