|
| 1 | +# Manual Import Feature |
| 2 | + |
| 3 | +The manual import feature allows users to import wallets by entering either a seed phrase (mnemonic) or a private key directly, along with selecting the appropriate cryptographic curve. |
| 4 | + |
| 5 | +## Features |
| 6 | + |
| 7 | +### 1. Import Methods |
| 8 | +- **Seed Phrase**: Import using a 12 or 24-word mnemonic phrase |
| 9 | +- **Private Key**: Import using a 64-character hexadecimal private key |
| 10 | + |
| 11 | +### 2. Cryptographic Curve Selection |
| 12 | +- **secp256k1**: Standard Bitcoin/Ethereum curve (recommended) |
| 13 | +- **P-256**: NIST P-256 curve for specialized networks |
| 14 | + |
| 15 | +### 3. Automatic Curve Detection |
| 16 | +When importing via private key, the system can automatically detect the appropriate curve: |
| 17 | +- Confidence indicators show detection reliability |
| 18 | +- Users can override auto-detection if needed |
| 19 | +- Real-time feedback during curve detection |
| 20 | + |
| 21 | +## User Interface |
| 22 | + |
| 23 | +### Import Type Selection |
| 24 | +Users can choose between two import methods: |
| 25 | +- **Seed Phrase**: For importing from mnemonic words |
| 26 | +- **Private Key**: For importing from raw private key |
| 27 | + |
| 28 | +### Input Fields |
| 29 | +- **Wallet Name**: Custom name for the imported wallet |
| 30 | +- **Seed Phrase/Private Key**: The actual import data |
| 31 | +- **Curve Selection**: Choose or auto-detect the cryptographic curve |
| 32 | + |
| 33 | +### Validation |
| 34 | +- Real-time validation of input format |
| 35 | +- Mnemonic phrase validation using BIP39 standards |
| 36 | +- Private key format validation (64 hex characters) |
| 37 | +- Clear error messages for invalid inputs |
| 38 | + |
| 39 | +### Visual Feedback |
| 40 | +- Loading states during import process |
| 41 | +- Color-coded confidence indicators for curve detection |
| 42 | +- Clear success/error messaging |
| 43 | + |
| 44 | +## Technical Implementation |
| 45 | + |
| 46 | +### Key Components |
| 47 | +1. **ManualImportPage**: Main component handling the import UI |
| 48 | +2. **CurveSelector**: Component for curve selection |
| 49 | +3. **Curve Detection**: Automatic curve identification |
| 50 | +4. **Wallet Generation**: Create wallet objects from import data |
| 51 | + |
| 52 | +### Security Features |
| 53 | +- Input sanitization and validation |
| 54 | +- Secure key generation using noble-curves |
| 55 | +- No storage of sensitive data during import process |
| 56 | + |
| 57 | +### Error Handling |
| 58 | +- Comprehensive input validation |
| 59 | +- Graceful error recovery |
| 60 | +- Clear user feedback for all error states |
| 61 | + |
| 62 | +## Usage Flow |
| 63 | + |
| 64 | +1. **Select Import Method**: Choose between seed phrase or private key |
| 65 | +2. **Enter Wallet Name**: Provide a custom name for the wallet |
| 66 | +3. **Input Data**: Enter the seed phrase or private key |
| 67 | +4. **Select Curve**: Choose curve (or use auto-detection for private key) |
| 68 | +5. **Import**: Complete the import process |
| 69 | + |
| 70 | +## Supported Formats |
| 71 | + |
| 72 | +### Seed Phrase |
| 73 | +- 12-word mnemonic phrases |
| 74 | +- 24-word mnemonic phrases |
| 75 | +- Space-separated words |
| 76 | +- BIP39 compatible |
| 77 | + |
| 78 | +### Private Key |
| 79 | +- 64-character hexadecimal strings |
| 80 | +- With or without '0x' prefix |
| 81 | +- Both uppercase and lowercase accepted |
| 82 | + |
| 83 | +## Integration |
| 84 | + |
| 85 | +The manual import feature integrates seamlessly with: |
| 86 | +- Existing wallet management system |
| 87 | +- Asset compatibility checking |
| 88 | +- Curve-based asset filtering |
| 89 | +- Wallet storage and retrieval |
0 commit comments