secure-wallet-native
Version:
Native SecureWallet module for React Native with iOS Secure Enclave support
67 lines (46 loc) • 1.52 kB
Markdown
for secure wallet functionality using iOS Secure Enclave and secp256k1 cryptography.
- 🔐 iOS Secure Enclave integration
- 🗝️ secp256k1 cryptographic operations
- 📱 BIP39 mnemonic generation
- 🔒 Secure key storage in Keychain
- ✍️ Transaction signing
- 🏠 Ethereum address derivation
```bash
npm install secure-wallet-native
```
```javascript
import SecureWallet from 'secure-wallet-native';
// Check if Secure Enclave is available
const isAvailable = await SecureWallet.isSecureEnclaveAvailable();
// Generate a new wallet
const wallet = await SecureWallet.generateSecureWallet({});
// Sign a transaction
const signature = await SecureWallet.signTransactionHash('0x...');
// Get mnemonic phrase
const mnemonic = await SecureWallet.getMnemonic();
```
Returns `Promise<boolean>` - Whether the device supports Secure Enclave.
Generates a new secure wallet using Secure Enclave.
Returns `Promise<WalletGenerationResult>`
Signs a transaction hash using the stored private key.
Returns `Promise<SignatureResult>`
Retrieves the stored mnemonic phrase.
Returns `Promise<string>`
Deletes all wallet data from the device.
Returns `Promise<boolean>`
- iOS 15.1+
- React Native 0.60+
- Device with Secure Enclave support
MIT
A React Native module