From 8958a88b07cba0ea45676e6e08cc1463e39f363a Mon Sep 17 00:00:00 2001 From: Iyk Azorji Date: Thu, 19 Dec 2024 13:07:12 -0500 Subject: [PATCH 1/2] feat: add otp auth example to expo example --- .../app/(tabs)/_layout.tsx | 27 +++ .../app/{ => (tabs)}/index.tsx | 4 +- .../app/(tabs)/otp-auth.tsx | 180 +++++++++++++++ .../react-native-expo-example/app/_layout.tsx | 8 +- yarn.lock | 210 +++++++----------- 5 files changed, 301 insertions(+), 128 deletions(-) create mode 100644 examples/react-native-expo-example/app/(tabs)/_layout.tsx rename examples/react-native-expo-example/app/{ => (tabs)}/index.tsx (98%) create mode 100644 examples/react-native-expo-example/app/(tabs)/otp-auth.tsx diff --git a/examples/react-native-expo-example/app/(tabs)/_layout.tsx b/examples/react-native-expo-example/app/(tabs)/_layout.tsx new file mode 100644 index 0000000000..4184ebee31 --- /dev/null +++ b/examples/react-native-expo-example/app/(tabs)/_layout.tsx @@ -0,0 +1,27 @@ +import FontAwesome6 from "@expo/vector-icons/FontAwesome"; +import { Tabs } from "expo-router"; + +export default function TabLayout() { + return ( + + ( + + ), + }} + /> + ( + + ), + }} + /> + + ); +} diff --git a/examples/react-native-expo-example/app/index.tsx b/examples/react-native-expo-example/app/(tabs)/index.tsx similarity index 98% rename from examples/react-native-expo-example/app/index.tsx rename to examples/react-native-expo-example/app/(tabs)/index.tsx index e2c3cff43b..8e384e6e36 100644 --- a/examples/react-native-expo-example/app/index.tsx +++ b/examples/react-native-expo-example/app/(tabs)/index.tsx @@ -18,11 +18,11 @@ import { } from "react-native"; import { API_KEY } from "@env"; -const signer = new RNAlchemySigner({ +const signer = RNAlchemySigner({ client: { connection: { apiKey: API_KEY } }, }); -export default function HomeScreen() { +export default function MagicLinkAuthScreen() { const [email, setEmail] = useState(""); const [user, setUser] = useState(null); const [account, setAccount] = useState(null); diff --git a/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx b/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx new file mode 100644 index 0000000000..3f78658be5 --- /dev/null +++ b/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx @@ -0,0 +1,180 @@ +/* eslint-disable import/extensions */ +import type { User } from "@account-kit/signer"; +import { useEffect, useState } from "react"; +import { + View, + Text, + TextInput, + StyleSheet, + TouchableOpacity, +} from "react-native"; + +import { API_KEY } from "@env"; +import { RNAlchemySigner } from "@account-kit/react-native-signer"; +import { + createLightAccountAlchemyClient, + LightAccount, +} from "@account-kit/smart-contracts"; +import { sepolia } from "@account-kit/infra"; +import { alchemy } from "@account-kit/infra"; + +const signer = RNAlchemySigner({ + client: { connection: { apiKey: API_KEY! } }, +}); + +export default function OTPAuthScreen() { + const [email, setEmail] = useState(""); + const [user, setUser] = useState(null); + const [account, setAccount] = useState(null); + const [signerAddress, setSignerAddress] = useState(null); + + const [awaitingOtp, setAwaitingOtp] = useState(false); + + const [otpCode, setOtpCode] = useState(""); + + const handleUserAuth = ({ code }: { code: string }) => { + setAwaitingOtp(false); + signer + .authenticate({ + otpCode: code, + type: "otp", + }) + .then(setUser) + .catch(console.error); + }; + + useEffect(() => { + // get the user if already logged in + signer.getAuthDetails().then(setUser); + }, []); + + useEffect(() => { + if (user) { + createLightAccountAlchemyClient({ + signer, + chain: sepolia, + transport: alchemy({ apiKey: API_KEY! }), + }).then((client) => { + setAccount(client.account); + }); + + signer.getAddress().then((address) => { + setSignerAddress(address); + }); + } + }, [user]); + + return ( + + {awaitingOtp ? ( + <> + + handleUserAuth({ code: otpCode })} + > + Sign in + + + ) : !user ? ( + <> + + { + signer + .authenticate({ + email, + type: "email", + emailMode: "otp", + }) + .catch(console.error); + setAwaitingOtp(true); + }} + > + Sign in + + + ) : ( + <> + + Currently logged in as: {user.email} + + OrgId: {user.orgId} + Address: {user.address} + + Light Account Address: {account?.address} + + + Signer Address: {signerAddress} + + + + signer.disconnect().then(() => setUser(null)) + } + > + Sign out + + + )} + + ); +} + +const styles = StyleSheet.create({ + container: { + flex: 1, + alignItems: "center", + justifyContent: "center", + backgroundColor: "#FFFFF", + paddingHorizontal: 20, + }, + textInput: { + width: "100%", + height: 40, + borderColor: "gray", + borderWidth: 1, + paddingHorizontal: 10, + backgroundColor: "rgba(0,0,0,0.05)", + marginTop: 20, + marginBottom: 10, + }, + box: { + width: 60, + height: 60, + marginVertical: 20, + }, + button: { + width: 200, + padding: 10, + height: 50, + backgroundColor: "rgb(147, 197, 253)", + borderRadius: 5, + alignItems: "center", + justifyContent: "center", + marginTop: 20, + }, + buttonText: { + color: "white", + fontWeight: "bold", + textAlign: "center", + }, + userText: { + marginBottom: 10, + fontSize: 18, + }, +}); diff --git a/examples/react-native-expo-example/app/_layout.tsx b/examples/react-native-expo-example/app/_layout.tsx index cb44996d68..564f84e960 100644 --- a/examples/react-native-expo-example/app/_layout.tsx +++ b/examples/react-native-expo-example/app/_layout.tsx @@ -3,8 +3,12 @@ import "node-libs-react-native/globals.js"; import "react-native-get-random-values"; import React from "react"; -import { Slot } from "expo-router"; +import { Stack } from "expo-router"; export default function RootLayout() { - return ; + return ( + + + + ); } diff --git a/yarn.lock b/yarn.lock index 9d839d006d..a05394971f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -12,7 +12,7 @@ resolved "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@adobe/css-tools@^4.3.2", "@adobe/css-tools@^4.4.0": +"@adobe/css-tools@^4.4.0": version "4.4.0" resolved "https://registry.npmjs.org/@adobe/css-tools/-/css-tools-4.4.0.tgz" integrity sha512-Ff9+ksdQQB3rMncgqDK78uLznstjyfIf2Arnh22pW8kBpLs6rpKDwgnZT46hin5Hl1WzazzK64DOrhSwYpS7bQ== @@ -1831,7 +1831,7 @@ resolved "https://registry.yarnpkg.com/@babel/regjsgen/-/regjsgen-0.8.0.tgz#f0ba69b075e1f05fb2825b7fad991e7adbb18310" integrity sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA== -"@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.19.4", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.24.1", "@babel/runtime@^7.25.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.8.4", "@babel/runtime@^7.9.2": +"@babel/runtime@^7.12.5", "@babel/runtime@^7.13.10", "@babel/runtime@^7.16.3", "@babel/runtime@^7.17.8", "@babel/runtime@^7.19.4", "@babel/runtime@^7.21.0", "@babel/runtime@^7.23.2", "@babel/runtime@^7.24.1", "@babel/runtime@^7.25.0", "@babel/runtime@^7.3.1", "@babel/runtime@^7.8.4": version "7.25.7" resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.25.7.tgz" integrity sha512-FjoyLe754PMiYsFaN5C94ttGiOmBNYTf6pLr4xXHAT5uctHb092PBszndLDR5XA/jghQvn4n7JMHl7dmTgbm9w== @@ -6346,7 +6346,7 @@ invariant "^2.2.4" nullthrows "^1.1.1" -"@react-navigation/bottom-tabs@^7.2.0": +"@react-navigation/bottom-tabs@^7.0.0", "@react-navigation/bottom-tabs@^7.2.0": version "7.2.0" resolved "https://registry.npmjs.org/@react-navigation/bottom-tabs/-/bottom-tabs-7.2.0.tgz#5b336b823226647a263b4fe743655462796b6aaf" integrity sha512-1LxjgnbPyFINyf9Qr5d1YE0pYhuJayg5TCIIFQmbcX4PRhX7FKUXV7cX8OzrKXEdZi/UE/VNXugtozPAR9zgvA== @@ -7305,14 +7305,14 @@ dependencies: "@storybook/global" "^5.0.0" -"@storybook/addon-interactions@^8.2.8": - version "8.2.9" - resolved "https://registry.npmjs.org/@storybook/addon-interactions/-/addon-interactions-8.2.9.tgz" - integrity sha512-oSxBkqpmp1Vm9v/G8mZeFNXD8k6T1NMgzUWzAx7R5m31rfObhoi5Fo1bKQT5BAhSSsdjjd7owTAFKdhwSotSKg== +"@storybook/addon-interactions@^8.4.4": + version "8.4.7" + resolved "https://registry.npmjs.org/@storybook/addon-interactions/-/addon-interactions-8.4.7.tgz#d34545db5ea6f03a5499ad6742c3317fb9e02d55" + integrity sha512-fnufT3ym8ht3HHUIRVXAH47iOJW/QOb0VSM+j269gDuvyDcY03D1civCu1v+eZLGaXPKJ8vtjr0L8zKQ/4P0JQ== dependencies: "@storybook/global" "^5.0.0" - "@storybook/instrumenter" "8.2.9" - "@storybook/test" "8.2.9" + "@storybook/instrumenter" "8.4.7" + "@storybook/test" "8.4.7" polished "^4.2.2" ts-dedent "^2.2.0" @@ -7509,6 +7509,13 @@ dependencies: type-fest "^2.19.0" +"@storybook/csf@^0.1.11": + version "0.1.12" + resolved "https://registry.npmjs.org/@storybook/csf/-/csf-0.1.12.tgz#1dcfa0f398a69b834c563884b5f747db3d5a81df" + integrity sha512-9/exVhabisyIVL0VxTCxo01Tdm8wefIXKXfltAPTSr8cbLn5JAxGQ6QV3mjdecLGEOucfoVhAKtJfVHxEK1iqw== + dependencies: + type-fest "^2.19.0" + "@storybook/expect@storybook-jest": version "28.1.3-5" resolved "https://registry.yarnpkg.com/@storybook/expect/-/expect-28.1.3-5.tgz#ecb680851866aa411238b23b48c43285bd7477cf" @@ -7526,14 +7533,13 @@ resolved "https://registry.npmjs.org/@storybook/icons/-/icons-1.2.10.tgz" integrity sha512-310apKdDcjbbX2VSLWPwhEwAgjxTzVagrwucVZIdGPErwiAppX8KvBuWZgPo+rQLVrtH8S+pw1dbUwjcE6d7og== -"@storybook/instrumenter@8.2.9": - version "8.2.9" - resolved "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.2.9.tgz" - integrity sha512-+DNjTbsMzlDggsvkhRuOy7aGvQJ4oLCPgunP5Se/3yBjG+M2bYDa0EmC5jC2nwZ3ffpuvbzaVe7fWf7R8W9F2Q== +"@storybook/instrumenter@8.4.7": + version "8.4.7" + resolved "https://registry.npmjs.org/@storybook/instrumenter/-/instrumenter-8.4.7.tgz#5a37876fee8f828241a1e7fd76891c6effc1805a" + integrity sha512-k6NSD3jaRCCHAFtqXZ7tw8jAzD/yTEWXGya+REgZqq5RCkmJ+9S4Ytp/6OhQMPtPFX23gAuJJzTQVLcCr+gjRg== dependencies: "@storybook/global" "^5.0.0" - "@vitest/utils" "^1.3.1" - util "^0.12.4" + "@vitest/utils" "^2.1.1" "@storybook/jest@^0.2.3": version "0.2.3" @@ -7660,19 +7666,19 @@ tempy "^1.0.1" ts-dedent "^2.0.0" -"@storybook/test@8.2.9": - version "8.2.9" - resolved "https://registry.npmjs.org/@storybook/test/-/test-8.2.9.tgz" - integrity sha512-O5JZ5S8UVVR7V0ru5AiF/uRO+srAVwji0Iik7ihy8gw3V91WQNMmJh2KkdhG0R1enYeBsYZlipOm+AW7f/MmOA== +"@storybook/test@8.4.7", "@storybook/test@^8.4.4": + version "8.4.7" + resolved "https://registry.npmjs.org/@storybook/test/-/test-8.4.7.tgz#7f58f2cdf3a6d810bf3ff4e0e2fee634040c678f" + integrity sha512-AhvJsu5zl3uG40itSQVuSy5WByp3UVhS6xAnme4FWRwgSxhvZjATJ3AZkkHWOYjnnk+P2/sbz/XuPli1FVCWoQ== dependencies: - "@storybook/csf" "0.1.11" - "@storybook/instrumenter" "8.2.9" - "@testing-library/dom" "10.1.0" - "@testing-library/jest-dom" "6.4.5" + "@storybook/csf" "^0.1.11" + "@storybook/global" "^5.0.0" + "@storybook/instrumenter" "8.4.7" + "@testing-library/dom" "10.4.0" + "@testing-library/jest-dom" "6.5.0" "@testing-library/user-event" "14.5.2" - "@vitest/expect" "1.6.0" - "@vitest/spy" "1.6.0" - util "^0.12.4" + "@vitest/expect" "2.0.5" + "@vitest/spy" "2.0.5" "@storybook/testing-library@^0.2.2": version "0.2.2" @@ -7871,10 +7877,10 @@ dependencies: "@tanstack/form-core" "0.33.0" -"@testing-library/dom@10.1.0": - version "10.1.0" - resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-10.1.0.tgz" - integrity sha512-wdsYKy5zupPyLCW2Je5DLHSxSfbIp6h80WoHOQc+RPtmPGA52O9x5MJEkv92Sjonpq+poOAtUKhh1kBGAXBrNA== +"@testing-library/dom@10.4.0": + version "10.4.0" + resolved "https://registry.npmjs.org/@testing-library/dom/-/dom-10.4.0.tgz#82a9d9462f11d240ecadbf406607c6ceeeff43a8" + integrity sha512-pemlzrSESWbdAloYml3bAJMEfNh1Z7EduzqPKprCH5S341frlpYnUEW0H72dLxa6IsYr+mPno20GiSm+h9dEdQ== dependencies: "@babel/code-frame" "^7.10.4" "@babel/runtime" "^7.12.5" @@ -7899,21 +7905,7 @@ lz-string "^1.5.0" pretty-format "^27.0.2" -"@testing-library/jest-dom@6.4.5": - version "6.4.5" - resolved "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.4.5.tgz" - integrity sha512-AguB9yvTXmCnySBP1lWjfNNUwpbElsaQ567lt2VdGqAdHtpieLgjmcVyv1q7PMIvLbgpDdkWV5Ydv3FEejyp2A== - dependencies: - "@adobe/css-tools" "^4.3.2" - "@babel/runtime" "^7.9.2" - aria-query "^5.0.0" - chalk "^3.0.0" - css.escape "^1.5.1" - dom-accessibility-api "^0.6.3" - lodash "^4.17.21" - redent "^3.0.0" - -"@testing-library/jest-dom@^6.1.2": +"@testing-library/jest-dom@6.5.0", "@testing-library/jest-dom@^6.1.2": version "6.5.0" resolved "https://registry.npmjs.org/@testing-library/jest-dom/-/jest-dom-6.5.0.tgz" integrity sha512-xGGHpBXYSHUUr6XsKBfs85TWlYKpTc37cSBBVrXcib2MkHLboWlkClhWF37JKlDb9KEq3dHs+f2xR7XJEWGBxA== @@ -9387,15 +9379,6 @@ "@types/babel__core" "^7.20.5" react-refresh "^0.14.2" -"@vitest/expect@1.6.0": - version "1.6.0" - resolved "https://registry.npmjs.org/@vitest/expect/-/expect-1.6.0.tgz" - integrity sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ== - dependencies: - "@vitest/spy" "1.6.0" - "@vitest/utils" "1.6.0" - chai "^4.3.10" - "@vitest/expect@2.0.4": version "2.0.4" resolved "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.4.tgz" @@ -9406,6 +9389,16 @@ chai "^5.1.1" tinyrainbow "^1.2.0" +"@vitest/expect@2.0.5": + version "2.0.5" + resolved "https://registry.npmjs.org/@vitest/expect/-/expect-2.0.5.tgz#f3745a6a2c18acbea4d39f5935e913f40d26fa86" + integrity sha512-yHZtwuP7JZivj65Gxoi8upUN2OzHTi3zVfjwdpu2WrvCZPLwsJ2Ey5ILIPccoW23dd/zQBlJ4/dhi7DWNyXCpA== + dependencies: + "@vitest/spy" "2.0.5" + "@vitest/utils" "2.0.5" + chai "^5.1.1" + tinyrainbow "^1.2.0" + "@vitest/pretty-format@2.0.4", "@vitest/pretty-format@^2.0.4": version "2.0.4" resolved "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.4.tgz" @@ -9413,6 +9406,20 @@ dependencies: tinyrainbow "^1.2.0" +"@vitest/pretty-format@2.0.5": + version "2.0.5" + resolved "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.0.5.tgz#91d2e6d3a7235c742e1a6cc50e7786e2f2979b1e" + integrity sha512-h8k+1oWHfwTkyTkb9egzwNMfJAEx4veaPSnMeKbVSjp4euqGSbQlm5+6VHwTr7u4FJslVVsUG5nopCaAYdOmSQ== + dependencies: + tinyrainbow "^1.2.0" + +"@vitest/pretty-format@2.1.8": + version "2.1.8" + resolved "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-2.1.8.tgz#88f47726e5d0cf4ba873d50c135b02e4395e2bca" + integrity sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ== + dependencies: + tinyrainbow "^1.2.0" + "@vitest/runner@2.0.4": version "2.0.4" resolved "https://registry.npmjs.org/@vitest/runner/-/runner-2.0.4.tgz" @@ -9430,13 +9437,6 @@ magic-string "^0.30.10" pathe "^1.1.2" -"@vitest/spy@1.6.0": - version "1.6.0" - resolved "https://registry.npmjs.org/@vitest/spy/-/spy-1.6.0.tgz" - integrity sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw== - dependencies: - tinyspy "^2.2.0" - "@vitest/spy@2.0.4": version "2.0.4" resolved "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.4.tgz" @@ -9444,15 +9444,12 @@ dependencies: tinyspy "^3.0.0" -"@vitest/utils@1.6.0", "@vitest/utils@^1.3.1": - version "1.6.0" - resolved "https://registry.npmjs.org/@vitest/utils/-/utils-1.6.0.tgz" - integrity sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw== +"@vitest/spy@2.0.5": + version "2.0.5" + resolved "https://registry.npmjs.org/@vitest/spy/-/spy-2.0.5.tgz#590fc07df84a78b8e9dd976ec2090920084a2b9f" + integrity sha512-c/jdthAhvJdpfVuaexSrnawxZz6pywlTPe84LUB2m/4t3rl2fTo9NFGBG4oWgaD+FTgDDV8hJ/nibT7IfH3JfA== dependencies: - diff-sequences "^29.6.3" - estree-walker "^3.0.3" - loupe "^2.3.7" - pretty-format "^29.7.0" + tinyspy "^3.0.0" "@vitest/utils@2.0.4": version "2.0.4" @@ -9464,6 +9461,25 @@ loupe "^3.1.1" tinyrainbow "^1.2.0" +"@vitest/utils@2.0.5": + version "2.0.5" + resolved "https://registry.npmjs.org/@vitest/utils/-/utils-2.0.5.tgz#6f8307a4b6bc6ceb9270007f73c67c915944e926" + integrity sha512-d8HKbqIcya+GR67mkZbrzhS5kKhtp8dQLcmRZLGTscGVg7yImT82cIrhtn2L8+VujWcy6KZweApgNmPsTAO/UQ== + dependencies: + "@vitest/pretty-format" "2.0.5" + estree-walker "^3.0.3" + loupe "^3.1.1" + tinyrainbow "^1.2.0" + +"@vitest/utils@^2.1.1": + version "2.1.8" + resolved "https://registry.npmjs.org/@vitest/utils/-/utils-2.1.8.tgz#f8ef85525f3362ebd37fd25d268745108d6ae388" + integrity sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA== + dependencies: + "@vitest/pretty-format" "2.1.8" + loupe "^3.1.2" + tinyrainbow "^1.2.0" + "@wagmi/connectors@5.1.7": version "5.1.7" resolved "https://registry.npmjs.org/@wagmi/connectors/-/connectors-5.1.7.tgz" @@ -10516,11 +10532,6 @@ assert@^1.4.1: object.assign "^4.1.4" util "^0.10.4" -assertion-error@^1.1.0: - version "1.1.0" - resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz" - integrity sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw== - assertion-error@^2.0.1: version "2.0.1" resolved "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz" @@ -11564,19 +11575,6 @@ ccount@^2.0.0: resolved "https://registry.npmjs.org/ccount/-/ccount-2.0.1.tgz" integrity sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg== -chai@^4.3.10: - version "4.5.0" - resolved "https://registry.npmjs.org/chai/-/chai-4.5.0.tgz" - integrity sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw== - dependencies: - assertion-error "^1.1.0" - check-error "^1.0.3" - deep-eql "^4.1.3" - get-func-name "^2.0.2" - loupe "^2.3.6" - pathval "^1.1.1" - type-detect "^4.1.0" - chai@^5.1.1: version "5.1.1" resolved "https://registry.npmjs.org/chai/-/chai-5.1.1.tgz" @@ -11696,13 +11694,6 @@ charenc@0.0.2: resolved "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz#c0a1d2f3a7092e03774bfa83f14c0fc5790a8667" integrity sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA== -check-error@^1.0.3: - version "1.0.3" - resolved "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz" - integrity sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg== - dependencies: - get-func-name "^2.0.2" - check-error@^2.1.1: version "2.1.1" resolved "https://registry.npmjs.org/check-error/-/check-error-2.1.1.tgz" @@ -13025,13 +13016,6 @@ dedent@^1.0.0, dedent@^1.5.1, dedent@^1.5.3: resolved "https://registry.npmjs.org/dedent/-/dedent-1.5.3.tgz" integrity sha512-NHQtfOOW68WD8lgypbLA5oT+Bt0xXJhiYvoR6SmmNXZfpzOGXwdKWmcwG8N7PwVVWV3eF/68nmD9BaJSsTBhyQ== -deep-eql@^4.1.3: - version "4.1.4" - resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.4.tgz" - integrity sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg== - dependencies: - type-detect "^4.0.0" - deep-eql@^5.0.1: version "5.0.2" resolved "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz" @@ -16058,7 +16042,7 @@ get-east-asian-width@^1.0.0: resolved "https://registry.npmjs.org/get-east-asian-width/-/get-east-asian-width-1.2.0.tgz" integrity sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA== -get-func-name@^2.0.1, get-func-name@^2.0.2: +get-func-name@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz" integrity sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ== @@ -19957,13 +19941,6 @@ loose-envify@^1.0.0, loose-envify@^1.1.0, loose-envify@^1.4.0: dependencies: js-tokens "^3.0.0 || ^4.0.0" -loupe@^2.3.6, loupe@^2.3.7: - version "2.3.7" - resolved "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz" - integrity sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA== - dependencies: - get-func-name "^2.0.1" - loupe@^3.1.0, loupe@^3.1.1: version "3.1.1" resolved "https://registry.npmjs.org/loupe/-/loupe-3.1.1.tgz" @@ -23346,11 +23323,6 @@ pathe@^1.1.0, pathe@^1.1.1, pathe@^1.1.2: resolved "https://registry.npmjs.org/pathe/-/pathe-1.1.2.tgz" integrity sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ== -pathval@^1.1.1: - version "1.1.1" - resolved "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz" - integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== - pathval@^2.0.0: version "2.0.0" resolved "https://registry.npmjs.org/pathval/-/pathval-2.0.0.tgz" @@ -27150,11 +27122,6 @@ tinyrainbow@^1.2.0: resolved "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-1.2.0.tgz" integrity sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ== -tinyspy@^2.2.0: - version "2.2.1" - resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-2.2.1.tgz" - integrity sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A== - tinyspy@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/tinyspy/-/tinyspy-3.0.0.tgz" @@ -27548,11 +27515,6 @@ type-detect@4.0.8: resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz" integrity sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g== -type-detect@^4.0.0, type-detect@^4.1.0: - version "4.1.0" - resolved "https://registry.npmjs.org/type-detect/-/type-detect-4.1.0.tgz" - integrity sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw== - type-fest@^0.16.0: version "0.16.0" resolved "https://registry.npmjs.org/type-fest/-/type-fest-0.16.0.tgz" From e8b3a5de1a9466472354264161a3f0fa5fc02194 Mon Sep 17 00:00:00 2001 From: Iyk Azorji Date: Thu, 19 Dec 2024 13:08:58 -0500 Subject: [PATCH 2/2] fix: fix imports --- examples/react-native-expo-example/app/(tabs)/otp-auth.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx b/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx index 3f78658be5..4f55f6292c 100644 --- a/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx +++ b/examples/react-native-expo-example/app/(tabs)/otp-auth.tsx @@ -15,8 +15,7 @@ import { createLightAccountAlchemyClient, LightAccount, } from "@account-kit/smart-contracts"; -import { sepolia } from "@account-kit/infra"; -import { alchemy } from "@account-kit/infra"; +import { sepolia, alchemy } from "@account-kit/infra"; const signer = RNAlchemySigner({ client: { connection: { apiKey: API_KEY! } },