From 7e303c3754164606ffaec023dbc65aec882a83d4 Mon Sep 17 00:00:00 2001 From: Yashovardhan Agrawal <21066442+yashovardhan@users.noreply.github.com> Date: Tue, 29 Oct 2024 11:56:17 +0530 Subject: [PATCH] nits for mpc ck rn examples --- ...labs-react-native-tss-lib-bridge-2.0.0.tgz | Bin 16028 -> 0 bytes .../mpc-core-kit-rn-quick-start/App.tsx | 305 ++++++++++++------ .../package-lock.json | 64 ++-- .../mpc-core-kit-rn-quick-start/package.json | 1 + ...labs-react-native-tss-lib-bridge-2.0.0.tgz | Bin 16028 -> 0 bytes 5 files changed, 248 insertions(+), 122 deletions(-) delete mode 100644 mpc-core-kit-react-native/mpc-core-kit-rn-auth0/toruslabs-react-native-tss-lib-bridge-2.0.0.tgz delete mode 100644 mpc-core-kit-react-native/mpc-core-kit-rn-quick-start/toruslabs-react-native-tss-lib-bridge-2.0.0.tgz diff --git a/mpc-core-kit-react-native/mpc-core-kit-rn-auth0/toruslabs-react-native-tss-lib-bridge-2.0.0.tgz b/mpc-core-kit-react-native/mpc-core-kit-rn-auth0/toruslabs-react-native-tss-lib-bridge-2.0.0.tgz deleted file mode 100644 index 1fedb5575f6e190335d2502ae2eb8de2a596a899..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 16028 zcma*uQ+TG))-LFZlZtKIww*7wZB=YnY}>X`v2CYf+jjDGt-b#4zPfiG^gMiz#(OsB zb3cPH3i`)?4k+--*G6MQD(Ti|h5HSWead;njl?ud$6S1j4~`4f4W@o1qifbkE6%p{ zmt62+iYb<0H1Nawz0$6Ne9};AU>DKwXvyL3hNE+f|9y`G1YRQxEK<1*+~CBZ%Qnti2D}1e zd}tP-h0((71ZyvGMyzfSm*Q$ba5@BdV1r%Imh=a`w)gKXx6D^6Hmj*oPoR)FVZ-z#XjEiQDQ6 ztGyVdf};qtJeBQ!C2Gs$Vpdgxw<8w2V|xVYj}sK(%gQ%|hJJp2&PR#ouiK5D2w15O zh>H4#gSKshNVNtFd}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_ghw662oeDgnLxqavQ(Ut;Wp5K@`|@5|Nuk>#uHECfNi zh1w&LwQJup^w7**dhGi--Pf&7Fmj^kU&ZBlVn>srQGbpra(`iOGb`VeD>$2XGW+-Q P4M^(Z7W$(Y { return EncryptedStorage.getItem(key); @@ -84,6 +88,8 @@ const evmProvider = new EthereumSigningProvider({config: {chainConfig}}); evmProvider.setupProvider(makeEthereumSigner(coreKitInstance)); // IMP END - SDK Initialization +const password = 'Testing@123'; + export default function App() { const [loading, setLoading] = useState(false); const [consoleUI, setConsoleUI] = useState(''); @@ -92,8 +98,7 @@ export default function App() { ); const [backupFactorKey, setBackupFactorKey] = useState(''); const [mnemonicFactor, setMnemonicFactor] = useState(''); - const [email, setEmail] = useState(''); - const [password, setPassword] = useState(''); + const [email, setEmail] = useState(`user${Math.floor(Math.random() * 10000)}@example.com`); useEffect(() => { const init = async () => { @@ -147,11 +152,11 @@ export default function App() { throw new Error('Error in login'); } - // IMP START - Login const idToken = await loginRes!.user.getIdToken(true); uiConsole('idToken', idToken); const parsedToken = parseToken(idToken); + // IMP START - Login const LoginParams = { verifier, verifierId: parsedToken.sub, @@ -159,9 +164,6 @@ export default function App() { } as JWTLoginParams; await coreKitInstance.loginWithJWT(LoginParams); - if (coreKitInstance.status === COREKIT_STATUS.LOGGED_IN) { - await coreKitInstance.commitChanges(); // Needed for new accounts - } // IMP END - Login // IMP START - Recover MFA Enabled Account @@ -209,8 +211,9 @@ export default function App() { try { uiConsole('Enabling MFA, please wait'); - const factorKey = new BN(await getSocialMFAFactorKey(), 'hex'); - await coreKitInstance.enableMFA({factorKey}); + // const factorKey = new BN(await getSocialMFAFactorKey(), 'hex'); + const factorKey = generateFactorKey(); + await coreKitInstance.enableMFA({ factorKey: factorKey.private }); uiConsole( 'MFA enabled, device factor stored in local store, deleted hashed cloud key, your firebase email password login (hardcoded in this example) is used as the social backup factor', @@ -243,20 +246,24 @@ export default function App() { } }; - // const storeDeviceFactor = async () => { - // try { - // const factorKey = await generateFactorKey(); - // await asyncStoreFactor( - // factorKey.private, - // coreKitInstance!, - // asyncStorageKey, - // ); - // uiConsole('Stored factor: ', factorKey); - // } catch (error: any) { - // uiConsole(error.message); - // } - // }; - + // IMP START - Store Device Factor + const storeDeviceFactor = async () => { + try { + const factorKey = await generateFactorKey(); + await coreKitInstance.createFactor({ + shareType: TssShareType.DEVICE, + factorKey: factorKey.private, + }); + await coreKitInstance.setDeviceFactor( + factorKey.private, + true, + ); + uiConsole('Stored factor: ', factorKey); + } catch (error: any) { + uiConsole(error.message); + } + }; + // IMP END - Store Device Factor // IMP START - Export Social Account Factor const getSocialMFAFactorKey = async (): Promise => { try { @@ -337,6 +344,30 @@ export default function App() { } }; + + // IMP START - Delete Factor + const deleteFactor = async () => { + let factorPub: string | undefined; + for (const [key, value] of Object.entries(coreKitInstance.getKeyDetails().shareDescriptions)) { + if (value.length > 0) { + const parsedData = JSON.parse(value[0]); + if (parsedData.module === FactorKeyTypeShareDescription.SocialShare) { + factorPub = key; + } + } + } + if (factorPub) { + uiConsole('Deleting Social Factor, please wait...', 'Factor Pub:', factorPub); + const pub = Point.fromSEC1(secp256k1, factorPub); + await coreKitInstance.deleteFactor(pub); + await coreKitInstance.commitChanges(); + uiConsole('Social Factor deleted'); + } else { + uiConsole('No social factor found to delete'); + } + }; + // IMP END - Delete Factor + const getUserInfo = async () => { // IMP START - Get User Information const user = coreKitInstance.getUserInfo(); @@ -350,13 +381,7 @@ export default function App() { await coreKitInstance.logout(); // IMP END - Logout setCoreKitStatus(coreKitInstance.status); - // Log out from Auth0 setLoading(false); - try { - uiConsole('logged out from auth0'); - } catch (error: any) { - uiConsole(error.message); - } uiConsole('logged out from web3auth'); }; @@ -464,16 +489,19 @@ export default function App() { }; const uiConsole = (...args: any) => { - setConsoleUI('[LOG]' + JSON.stringify(args) + '\n' + consoleUI); - console.log(...args); + setConsoleUI( + JSON.stringify(args, null, 2) + + '\n\n' + + consoleUI + ); + console.log(JSON.stringify(args, null, 2)); }; const loginScreen = ( - MPC Core Kit RN Quick Start - This is a test example, you can enter a random email & password to create a new account + This is a test example, you can enter a random email to create a new account, the constant password is "Testing@123" - Enter your Email + Enter your Email - - Enter your Password - - -