hd wallet bip44 in js - how to create an address for a chain other than bitcoin

0 votes

I have a small script basically taken from bitcoinjs-lib

function getAddress(node) { const bitcoin = require('bitcoinjs-lib'); return bitcoin.payments.p2pkh({ pubkey: node.publicKey }).address; } function BIP44() { /* create a BIP44, rvn, account 0, external address */ const bip32 = require('bip32'); const root = bip32.fromSeed( Buffer.from( 'dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd', 'hex', ), ); const childAuto = root.derivePath("m/44'/175'/0'/0/0"); const childManual = root .deriveHardened(44) .deriveHardened(175) .deriveHardened(0) .derive(0) .derive(0); return getAddress(childAuto); } console.log(BIP44());

It works perfectly for deriving a bitcoin address (derivation path "m/44'/0'/0'/0/0") but when trying to derive any other address it doesn't seem to work. The output is this:

16CzcgCURH83h3cLQ91ZpavDjXSfuNru4c

That address starts with a 1, whereas RVN addresses start with R.

I mistakenly assumed that merely by changing the derivation path to match RVN (175) it would generate Raven addresses, but there must be something else I'm missing.

Can you help me figure out where I'm going wrong?

Mar 2, 2022 in Blockchain by Aditya
• 7,680 points
868 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Blockchain

+1 vote
1 answer
0 votes
1 answer

How to create Bitcoin Address in PHP?

You need to understand that Bitcoin address and ...READ MORE

answered Aug 28, 2018 in Blockchain by Perry
• 17,100 points
5,127 views
+1 vote
1 answer

Is there a way to send funds from a specific bitcoin address in a wallet?

I'll answer my own question, It was unbelievably ...READ MORE

answered Sep 3, 2018 in Blockchain by Perry
• 17,100 points
1,286 views
+1 vote
0 answers

How to check a Bitcoin wallet balance from first generated address (m/44'/0'/0'/0/0)

Is there a way to check a ...READ MORE

Mar 4, 2022 in Blockchain by Soham
• 9,700 points
1,991 views
+1 vote
0 answers

How to check a Bitcoin wallet balance from first generated address (m/44'/0'/0'/0/0)

Is there a way to check a ...READ MORE

Mar 9, 2022 in Blockchain by Soham
• 9,700 points
1,416 views
+1 vote
1 answer

Protocols used in a distributed/dlt system for the nodes to establish communication

yes all are over TCP/IP connections secured ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,450 points
1,180 views
0 votes
1 answer

Truffle tests not running after truffle init

This was a bug. They've fixed it. ...READ MORE

answered Sep 11, 2018 in Blockchain by Christine
• 15,790 points
1,743 views
0 votes
1 answer

Hyperledger Sawtooth vs Quorum in concurrency and speed Ask

Summary: Both should provide similar reliability of ...READ MORE

answered Sep 26, 2018 in IoT (Internet of Things) by Upasana
• 8,620 points
1,263 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP