`CashuWallet()` wants `keys` and `mint`, `keys` seems redundant
callebtc opened this issue · 6 comments
callebtc commented
CashuWallet()
wants keys
and mint
as arguments. Isn'tkeys
argument not redundant?
I think it would be nicer to have only one and get the keys, either in the constructor of the CashuMint
or (maybe better) when they are needed in CashuWallet
(right after step3_Alice
afaik).
const mint = new CashuMint(MINTURL);
const keys = await mint.getKeys();
const wallet = new CashuWallet(keys, mint);
BilligsterUser commented
I agree
BilligsterUser commented
what do you think @gandlafbtc ?
gandlafbtc commented
hmm do we still have the option to set the keys from outside the class? I think that's a must.
BilligsterUser commented
For now keys is public. I like to make it private soon but i will add a public setter bc we have to recalc the keysetId If we set new keys
BilligsterUser commented
why is this closed?
gandlafbtc commented
sorry, fat fingers.