Koniverse / SubWallet-Extension

SubWallet is the comprehensive non-custodial wallet solution for Polkadot, Substrate & Ethereum ecosystems.
https://www.subwallet.app
Apache License 2.0
93 stars 66 forks source link

SubWallet Interactive with Cold Wallet #150

Closed hieudd closed 2 years ago

hieudd commented 2 years ago

Basic knowledge

Overview

Signer with manage account and keep private key and allow to create signature for any transaction. Most of signer require passphase to unlock private key before create signature. DApp, Extension Wallet, Hardware Wallet, Mobile Signer can become signer if it keep private key of an account.

There are some signing data usecase depend on which object contain private key:

  1. DApp keep private key a. This is most simplest case. DApp will create transaction and sign transaction with private key that it own.
  2. Extension Wallet keep private key, this case is very popular key a. Some Wallet Extension like SubWallet have some features like a DApp. When user perform some features that required signature, this case will be the same with 1a. b. DApp will create transaction and keyring on DApp will request signature from Extension via extension signature. c. DApp on mobile can be import account from QR code. Anytime required signature DApp need to push data to Extension Wallet and get signature result by QR.
  3. Hardware Wallet keep private key, this is nearly the most security a. DApp direct connect to hardware wallet via usb connection and it need to import account from hardware wallet. Whenver imported account request signature, it required Hardware Wallet connect and sign data with its passphase. b. DApp use injected account from Extension and Extension import account from hardware. With DApp this case is same with 2a but with Extension it need to import account from Hardware and connect to this device to get transaction signature.
  4. Mobile Signer keep private key. This case near the same with Hardware Wallet but Mobile Signature will use QR code to interact with extension or DApp a. DApp direct connect to hardware wallet via usb connection and it need to import account from QR code. Whenver imported account request signature DApp with send and get payload via QR code. b. DApp use injected account from Extension and Extension import account from hardware. With DApp this case is same with 2a but with Extension it need to import account from and request signature by send and get data via QR code.

image

Use QR with signer

Requirements

SubWallet now work ok with case 2a, 2b It hold private key and can sign for these transaction.

Todo List

These step will help us response for all requiredment

Research

Test again

sokol142 commented 2 years ago

Pls check some issues:

Improve:

sokol142 commented 2 years ago

Other bug UI:

sokol142 commented 2 years ago

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./337-merge-build-0.4.6-1656046324651.zip

Pls check issues:

sokol142 commented 2 years ago

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./337-merge-build-0.4.7-1656312422203.zip

sokol142 commented 2 years ago
sokol142 commented 2 years ago

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./337-merge-build-0.4.7-1656662663807.zip Check issues:

sokol142 commented 2 years ago

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./337-merge-build-0.4.9-1657187578811.zip

Please check:

sokol142 commented 2 years ago

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./337-merge-build-0.4.9-1657795530326.zip

https://user-images.githubusercontent.com/102292476/180154801-d96e6159-4368-4562-bc50-a372aceee551.mp4

Notes: Staking for the Ledger Account not tested yet

sokol142 commented 2 years ago

@hieudd Screenshot for this feature. QR_Ledger_Account.zip

Scan QR screen: image

S2kael commented 2 years ago

Ledger Kusama

https://user-images.githubusercontent.com/41369298/181150703-c433595a-1ccc-4fb3-b545-a5e961e006f6.mp4

hieudd commented 2 years ago

@S2kael update style follow this Design:

sokol142 commented 2 years ago

Version test: https://file.cdmteck.com/s/4oimk9zDJ8R5Aai/download?path=%2F&files=./337-merge-build-0.5.3-1659612112422.zip

QR signer