Closed Psycarlo closed 5 months ago
Hi. I am trying to make bdk-rn work with expo. I can't even generate a 12 word mnemonic. 👇🏼
Replication steps:
Note: I am using Node v18.19.0, npm v10.5.0, windows machine
npx create-expo-app --template
Choose template: Blank (TypeScript)
"dependencies": { "expo": "~50.0.14", "expo-status-bar": "~1.11.1", "react": "18.2.0", "react-native": "0.73.6" },
npm i --save bdk-rn
import { StatusBar } from "expo-status-bar"; import { StyleSheet, Text, View, Button } from "react-native"; import { Mnemonic } from "bdk-rn"; import { WordCount } from "bdk-rn/lib/lib/enums"; import { useState } from "react"; export default function App() { const [mnemonic, setMnemonic] = useState(""); const handleClick = async () => { const mnemonic = await new Mnemonic().create(WordCount.WORDS12); setMnemonic(mnemonic.asString()); }; return ( <View style={styles.container}> <Text>Open up App.tsx to start working on your app!</Text> <Button title="Generate" onPress={handleClick} /> <Text>Test: {mnemonic}</Text> <StatusBar style="auto" /> </View> ); } ...
npm start
Now I get the following error:
Possible unhandled promise rejection | TypeError: Cannot read property 'generateSeedFromWordCount' of null
cc @BitcoinZavior
There are 2 different workflows used by Expo to run Apps.
npx expo start
npx expo run:ios
bdk-rn just like any other RN module will work with Bare Workflow but not with Managed Workflow
bdk-rn
Hi. I am trying to make bdk-rn work with expo. I can't even generate a 12 word mnemonic. 👇🏼
Replication steps:
Note: I am using Node v18.19.0, npm v10.5.0, windows machine
Choose template: Blank (TypeScript)
Now I get the following error:
cc @BitcoinZavior