woodser / monero-ts

TypeScript library for using Monero
http://woodser.github.io/monero-ts/typedocs
MIT License
210 stars 71 forks source link

MoneroWalletKeys.createSubaddress() not supported #183

Closed AlexAnarcho closed 7 months ago

AlexAnarcho commented 7 months ago

Heyo there! So we have a MoneroWalletKeys (view only wallet) on the client side and want to continously generate subaddresses with it. Intuitively we wanted to use .createSubaddress() but then got the error that it is not supported.

Looking at the src/main/ts/wallet/MoneroWallet.ts it looks like this is not implemented, just for the MoneroWalletFull. We are wondering if the function of the MoneroWalletFull could not also be adopted for the MoneroWalletKeys.

I guess a workable workaround is to use MoneroWalletKeys.getAddress() and then keep track of the subaddress index elsewhere.

Cheers!

woodser commented 7 months ago

MoneroWalletKeys provides only basic key access and doesn't maintain any wallet state.

View-only and offline wallets should use MoneroWalletFull. Here's documentation for that.