GIONG
All Dispatches
Engineering

Zero Private Key in JavaScript: Architecting React Native 0.88 + C++ WalletCore TurboModules

How G-Wallet eliminates JavaScript heap key exposure in React Native 0.88 using C++ TrustWallet Core TurboModules, 0x02 SCrypt + AES-256-GCM vaults, Secure Enclave, and memset_s RAM zeroing.

22 November 2026/Gióng Web3 Engineering Desk/Dispatch 03
Zero Private Key in JavaScript: Architecting React Native 0.88 + C++ WalletCore TurboModules

Most hybrid mobile crypto wallets share an uncomfortable architectural flaw: they treat JavaScript as a trusted cryptographic runtime. Mnemonics are decrypted into JS strings, passed through pure-JS bip39 or ethers.js packages, and left lingering in the Hermes or V8 garbage-collected heap until an unpredictable GC cycle sweeps memory.

When we architected G-Wallet for enterprise white-label licensing, we enforced a strict invariant from commit one: Zero Private Key in JavaScript.

Why JavaScript Memory Is Unsuitable for Private Keys

  • Immutable String Persistence: JavaScript strings are immutable and cannot be deterministically zeroed in RAM. Once a 24-word mnemonic or hex private key enters the JS runtime, copies can persist across heap snapshots and crash dumps.
  • Supply-Chain Blast Radius: A single compromised transitive npm package inside a JS-signing wallet can hook signing functions or read decrypted vault state directly from memory.
  • Slow Key Derivation: Pure-JS PBKDF2 / SCrypt and multi-chain BIP-44 derivation across 32+ curves (secp256k1, ed25519, sr25519, bls12-381) stalls the UI thread and ruins 60fps fluidity.

G-Wallet’s 3-Layer Native Security Boundary

Instead of passing secrets across the React Native bridge, G-Wallet routes every cryptographic lifecycle event through a typed JSI TurboModule (WalletCoreBridge) backed by native Swift, Kotlin, and C++ TrustWallet Core:

Layer 1: React Native 0.88 Presentation Layer (Public Data Only)

The TypeScript/React UI layer strictly holds opaque wallet IDs, public addresses, balances, and unsigned transaction intents. Even during wallet creation or import, seed phrases are handled through hardened native flows with FLAG_SECURE (Android) and screen-capture observers (iOS) enabled.

Layer 2: WalletCoreBridge C++ TurboModule (<12ms Derivation & RAM Zeroing)

All BIP-39 mnemonic generation, BIP-44 multi-chain derivation across 166+ CoinTypes, and Protobuf transaction signing via AnySigner execute inside compiled C++ native code. Immediately after generating the signed transaction hex, native buffers are deterministically wiped using memset_s (iOS) and Arrays.fill (Android) before returning only the signed broadcast payload to TypeScript.

Layer 3: Hardware-Backed 0x02 Encrypted Vault

Wallet secrets are encrypted at rest using our 0x02 vault envelope (SCrypt KDF + AES-256-GCM authenticated encryption), with the wrapping key sealed inside iOS Secure Enclave and Android Hardware KeyStore behind biometric (Face ID / Touch ID) and passcode authentication.

Security Audit Readiness for White-Label Buyers

For exchanges, neobanks, and regulated Web3 brands, this architecture dramatically accelerates third-party penetration testing and compliance reviews. Instead of auditing dozens of JavaScript crypto libraries, auditors inspect a single, deterministic native boundary.

Inspect the full architecture on our G-Wallet White-Label product page, or read how we pair this vault with zero-key real-time push notifications.

READY TO BUILD WITH G-WALLET?

License the complete iOS, Android & Gateway stack.

Turn-Key White-Label deployment or Full Source-Code IP ownership.

Explore G-Wallet