utils/hdnode.js
function HDNode(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonic, path) {
        errors.checkNew(this, HDNode);
        if (constructorGuard !== _constructorGuard) {
            throw new Error('HDNode constructor cannot be called directly');
        }
        if (privateKey) {
            var keyPair = new secp256k1_1.KeyPair(privateKey);
            properties_1.defineReadOnly(this, 'privateKey', keyPair.privateKey);
            properties_1.defineReadOnly(this, 'publicKey', keyPair.compressedPublicKey);
        }
        else {
            properties_1.defineReadOnly(this, 'privateKey', null);
            properties_1.defineReadOnly(this, 'publicKey', bytes_1.hexlify(publicKey));
        }
        properties_1.defineReadOnly(this, 'parentFingerprint', parentFingerprint);
        properties_1.defineReadOnly(this, 'fingerprint', bytes_1.hexDataSlice(sha2_1.ripemd160(sha2_1.sha256(this.publicKey)), 0, 4));
        properties_1.defineReadOnly(this, 'address', secp256k1_1.computeAddress(this.publicKey));
        properties_1.defineReadOnly(this, 'chainCode', chainCode);
        properties_1.defineReadOnly(this, 'index', index);
        properties_1.defineReadOnly(this, 'depth', depth);
        properties_1.defineReadOnly(this, 'mnemonic', mnemonic);
        properties_1.defineReadOnly(this, 'path', path);
        properties_1.setType(this, 'HDNode');
    }
function HDNode(constructorGuard, privateKey, publicKey, parentFingerprint, chainCode, index, depth, mnemonic, path) {
        errors.checkNew(this, HDNode);
        if (constructorGuard !== _constructorGuard) {
            throw new Error('HDNode constructor cannot be called directly');
        }
        if (privateKey) {
            var keyPair = new secp256k1_1.KeyPair(privateKey);
            properties_1.defineReadOnly(this, 'privateKey', keyPair.privateKey);
            properties_1.defineReadOnly(this, 'publicKey', keyPair.compressedPublicKey);
        }
        else {
            properties_1.defineReadOnly(this, 'privateKey', null);
            properties_1.defineReadOnly(this, 'publicKey', bytes_1.hexlify(publicKey));
        }
        properties_1.defineReadOnly(this, 'parentFingerprint', parentFingerprint);
        properties_1.defineReadOnly(this, 'fingerprint', bytes_1.hexDataSlice(sha2_1.ripemd160(sha2_1.sha256(this.publicKey)), 0, 4));
        properties_1.defineReadOnly(this, 'address', secp256k1_1.computeAddress(this.publicKey));
        properties_1.defineReadOnly(this, 'chainCode', chainCode);
        properties_1.defineReadOnly(this, 'index', index);
        properties_1.defineReadOnly(this, 'depth', depth);
        properties_1.defineReadOnly(this, 'mnemonic', mnemonic);
        properties_1.defineReadOnly(this, 'path', path);
        properties_1.setType(this, 'HDNode');
    }
function HDNode ( constructorGuard , privateKey , publicKey , parentFingerprint , chainCode , index , depth , mnemonic , path ) { errors . checkNew ( this , HDNode ) ; if ( constructorGuard !== _constructorGuard ) { throw new Error ( 'HDNode constructor cannot be called directly' ) ; } if ( privateKey ) { var keyPair = new secp256k1_1 . KeyPair ( privateKey ) ; properties_1 . defineReadOnly ( this , 'privateKey' , keyPair . privateKey ) ; properties_1 . defineReadOnly ( this , 'publicKey' , keyPair . compressedPublicKey ) ; } else { properties_1 . defineReadOnly ( this , 'privateKey' , null ) ; properties_1 . defineReadOnly ( this , 'publicKey' , bytes_1 . hexlify ( publicKey ) ) ; } properties_1 . defineReadOnly ( this , 'parentFingerprint' , parentFingerprint ) ; properties_1 . defineReadOnly ( this , 'fingerprint' , bytes_1 . hexDataSlice ( sha2_1 . ripemd160 ( sha2_1 . sha256 ( this . publicKey ) ) , 0 , 4 ) ) ; properties_1 . defineReadOnly ( this , 'address' , secp256k1_1 . computeAddress ( this . publicKey ) ) ; properties_1 . defineReadOnly ( this , 'chainCode' , chainCode ) ; properties_1 . defineReadOnly ( this , 'index' , index ) ; properties_1 . defineReadOnly ( this , 'depth' , depth ) ; properties_1 . defineReadOnly ( this , 'mnemonic' , mnemonic ) ; properties_1 . defineReadOnly ( this , 'path' , path ) ; properties_1 . setType ( this , 'HDNode' ) ; }
This constructor should not be called directly.

Please use:
- fromMnemonic
- fromSeed
This constructor should not be called directly .