Skip to content
This repository has been archived by the owner on Feb 14, 2024. It is now read-only.

Ledger.getAddress(path) #2

Open
torusJKL opened this issue Nov 18, 2015 · 2 comments
Open

Ledger.getAddress(path) #2

torusJKL opened this issue Nov 18, 2015 · 2 comments

Comments

@torusJKL
Copy link

Please add a function in the Ledger Chrome app that allows for the following API call:

Ledger.getAddress(path)

Request the address for a specific path.

function callback(event) {
  response = event.response;
  if (response.command == "get_address") {
    console.log(response);
  }
};
Ledger.init({ callback: callback });
Ledger.getAddress("44'/0'/0'/0/0");

If the user cancels the request:

{  
   "command":"get_address",
   "success":false,
   "message":"Export request cancelled"
}

If the user confirms the export request:

{  
   "command":"get_address",
   "success":true,

   "address":"15Tc1vFcBQJD5vCs5sZM3s5cAZewLs8sM5"
}
@btchip
Copy link

btchip commented Nov 19, 2015

Hi

You can get that from any library that manipulates HD keys, such as Bitcore, and use the getXPubKey call.

A bit in a hurry now, so let me know if you need more details

@torusJKL
Copy link
Author

Yes, you could get it from the xPubKey.
But you could say the same for Ledger.getNewAddresses(account_id, count).
Having this call makes it easier because you don't need to use another library.

That was the idea behind this feature request.
Make it easier to get a specific address. :-)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants