A React Native (Expo) wallet application supporting multiple chains (DOGE, BTC, MVC). The project includes wallet UI, transaction construction and broadcasting, and an experimental DOGE inscription flow that stores data inside a P2SH scriptSig.
- Platform: React Native (Expo)
- Language: TypeScript / JavaScript
- Main features: multi-chain wallet UI, transaction construction & broadcast, DOGE inscription/reveal flow, address-type switching
src/— application source codepage/— React Native screens (e.g.AssetsDogeDetailPage.tsx)webs/actions/lib/authorize/doge/inscribe.ts— DOGE inscription and transaction-building logicchat/wallet/doge/wallet.ts— DOGE wallet helperwallet/MetaletWallet.tsx— wallet container and active wallet referenceutils/WalletUtils.ts— helpers for storage and address-type switching
assets/— images and static assets- Standard config files:
package.json,tsconfig.json,babel.config.js, etc.
- Node.js (recommended LTS)
- Yarn or npm
- Expo CLI (for running the app in development)
- Xcode / Android SDK for native builds or EAS submissions
yarn install
# or
npm installStart Metro / Expo dev server:
yarn start
# or
npm run startOpen the app with Expo Go or run on simulators/emulators.
yarn start— start Expo / Metroyarn ios/yarn android— platform run (if configured)eas submit --platform ios— submit iOS build via EAS (example)
- ECC backend selection on iOS: avoid importing native/JSI
secp256k1modules at module load time on iOS to prevent crashes. The codebase uses@noble/secp256k1(pure JS) on iOS and dynamically selects ECC backends at runtime (seeinscribe.ts). - WebCrypto / random values:
@noble/secp256k1async signing expects WebCrypto (crypto.subtle) and secure random. On React Native provide polyfills such asreact-native-get-random-valuesand a WebCrypto shim, or ensureglobalThis.cryptoexists before invoking ECC functions. - ScriptSig and stack ordering: P2SH unlock scripts depend on the order of pushed items. For the DOGE inscription flow the stack must place signature and pushes in the order expected by the redeem script (see
signP2SHInputininscribe.ts). If node validation fails, enable debug logs ininscribe.tsand collect the printedscriptSighex. - Address type switching:
AssetsDogeDetailPage.tsxprovides a UI to switch DOGE address types. Changes persist viachangeCurrentWalletDogeAddressTypeand update the active wallet state on the Metalet container.
- iOS crash related to secp library: ensure no native
secp256k1is imported at top-level. Use the runtime initializer (ensureEccInitialized) to select a safe backend. - Node RPC signature failures (e.g.
mandatory-script-verify-flag-failed): inspect thescriptSighex output from the app, verify signature is DER + SIGHASH, low-S normalized, and that push order/encoding matches the redeem script.
- Add unit tests to validate signature formats and scriptSig stack ordering.
- Document WebCrypto polyfill installation steps and include guard logic in initialization.
- Add more exhaustive address-type derivations if required by product.
Provide runtime logs and the scriptSig / transaction hex printed by the app when requesting help. That information is critical for diagnosing signature and script verification issues.
If you want the README shortened, expanded with developer setup steps, or converted to another language, open an issue or request an update.