ergo-wallet-app
ergo-wallet-app copied to clipboard
Add multisig EIP-41/EIP-11 support
To support EIP-41 multisig wallets, following steps have to be done:
Prerequisites
- [ ] Appkit implementation
- [x] Add a new type field to walletconfig db with type enum p2pk, read-only and multisig (so far) (Android)
- [x] same for desktop/ios
- [x] When creating a read-only wallet, it is checked if it is actually a multisig wallet
New wizard for creating multisig wallets
- [x] Create wallet chooser: new item for multisig (Android)
- [ ] Same for iOS
- [x] Same for desktop
- [x] Step 2: add the p2pk addresses (with a chooser from address book or scan) and how many needed to sign
- [ ] Same for iOS
Wallet list and configuration
- [x] different icon for multi sig wallet on main screen
- [x] configuration screen should not show any secrets or link to addresses, but the list of participating addresses and how many needed to sign
- [ ] Same for iOS
- [x] Same for desktop
Creating multisig transactions
- [ ] an ergopay transaction the multisig wallet will create the multisig transaction entry and navigate to the multisig transaction details page
- [ ] same for desktop
- [ ] same for iOS
- [x] same behaviour for a manual send transaction
- [x] same for desktop
- [ ] same for iOS
- [ ] creating manual transaction should not use any inputs used in waiting multisig transactions; instead, it can use outboxes of multisig transactions (save in dependsOn list)
- [ ] adding from ergopay transaction checks inputs of other waiting multisig transaction and will not add the new one if there are clashes
Waiting multisig transactions
The multisig wallet will never hold any secrets. To sign, the actual wallet to sign must be set up or must be invoked via qr code/file exchange (same concept as for cold wallet)
- [x] new db table "multisig transaction" similar to "address transaction": id, address, tx_id, state - different: memo, data (lastJson + dependsOn list), lastChange
- [x] same for desktop/ios
- [ ] new check: when wallet details screen is opened: check if any multi sig transaction is already part of adress transaction (so already submitted or executed) - then multi sig transaction record can be deleted.
- [x] new section on wallet details screen for drafted/waiting multisig transactions which navigate to the multisig transaction details page
- [x] same for desktop
- [ ] same for iOS
Multisig transaction details page
- [ ] check if the inputs are still unspent. if not, the transaction is invalid
- [ ] check if depend on transactions are not valid. if one is, the whole transaction is invalid
- [x] show the state of each participant (signed/not signed)
- [ ] show on which transaction this one is depending on
- [ ] when a particpant is set up in the app, a sign button is present
- [ ] submit transaction button when ready (which will also delete the db record and add an address transaction record)
- [ ] Can show a sync qr code or export a file for other particpants
- [ ] scan button/import file button to sync the data (check dependsOn and inputs)
Later
- [ ] multisig configuration screen: add a server to manage/sync multisig transactions between participants
- [ ] sync it on wallet details screen