BitBoxSwiss / bitbox02-api-js

BitBox02 JavaScript library
Other
11 stars 9 forks source link

Why btcDisplayAddressSimple doesn't return the address? #39

Closed lf94 closed 3 years ago

lf94 commented 3 years ago

The documentation says btcDisplayAddressSimple will display the address on the device, but why not also return it to the caller? Otherwise I have to include extra code to derive the address after obtaining the xpub from calling btcXPub.

I imagine there is probably some explanation for this design, but I think it should be reconsidered!

lf94 commented 3 years ago

In the meantime using https://www.npmjs.com/package/bip32 seems sufficient.

benma commented 3 years ago

This function does in fact also return the address.

const address = await device.api.btcDisplayAddressSimple(...).

lf94 commented 3 years ago

@benma ah, then the documentation is outdated. Thank you for clarifying!