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 in Blockchain by Aditya
• 7,660 points
350 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
4,008 views
0 votes
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
759 views
0 votes
0 answers
0 votes
0 answers
0 votes
1 answer

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

yes all are over TCP/IP connections secured by TLS encryption in hashgraph architecture-hashgraph, ...READ MORE

answered Aug 6, 2018 in Blockchain by aryya
• 7,440 points
730 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,108 views
0 votes
1 answer
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