kaspagang / k-wallet

Discord wallet bot (node based)
3 stars 3 forks source link

Migrate to Kaspa NG #9

Open tmrlvi opened 4 months ago

tmrlvi commented 4 months ago

In order to stay up to date with the newest wallet version, we should migrate to Kaspa NG while providing users the ability to upgrade their wallet (or maybe even automatically upgrading when unlocking). In order to support it we should:

1) Add version to the data in the user store so we know who update and who didn't 2) Add a migrate function 3) Expose the migrate function in UI, either by button on unlock, or by a special command 4) Wrap the kaspa NG api in a way that the can be used a drop in for the old wallet

tmrlvi commented 4 months ago

Kaspa NG is actually based on the kaspa-core-wallet, and it seems we can use it directly, with a few modifications. Kaspa NG also provides a list of nodes we can use: https://beacon.kaspa-ng.org/status

In general, the Kaspa core wallet separates between wallet (a collection of all accounts on a machine) and an account (mnemonics / private key). Both the wallet and accounts have their own passwords for the encryption (accounts via the paymentSecret option). So, each wallet will be in fact and account, save it in a single file instead of DB.

However, the current send function allows only a single recipients, and no p2sh

So we need:

tmrlvi commented 4 months ago

Seems multi-output sending is supported