Packages: core (BIP39/32/44/49/84/86 derivation, WIF), keystore (PBKDF2 + AES-GCM), psbt, p2p (BIP157/158 SPV daemon, Dandelion++ broadcast with relay-echo verification), blockbook, rpc, electrum, net, bns, web-ui (React/Vite), mobile (Expo). ops/ holds the nginx vhost, systemd unit and push.sh deploy script for digibyte.x/web.
30 lines
1.1 KiB
JavaScript
30 lines
1.1 KiB
JavaScript
// Metro (React Native bundler) needs help resolving:
|
|
// 1. Workspace packages (@dgb-wallet/*) — enable symlink traversal
|
|
// 2. Node built-ins (crypto, buffer, stream) used by bitcoinjs-lib —
|
|
// shim them to browser-compatible replacements
|
|
const path = require('path');
|
|
const { getDefaultConfig } = require('expo/metro-config');
|
|
|
|
const projectRoot = __dirname;
|
|
const monorepoRoot = path.resolve(projectRoot, '../..');
|
|
|
|
const config = getDefaultConfig(projectRoot);
|
|
|
|
// Watch the monorepo so workspace packages hot-reload.
|
|
config.watchFolders = [monorepoRoot];
|
|
|
|
// Resolve modules from both the app's node_modules and the monorepo root.
|
|
config.resolver.nodeModulesPaths = [
|
|
path.resolve(projectRoot, 'node_modules'),
|
|
path.resolve(monorepoRoot, 'node_modules'),
|
|
];
|
|
config.resolver.disableHierarchicalLookup = true;
|
|
|
|
// Polyfills for Node built-ins used by bitcoinjs-lib et al.
|
|
config.resolver.extraNodeModules = {
|
|
crypto: require.resolve('react-native-quick-crypto'),
|
|
buffer: require.resolve('buffer'),
|
|
stream: require.resolve('readable-stream'),
|
|
};
|
|
|
|
module.exports = config;
|