@crossmint/client-sdk-react-native-ui 1.0.4 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-2LHAVQDL.js +1 -0
- package/dist/chunk-37TKX2AS.js +1 -0
- package/dist/{chunk-SNGN2C5V.js → chunk-3FBCOA5Q.js} +1 -1
- package/dist/chunk-3FPXEECQ.js +1 -0
- package/dist/chunk-3LVSYXD6.mjs +1 -0
- package/dist/chunk-4EBFS2LY.mjs +1 -0
- package/dist/chunk-4EVH2LVP.js +1 -0
- package/dist/chunk-4GUZHOD6.js +1 -0
- package/dist/chunk-4XI5PNDY.mjs +1 -0
- package/dist/chunk-5276D2J3.js +1 -0
- package/dist/chunk-55P442RU.js +1 -0
- package/dist/chunk-5OGTOGBE.js +2 -0
- package/dist/chunk-5XTVBDZD.js +1 -0
- package/dist/chunk-67Z6QY5X.mjs +1 -0
- package/dist/chunk-6EHK6FE4.mjs +1 -0
- package/dist/chunk-6SC5DDHW.js +1 -0
- package/dist/chunk-7573EHPC.mjs +1 -0
- package/dist/{chunk-R4AKS6SV.js → chunk-7AMJYMIL.js} +1 -1
- package/dist/chunk-7S7G5AEZ.js +1 -0
- package/dist/chunk-7UXEUMEA.mjs +2 -0
- package/dist/chunk-A32QK47S.js +1 -0
- package/dist/chunk-AXQNJ6P5.mjs +1 -0
- package/dist/chunk-AY4NQNL2.js +1 -0
- package/dist/chunk-BP63EHIH.mjs +1 -0
- package/dist/chunk-CB4O4U7N.js +1 -0
- package/dist/chunk-CVNNPHHC.mjs +1 -0
- package/dist/chunk-DAERG6FM.js +1 -0
- package/dist/chunk-DCWNSPWC.js +1 -0
- package/dist/chunk-E5XQNXJ6.mjs +1 -0
- package/dist/chunk-EU5BBX2G.js +1 -0
- package/dist/chunk-EUIDKBS7.js +1 -0
- package/dist/chunk-FHG7Y3B2.js +1 -0
- package/dist/chunk-FKHEMIRR.js +1 -0
- package/dist/chunk-FUXBVE4N.mjs +1 -0
- package/dist/chunk-GTBJ6SM6.mjs +1 -0
- package/dist/chunk-GUSANCWE.mjs +1 -0
- package/dist/chunk-GYFXX3S4.js +1 -0
- package/dist/chunk-HCABBSIE.mjs +1 -0
- package/dist/chunk-HNQKTLQ5.js +1 -0
- package/dist/{chunk-7JOOUJJ2.js → chunk-IMGW2ENF.js} +3 -3
- package/dist/chunk-INFBLVRX.js +1 -0
- package/dist/chunk-IVKDLJHC.mjs +1 -0
- package/dist/chunk-JDI5YAT3.mjs +1 -0
- package/dist/chunk-L3XYSJK3.js +1 -0
- package/dist/chunk-LZHSNX3O.js +1 -0
- package/dist/chunk-MVBKLS3P.mjs +1 -0
- package/dist/chunk-NAZHVLXC.mjs +1 -0
- package/dist/chunk-NBK4T7QJ.js +1 -0
- package/dist/chunk-ND3HLTOS.mjs +1 -0
- package/dist/chunk-NR7JUGTU.js +1 -0
- package/dist/chunk-O4HZNHTS.mjs +1 -0
- package/dist/{chunk-R4DCEEUP.mjs → chunk-OP5W4CEA.mjs} +3 -3
- package/dist/chunk-PEZ37X4S.js +1 -0
- package/dist/chunk-PZXSKAWQ.mjs +1 -0
- package/dist/chunk-Q4IW3VOW.mjs +1 -0
- package/dist/chunk-QZP5C7M5.mjs +1 -0
- package/dist/chunk-RZ5NAERX.mjs +1 -0
- package/dist/chunk-S5O4QBFM.mjs +1 -0
- package/dist/chunk-SOJZCPJL.mjs +1 -0
- package/dist/chunk-SPG5LDJQ.mjs +1 -0
- package/dist/chunk-TJRVTCJX.mjs +2 -0
- package/dist/{chunk-RIKAIN6N.js → chunk-TWZI6S7U.js} +1 -1
- package/dist/chunk-TZKIJ5KX.mjs +1 -0
- package/dist/chunk-UJTROZMN.js +1 -0
- package/dist/chunk-UYWLWCLN.mjs +1 -0
- package/dist/chunk-UZIY546T.js +2 -0
- package/dist/chunk-VECZ4E3A.mjs +1 -0
- package/dist/chunk-VG3RYWDG.mjs +1 -0
- package/dist/chunk-VS54UJOO.mjs +1 -0
- package/dist/chunk-VZ5LCEL6.js +1 -0
- package/dist/chunk-W5BITU26.mjs +1 -0
- package/dist/{chunk-2U67EBAU.js → chunk-WJP5GQ35.js} +1 -1
- package/dist/chunk-WWBVTF23.mjs +1 -0
- package/dist/{chunk-TQIJ7OZD.js → chunk-X5DFNNBV.js} +1 -1
- package/dist/chunk-XD7WEGQZ.mjs +1 -0
- package/dist/chunk-XIBSZLHT.js +1 -0
- package/dist/chunk-XONQWEM5.mjs +1 -0
- package/dist/chunk-YRWIRSZH.js +1 -0
- package/dist/components/embed/index.js +1 -1
- package/dist/components/embed/index.mjs +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.mjs +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.js +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.mjs +1 -1
- package/dist/components/embed/v3/crypto/PayerConnectionHandler.js +1 -1
- package/dist/components/embed/v3/crypto/PayerConnectionHandler.mjs +1 -1
- package/dist/components/embed/v3/index.js +1 -1
- package/dist/components/embed/v3/index.mjs +1 -1
- package/dist/components/icons/MailCheckIcon.js +1 -1
- package/dist/components/icons/MailCheckIcon.mjs +1 -1
- package/dist/components/icons/MailIcon.js +1 -1
- package/dist/components/icons/MailIcon.mjs +1 -1
- package/dist/components/icons/PhoneIcon.js +1 -1
- package/dist/components/icons/PhoneIcon.mjs +1 -1
- package/dist/components/icons/PngIcon.js +1 -1
- package/dist/components/icons/PngIcon.mjs +1 -1
- package/dist/components/icons/SmartphoneIcon.js +1 -1
- package/dist/components/icons/SmartphoneIcon.mjs +1 -1
- package/dist/components/icons/XIcon.js +1 -1
- package/dist/components/icons/XIcon.mjs +1 -1
- package/dist/components/icons/index.js +1 -1
- package/dist/components/icons/index.mjs +1 -1
- package/dist/components/icons/types.js +1 -1
- package/dist/components/icons/types.mjs +1 -0
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/components/signers/BaseCodeInput.js +1 -1
- package/dist/components/signers/BaseCodeInput.mjs +1 -1
- package/dist/components/signers/BaseConfirmation.js +1 -1
- package/dist/components/signers/BaseConfirmation.mjs +1 -1
- package/dist/components/signers/EmailSignersDialog.js +1 -1
- package/dist/components/signers/EmailSignersDialog.mjs +1 -1
- package/dist/components/signers/PhoneSignersDialog.js +1 -1
- package/dist/components/signers/PhoneSignersDialog.mjs +1 -1
- package/dist/components/signers/index.js +1 -1
- package/dist/components/signers/index.mjs +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.js +1 -1
- package/dist/components/wallets/ExportPrivateKeyButton.mjs +1 -1
- package/dist/components/wallets/index.js +1 -1
- package/dist/components/wallets/index.mjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/useAuth.js +1 -1
- package/dist/hooks/useAuth.mjs +1 -1
- package/dist/hooks/useCrossmintCheckout.js +1 -1
- package/dist/hooks/useCrossmintCheckout.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/logger/init.js +1 -1
- package/dist/logger/init.mjs +1 -1
- package/dist/native/NativeDeviceSignerKeyStorage.js +1 -1
- package/dist/native/NativeDeviceSignerKeyStorage.mjs +1 -1
- package/dist/native/SoftwareDeviceSignerKeyStorage.d.mts +37 -0
- package/dist/native/SoftwareDeviceSignerKeyStorage.d.ts +37 -0
- package/dist/native/SoftwareDeviceSignerKeyStorage.js +1 -0
- package/dist/native/SoftwareDeviceSignerKeyStorage.mjs +1 -0
- package/dist/native/createDeviceSignerKeyStorage.d.mts +20 -0
- package/dist/native/createDeviceSignerKeyStorage.d.ts +20 -0
- package/dist/native/createDeviceSignerKeyStorage.js +1 -0
- package/dist/native/createDeviceSignerKeyStorage.mjs +1 -0
- package/dist/plugin/mods/addQueryToAndroidManifest.js +1 -1
- package/dist/plugin/mods/addQueryToAndroidManifest.mjs +1 -1
- package/dist/plugin/withCrossmintUI.js +1 -1
- package/dist/plugin/withCrossmintUI.mjs +1 -1
- package/dist/plugin/withDeviceSigner.js +1 -1
- package/dist/plugin/withDeviceSigner.mjs +1 -1
- package/dist/plugin/withGooglePay.js +1 -1
- package/dist/plugin/withGooglePay.mjs +1 -1
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintAuthProvider.mjs +1 -1
- package/dist/providers/CrossmintProvider.d.mts +2 -2
- package/dist/providers/CrossmintProvider.d.ts +2 -2
- package/dist/providers/CrossmintProvider.js +1 -1
- package/dist/providers/CrossmintProvider.mjs +1 -1
- package/dist/providers/CrossmintWalletProvider.js +1 -1
- package/dist/providers/CrossmintWalletProvider.mjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.mjs +1 -1
- package/dist/styles/index.js +1 -1
- package/dist/styles/index.mjs +1 -1
- package/dist/styles/theme.js +1 -1
- package/dist/styles/theme.mjs +1 -1
- package/dist/types/auth.js +1 -1
- package/dist/types/auth.mjs +1 -0
- package/dist/utils/SecureStorage.js +1 -1
- package/dist/utils/SecureStorage.mjs +1 -1
- package/dist/utils/createCrossmintApiClient.js +1 -1
- package/dist/utils/createCrossmintApiClient.mjs +1 -1
- package/dist/utils/embed/userAgent.js +1 -1
- package/dist/utils/embed/userAgent.mjs +1 -1
- package/dist/utils/eventEmitter.js +1 -1
- package/dist/utils/eventEmitter.mjs +1 -1
- package/package.json +14 -12
- package/dist/chunk-2D2RJCVX.js +0 -1
- package/dist/chunk-2PX34LDU.js +0 -1
- package/dist/chunk-2RDEJU3T.js +0 -2
- package/dist/chunk-2UY6GCV3.js +0 -1
- package/dist/chunk-3G67LZY4.js +0 -2
- package/dist/chunk-3TFUHD5V.mjs +0 -1
- package/dist/chunk-4P5ABAFD.mjs +0 -1
- package/dist/chunk-4PB62QZH.mjs +0 -1
- package/dist/chunk-5CLFJLE4.mjs +0 -0
- package/dist/chunk-6N7XF54Y.mjs +0 -1
- package/dist/chunk-72MMCJ2E.js +0 -1
- package/dist/chunk-77GXCNDP.js +0 -1
- package/dist/chunk-7JGGPJBX.mjs +0 -1
- package/dist/chunk-7USVT6EZ.mjs +0 -1
- package/dist/chunk-AHAHB7QD.mjs +0 -1
- package/dist/chunk-AJMHVVST.js +0 -1
- package/dist/chunk-BOG3QIA2.js +0 -1
- package/dist/chunk-C62HRWJA.js +0 -1
- package/dist/chunk-C7S2X5RD.mjs +0 -1
- package/dist/chunk-D4347S2W.mjs +0 -1
- package/dist/chunk-DKQZSNOO.js +0 -1
- package/dist/chunk-DL5D6VSE.mjs +0 -1
- package/dist/chunk-EI5LOD4Y.js +0 -1
- package/dist/chunk-FFQ6EQCL.mjs +0 -1
- package/dist/chunk-FVINRPAB.js +0 -1
- package/dist/chunk-I3QSTPTV.mjs +0 -0
- package/dist/chunk-I4D3YJW2.js +0 -1
- package/dist/chunk-IJN37RF2.js +0 -1
- package/dist/chunk-INFXPCQ2.js +0 -1
- package/dist/chunk-IUDQDPIN.mjs +0 -1
- package/dist/chunk-J62V5BQX.mjs +0 -1
- package/dist/chunk-J7Q2R6UH.mjs +0 -0
- package/dist/chunk-JPPAYHQP.js +0 -1
- package/dist/chunk-K6ZOIECD.mjs +0 -1
- package/dist/chunk-L3FU4JVL.mjs +0 -1
- package/dist/chunk-LHEOII54.js +0 -1
- package/dist/chunk-LOFHVHXQ.js +0 -1
- package/dist/chunk-MB7H3PBJ.mjs +0 -0
- package/dist/chunk-MIIWRDK7.mjs +0 -1
- package/dist/chunk-NG4FYS2Z.mjs +0 -1
- package/dist/chunk-NNGGH73Y.mjs +0 -1
- package/dist/chunk-NSOPIJTO.mjs +0 -1
- package/dist/chunk-NVBPI6JQ.js +0 -1
- package/dist/chunk-PCJMDUSI.mjs +0 -1
- package/dist/chunk-PHECZO2O.mjs +0 -1
- package/dist/chunk-QE2FX5MA.mjs +0 -1
- package/dist/chunk-QHJA7VYD.js +0 -1
- package/dist/chunk-QHTHMZZV.mjs +0 -1
- package/dist/chunk-RWTMQGU7.js +0 -1
- package/dist/chunk-S75MIWI2.js +0 -1
- package/dist/chunk-T6FKCQE2.js +0 -1
- package/dist/chunk-TIQGKXQA.mjs +0 -0
- package/dist/chunk-TSRZEXRU.mjs +0 -1
- package/dist/chunk-TVASK7FQ.js +0 -1
- package/dist/chunk-U3CLRKGH.js +0 -1
- package/dist/chunk-UBHIBMTA.mjs +0 -0
- package/dist/chunk-UO2GSJW5.js +0 -1
- package/dist/chunk-W4PUVHWF.mjs +0 -2
- package/dist/chunk-W62R4744.js +0 -1
- package/dist/chunk-WDMEQNBX.mjs +0 -1
- package/dist/chunk-WH3PVAVN.js +0 -1
- package/dist/chunk-XZ5LQIRB.mjs +0 -1
- package/dist/chunk-YJIX6E2P.mjs +0 -0
- package/dist/chunk-YMCYXFCG.mjs +0 -2
- package/dist/chunk-YQEWHOQ7.js +0 -1
- package/dist/chunk-Z36IMAC2.js +0 -1
- package/dist/chunk-ZP2QWJOD.mjs +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk5276D2J3js = require('./chunk-5276D2J3.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _configplugins = require('@expo/config-plugins');var{addMetaDataItemToMainApplication:d,getMainApplicationOrThrow:m}=_configplugins.AndroidConfig.Manifest,u= exports.a =(n,i={enableGooglePay:!1})=>i.enableGooglePay?_configplugins.withAndroidManifest.call(void 0, n,o=>{let t=m(o.modResults);return d(t,"com.google.android.gms.wallet.api.enabled","true"),o.modResults=_chunk5276D2J3js.a.call(void 0, o.modResults,{intent:[{action:[{$:{"android:name":"org.chromium.intent.action.PAY"}}]},{action:[{$:{"android:name":"org.chromium.intent.action.IS_READY_TO_PAY"}}]},{action:[{$:{"android:name":"org.chromium.intent.action.UPDATE_PAYMENT_DETAILS"}}]}]}),o}):n;exports.a = u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDCWNSPWCjs = require('./chunk-DCWNSPWC.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var n=_chunk4EVH2LVPjs.f.call(void 0, (Q,m)=>{m.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAxUlEQVR4AeyVbQrCQAxEqx5F9Gyi51E8m+JR/Ji3mIXQlM0PhUK3ZJZt8oa0oXTXw5+vqQZn9X1K76Rg8Qj3ETUAPAqLakqHAYsHrwMouIRuDhKx17JKClboYF72RVEDy90LkVuMNW91jRK18qNNb9AcZB9RH1FzAk1geV/RTTN5SOmY3Yj472/Tjy8weoOX8sSOJSljzVttUYPrt8q8s2cyLDbzsi+KGpxUuUijp1FuKmDx4HVM1AAAcKNN9kyGxSOLjw8AAAD//6BjmDAAAAAGSURBVAMAy+IoMbHLqDcAAAAASUVORK5CYII="});_chunk4EVH2LVPjs.j.call(void 0, );var _jsxruntime = require('react/jsx-runtime');function u({size:p=22,color:c,strokeWidth:I=2}){return _jsxruntime.jsx.call(void 0, _chunkDCWNSPWCjs.a,{source:n(),size:p,color:c})}exports.a = u;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.1.1",repository:"https://github.com/Crossmint/crossmint-sdk",license:"Apache-2.0",author:"Paella Labs Inc",sideEffects:!1,main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",files:["dist","ios","android","expo-module.config.json","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch","generate:docs":"typedoc && node scripts/generate-reference.mjs"},dependencies:{"@crossmint/client-sdk-auth":"workspace:*","@crossmint/client-sdk-base":"workspace:*","@crossmint/client-sdk-react-base":"workspace:*","@crossmint/client-sdk-rn-window":"workspace:*","@crossmint/client-signers":"workspace:*","@crossmint/common-sdk-auth":"workspace:*","@crossmint/common-sdk-base":"workspace:*","@crossmint/wallets-sdk":"workspace:*","@noble/curves":"1.9.7","@solana/web3.js":"1.98.1",bs58:"^5.0.0","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8","lodash.clonedeep":"4.5.0","lodash.isequal":"4.5.0",mitt:"3.0.1","react-native-get-random-values":"2.0.0","react-native-svg":"15.14.0","react-native-webview":"13.15.0",zod:"3.22.4"},devDependencies:{"@expo/config-plugins":"^9.0.17","@types/react":"19.1.10","expo-modules-core":"~3.0.29",typedoc:"0.28.16"},peerDependencies:{"@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-modules-core":">=2.0.0",react:">=17.0.2","react-native":">=0.74.3"}};exports.a = o;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkNR7JUGTUjs = require('./chunk-NR7JUGTU.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _expowebbrowser = require('expo-web-browser'); var n = _interopRequireWildcard(_expowebbrowser);var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _reactnative = require('react-native');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');_chunk4EVH2LVPjs.j.call(void 0, );_chunk4EVH2LVPjs.j.call(void 0, );function R(){let r=_react.useContext.call(void 0, y);if(r==null)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return r}var _jsxruntime = require('react/jsx-runtime');var B={google:null,twitter:null},G={crossmintAuth:void 0,login:()=>{},logout:()=>_chunk4EVH2LVPjs.i.call(void 0, void 0,null,function*(){}),jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},loginWithOAuth:()=>Promise.resolve(),createAuthSession:()=>Promise.resolve(null)},y= exports.a =_react.createContext.call(void 0, G);function V({children:r}){let{setJwt:e}=_clientsdkreactbase.useCrossmint.call(void 0, ),{jwt:t}=R();return _react.useEffect.call(void 0, ()=>{e(t)},[e,t]),r}function _({children:r,appSchema:e}){let t=_clientsdkreactbase.useCrossmintAuthBase.call(void 0, ),[l,f]=_react.useState.call(void 0, B),[C,i]=_react.useState.call(void 0, !1),p=Array.isArray(e)?e[0]:e,w=_expoconstants2.default.executionEnvironment==="storeClient"||_expoconstants2.default.appOwnership==="expo"||!!_expoconstants2.default.expoVersion?"exp://127.0.0.1:8081":p,x=_react.useCallback.call(void 0, ()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){try{let u=Object.keys(B).map(s=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){var A;let m=yield(A=t.crossmintAuth)==null?void 0:A.getOAuthUrl(s,{appSchema:w});return{[s]:m}})),a=Object.assign({},...yield Promise.all(u));f(a)}catch(o){console.error(o)}}),[t.crossmintAuth,w]);_react.useEffect.call(void 0, ()=>{t.user==null&&x()},[x,t.user]);let E=()=>t.status==="initializing"?"initializing":C?"in-progress":t.jwt!=null?"logged-in":"logged-out",j=o=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){var u,a;try{i(!0);let s=(a=l[o])!=null?a:yield(u=t.crossmintAuth)==null?void 0:u.getOAuthUrl(o,{appSchema:w});yield n.warmUpAsync();let m=new URL(s);if(o==="google"&&m.searchParams.append("provider_prompt","select_account"),_reactnative.Platform.OS==="android")yield n.openBrowserAsync(m.toString());else{let A=yield n.openAuthSessionAsync(m.toString());A.type==="success"&&(yield S(A.url))}yield n.coolDownAsync()}catch(s){throw console.error("[CrossmintAuthProvider] Error during OAuth login:",s),new Error(`Error during OAuth login: ${s}`)}finally{i(!1)}}),S=_react.useCallback.call(void 0, o=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){var a;let u=o.includes("://")?D(o):o;if(u!=null)try{return i(!0),yield(a=t.crossmintAuth)==null?void 0:a.handleRefreshAuthMaterial(u)}catch(s){throw s}finally{i(!1)}return null}),[t.crossmintAuth]);return _jsxruntime.jsx.call(void 0, y.Provider,{value:{crossmintAuth:t.crossmintAuth,logout:t.logout,jwt:t.jwt,user:t.user,status:E(),getUser:t.getUser,login:()=>{},loginWithOAuth:j,createAuthSession:S},children:_jsxruntime.jsx.call(void 0, V,{children:r})})}function at(t){var l=t,{children:r}=l,e=_chunk4EVH2LVPjs.d.call(void 0, l,["children"]);var i,p;let f=(p=e.appSchema)!=null?p:(i=_expoconstants2.default.expoConfig)==null?void 0:i.scheme,C=_react.useMemo.call(void 0, ()=>{var P;return(P=e.storageProvider)!=null?P:new _chunkNR7JUGTUjs.a},[e.storageProvider]);return _jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintAuthBaseProvider,{onLoginSuccess:e.onLoginSuccess,refreshRoute:e.refreshRoute,logoutRoute:e.logoutRoute,storageProvider:C,children:_jsxruntime.jsx.call(void 0, _,{appSchema:f,children:r})})}var D=r=>{let e=/[?&]oneTimeSecret=([^&#]+)/,t=r.match(e);return t?decodeURIComponent(t[1]):void 0};exports.a = y; exports.b = at; exports.c = R; exports.d = _clientsdkreactbase.useCrossmint; exports.e = _clientsdkreactbase.useWallet; exports.f = _clientsdkreactbase.useWalletOtpSigner;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./chunk-SOJZCPJL.mjs";o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as c}from"./chunk-SOJZCPJL.mjs";c();var F={"cm-text-primary":"#00150D","cm-text-secondary":"#67797F","cm-background-primary":"#FFFFFF","cm-muted-primary":"#F0F2F4","cm-hover":"#E9ECF0","cm-border":"#D9D9D9","cm-link":"#1A74E9","cm-accent":"#4CAF50","cm-danger":"#f44336"};export{F as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var i=Object.defineProperty,l=Object.defineProperties,R=Object.getOwnPropertyDescriptor,h=Object.getOwnPropertyDescriptors,w=Object.getOwnPropertyNames,m=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;var p=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,S= exports.a =(e,t)=>{for(var n in t||(t={}))f.call(t,n)&&p(e,n,t[n]);if(m)for(var n of m(t))a.call(t,n)&&p(e,n,t[n]);return e},_= exports.b =(e,t)=>l(e,h(t));var b=(e=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(e,{get:(t,n)=>(typeof require!="undefined"?require:t)[n]}):e)(function(e){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var g=(e,t)=>{var n={};for(var r in e)f.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&m)for(var r of m(e))t.indexOf(r)<0&&a.call(e,r)&&(n[r]=e[r]);return n};var I=(e,t)=>()=>(e&&(t=e(e=0)),t);var j=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),x= exports.g =(e,t)=>{for(var n in t)i(e,n,{get:t[n],enumerable:!0})},L=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let c of w(t))!f.call(e,c)&&c!==n&&i(e,c,{get:()=>t[c],enumerable:!(r=R(t,c))||r.enumerable});return e};var y=e=>L(i({},"__esModule",{value:!0}),e);var k=(e,t,n)=>new Promise((r,c)=>{var s=o=>{try{u(n.next(o))}catch(d){c(d)}},U=o=>{try{u(n.throw(o))}catch(d){c(d)}},u=o=>o.done?r(o.value):Promise.resolve(o.value).then(s,U);u((n=n.apply(e,t)).next())});var M=I(()=>{"use strict"});exports.a = S; exports.b = _; exports.c = b; exports.d = g; exports.e = I; exports.f = j; exports.g = x; exports.h = y; exports.i = k; exports.j = M;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDAERG6FMjs = require('./chunk-DAERG6FM.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _jsxruntime = require('react/jsx-runtime');var i=_react.createContext.call(void 0, void 0);function E({children:e}){let[s,c]=_react.useState.call(void 0, void 0),[u,C]=_react.useState.call(void 0, void 0);return _react.useEffect.call(void 0, ()=>{let r=o=>{c(o.order),C(o.orderClientSecret)};return _chunkDAERG6FMjs.a.on("order:updated",r),()=>{_chunkDAERG6FMjs.a.off("order:updated",r)}},[]),_jsxruntime.jsx.call(void 0, i.Provider,{value:{order:s,orderClientSecret:u},children:e})}function k(){let e=_react.useContext.call(void 0, i);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}exports.a = E; exports.b = k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as u,g as m,j as g}from"./chunk-SOJZCPJL.mjs";var y={};m(y,{NativeDeviceSignerKeyStorage:()=>t});import{requireNativeModule as c}from"expo-modules-core";import*as s from"expo-device";import{DeviceSignerKeyStorage as v}from"@crossmint/wallets-sdk";function i(){if(n==null)try{n=c("CrossmintDeviceSigner")}catch(l){throw new Error("CrossmintDeviceSigner native module is not available. This typically means you are running in Expo Go, which does not support custom native modules. Use a development build (`npx expo run:ios` / `npx expo run:android`) or EAS Build, or use SoftwareDeviceSignerKeyStorage as a fallback for development.")}return n}var n,t,K=u(()=>{g();n=null;t=class extends v{constructor(){super("")}generateKey(e){var r;return i().generateKey((r=e.address)!=null?r:null)}mapAddressToKey(e,r){return i().mapAddressToKey(e,r)}getKey(e){return i().getKey(e)}hasKey(e){return i().hasKey(e)}signMessage(e,r){return i().signMessage(e,r)}deleteKey(e){return i().deleteKey(e)}deletePendingKey(e){return i().deletePendingKey(e)}getDeviceName(){var o,a,d;let e=(a=(o=s.deviceName)!=null?o:s.modelName)!=null?a:s.brand,r=s.osName;return e!=null&&r!=null?`${e} (${r})`:(d=e!=null?e:r)!=null?d:"Unknown Device"}}});export{t as a,y as b,K as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );function t(i,r){let e=i.manifest;return e.queries||(e.queries=[]),e.queries.push(r),i}exports.a = t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL3XYSJK3js = require('./chunk-L3XYSJK3.js');var _chunk5XTVBDZDjs = require('./chunk-5XTVBDZD.js');var _chunk5OGTOGBEjs = require('./chunk-5OGTOGBE.js');var _chunkUZIY546Tjs = require('./chunk-UZIY546T.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _reactnative = require('react-native');var _clientsdkrnwindow = require('@crossmint/client-sdk-rn-window');var _clientsigners = require('@crossmint/client-signers');var _commonsdkbase = require('@crossmint/common-sdk-base');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var L="Passkey signers are not supported in React Native. Use a different signer type such as 'device', or 'external-wallet'.";function me(c){var i,v;return c==null?!1:!!(((i=c.recovery)==null?void 0:i.type)==="passkey"||(v=c.signers)!=null&&v.some(m=>m.type==="passkey"))}function pe({children:c}){let i=_react.useContext.call(void 0, _clientsdkreactbase.CrossmintWalletBaseContext),v=_react.useCallback.call(void 0, d=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){var R,I;if(((R=d.recovery)==null?void 0:R.type)==="passkey"||(I=d.signers)!=null&&I.some(r=>r.type==="passkey"))throw new Error(L);return i.createWallet(d)}),[i.createWallet]),m=_react.useCallback.call(void 0, d=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){throw new Error(L)}),[]),V=_react.useMemo.call(void 0, ()=>_chunk4EVH2LVPjs.b.call(void 0, _chunk4EVH2LVPjs.a.call(void 0, {},i),{createWallet:v,createPasskeySigner:m}),[i,v,m]);return _jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintWalletBaseContext.Provider,{value:V,children:c})}function he({children:c,createOnLogin:i,appearance:v,showOtpSignerPrompt:m=!0,callbacks:V,deviceSignerKeyStorage:d}){let R=_react.useMemo.call(void 0, ()=>d!=null?d:_chunkL3XYSJK3js.a.call(void 0, ),[]),{crossmint:I}=_clientsdkreactbase.useCrossmint.call(void 0, "CrossmintWalletProvider must be used within CrossmintProvider"),r=_clientsdkreactbase.useLogger.call(void 0, _chunk5XTVBDZDjs.a),{apiKey:N,appId:O}=I,D=_react.useMemo.call(void 0, ()=>{let e=_commonsdkbase.validateAPIKey.call(void 0, N);if(!e.isValid)throw new Error("Invalid API key");return e},[N]),Y=_react.useMemo.call(void 0, ()=>_clientsigners.environmentUrlConfig[D.environment],[D.environment]),y=_react.useRef.call(void 0, null),t=_react.useRef.call(void 0, null),[T,$]=_react.useState.call(void 0, !1),C=_react.useRef.call(void 0, !1),l=_react.useRef.call(void 0, !1),s=_react.useRef.call(void 0, 0),M=_react.useRef.call(void 0, 0),q=_react.useMemo.call(void 0, ()=>O!=null?{crossmintAppId:O}:{},[O]),w=_react.useCallback.call(void 0, e=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){if(t.current!=null){let n=t.current;if(l.current){r.info("react-native.wallet.webview.handshake.skip.in-progress",{trigger:e,generation:s.current});return}if(C.current&&n.isConnected){r.info("react-native.wallet.webview.handshake.skip.already-connected",{trigger:e,generation:s.current});return}l.current=!0;let a=Date.now();M.current=a;let o=s.current;try{r.info("react-native.wallet.webview.handshake.start",{trigger:e,generation:o,platform:_reactnative.Platform.OS}),C.current=!0,n.isConnected=!1,yield n.handshakeWithChild();let u=Date.now()-a;r.info("react-native.wallet.webview.handshake.success",{trigger:e,generation:o,durationMs:u})}catch(u){let f=Date.now()-a;o===s.current&&(C.current=!1),r.error("react-native.wallet.webview.handshake.error",{trigger:e,generation:o,durationMs:f,error:u instanceof Error?u.message:String(u)}),console.error("[CrossmintWalletProvider] Handshake error:",u)}finally{o===s.current&&(l.current=!1)}}else r.warn("react-native.wallet.webview.handshake.skip",{trigger:e,reason:"parent not initialized"})}),[r]);_react.useEffect.call(void 0, ()=>{y.current!=null&&t.current==null&&(r.info("react-native.wallet.webview.initializing"),t.current=new (0, _clientsdkrnwindow.WebViewParent)(y,{incomingEvents:_clientsigners.signerOutboundEvents,outgoingEvents:_clientsigners.signerInboundEvents,handshakeOptions:{timeoutMs:3e4,intervalMs:100},recovery:{recoverableErrorCodes:[_clientsigners.SignerErrorCode.IndexedDbFatal]}}),r.info("react-native.wallet.webview.initialized"),w("eager"))},[T,r,w]);let Q=_react.useCallback.call(void 0, ()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){var e,n;r.info("react-native.wallet.webview.onLoadEnd",{handshakeInProgress:l.current,isConnected:(n=(e=t.current)==null?void 0:e.isConnected)!=null?n:!1,generation:s.current}),yield w("onLoadEnd")}),[r,w]),X=_react.useCallback.call(void 0, e=>{var o,u;let n=t.current;if(n==null)return;let a=e.nativeEvent.data;if(a==="frame-ready"){r.info("react-native.wallet.webview.frame-ready.received",{handshakeInProgress:l.current,isConnected:(u=(o=t.current)==null?void 0:o.isConnected)!=null?u:!1,generation:s.current,msSinceHandshakeStart:M.current>0?Date.now()-M.current:null}),w("frame-ready");return}try{let f=JSON.parse(a);if(f&&typeof f.type=="string"&&f.type.startsWith("console.")){let x=f.type.split(".")[1],U=(f.data||[]).map(h=>{try{return h==="[Function]"||h==="[Circular Reference]"||h==="[Unserializable Object]"?h:JSON.parse(h)}catch(ge){return h}}),k=`react-native.wallet.webview.console.${x}`,P={webview_args:U};switch(x){case"log":r.info(k,P);break;case"error":r.error(k,P);break;case"warn":r.warn(k,P);break;case"info":r.info(k,P);break;case"debug":r.debug(k,P);break;default:r.info("react-native.wallet.webview.console.unknown",{webview_method:x,webview_args:U})}return}}catch(f){}n.handleMessage(e)},[r,w]),Z=()=>{if(t.current==null)throw new Error("WebView not ready or handshake incomplete");return t.current},ee=({emailSignerProps:e,phoneSignerProps:n})=>m?_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunk5OGTOGBEjs.a,_chunk4EVH2LVPjs.a.call(void 0, {},e)),_jsxruntime.jsx.call(void 0, _chunkUZIY546Tjs.a,_chunk4EVH2LVPjs.a.call(void 0, {},n))]}):null,re=()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){r.info("react-native.wallet.webview.init.start"),$(!0);let e=0,n=100;for(;t.current==null&&e<n;)yield new Promise(a=>setTimeout(a,50)),e++;if(t.current==null)throw r.error("react-native.wallet.webview.init.timeout",{attempts:e}),new Error("WebView not ready or handshake incomplete");r.info("react-native.wallet.webview.init.success",{attempts:e})});return _react.useEffect.call(void 0, ()=>{if(me(i))throw new Error(L)},[i]),_jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletBaseProvider,{createOnLogin:i,appearance:v,showOtpSignerPrompt:m,initializeWebView:re,callbacks:V,renderUI:ee,clientTEEConnection:Z,deviceSignerKeyStorage:R,children:[_jsxruntime.jsx.call(void 0, pe,{children:c}),T&&_jsxruntime.jsx.call(void 0, _reactnative.View,{style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:_jsxruntime.jsx.call(void 0, _clientsdkrnwindow.RNWebView,{ref:y,source:{uri:Y},globals:q,onLoadEnd:Q,onMessage:X,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var n,a,o;let e=s.current;s.current++,r.warn("react-native.wallet.webview.process.terminated",{prevGeneration:e,newGeneration:s.current,wasConnected:(a=(n=t.current)==null?void 0:n.isConnected)!=null?a:!1,hadHandshakeInProgress:l.current}),C.current=!1,l.current=!1,t.current!=null&&(t.current.isConnected=!1),(o=y.current)==null||o.reload(),w("eager")},onRenderProcessGone:()=>{var n,a,o;let e=s.current;s.current++,r.warn("react-native.wallet.webview.process.renderGone",{prevGeneration:e,newGeneration:s.current,wasConnected:(a=(n=t.current)==null?void 0:n.isConnected)!=null?a:!1,hadHandshakeInProgress:l.current}),C.current=!1,l.current=!1,t.current!=null&&(t.current.isConnected=!1),(o=y.current)==null||o.reload(),w("eager")},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[_clientsigners.environmentUrlConfig[D.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function Me(c){return _jsxruntime.jsx.call(void 0, he,_chunk4EVH2LVPjs.a.call(void 0, {},c))}exports.a = Me;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEUIDKBS7js = require('./chunk-EUIDKBS7.js');var _chunkTWZI6S7Ujs = require('./chunk-TWZI6S7U.js');var _chunk7AMJYMILjs = require('./chunk-7AMJYMIL.js');var _chunkNBK4T7QJjs = require('./chunk-NBK4T7QJ.js');var _chunkFHG7Y3B2js = require('./chunk-FHG7Y3B2.js');var _chunkX5DFNNBVjs = require('./chunk-X5DFNNBV.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');var{width:D}=_reactnative.Dimensions.get("window");function X({email:i,open:n,setOpen:O,step:v,onSubmitOTP:P,onResendOTPCode:V,onSubmitEmail:M,rejectRef:r,appearance:o}){var m,u,c,g,b,h;function s(){var y;n&&((y=r.current)==null||y.call(r,new Error),O(!1))}let d=_reactnative.StyleSheet.create({centeredView:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalView:{backgroundColor:((m=o==null?void 0:o.colors)==null?void 0:m.background)||_chunkFHG7Y3B2js.a["cm-background-primary"],borderRadius:(o==null?void 0:o.borderRadius)||12,padding:32,alignItems:"center",width:Math.min(D-32,400),maxHeight:"80%",position:"relative",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:5},closeButton:{position:"absolute",top:16,right:16,width:32,height:32,borderRadius:6,backgroundColor:((u=o==null?void 0:o.colors)==null?void 0:u.inputBackground)||_chunkFHG7Y3B2js.a["cm-muted-primary"],alignItems:"center",justifyContent:"center",zIndex:1}});return n?_jsxruntime.jsx.call(void 0, _reactnative.Modal,{visible:n,transparent:!0,animationType:"fade",onRequestClose:s,statusBarTranslucent:!0,children:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:d.centeredView,children:_jsxruntime.jsxs.call(void 0, _reactnative.View,{style:d.modalView,children:[_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:d.closeButton,onPress:s,hitSlop:{top:10,bottom:10,left:10,right:10},children:_jsxruntime.jsx.call(void 0, _chunk7AMJYMILjs.a,{size:16,color:((c=o==null?void 0:o.colors)==null?void 0:c.textSecondary)||_chunkFHG7Y3B2js.a["cm-text-secondary"]})}),v==="initial"?_jsxruntime.jsx.call(void 0, _chunkEUIDKBS7js.a,{contactInfo:i!=null?i:"",contactType:"email",icon:_jsxruntime.jsx.call(void 0, _chunkTWZI6S7Ujs.a,{size:22,color:((g=o==null?void 0:o.colors)==null?void 0:g.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"]}),onConfirm:M,onCancel:s,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkNBK4T7QJjs.a,{contactInfo:i!=null?i:"",contactType:"email",icon:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:{backgroundColor:((b=o==null?void 0:o.colors)==null?void 0:b.accent)||_chunkFHG7Y3B2js.a["cm-accent"],borderRadius:999,padding:12},children:_jsxruntime.jsx.call(void 0, _chunkX5DFNNBVjs.a,{size:22,color:((h=o==null?void 0:o.colors)==null?void 0:h.background)||_chunkFHG7Y3B2js.a["cm-background-primary"]})}),title:"Check your email",description:_jsxruntime.jsxs.call(void 0, _reactnative.Text,{children:["A temporary login code has been sent to"," ",_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:{fontWeight:"bold"},children:i})]}),helpText:`Can't find the email? Check spam folder.
|
|
2
|
+
Some emails may take several minutes to arrive.`,onSubmitOTP:P,onResendCode:V,appearance:o,otpLength:9,keyboardType:"default",autoComplete:"one-time-code",textContentType:"oneTimeCode"})]})})}):null}exports.a = X;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkXIBSZLHTjs = require('./chunk-XIBSZLHT.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');var P=_clientsdkreactbase.createLoggerContext.call(void 0, );function b({children:c,apiKey:o,overrideBaseUrl:v,appId:e,consoleLogLevel:r}){var t,i,s,n,m;let f=_react.useMemo.call(void 0, ()=>_chunkXIBSZLHTjs.a.call(void 0, o,r),[o,r]),p=(m=e!=null?e:(i=(t=_expoconstants2.default.expoConfig)==null?void 0:t.ios)==null?void 0:i.bundleIdentifier)!=null?m:(n=(s=_expoconstants2.default.expoConfig)==null?void 0:s.android)==null?void 0:n.package;return _jsxruntime.jsx.call(void 0, P.Provider,{value:f,children:_jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintProvider,{apiKey:o,appId:p,overrideBaseUrl:v,children:c})})}exports.a = P; exports.b = b;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-AXQNJ6P5.mjs";import{f as i,j as o}from"./chunk-SOJZCPJL.mjs";var I=i((P,n)=>{n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABPElEQVR4AdzVW1ICMRCF4ajL8FnXoetwLZZaLkzX4VpU6C+kh2Go4RZ4gcrJpZP+TxJCcVsu/Lkug/e4rb/QolO/kY8VTSl5RQJvEclxdE8ud5GJhTkYvEZQeYzqplMYgSiVmTvO9sVMp+5bfmXWqgU0w9EMTpBr+RrnTQ3MMfFFW2x8iJ5ikRy50V2XqcFzTH2EFIv3mQDbMcn5jgojmlWZGlgAOjaxM7FVxroWA2YiKgccw7hqalCDUUn2miTFsORpwAhYzBwgsBzjDc0Z5CJJYxNgYmINMDEx3tI+AwlMxqcBYyqmb82sDjHI5DSyY/2M72yPMdgJmpu8HoP/dsSH1vY0yajMvKLPRvyJ1g+rRxiBKZWZBl6Fp1ddzXYIAwtz+D/AE/Bn4X33CAMLc8OgBs5d5RWdmzvwlgAAAP//5FxmQQAAAAZJREFUAwDOiFAxJLPlDQAAAABJRU5ErkJggg=="});o();import{jsx as s}from"react/jsx-runtime";function y({size:c=22,color:p,strokeWidth:e=2}){return s(r,{source:I(),size:c,color:p})}export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as b}from"./chunk-FUXBVE4N.mjs";import{c as y}from"./chunk-QZP5C7M5.mjs";import{a as h}from"./chunk-GUSANCWE.mjs";import{a as f}from"./chunk-W5BITU26.mjs";import{a as d,b as m,j as p}from"./chunk-SOJZCPJL.mjs";p();import{useCrossmint as W}from"@crossmint/client-sdk-react-base";import{useEffect as g,useRef as l,useState as w}from"react";import{View as I}from"react-native";import{crossmintEmbeddedCheckoutV3Service as A}from"@crossmint/client-sdk-base";import{RNWebView as M,WebViewParent as R}from"@crossmint/client-sdk-rn-window";import{embeddedCheckoutV3IncomingEvents as O,embeddedCheckoutV3OutgoingEvents as U}from"@crossmint/client-sdk-base";import{jsx as c,jsxs as N}from"react/jsx-runtime";function Z(t){var u;let[e,C]=w(null),[v,E]=w(0),V=l((u=t.payment.crypto.payer)==null?void 0:u.initialChain),n=l(t);if(F(t,n.current)){let r=d({},t),o=H(t,V.current);o.shouldPreserve&&(r.payment.crypto.payer=o.updatedPayer),n.current=r}let{crossmint:i}=W(),P=h(i,{usageOrigin:"client"}),k=A({apiClient:P}),s=l(null);g(()=>{let r=s.current;if(!r||e)return;let o=new R({current:r},{incomingEvents:O,outgoingEvents:U});C(o)},[s.current,e]),g(()=>{if(e==null)return;let r=a=>E(a.height);e.on("ui:height.changed",r);let o=a=>{f.emit("order:updated",a)};return e.on("order:updated",o),()=>{e.off("ui:height.changed"),e.off("order:updated")}},[e]);let S=r=>{e&&e.handleMessage(r)};return N(I,{style:{flex:1},children:[c(M,{ref:s,globals:i.appId?{crossmintAppId:i.appId}:void 0,source:{uri:k.iframe.getUrl(n.current)},onMessage:S,style:{width:"100%",minWidth:"100%",height:v,backgroundColor:"transparent",overflow:"hidden",opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!1,bounces:!1,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,domStorageEnabled:!0,mixedContentMode:"always",allowFileAccess:!0,allowUniversalAccessFromFileURLs:!0,geolocationEnabled:!0,userAgent:y,paymentRequestEnabled:!0}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?c(b,{payer:n.current.payment.crypto.payer,webViewClient:e}):c(L,{message:"If 'payment.crypto.enabled' is true, 'payment.crypto.payer' must be provided. Support for not providing a payer is not yet implemented."}):null]})}function F(t,e){return JSON.stringify(t)!==JSON.stringify(e)}function H(t,e){return t.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:m(d({},t.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}function L({message:t}){throw new Error(t)}export{Z as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var E={};_chunk4EVH2LVPjs.g.call(void 0, E,{SoftwareDeviceSignerKeyStorage:()=>p});require('react-native-get-random-values');var _expodevice = require('expo-device'); var y = _interopRequireWildcard(_expodevice);var _exposecurestore = require('expo-secure-store'); var a = _interopRequireWildcard(_exposecurestore);var _p256 = require('@noble/curves/p256');var _walletssdk = require('@crossmint/wallets-sdk');function v(r){let n=r.replace(/-/g,"+").replace(/_/g,"/"),e=n.length%4;if(e===0)return n;if(e===2)return`${n}==`;if(e===3)return`${n}=`;throw new Error("Invalid base64url string")}function c(r){return v(r)}function d(r){return c(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $(r){let n=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)n[e/2]=Number.parseInt(r.substring(e,e+2),16);return n}function A(r){return Array.from(r).map(n=>n.toString(16).padStart(2,"0")).join("")}function x(r){let n="";for(let e=0;e<r.length;e++)n+=String.fromCharCode(r[e]);return btoa(n)}function I(r){let n=atob(v(r)),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e}function _(r){var e,t,i;if(((e=globalThis.crypto)==null?void 0:e.getRandomValues)!=null)return globalThis.crypto.getRandomValues(r),r;let n=(i=(t=globalThis.expo)==null?void 0:t.modules)==null?void 0:i.ExpoCrypto;if((n==null?void 0:n.getRandomValues)!=null)return n.getRandomValues(r),r;throw new Error("No secure random source is available for software device signer key generation")}function k(){for(let r=0;r<8;r++){let n=_(new Uint8Array(32));if(_p256.p256.utils.isValidPrivateKey(n))return n}throw new Error("Failed to generate a valid P-256 private key")}var S,g,u,w,p,U= exports.c =_chunk4EVH2LVPjs.e.call(void 0, ()=>{_chunk4EVH2LVPjs.j.call(void 0, );S="crossmint_device_signer_",g=`${S}pending_`,u=`${S}addr_`,w=`${S}pub_key_index`;p= exports.a =class extends _walletssdk.DeviceSignerKeyStorage{constructor(){super("");this.indexUpdateLock=Promise.resolve()}generateKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let t=k(),i=_p256.p256.getPublicKey(t,!1),s=x(i),l=A(t);return e.address!=null?(yield a.setItemAsync(`${u}${e.address}`,l),yield a.setItemAsync(`${u}${e.address}_pub`,c(s))):yield a.setItemAsync(`${g}${d(s)}`,l),yield this.trackPublicKey(s),s})}mapAddressToKey(e,t){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let i=`${g}${d(t)}`,s=yield a.getItemAsync(i);if(s==null)throw new Error(`No pending key found for public key: ${t}`);yield a.setItemAsync(`${u}${e}`,s),yield a.setItemAsync(`${u}${e}_pub`,c(t)),yield a.deleteItemAsync(i)})}getKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let t=yield a.getItemAsync(`${u}${e}_pub`);return t==null?null:c(t)})}hasKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let t=yield this.getPublicKeyIndex(),i=c(e);return t.some(s=>c(s)===i)})}signMessage(e,t){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let i=yield a.getItemAsync(`${u}${e}`);if(i==null)throw new Error(`No key found for address: ${e}`);let s=$(i),l=I(t),f=_p256.p256.sign(l,s,{lowS:!0,prehash:!0});return{r:`0x${f.r.toString(16).padStart(64,"0")}`,s:`0x${f.s.toString(16).padStart(64,"0")}`}})}deleteKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let t=yield a.getItemAsync(`${u}${e}_pub`);yield a.deleteItemAsync(`${u}${e}`),yield a.deleteItemAsync(`${u}${e}_pub`),t!=null&&(yield this.untrackPublicKey(t))})}deletePendingKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){yield a.deleteItemAsync(`${g}${d(e)}`),yield this.untrackPublicKey(e)})}getDeviceName(){var i,s,l;let e=(s=(i=y.deviceName)!=null?i:y.modelName)!=null?s:y.brand,t=y.osName;return e!=null&&t!=null?`${e} (${t})`:(l=e!=null?e:t)!=null?l:"Unknown Device"}getPublicKeyIndex(){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let e=yield a.getItemAsync(w);if(e==null)return[];try{return JSON.parse(e)}catch(t){return[]}})}savePublicKeyIndex(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){yield a.setItemAsync(w,JSON.stringify(e))})}trackPublicKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){this.indexUpdateLock=this.indexUpdateLock.catch(()=>{}).then(()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let t=yield this.getPublicKeyIndex(),i=c(e);t.some(s=>c(s)===i)||(t.push(i),yield this.savePublicKeyIndex(t))})),yield this.indexUpdateLock})}untrackPublicKey(e){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){this.indexUpdateLock=this.indexUpdateLock.catch(()=>{}).then(()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){let t=yield this.getPublicKeyIndex(),i=c(e),s=t.filter(l=>c(l)!==i);yield this.savePublicKeyIndex(s)})),yield this.indexUpdateLock})}}});exports.a = p; exports.b = E; exports.c = U;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-AXQNJ6P5.mjs";import{f as c,j as o}from"./chunk-SOJZCPJL.mjs";var i=c((p,e)=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABV0lEQVR4AdzUXVKDQBAEYPRi6snUk+nNdL4pmiIEE5DkJSl6l52Z7t4/8jzc+fdYBq+1W1+Fn4Og8VEa/WSLBCSYdOJAQ+O9+PohBi8V8HxW83QQNEpiYDIZtJvoDfA9arRmVjDG2tV2Zby3x7XVE29pIGFpDlqx8RaYLQ7uSf3S4K2y8z28ZkLYjKGog+2hMeS3NFBAdG5iZmLhpBcjzEQMhzgN48bSoIPVILtNSDWczoYYEM52EFSLo/YEfxmkCGluQhiYEDZjSP1Zf80AgYkZxoiwd8Le1SwhD9N3sCxYG8eIsPe1msTkYZdByLv6LVu0S3Asdk53WwFxl6C9soIcVrt2ZlujHlIdcXodj0GfeFW52z6sS2hi1Xr8C+MQBjMn7iLIT4csyETfiY0NIRzC4F1somcFAmYm6c5fgjr1AU4m5z3x7ucGHfhnw/RMnNatDGit4hcAAP//I+bVpgAAAAZJREFUAwC4slUxPmyOTgAAAABJRU5ErkJggg=="});o();import{jsx as f}from"react/jsx-runtime";function N({size:n=22,color:t,strokeWidth:I=2}){return f(r,{source:i(),size:n,color:t})}export{N as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDCWNSPWCjs = require('./chunk-DCWNSPWC.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var p=_chunk4EVH2LVPjs.f.call(void 0, (P,e)=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABMElEQVR4AezRy20CMRAGYJQiUkcuSQu5pNxc0kJySR1Uwf+hNQ+tx14hIS4gDzue/7UML7s7f54B0wU/bEW/eTX1mufs4OCqFXf0C97D/k4xyKN7YDi4XUIV8BX2X4qQAaNcr44ZDAeX5orgUgXsAxIQMmDEMOPj0ZvBcHBpjuDlVxWAQ0DIgBFDxkpvBsPBpVnVKACZkAEjhj8ZKr0ZDCfj/pkFUDFg9J/L21J6M1hG9dkSUKs3IFsC2s69vTdXev8DbBgzC2DAqO38M27K/s1gOBn3zyiAkAEjhm3n9q43g+HgdhOqAAJCBowYMm4mejMYDi5Nw0/PKoCAkAEjhifR0pjBcHBpFuj8qAIwCBkwcu8VDAe3h++qgI+wFYO0w4ODq1bEKmBFvHXwDJhu7gAAAP//FX4TdAAAAAZJREFUAwAkFUAxInh9owAAAABJRU5ErkJggg=="});_chunk4EVH2LVPjs.j.call(void 0, );var _jsxruntime = require('react/jsx-runtime');function u({size:n=16,color:I,strokeWidth:i=2}){return _jsxruntime.jsx.call(void 0, _chunkDCWNSPWCjs.a,{source:p(),size:n,color:I})}exports.a = u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk3FBCOA5Qjs = require('./chunk-3FBCOA5Q.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _commonsdkbase = require('@crossmint/common-sdk-base');function C(t,e){return new (0, _commonsdkbase.CrossmintApiClient)(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:_chunk3FBCOA5Qjs.a.version},apiKeyExpectations:e}})}exports.a = C;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as k}from"./chunk-MVBKLS3P.mjs";import{a as C}from"./chunk-XD7WEGQZ.mjs";import{a as S}from"./chunk-TZKIJ5KX.mjs";import{a as T}from"./chunk-XONQWEM5.mjs";import{a as w}from"./chunk-GTBJ6SM6.mjs";import{a as e}from"./chunk-4EBFS2LY.mjs";import{j as f}from"./chunk-SOJZCPJL.mjs";f();import{View as d,StyleSheet as B,Dimensions as z,Modal as D,TouchableOpacity as V,Text as P}from"react-native";import{jsx as t,jsxs as v}from"react/jsx-runtime";var{width:U}=z.get("window");function X({phone:i,open:n,setOpen:O,step:x,onSubmitOTP:I,onResendOTPCode:M,onSubmitPhone:R,rejectRef:r,appearance:o}){var m,u,c,g,y,b;function s(){var h;n&&((h=r.current)==null||h.call(r,new Error("User cancelled")),O(!1))}let l=B.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalContainer:{backgroundColor:((m=o==null?void 0:o.colors)==null?void 0:m.background)||e["cm-background-primary"],borderRadius:(o==null?void 0:o.borderRadius)||12,padding:32,width:Math.min(U-32,400),maxHeight:"80%",position:"relative",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:5},closeButton:{position:"absolute",top:16,right:16,width:32,height:32,borderRadius:6,backgroundColor:((u=o==null?void 0:o.colors)==null?void 0:u.inputBackground)||e["cm-muted-primary"],alignItems:"center",justifyContent:"center",zIndex:1}});return n?t(D,{visible:n,transparent:!0,animationType:"fade",onRequestClose:s,statusBarTranslucent:!0,children:t(d,{style:l.modalOverlay,children:v(d,{style:l.modalContainer,children:[t(V,{style:l.closeButton,onPress:s,hitSlop:{top:10,bottom:10,left:10,right:10},children:t(T,{size:16,color:((c=o==null?void 0:o.colors)==null?void 0:c.textSecondary)||e["cm-text-secondary"]})}),x==="initial"?t(k,{contactInfo:i!=null?i:"",contactType:"phone",icon:t(C,{size:22,color:((g=o==null?void 0:o.colors)==null?void 0:g.textPrimary)||e["cm-text-primary"]}),onConfirm:R,onCancel:s,appearance:o}):t(w,{contactInfo:i!=null?i:"",contactType:"phone",icon:t(d,{style:{backgroundColor:((y=o==null?void 0:o.colors)==null?void 0:y.accent)||e["cm-accent"],borderRadius:999,padding:12},children:t(S,{size:22,color:((b=o==null?void 0:o.colors)==null?void 0:b.background)||e["cm-background-primary"]})}),title:"Check your phone",description:v(P,{children:["A temporary login code has been sent via SMS to"," ",t(P,{style:{fontWeight:"bold"},children:i})]}),helpText:`Can't receive the SMS? Check your phone number.
|
|
2
|
+
Some messages may take several minutes to arrive.`,onSubmitOTP:I,onResendCode:M,appearance:o,otpLength:10,keyboardType:"number-pad",autoComplete:"sms-otp",textContentType:"oneTimeCode"})]})})}):null}export{X as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./chunk-SOJZCPJL.mjs";r();import{Image as t}from"react-native";import{jsx as p}from"react/jsx-runtime";function m({source:o,size:e=22,color:n}){return p(t,{source:typeof o=="string"?{uri:o}:o,resizeMode:"contain",style:{width:e,height:e,tintColor:n}})}export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');function u({payer:r,webViewClient:e}){return _react.useEffect.call(void 0, ()=>{if(e==null)return;let s=e.on("crypto:send-transaction",l=>_chunk4EVH2LVPjs.i.call(void 0, this,[l],function*({chain:c,serializedTransaction:a}){try{yield r.handleChainSwitch(c);let n=yield r.handleSignAndSendTransaction(a);n.success?e.send("crypto:send-transaction:success",{txId:n.txId}):e.send("crypto:send-transaction:failed",{error:n.errorMessage})}catch(n){console.error("[PayerConnectionHandler] Failed to send transaction",n),e.send("crypto:send-transaction:failed",{error:n.message||"An unknown error occurred"})}}));return()=>{e.off(s)}},[e]),null}exports.a = u;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as c,c as d}from"./chunk-4XI5PNDY.mjs";import{b as g,c as v}from"./chunk-ND3HLTOS.mjs";import{h as l,j as u}from"./chunk-SOJZCPJL.mjs";u();import{NativeModules as m}from"react-native";function f(){if(p()){console.info("[CrossmintDeviceSigner] Using native device signer key storage (hardware-backed)");let{NativeDeviceSignerKeyStorage:o}=(d(),l(c));return new o}console.info("[CrossmintDeviceSigner] Native module not available \u2014 using software-backed key storage. This is suitable for development in Expo Go but not recommended for production.");let{SoftwareDeviceSignerKeyStorage:e}=(v(),l(g));return new e}function p(){var i,r,t,s,a;let e="CrossmintDeviceSigner",o=globalThis,n=m;return((r=(i=o.expo)==null?void 0:i.modules)==null?void 0:r[e])!=null||((t=o.NativeModulesProxy)==null?void 0:t[e])!=null||n[e]!=null||((a=(s=n.NativeUnimoduleProxy)==null?void 0:s.modulesConstants)==null?void 0:a[e])!=null}export{f as a,p as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./chunk-SOJZCPJL.mjs";o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _mitt = require('mitt'); var _mitt2 = _interopRequireDefault(_mitt);var i=_mitt2.default.call(void 0, );exports.a = i;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');function g({source:o,size:e=22,color:n}){return _jsxruntime.jsx.call(void 0, _reactnative.Image,{source:typeof o=="string"?{uri:o}:o,resizeMode:"contain",style:{width:e,height:e,tintColor:n}})}exports.a = g;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./chunk-SOJZCPJL.mjs";r();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFHG7Y3B2js = require('./chunk-FHG7Y3B2.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');function N({contactInfo:v,contactType:e,icon:z,onConfirm:R,onCancel:V,appearance:t}){var u,g,f,b,x,C,h,T,S,B;let[l,m]=_react.useState.call(void 0, !1),[c,y]=_react.useState.call(void 0, null),A=()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){m(!0),y(null);try{yield R()}catch(W){console.error(`Failed to send ${e} code`,W),y(`Failed to send ${e==="email"?"email":"SMS"}. Please try again.`)}finally{m(!1)}}),o=_reactnative.StyleSheet.create({container:{width:"100%"},title:{fontSize:24,fontWeight:"600",color:((u=t==null?void 0:t.colors)==null?void 0:u.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"],textAlign:"center",marginBottom:8},description:{fontSize:16,color:((g=t==null?void 0:t.colors)==null?void 0:g.textSecondary)||_chunkFHG7Y3B2js.a["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:22},contactContainer:{borderWidth:1,borderColor:((f=t==null?void 0:t.colors)==null?void 0:f.border)||_chunkFHG7Y3B2js.a["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,padding:16,marginBottom:24,flexDirection:"row",alignItems:"center"},contactText:{fontSize:16,color:((b=t==null?void 0:t.colors)==null?void 0:b.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"],marginLeft:12,flex:1},errorText:{fontSize:14,color:((x=t==null?void 0:t.colors)==null?void 0:x.danger)||_chunkFHG7Y3B2js.a["cm-danger"],textAlign:"center",marginBottom:16},buttonContainer:{flexDirection:"row",gap:12},button:{flex:1,paddingVertical:16,paddingHorizontal:24,borderRadius:999,alignItems:"center",justifyContent:"center",minHeight:52},primaryButton:{backgroundColor:((C=t==null?void 0:t.colors)==null?void 0:C.accent)||_chunkFHG7Y3B2js.a["cm-accent"]},secondaryButton:{backgroundColor:"transparent",borderWidth:1,borderColor:((h=t==null?void 0:t.colors)==null?void 0:h.border)||_chunkFHG7Y3B2js.a["cm-border"]},disabledButton:{opacity:.6},buttonText:{fontSize:16,fontWeight:"500",color:((T=t==null?void 0:t.colors)==null?void 0:T.background)||_chunkFHG7Y3B2js.a["cm-background-primary"]},secondaryButtonText:{color:((S=t==null?void 0:t.colors)==null?void 0:S.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"]}});return _jsxruntime.jsxs.call(void 0, _reactnative.View,{style:o.container,children:[_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.title,children:"Confirm it's you"}),_jsxruntime.jsxs.call(void 0, _reactnative.Text,{style:o.description,children:["You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code",e==="phone"?" via SMS":"","."]}),_jsxruntime.jsxs.call(void 0, _reactnative.View,{style:o.contactContainer,children:[z,_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.contactText,children:v})]}),c&&_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.errorText,children:c}),_jsxruntime.jsxs.call(void 0, _reactnative.View,{style:o.buttonContainer,children:[_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[o.button,o.secondaryButton],onPress:V,disabled:l,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:[o.buttonText,o.secondaryButtonText],children:"Cancel"})}),_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[o.button,o.primaryButton,l&&o.disabledButton],onPress:A,disabled:l,children:l?_jsxruntime.jsx.call(void 0, _reactnative.ActivityIndicator,{color:((B=t==null?void 0:t.colors)==null?void 0:B.background)||_chunkFHG7Y3B2js.a["cm-background-primary"]}):_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.buttonText,children:"Send code"})})]})]})}exports.a = N;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var r={"cm-text-primary":"#00150D","cm-text-secondary":"#67797F","cm-background-primary":"#FFFFFF","cm-muted-primary":"#F0F2F4","cm-hover":"#E9ECF0","cm-border":"#D9D9D9","cm-link":"#1A74E9","cm-accent":"#4CAF50","cm-danger":"#f44336"};exports.a = r;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _reactnative = require('react-native');var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _clientsigners = require('@crossmint/client-signers');var _walletssdk = require('@crossmint/wallets-sdk');var _commonsdkbase = require('@crossmint/common-sdk-base');var _clientsdkrnwindow = require('@crossmint/client-sdk-rn-window');var _jsxruntime = require('react/jsx-runtime');function z({appearance:U}){let{wallet:r}=_clientsdkreactbase.useWallet.call(void 0, ),{crossmint:i}=_clientsdkreactbase.useCrossmint.call(void 0, ),a=_react.useRef.call(void 0, null),l=_react.useRef.call(void 0, null),[c,E]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{if(i!=null)try{let e=_commonsdkbase.validateAPIKey.call(void 0, i.apiKey);if(e.isValid){let t=_clientsigners.environmentUrlConfig[e.environment];E(`${t}/export`)}}catch(e){console.error("Failed to get TEE URL:",e)}},[i]);let m=_react.useCallback.call(void 0, e=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){if(!(r==null||a.current==null||e.nativeEvent.loading))try{if(r.signer!=null&&_walletssdk.isExportableSignerAdapter.call(void 0, r.signer)){let t=new (0, _clientsdkrnwindow.WebViewParent)(a,{incomingEvents:_clientsigners.exportSignerOutboundEvents,outgoingEvents:_clientsigners.exportSignerInboundEvents});l.current=t,yield t.handshakeWithChild(),yield r.signer._exportPrivateKey(t)}}catch(t){console.error("Failed to export private key:",t),_reactnative.Alert.alert("Export Failed","Failed to export private key. Please try again.")}}),[r]),d=_react.useCallback.call(void 0, e=>{let{nativeEvent:t}=e;console.error("WebView error:",t),_reactnative.Alert.alert("Export Failed","Failed to load export interface. Please try again.")},[]),v=_react.useCallback.call(void 0, e=>{l.current&&l.current.handleMessage(e)},[]);return c===""||r==null||r.signer==null||!_walletssdk.isExportableSignerAdapter.call(void 0, r.signer)?null:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:n.webViewContainer,children:_jsxruntime.jsx.call(void 0, _clientsdkrnwindow.RNWebView,{ref:a,source:{uri:c},style:n.webView,javaScriptEnabled:!0,domStorageEnabled:!0,onLoadEnd:m,onError:d,onHttpError:d,onMessage:v,startInLoadingState:!0,renderLoading:()=>_jsxruntime.jsx.call(void 0, _reactnative.View,{style:n.loadingContainer,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:n.loadingText,children:"Loading..."})})})})}var n=_reactnative.StyleSheet.create({webViewContainer:{height:56,borderWidth:1,borderColor:"#E5E5E5",borderRadius:12,overflow:"hidden"},webView:{flex:1},loadingContainer:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"#F5F5F5"},loadingText:{fontSize:16,color:"#666666"}});exports.a = z;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as o,j as t}from"./chunk-SOJZCPJL.mjs";t();import{useEffect as d}from"react";function p({payer:r,webViewClient:e}){return d(()=>{if(e==null)return;let s=e.on("crypto:send-transaction",h=>o(this,[h],function*({chain:c,serializedTransaction:a}){try{yield r.handleChainSwitch(c);let n=yield r.handleSignAndSendTransaction(a);n.success?e.send("crypto:send-transaction:success",{txId:n.txId}):e.send("crypto:send-transaction:failed",{error:n.errorMessage})}catch(n){console.error("[PayerConnectionHandler] Failed to send transaction",n),e.send("crypto:send-transaction:failed",{error:n.message||"An unknown error occurred"})}}));return()=>{e.off(s)}},[e]),null}export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as o}from"./chunk-4EBFS2LY.mjs";import{i as b,j as V}from"./chunk-SOJZCPJL.mjs";V();import{useState as g}from"react";import{View as D,Text as n,TextInput as M,TouchableOpacity as H,StyleSheet as Q,ActivityIndicator as X}from"react-native";import{jsx as e,jsxs as Y}from"react/jsx-runtime";function tt({icon:L,title:F,description:N,helpText:W,onSubmitOTP:E,onResendCode:y,appearance:t,otpLength:U=9,keyboardType:$="default",autoComplete:q="one-time-code",textContentType:G="oneTimeCode"}){var f,h,B,C,S,I,P,k,R,z,w,O,v;let[r,x]=g(""),[s,u]=g(!1),[c,d]=g(null),[m,T]=g(0),J=()=>b(this,null,function*(){if(r.length!==0){u(!0),d(null);try{yield E(r),x("")}catch(l){console.error("Failed to verify OTP",l),d("Invalid code. Please try again.")}finally{u(!1)}}}),K=()=>b(this,null,function*(){if(!(m>0||!y)){u(!0),d(null);try{yield y(),T(60);let l=setInterval(()=>{T(A=>A<=1?(clearInterval(l),0):A-1)},1e3)}catch(l){console.error("Failed to resend OTP",l),d("Failed to resend code. Please try again.")}finally{u(!1)}}}),i=Q.create({container:{width:"100%"},iconContainer:{alignItems:"center",marginBottom:8},title:{fontSize:18,fontWeight:"600",color:((f=t==null?void 0:t.colors)==null?void 0:f.textPrimary)||o["cm-text-primary"],textAlign:"center",marginBottom:8,marginTop:16},description:{fontSize:14,color:((h=t==null?void 0:t.colors)==null?void 0:h.textSecondary)||o["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:20},otpInput:{borderWidth:1,borderColor:c?((B=t==null?void 0:t.colors)==null?void 0:B.danger)||o["cm-danger"]:((C=t==null?void 0:t.colors)==null?void 0:C.border)||o["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,backgroundColor:((S=t==null?void 0:t.colors)==null?void 0:S.inputBackground)||o["cm-muted-primary"],padding:16,fontSize:16,color:((I=t==null?void 0:t.colors)==null?void 0:I.textPrimary)||o["cm-text-primary"],marginBottom:16,textAlign:"center"},errorText:{fontSize:14,color:((P=t==null?void 0:t.colors)==null?void 0:P.danger)||o["cm-danger"],textAlign:"center",marginBottom:16},helpText:{fontSize:12,color:((k=t==null?void 0:t.colors)==null?void 0:k.textSecondary)||o["cm-text-secondary"],textAlign:"center",marginBottom:16,lineHeight:16},submitButton:{backgroundColor:((R=t==null?void 0:t.colors)==null?void 0:R.accent)||o["cm-accent"],paddingVertical:16,paddingHorizontal:32,borderRadius:(t==null?void 0:t.borderRadius)||12,alignItems:"center",marginBottom:16},submitButtonDisabled:{opacity:.6},submitButtonText:{fontSize:16,fontWeight:"500",color:((z=t==null?void 0:t.colors)==null?void 0:z.background)||o["cm-background-primary"]},resendButton:{alignSelf:"center",paddingVertical:12,paddingHorizontal:16},resendButtonText:{fontSize:14,color:((w=t==null?void 0:t.colors)==null?void 0:w.accent)||o["cm-accent"],textAlign:"center"},resendButtonDisabled:{opacity:.6}});return Y(D,{style:i.container,children:[e(D,{style:i.iconContainer,children:L}),e(n,{style:i.title,children:F}),e(n,{style:i.description,children:N}),e(M,{style:i.otpInput,placeholder:"Enter code",placeholderTextColor:((O=t==null?void 0:t.colors)==null?void 0:O.textSecondary)||o["cm-text-secondary"],value:r,onChangeText:l=>{x(l),d(null)},keyboardType:$,autoComplete:q,textContentType:G,editable:!s,maxLength:U}),c&&e(n,{style:i.errorText,children:c}),e(n,{style:i.helpText,children:W}),e(H,{style:[i.submitButton,(r.length===0||s)&&i.submitButtonDisabled],onPress:J,disabled:r.length===0||s,children:s?e(X,{color:((v=t==null?void 0:t.colors)==null?void 0:v.background)||o["cm-background-primary"]}):e(n,{style:i.submitButtonText,children:"Submit"})}),y&&e(H,{style:[i.resendButton,m>0&&i.resendButtonDisabled],onPress:K,disabled:m>0||s,children:e(n,{style:i.resendButtonText,children:m>0?`Re-send code in ${m}s`:"Re-send code"})})]})}export{tt as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-O4HZNHTS.mjs";import{j as n}from"./chunk-SOJZCPJL.mjs";n();import{CrossmintApiClient as r}from"@crossmint/common-sdk-base";function m(t,e){return new r(t,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:i.version},apiKeyExpectations:e}})}export{m as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-W5BITU26.mjs";import{j as n}from"./chunk-SOJZCPJL.mjs";n();import{createContext as m,useContext as f,useEffect as a,useState as d}from"react";import{jsx as p}from"react/jsx-runtime";var i=m(void 0);function k({children:e}){let[s,c]=d(void 0),[u,C]=d(void 0);return a(()=>{let r=o=>{c(o.order),C(o.orderClientSecret)};return t.on("order:updated",r),()=>{t.off("order:updated",r)}},[]),p(i.Provider,{value:{order:s,orderClientSecret:u},children:e})}function x(){let e=f(i);if(!e)throw new Error("useCrossmintCheckout must be used within a CrossmintCheckoutProvider");return e}export{k as a,x as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYRWIRSZHjs = require('./chunk-YRWIRSZH.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _jsxruntime = require('react/jsx-runtime');function i(t){return _jsxruntime.jsx.call(void 0, _chunkYRWIRSZHjs.a,_chunk4EVH2LVPjs.a.call(void 0, {},t))}exports.a = i;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _configplugins = require('@expo/config-plugins');var _path = require('path'); var _path2 = _interopRequireDefault(_path);var _fs = require('fs'); var _fs2 = _interopRequireDefault(_fs);var f=a=>_configplugins.withDangerousMod.call(void 0, a,["ios",i=>_chunk4EVH2LVPjs.i.call(void 0, void 0,null,function*(){let t=_path2.default.join(i.modRequest.platformProjectRoot,"Podfile"),e=_fs2.default.readFileSync(t,"utf8");e.includes("CROSSMINT_RN_PREBUILT_FIX")||(e=e.replace(/(ENV\['RCT_USE_RN_DEP'\][^\n]+\n)(ENV\['RCT_USE_PREBUILT_RNCORE'\][^\n]+\n)/,`$1$2ENV.delete('RCT_USE_RN_DEP') # CROSSMINT_RN_PREBUILT_FIX
|
|
2
2
|
ENV.delete('RCT_USE_PREBUILT_RNCORE') # CROSSMINT_RN_PREBUILT_FIX
|
|
3
|
-
`));let n="# @crossmint/expo-device-signer: CrossmintDeviceSigner autolinking exclusion";if(!e.includes(n)){let
|
|
3
|
+
`));let n="# @crossmint/expo-device-signer: CrossmintDeviceSigner autolinking exclusion";if(!e.includes(n)){let c=` ${n}
|
|
4
4
|
# RN 0.82 removed CallInvoker.h from TurboModuleUtils.h, breaking
|
|
5
5
|
# expo-modules-core@3.x. Inject it via a prefix header for that pod.
|
|
6
6
|
require 'fileutils'
|
|
@@ -35,4 +35,4 @@ ENV.delete('RCT_USE_PREBUILT_RNCORE') # CROSSMINT_RN_PREBUILT_FIX
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
`,o=e.replace(/(post_install do \|installer\|)/,`$1
|
|
38
|
-
${
|
|
38
|
+
${c}`);if(o===e)throw new Error("[crossmint/client-sdk-react-native-ui] Could not inject post_install hook: expected 'post_install do |installer|' in Podfile");e=o}return _fs2.default.writeFileSync(t,e),i})]);exports.a = f;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var y={};_chunk4EVH2LVPjs.g.call(void 0, y,{NativeDeviceSignerKeyStorage:()=>t});var _expomodulescore = require('expo-modules-core');var _expodevice = require('expo-device'); var s = _interopRequireWildcard(_expodevice);var _walletssdk = require('@crossmint/wallets-sdk');function i(){if(n==null)try{n=_expomodulescore.requireNativeModule.call(void 0, "CrossmintDeviceSigner")}catch(l){throw new Error("CrossmintDeviceSigner native module is not available. This typically means you are running in Expo Go, which does not support custom native modules. Use a development build (`npx expo run:ios` / `npx expo run:android`) or EAS Build, or use SoftwareDeviceSignerKeyStorage as a fallback for development.")}return n}var n,t,K= exports.c =_chunk4EVH2LVPjs.e.call(void 0, ()=>{_chunk4EVH2LVPjs.j.call(void 0, );n=null;t= exports.a =class extends _walletssdk.DeviceSignerKeyStorage{constructor(){super("")}generateKey(e){var r;return i().generateKey((r=e.address)!=null?r:null)}mapAddressToKey(e,r){return i().mapAddressToKey(e,r)}getKey(e){return i().getKey(e)}hasKey(e){return i().hasKey(e)}signMessage(e,r){return i().signMessage(e,r)}deleteKey(e){return i().deleteKey(e)}deletePendingKey(e){return i().deletePendingKey(e)}getDeviceName(){var o,a,d;let e=(a=(o=s.deviceName)!=null?o:s.modelName)!=null?a:s.brand,r=s.osName;return e!=null&&r!=null?`${e} (${r})`:(d=e!=null?e:r)!=null?d:"Unknown Device"}}});exports.a = t; exports.b = y; exports.c = K;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as p,j as u}from"./chunk-SOJZCPJL.mjs";u();import{useState as y,useCallback as s,useRef as g,useEffect as x}from"react";import{View as f,Text as V,StyleSheet as h,Alert as b}from"react-native";import{useWallet as C,useCrossmint as W}from"@crossmint/client-sdk-react-base";import{environmentUrlConfig as P,exportSignerInboundEvents as S,exportSignerOutboundEvents as F}from"@crossmint/client-signers";import{isExportableSignerAdapter as w}from"@crossmint/wallets-sdk";import{validateAPIKey as I}from"@crossmint/common-sdk-base";import{WebViewParent as k,RNWebView as K}from"@crossmint/client-sdk-rn-window";import{jsx as o}from"react/jsx-runtime";function H({appearance:U}){let{wallet:r}=C(),{crossmint:i}=W(),a=g(null),l=g(null),[c,E]=y("");x(()=>{if(i!=null)try{let e=I(i.apiKey);if(e.isValid){let t=P[e.environment];E(`${t}/export`)}}catch(e){console.error("Failed to get TEE URL:",e)}},[i]);let m=s(e=>p(this,null,function*(){if(!(r==null||a.current==null||e.nativeEvent.loading))try{if(r.signer!=null&&w(r.signer)){let t=new k(a,{incomingEvents:F,outgoingEvents:S});l.current=t,yield t.handshakeWithChild(),yield r.signer._exportPrivateKey(t)}}catch(t){console.error("Failed to export private key:",t),b.alert("Export Failed","Failed to export private key. Please try again.")}}),[r]),d=s(e=>{let{nativeEvent:t}=e;console.error("WebView error:",t),b.alert("Export Failed","Failed to load export interface. Please try again.")},[]),v=s(e=>{l.current&&l.current.handleMessage(e)},[]);return c===""||r==null||r.signer==null||!w(r.signer)?null:o(f,{style:n.webViewContainer,children:o(K,{ref:a,source:{uri:c},style:n.webView,javaScriptEnabled:!0,domStorageEnabled:!0,onLoadEnd:m,onError:d,onHttpError:d,onMessage:v,startInLoadingState:!0,renderLoading:()=>o(f,{style:n.loadingContainer,children:o(V,{style:n.loadingText,children:"Loading..."})})})})}var n=h.create({webViewContainer:{height:56,borderWidth:1,borderColor:"#E5E5E5",borderRadius:12,overflow:"hidden"},webView:{flex:1},loadingContainer:{flex:1,justifyContent:"center",alignItems:"center",backgroundColor:"#F5F5F5"},loadingText:{fontSize:16,color:"#666666"}});export{H as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./chunk-SOJZCPJL.mjs";o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkINFBLVRXjs = require('./chunk-INFBLVRX.js');var _chunk6SC5DDHWjs = require('./chunk-6SC5DDHW.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _reactnative = require('react-native');function b(){if(p()){console.info("[CrossmintDeviceSigner] Using native device signer key storage (hardware-backed)");let{NativeDeviceSignerKeyStorage:o}=(_chunkINFBLVRXjs.c.call(void 0, ),_chunk4EVH2LVPjs.h.call(void 0, _chunkINFBLVRXjs.b));return new o}console.info("[CrossmintDeviceSigner] Native module not available \u2014 using software-backed key storage. This is suitable for development in Expo Go but not recommended for production.");let{SoftwareDeviceSignerKeyStorage:e}=(_chunk6SC5DDHWjs.c.call(void 0, ),_chunk4EVH2LVPjs.h.call(void 0, _chunk6SC5DDHWjs.b));return new e}function p(){var i,r,t,s,a;let e="CrossmintDeviceSigner",o=globalThis,n=_reactnative.NativeModules;return((r=(i=o.expo)==null?void 0:i.modules)==null?void 0:r[e])!=null||((t=o.NativeModulesProxy)==null?void 0:t[e])!=null||n[e]!=null||((a=(s=n.NativeUnimoduleProxy)==null?void 0:s.modulesConstants)==null?void 0:a[e])!=null}exports.a = b; exports.b = p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-4EBFS2LY.mjs";import{i as w,j as P}from"./chunk-SOJZCPJL.mjs";P();import{useState as k}from"react";import{View as d,Text as n,TouchableOpacity as I,StyleSheet as H,ActivityIndicator as L}from"react-native";import{jsx as r,jsxs as s}from"react/jsx-runtime";function U({contactInfo:v,contactType:e,icon:z,onConfirm:R,onCancel:V,appearance:t}){var u,g,f,b,x,C,h,T,S,B;let[l,m]=k(!1),[c,y]=k(null),A=()=>w(this,null,function*(){m(!0),y(null);try{yield R()}catch(W){console.error(`Failed to send ${e} code`,W),y(`Failed to send ${e==="email"?"email":"SMS"}. Please try again.`)}finally{m(!1)}}),o=H.create({container:{width:"100%"},title:{fontSize:24,fontWeight:"600",color:((u=t==null?void 0:t.colors)==null?void 0:u.textPrimary)||i["cm-text-primary"],textAlign:"center",marginBottom:8},description:{fontSize:16,color:((g=t==null?void 0:t.colors)==null?void 0:g.textSecondary)||i["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:22},contactContainer:{borderWidth:1,borderColor:((f=t==null?void 0:t.colors)==null?void 0:f.border)||i["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,padding:16,marginBottom:24,flexDirection:"row",alignItems:"center"},contactText:{fontSize:16,color:((b=t==null?void 0:t.colors)==null?void 0:b.textPrimary)||i["cm-text-primary"],marginLeft:12,flex:1},errorText:{fontSize:14,color:((x=t==null?void 0:t.colors)==null?void 0:x.danger)||i["cm-danger"],textAlign:"center",marginBottom:16},buttonContainer:{flexDirection:"row",gap:12},button:{flex:1,paddingVertical:16,paddingHorizontal:24,borderRadius:999,alignItems:"center",justifyContent:"center",minHeight:52},primaryButton:{backgroundColor:((C=t==null?void 0:t.colors)==null?void 0:C.accent)||i["cm-accent"]},secondaryButton:{backgroundColor:"transparent",borderWidth:1,borderColor:((h=t==null?void 0:t.colors)==null?void 0:h.border)||i["cm-border"]},disabledButton:{opacity:.6},buttonText:{fontSize:16,fontWeight:"500",color:((T=t==null?void 0:t.colors)==null?void 0:T.background)||i["cm-background-primary"]},secondaryButtonText:{color:((S=t==null?void 0:t.colors)==null?void 0:S.textPrimary)||i["cm-text-primary"]}});return s(d,{style:o.container,children:[r(n,{style:o.title,children:"Confirm it's you"}),s(n,{style:o.description,children:["You're using this wallet for the first time on this device. Click 'Send code' to get a one-time verification code",e==="phone"?" via SMS":"","."]}),s(d,{style:o.contactContainer,children:[z,r(n,{style:o.contactText,children:v})]}),c&&r(n,{style:o.errorText,children:c}),s(d,{style:o.buttonContainer,children:[r(I,{style:[o.button,o.secondaryButton],onPress:V,disabled:l,children:r(n,{style:[o.buttonText,o.secondaryButtonText],children:"Cancel"})}),r(I,{style:[o.button,o.primaryButton,l&&o.disabledButton],onPress:A,disabled:l,children:l?r(L,{color:((B=t==null?void 0:t.colors)==null?void 0:B.background)||i["cm-background-primary"]}):r(n,{style:o.buttonText,children:"Send code"})})]})]})}export{U as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{i as n,j as i}from"./chunk-SOJZCPJL.mjs";i();import*as e from"expo-secure-store";var a=class{get(t){return n(this,null,function*(){try{let r=yield e.getItemAsync(t);if(!r)return;try{let o=JSON.parse(r);if(o.expiresAt&&new Date(o.expiresAt)<new Date){yield this.remove(t);return}return o.value}catch(o){return r}}catch(r){console.error("Error reading from SecureStore:",r);return}})}set(t,r,o){return n(this,null,function*(){try{if(o){let s=JSON.stringify({value:r,expiresAt:o});yield e.setItemAsync(t,s)}else yield e.setItemAsync(t,r)}catch(s){console.error("Error writing to SecureStore:",s)}})}remove(t){return n(this,null,function*(){try{yield e.deleteItemAsync(t)}catch(r){console.error("Error removing from SecureStore:",r)}})}isAvailable(){return n(this,null,function*(){try{return yield e.isAvailableAsync()}catch(t){return!1}})}};export{a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFHG7Y3B2js = require('./chunk-FHG7Y3B2.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _react = require('react');var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');function p({icon:L,title:F,description:N,helpText:W,onSubmitOTP:E,onResendCode:y,appearance:t,otpLength:U=9,keyboardType:$="default",autoComplete:q="one-time-code",textContentType:G="oneTimeCode"}){var f,h,B,C,S,I,P,k,R,z,w,O,v;let[r,x]=_react.useState.call(void 0, ""),[s,u]=_react.useState.call(void 0, !1),[c,d]=_react.useState.call(void 0, null),[m,T]=_react.useState.call(void 0, 0),J=()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){if(r.length!==0){u(!0),d(null);try{yield E(r),x("")}catch(l){console.error("Failed to verify OTP",l),d("Invalid code. Please try again.")}finally{u(!1)}}}),K=()=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){if(!(m>0||!y)){u(!0),d(null);try{yield y(),T(60);let l=setInterval(()=>{T(A=>A<=1?(clearInterval(l),0):A-1)},1e3)}catch(l){console.error("Failed to resend OTP",l),d("Failed to resend code. Please try again.")}finally{u(!1)}}}),i=_reactnative.StyleSheet.create({container:{width:"100%"},iconContainer:{alignItems:"center",marginBottom:8},title:{fontSize:18,fontWeight:"600",color:((f=t==null?void 0:t.colors)==null?void 0:f.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"],textAlign:"center",marginBottom:8,marginTop:16},description:{fontSize:14,color:((h=t==null?void 0:t.colors)==null?void 0:h.textSecondary)||_chunkFHG7Y3B2js.a["cm-text-secondary"],textAlign:"center",marginBottom:24,lineHeight:20},otpInput:{borderWidth:1,borderColor:c?((B=t==null?void 0:t.colors)==null?void 0:B.danger)||_chunkFHG7Y3B2js.a["cm-danger"]:((C=t==null?void 0:t.colors)==null?void 0:C.border)||_chunkFHG7Y3B2js.a["cm-border"],borderRadius:(t==null?void 0:t.borderRadius)||12,backgroundColor:((S=t==null?void 0:t.colors)==null?void 0:S.inputBackground)||_chunkFHG7Y3B2js.a["cm-muted-primary"],padding:16,fontSize:16,color:((I=t==null?void 0:t.colors)==null?void 0:I.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"],marginBottom:16,textAlign:"center"},errorText:{fontSize:14,color:((P=t==null?void 0:t.colors)==null?void 0:P.danger)||_chunkFHG7Y3B2js.a["cm-danger"],textAlign:"center",marginBottom:16},helpText:{fontSize:12,color:((k=t==null?void 0:t.colors)==null?void 0:k.textSecondary)||_chunkFHG7Y3B2js.a["cm-text-secondary"],textAlign:"center",marginBottom:16,lineHeight:16},submitButton:{backgroundColor:((R=t==null?void 0:t.colors)==null?void 0:R.accent)||_chunkFHG7Y3B2js.a["cm-accent"],paddingVertical:16,paddingHorizontal:32,borderRadius:(t==null?void 0:t.borderRadius)||12,alignItems:"center",marginBottom:16},submitButtonDisabled:{opacity:.6},submitButtonText:{fontSize:16,fontWeight:"500",color:((z=t==null?void 0:t.colors)==null?void 0:z.background)||_chunkFHG7Y3B2js.a["cm-background-primary"]},resendButton:{alignSelf:"center",paddingVertical:12,paddingHorizontal:16},resendButtonText:{fontSize:14,color:((w=t==null?void 0:t.colors)==null?void 0:w.accent)||_chunkFHG7Y3B2js.a["cm-accent"],textAlign:"center"},resendButtonDisabled:{opacity:.6}});return _jsxruntime.jsxs.call(void 0, _reactnative.View,{style:i.container,children:[_jsxruntime.jsx.call(void 0, _reactnative.View,{style:i.iconContainer,children:L}),_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.title,children:F}),_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.description,children:N}),_jsxruntime.jsx.call(void 0, _reactnative.TextInput,{style:i.otpInput,placeholder:"Enter code",placeholderTextColor:((O=t==null?void 0:t.colors)==null?void 0:O.textSecondary)||_chunkFHG7Y3B2js.a["cm-text-secondary"],value:r,onChangeText:l=>{x(l),d(null)},keyboardType:$,autoComplete:q,textContentType:G,editable:!s,maxLength:U}),c&&_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.errorText,children:c}),_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.helpText,children:W}),_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[i.submitButton,(r.length===0||s)&&i.submitButtonDisabled],onPress:J,disabled:r.length===0||s,children:s?_jsxruntime.jsx.call(void 0, _reactnative.ActivityIndicator,{color:((v=t==null?void 0:t.colors)==null?void 0:v.background)||_chunkFHG7Y3B2js.a["cm-background-primary"]}):_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.submitButtonText,children:"Submit"})}),y&&_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:[i.resendButton,m>0&&i.resendButtonDisabled],onPress:K,disabled:m>0||s,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:i.resendButtonText,children:m>0?`Re-send code in ${m}s`:"Re-send code"})})]})}exports.a = p;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{e as h,g as P,i as o,j as b}from"./chunk-SOJZCPJL.mjs";var E={};P(E,{SoftwareDeviceSignerKeyStorage:()=>p});import"react-native-get-random-values";import*as y from"expo-device";import*as a from"expo-secure-store";import{p256 as m}from"@noble/curves/p256";import{DeviceSignerKeyStorage as K}from"@crossmint/wallets-sdk";function v(r){let n=r.replace(/-/g,"+").replace(/_/g,"/"),e=n.length%4;if(e===0)return n;if(e===2)return`${n}==`;if(e===3)return`${n}=`;throw new Error("Invalid base64url string")}function c(r){return v(r)}function d(r){return c(r).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function $(r){let n=new Uint8Array(r.length/2);for(let e=0;e<r.length;e+=2)n[e/2]=Number.parseInt(r.substring(e,e+2),16);return n}function A(r){return Array.from(r).map(n=>n.toString(16).padStart(2,"0")).join("")}function x(r){let n="";for(let e=0;e<r.length;e++)n+=String.fromCharCode(r[e]);return btoa(n)}function I(r){let n=atob(v(r)),e=new Uint8Array(n.length);for(let t=0;t<n.length;t++)e[t]=n.charCodeAt(t);return e}function _(r){var e,t,i;if(((e=globalThis.crypto)==null?void 0:e.getRandomValues)!=null)return globalThis.crypto.getRandomValues(r),r;let n=(i=(t=globalThis.expo)==null?void 0:t.modules)==null?void 0:i.ExpoCrypto;if((n==null?void 0:n.getRandomValues)!=null)return n.getRandomValues(r),r;throw new Error("No secure random source is available for software device signer key generation")}function k(){for(let r=0;r<8;r++){let n=_(new Uint8Array(32));if(m.utils.isValidPrivateKey(n))return n}throw new Error("Failed to generate a valid P-256 private key")}var S,g,u,w,p,U=h(()=>{b();S="crossmint_device_signer_",g=`${S}pending_`,u=`${S}addr_`,w=`${S}pub_key_index`;p=class extends K{constructor(){super("");this.indexUpdateLock=Promise.resolve()}generateKey(e){return o(this,null,function*(){let t=k(),i=m.getPublicKey(t,!1),s=x(i),l=A(t);return e.address!=null?(yield a.setItemAsync(`${u}${e.address}`,l),yield a.setItemAsync(`${u}${e.address}_pub`,c(s))):yield a.setItemAsync(`${g}${d(s)}`,l),yield this.trackPublicKey(s),s})}mapAddressToKey(e,t){return o(this,null,function*(){let i=`${g}${d(t)}`,s=yield a.getItemAsync(i);if(s==null)throw new Error(`No pending key found for public key: ${t}`);yield a.setItemAsync(`${u}${e}`,s),yield a.setItemAsync(`${u}${e}_pub`,c(t)),yield a.deleteItemAsync(i)})}getKey(e){return o(this,null,function*(){let t=yield a.getItemAsync(`${u}${e}_pub`);return t==null?null:c(t)})}hasKey(e){return o(this,null,function*(){let t=yield this.getPublicKeyIndex(),i=c(e);return t.some(s=>c(s)===i)})}signMessage(e,t){return o(this,null,function*(){let i=yield a.getItemAsync(`${u}${e}`);if(i==null)throw new Error(`No key found for address: ${e}`);let s=$(i),l=I(t),f=m.sign(l,s,{lowS:!0,prehash:!0});return{r:`0x${f.r.toString(16).padStart(64,"0")}`,s:`0x${f.s.toString(16).padStart(64,"0")}`}})}deleteKey(e){return o(this,null,function*(){let t=yield a.getItemAsync(`${u}${e}_pub`);yield a.deleteItemAsync(`${u}${e}`),yield a.deleteItemAsync(`${u}${e}_pub`),t!=null&&(yield this.untrackPublicKey(t))})}deletePendingKey(e){return o(this,null,function*(){yield a.deleteItemAsync(`${g}${d(e)}`),yield this.untrackPublicKey(e)})}getDeviceName(){var i,s,l;let e=(s=(i=y.deviceName)!=null?i:y.modelName)!=null?s:y.brand,t=y.osName;return e!=null&&t!=null?`${e} (${t})`:(l=e!=null?e:t)!=null?l:"Unknown Device"}getPublicKeyIndex(){return o(this,null,function*(){let e=yield a.getItemAsync(w);if(e==null)return[];try{return JSON.parse(e)}catch(t){return[]}})}savePublicKeyIndex(e){return o(this,null,function*(){yield a.setItemAsync(w,JSON.stringify(e))})}trackPublicKey(e){return o(this,null,function*(){this.indexUpdateLock=this.indexUpdateLock.catch(()=>{}).then(()=>o(this,null,function*(){let t=yield this.getPublicKeyIndex(),i=c(e);t.some(s=>c(s)===i)||(t.push(i),yield this.savePublicKeyIndex(t))})),yield this.indexUpdateLock})}untrackPublicKey(e){return o(this,null,function*(){this.indexUpdateLock=this.indexUpdateLock.catch(()=>{}).then(()=>o(this,null,function*(){let t=yield this.getPublicKeyIndex(),i=c(e),s=t.filter(l=>c(l)!==i);yield this.savePublicKeyIndex(s)})),yield this.indexUpdateLock})}}});export{p as a,E as b,U as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _exposecurestore = require('expo-secure-store'); var e = _interopRequireWildcard(_exposecurestore);var a=class{get(t){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){try{let r=yield e.getItemAsync(t);if(!r)return;try{let o=JSON.parse(r);if(o.expiresAt&&new Date(o.expiresAt)<new Date){yield this.remove(t);return}return o.value}catch(o){return r}}catch(r){console.error("Error reading from SecureStore:",r);return}})}set(t,r,o){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){try{if(o){let s=JSON.stringify({value:r,expiresAt:o});yield e.setItemAsync(t,s)}else yield e.setItemAsync(t,r)}catch(s){console.error("Error writing to SecureStore:",s)}})}remove(t){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){try{yield e.deleteItemAsync(t)}catch(r){console.error("Error removing from SecureStore:",r)}})}isAvailable(){return _chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){try{return yield e.isAvailableAsync()}catch(t){return!1}})}};exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.1.1",repository:"https://github.com/Crossmint/crossmint-sdk",license:"Apache-2.0",author:"Paella Labs Inc",sideEffects:!1,main:"./dist/index.js",module:"./dist/index.mjs",types:"./dist/index.d.ts",files:["dist","ios","android","expo-module.config.json","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch","generate:docs":"typedoc && node scripts/generate-reference.mjs"},dependencies:{"@crossmint/client-sdk-auth":"workspace:*","@crossmint/client-sdk-base":"workspace:*","@crossmint/client-sdk-react-base":"workspace:*","@crossmint/client-sdk-rn-window":"workspace:*","@crossmint/client-signers":"workspace:*","@crossmint/common-sdk-auth":"workspace:*","@crossmint/common-sdk-base":"workspace:*","@crossmint/wallets-sdk":"workspace:*","@noble/curves":"1.9.7","@solana/web3.js":"1.98.1",bs58:"^5.0.0","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8","lodash.clonedeep":"4.5.0","lodash.isequal":"4.5.0",mitt:"3.0.1","react-native-get-random-values":"2.0.0","react-native-svg":"15.14.0","react-native-webview":"13.15.0",zod:"3.22.4"},devDependencies:{"@expo/config-plugins":"^9.0.17","@types/react":"19.1.10","expo-modules-core":"~3.0.29",typedoc:"0.28.16"},peerDependencies:{"@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-modules-core":">=2.0.0",react:">=17.0.2","react-native":">=0.74.3"}};export{o as a};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{i as r,j as s}from"./chunk-SOJZCPJL.mjs";s();import{withDangerousMod as d}from"@expo/config-plugins";import _ from"path";import l from"fs";var g=a=>d(a,["ios",i=>r(void 0,null,function*(){let t=_.join(i.modRequest.platformProjectRoot,"Podfile"),e=l.readFileSync(t,"utf8");e.includes("CROSSMINT_RN_PREBUILT_FIX")||(e=e.replace(/(ENV\['RCT_USE_RN_DEP'\][^\n]+\n)(ENV\['RCT_USE_PREBUILT_RNCORE'\][^\n]+\n)/,`$1$2ENV.delete('RCT_USE_RN_DEP') # CROSSMINT_RN_PREBUILT_FIX
|
|
2
2
|
ENV.delete('RCT_USE_PREBUILT_RNCORE') # CROSSMINT_RN_PREBUILT_FIX
|
|
3
|
-
`));let n="# @crossmint/expo-device-signer: CrossmintDeviceSigner autolinking exclusion";if(!e.includes(n)){let
|
|
3
|
+
`));let n="# @crossmint/expo-device-signer: CrossmintDeviceSigner autolinking exclusion";if(!e.includes(n)){let c=` ${n}
|
|
4
4
|
# RN 0.82 removed CallInvoker.h from TurboModuleUtils.h, breaking
|
|
5
5
|
# expo-modules-core@3.x. Inject it via a prefix header for that pod.
|
|
6
6
|
require 'fileutils'
|
|
@@ -35,4 +35,4 @@ ENV.delete('RCT_USE_PREBUILT_RNCORE') # CROSSMINT_RN_PREBUILT_FIX
|
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
`,o=e.replace(/(post_install do \|installer\|)/,`$1
|
|
38
|
-
${
|
|
38
|
+
${c}`);if(o===e)throw new Error("[crossmint/client-sdk-react-native-ui] Could not inject post_install hook: expected 'post_install do |installer|' in Podfile");e=o}return l.writeFileSync(t,e),i})]);export{g as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./chunk-SOJZCPJL.mjs";n();function f(i,r){let e=i.manifest;return e.queries||(e.queries=[]),e.queries.push(r),i}export{f as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as d}from"./chunk-6EHK6FE4.mjs";import{a as e,j as o}from"./chunk-SOJZCPJL.mjs";o();import{jsx as m}from"react/jsx-runtime";function n(t){return m(d,e({},t))}export{n as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./chunk-SOJZCPJL.mjs";i();import{Platform as r}from"react-native";import*as e from"expo-device";var o=e.osVersion||"0",l=e.modelName||"Unknown",m=r.OS==="ios"?`Mozilla/5.0 (iPhone; CPU iPhone OS ${o.toString().replace(/\./g,"_")} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/${Math.floor(Number(o)/2)}.0 Mobile/15E148 Safari/604.1`:`Mozilla/5.0 (Linux; Android ${o}; ${l}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36`;export{o as a,l as b,m as c};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as O}from"./chunk-NAZHVLXC.mjs";import{d as v,i as c,j as h}from"./chunk-SOJZCPJL.mjs";h();import{createContext as L,useEffect as E,useMemo as T,useState as W,useCallback as B}from"react";import*as n from"expo-web-browser";import d from"expo-constants";import{Platform as z}from"react-native";import{CrossmintAuthBaseProvider as F,useCrossmintAuthBase as G}from"@crossmint/client-sdk-react-base";h();import{useCrossmint as M,useWallet as Z,useWalletOtpSigner as tt}from"@crossmint/client-sdk-react-base";h();import{useContext as I}from"react";function b(){let r=I(y);if(r==null)throw new Error("useCrossmintAuth must be used within a CrossmintAuthProvider");return r}import{jsx as g}from"react/jsx-runtime";var N={google:null,twitter:null},V={crossmintAuth:void 0,login:()=>{},logout:()=>c(void 0,null,function*(){}),jwt:void 0,user:void 0,status:"initializing",getUser:()=>{},loginWithOAuth:()=>Promise.resolve(),createAuthSession:()=>Promise.resolve(null)},y=L(V);function _({children:r}){let{setJwt:e}=M(),{jwt:t}=b();return E(()=>{e(t)},[e,t]),r}function D({children:r,appSchema:e}){let t=G(),[l,f]=W(N),[C,i]=W(!1),p=Array.isArray(e)?e[0]:e,w=d.executionEnvironment==="storeClient"||d.appOwnership==="expo"||!!d.expoVersion?"exp://127.0.0.1:8081":p,x=B(()=>c(this,null,function*(){try{let u=Object.keys(N).map(s=>c(this,null,function*(){var A;let m=yield(A=t.crossmintAuth)==null?void 0:A.getOAuthUrl(s,{appSchema:w});return{[s]:m}})),a=Object.assign({},...yield Promise.all(u));f(a)}catch(o){console.error(o)}}),[t.crossmintAuth,w]);E(()=>{t.user==null&&x()},[x,t.user]);let j=()=>t.status==="initializing"?"initializing":C?"in-progress":t.jwt!=null?"logged-in":"logged-out",k=o=>c(this,null,function*(){var u,a;try{i(!0);let s=(a=l[o])!=null?a:yield(u=t.crossmintAuth)==null?void 0:u.getOAuthUrl(o,{appSchema:w});yield n.warmUpAsync();let m=new URL(s);if(o==="google"&&m.searchParams.append("provider_prompt","select_account"),z.OS==="android")yield n.openBrowserAsync(m.toString());else{let A=yield n.openAuthSessionAsync(m.toString());A.type==="success"&&(yield S(A.url))}yield n.coolDownAsync()}catch(s){throw console.error("[CrossmintAuthProvider] Error during OAuth login:",s),new Error(`Error during OAuth login: ${s}`)}finally{i(!1)}}),S=B(o=>c(this,null,function*(){var a;let u=o.includes("://")?J(o):o;if(u!=null)try{return i(!0),yield(a=t.crossmintAuth)==null?void 0:a.handleRefreshAuthMaterial(u)}catch(s){throw s}finally{i(!1)}return null}),[t.crossmintAuth]);return g(y.Provider,{value:{crossmintAuth:t.crossmintAuth,logout:t.logout,jwt:t.jwt,user:t.user,status:j(),getUser:t.getUser,login:()=>{},loginWithOAuth:k,createAuthSession:S},children:g(_,{children:r})})}function ct(t){var l=t,{children:r}=l,e=v(l,["children"]);var i,p;let f=(p=e.appSchema)!=null?p:(i=d.expoConfig)==null?void 0:i.scheme,C=T(()=>{var P;return(P=e.storageProvider)!=null?P:new O},[e.storageProvider]);return g(F,{onLoginSuccess:e.onLoginSuccess,refreshRoute:e.refreshRoute,logoutRoute:e.logoutRoute,storageProvider:C,children:g(D,{appSchema:f,children:r})})}var J=r=>{let e=/[?&]oneTimeSecret=([^&#]+)/,t=r.match(e);return t?decodeURIComponent(t[1]):void 0};export{y as a,ct as b,b as c,M as d,Z as e,tt as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./chunk-SOJZCPJL.mjs";o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var a=Object.defineProperty,g=Object.defineProperties,h=Object.getOwnPropertyDescriptor,x=Object.getOwnPropertyDescriptors,u=Object.getOwnPropertyNames,n=Object.getOwnPropertySymbols;var f=Object.prototype.hasOwnProperty,s=Object.prototype.propertyIsEnumerable;var l=(t,e,o)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,P=(t,e)=>{for(var o in e||(e={}))f.call(e,o)&&l(t,o,e[o]);if(n)for(var o of n(e))s.call(e,o)&&l(t,o,e[o]);return t},R=(t,e)=>g(t,x(e));var T=(t=>typeof require!="undefined"?require:typeof Proxy!="undefined"?new Proxy(t,{get:(e,o)=>(typeof require!="undefined"?require:e)[o]}):t)(function(t){if(typeof require!="undefined")return require.apply(this,arguments);throw Error('Dynamic require of "'+t+'" is not supported')});var U=(t,e)=>{var o={};for(var m in t)f.call(t,m)&&e.indexOf(m)<0&&(o[m]=t[m]);if(t!=null&&n)for(var m of n(t))e.indexOf(m)<0&&s.call(t,m)&&(o[m]=t[m]);return o};var D=(t,e)=>()=>(t&&(e=t(t=0)),e);var b=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),j=(t,e)=>{for(var o in e)a(t,o,{get:e[o],enumerable:!0})},F=(t,e,o,m)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of u(e))!f.call(t,r)&&r!==o&&a(t,r,{get:()=>e[r],enumerable:!(m=h(e,r))||m.enumerable});return t};var k=t=>F(a({},"__esModule",{value:!0}),t);var q=(t,e,o)=>new Promise((m,r)=>{var _=i=>{try{p(o.next(i))}catch(c){r(c)}},d=i=>{try{p(o.throw(i))}catch(c){r(c)}},p=i=>i.done?m(i.value):Promise.resolve(i.value).then(_,d);p((o=o.apply(t,e)).next())});import{fileURLToPath as y}from"url";import A from"path";var L=D(()=>{"use strict"});export{P as a,R as b,T as c,U as d,D as e,b as f,j as g,k as h,q as i,L as j};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as H}from"./chunk-BP63EHIH.mjs";import{a as _}from"./chunk-VG3RYWDG.mjs";import{a as K}from"./chunk-TJRVTCJX.mjs";import{a as z}from"./chunk-7UXEUMEA.mjs";import{a as W,b as G,i as b,j as A}from"./chunk-SOJZCPJL.mjs";A();import{useCallback as S,useRef as g,useMemo as E,useEffect as B,useState as ne,useContext as te}from"react";import{Platform as ae,View as oe}from"react-native";import{RNWebView as se,WebViewParent as ie}from"@crossmint/client-sdk-rn-window";import{environmentUrlConfig as j,signerInboundEvents as ce,signerOutboundEvents as le,SignerErrorCode as ue}from"@crossmint/client-signers";import{validateAPIKey as de}from"@crossmint/common-sdk-base";import{CrossmintWalletBaseProvider as we,CrossmintWalletBaseContext as F,useCrossmint as fe}from"@crossmint/client-sdk-react-base";import{useLogger as ve}from"@crossmint/client-sdk-react-base";import{Fragment as be,jsx as p,jsxs as J}from"react/jsx-runtime";var L="Passkey signers are not supported in React Native. Use a different signer type such as 'device', or 'external-wallet'.";function me(c){var i,v;return c==null?!1:!!(((i=c.recovery)==null?void 0:i.type)==="passkey"||(v=c.signers)!=null&&v.some(m=>m.type==="passkey"))}function pe({children:c}){let i=te(F),v=S(d=>b(this,null,function*(){var R,I;if(((R=d.recovery)==null?void 0:R.type)==="passkey"||(I=d.signers)!=null&&I.some(r=>r.type==="passkey"))throw new Error(L);return i.createWallet(d)}),[i.createWallet]),m=S(d=>b(this,null,function*(){throw new Error(L)}),[]),V=E(()=>G(W({},i),{createWallet:v,createPasskeySigner:m}),[i,v,m]);return p(F.Provider,{value:V,children:c})}function he({children:c,createOnLogin:i,appearance:v,showOtpSignerPrompt:m=!0,callbacks:V,deviceSignerKeyStorage:d}){let R=E(()=>d!=null?d:H(),[]),{crossmint:I}=fe("CrossmintWalletProvider must be used within CrossmintProvider"),r=ve(_),{apiKey:N,appId:O}=I,D=E(()=>{let e=de(N);if(!e.isValid)throw new Error("Invalid API key");return e},[N]),Y=E(()=>j[D.environment],[D.environment]),y=g(null),t=g(null),[T,$]=ne(!1),C=g(!1),l=g(!1),s=g(0),M=g(0),q=E(()=>O!=null?{crossmintAppId:O}:{},[O]),w=S(e=>b(this,null,function*(){if(t.current!=null){let n=t.current;if(l.current){r.info("react-native.wallet.webview.handshake.skip.in-progress",{trigger:e,generation:s.current});return}if(C.current&&n.isConnected){r.info("react-native.wallet.webview.handshake.skip.already-connected",{trigger:e,generation:s.current});return}l.current=!0;let a=Date.now();M.current=a;let o=s.current;try{r.info("react-native.wallet.webview.handshake.start",{trigger:e,generation:o,platform:ae.OS}),C.current=!0,n.isConnected=!1,yield n.handshakeWithChild();let u=Date.now()-a;r.info("react-native.wallet.webview.handshake.success",{trigger:e,generation:o,durationMs:u})}catch(u){let f=Date.now()-a;o===s.current&&(C.current=!1),r.error("react-native.wallet.webview.handshake.error",{trigger:e,generation:o,durationMs:f,error:u instanceof Error?u.message:String(u)}),console.error("[CrossmintWalletProvider] Handshake error:",u)}finally{o===s.current&&(l.current=!1)}}else r.warn("react-native.wallet.webview.handshake.skip",{trigger:e,reason:"parent not initialized"})}),[r]);B(()=>{y.current!=null&&t.current==null&&(r.info("react-native.wallet.webview.initializing"),t.current=new ie(y,{incomingEvents:le,outgoingEvents:ce,handshakeOptions:{timeoutMs:3e4,intervalMs:100},recovery:{recoverableErrorCodes:[ue.IndexedDbFatal]}}),r.info("react-native.wallet.webview.initialized"),w("eager"))},[T,r,w]);let Q=S(()=>b(this,null,function*(){var e,n;r.info("react-native.wallet.webview.onLoadEnd",{handshakeInProgress:l.current,isConnected:(n=(e=t.current)==null?void 0:e.isConnected)!=null?n:!1,generation:s.current}),yield w("onLoadEnd")}),[r,w]),X=S(e=>{var o,u;let n=t.current;if(n==null)return;let a=e.nativeEvent.data;if(a==="frame-ready"){r.info("react-native.wallet.webview.frame-ready.received",{handshakeInProgress:l.current,isConnected:(u=(o=t.current)==null?void 0:o.isConnected)!=null?u:!1,generation:s.current,msSinceHandshakeStart:M.current>0?Date.now()-M.current:null}),w("frame-ready");return}try{let f=JSON.parse(a);if(f&&typeof f.type=="string"&&f.type.startsWith("console.")){let x=f.type.split(".")[1],U=(f.data||[]).map(h=>{try{return h==="[Function]"||h==="[Circular Reference]"||h==="[Unserializable Object]"?h:JSON.parse(h)}catch(ge){return h}}),k=`react-native.wallet.webview.console.${x}`,P={webview_args:U};switch(x){case"log":r.info(k,P);break;case"error":r.error(k,P);break;case"warn":r.warn(k,P);break;case"info":r.info(k,P);break;case"debug":r.debug(k,P);break;default:r.info("react-native.wallet.webview.console.unknown",{webview_method:x,webview_args:U})}return}}catch(f){}n.handleMessage(e)},[r,w]),Z=()=>{if(t.current==null)throw new Error("WebView not ready or handshake incomplete");return t.current},ee=({emailSignerProps:e,phoneSignerProps:n})=>m?J(be,{children:[p(K,W({},e)),p(z,W({},n))]}):null,re=()=>b(this,null,function*(){r.info("react-native.wallet.webview.init.start"),$(!0);let e=0,n=100;for(;t.current==null&&e<n;)yield new Promise(a=>setTimeout(a,50)),e++;if(t.current==null)throw r.error("react-native.wallet.webview.init.timeout",{attempts:e}),new Error("WebView not ready or handshake incomplete");r.info("react-native.wallet.webview.init.success",{attempts:e})});return B(()=>{if(me(i))throw new Error(L)},[i]),J(we,{createOnLogin:i,appearance:v,showOtpSignerPrompt:m,initializeWebView:re,callbacks:V,renderUI:ee,clientTEEConnection:Z,deviceSignerKeyStorage:R,children:[p(pe,{children:c}),T&&p(oe,{style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:p(se,{ref:y,source:{uri:Y},globals:q,onLoadEnd:Q,onMessage:X,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var n,a,o;let e=s.current;s.current++,r.warn("react-native.wallet.webview.process.terminated",{prevGeneration:e,newGeneration:s.current,wasConnected:(a=(n=t.current)==null?void 0:n.isConnected)!=null?a:!1,hadHandshakeInProgress:l.current}),C.current=!1,l.current=!1,t.current!=null&&(t.current.isConnected=!1),(o=y.current)==null||o.reload(),w("eager")},onRenderProcessGone:()=>{var n,a,o;let e=s.current;s.current++,r.warn("react-native.wallet.webview.process.renderGone",{prevGeneration:e,newGeneration:s.current,wasConnected:(a=(n=t.current)==null?void 0:n.isConnected)!=null?a:!1,hadHandshakeInProgress:l.current}),C.current=!1,l.current=!1,t.current!=null&&(t.current.isConnected=!1),(o=y.current)==null||o.reload(),w("eager")},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[j[D.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function xe(c){return p(he,W({},c))}export{xe as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as T}from"./chunk-MVBKLS3P.mjs";import{a as w}from"./chunk-67Z6QY5X.mjs";import{a as k}from"./chunk-XONQWEM5.mjs";import{a as x}from"./chunk-GTBJ6SM6.mjs";import{a as e}from"./chunk-4EBFS2LY.mjs";import{a as C}from"./chunk-7573EHPC.mjs";import{j as f}from"./chunk-SOJZCPJL.mjs";f();import{View as l,Modal as R,StyleSheet as B,Dimensions as E,TouchableOpacity as z,Text as I}from"react-native";import{jsx as t,jsxs as S}from"react/jsx-runtime";var{width:D}=E.get("window");function j({email:i,open:n,setOpen:O,step:v,onSubmitOTP:P,onResendOTPCode:V,onSubmitEmail:M,rejectRef:r,appearance:o}){var m,u,c,g,b,h;function s(){var y;n&&((y=r.current)==null||y.call(r,new Error),O(!1))}let d=B.create({centeredView:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalView:{backgroundColor:((m=o==null?void 0:o.colors)==null?void 0:m.background)||e["cm-background-primary"],borderRadius:(o==null?void 0:o.borderRadius)||12,padding:32,alignItems:"center",width:Math.min(D-32,400),maxHeight:"80%",position:"relative",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:5},closeButton:{position:"absolute",top:16,right:16,width:32,height:32,borderRadius:6,backgroundColor:((u=o==null?void 0:o.colors)==null?void 0:u.inputBackground)||e["cm-muted-primary"],alignItems:"center",justifyContent:"center",zIndex:1}});return n?t(R,{visible:n,transparent:!0,animationType:"fade",onRequestClose:s,statusBarTranslucent:!0,children:t(l,{style:d.centeredView,children:S(l,{style:d.modalView,children:[t(z,{style:d.closeButton,onPress:s,hitSlop:{top:10,bottom:10,left:10,right:10},children:t(k,{size:16,color:((c=o==null?void 0:o.colors)==null?void 0:c.textSecondary)||e["cm-text-secondary"]})}),v==="initial"?t(T,{contactInfo:i!=null?i:"",contactType:"email",icon:t(w,{size:22,color:((g=o==null?void 0:o.colors)==null?void 0:g.textPrimary)||e["cm-text-primary"]}),onConfirm:M,onCancel:s,appearance:o}):t(x,{contactInfo:i!=null?i:"",contactType:"email",icon:t(l,{style:{backgroundColor:((b=o==null?void 0:o.colors)==null?void 0:b.accent)||e["cm-accent"],borderRadius:999,padding:12},children:t(C,{size:22,color:((h=o==null?void 0:o.colors)==null?void 0:h.background)||e["cm-background-primary"]})}),title:"Check your email",description:S(I,{children:["A temporary login code has been sent to"," ",t(I,{style:{fontWeight:"bold"},children:i})]}),helpText:`Can't find the email? Check spam folder.
|
|
2
|
+
Some emails may take several minutes to arrive.`,onSubmitOTP:P,onResendCode:V,appearance:o,otpLength:9,keyboardType:"default",autoComplete:"one-time-code",textContentType:"oneTimeCode"})]})})}):null}export{j as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDCWNSPWCjs = require('./chunk-DCWNSPWC.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var I=_chunk4EVH2LVPjs.f.call(void 0, (P,n)=>{n.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABPElEQVR4AdzVW1ICMRCF4ajL8FnXoetwLZZaLkzX4VpU6C+kh2Go4RZ4gcrJpZP+TxJCcVsu/Lkug/e4rb/QolO/kY8VTSl5RQJvEclxdE8ud5GJhTkYvEZQeYzqplMYgSiVmTvO9sVMp+5bfmXWqgU0w9EMTpBr+RrnTQ3MMfFFW2x8iJ5ikRy50V2XqcFzTH2EFIv3mQDbMcn5jgojmlWZGlgAOjaxM7FVxroWA2YiKgccw7hqalCDUUn2miTFsORpwAhYzBwgsBzjDc0Z5CJJYxNgYmINMDEx3tI+AwlMxqcBYyqmb82sDjHI5DSyY/2M72yPMdgJmpu8HoP/dsSH1vY0yajMvKLPRvyJ1g+rRxiBKZWZBl6Fp1ddzXYIAwtz+D/AE/Bn4X33CAMLc8OgBs5d5RWdmzvwlgAAAP//5FxmQQAAAAZJREFUAwDOiFAxJLPlDQAAAABJRU5ErkJggg=="});_chunk4EVH2LVPjs.j.call(void 0, );var _jsxruntime = require('react/jsx-runtime');function l({size:c=22,color:p,strokeWidth:e=2}){return _jsxruntime.jsx.call(void 0, _chunkDCWNSPWCjs.a,{source:I(),size:c,color:p})}exports.a = l;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-AXQNJ6P5.mjs";import{f as e,j as o}from"./chunk-SOJZCPJL.mjs";var n=e((Q,m)=>{m.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAAAxUlEQVR4AeyVbQrCQAxEqx5F9Gyi51E8m+JR/Ji3mIXQlM0PhUK3ZJZt8oa0oXTXw5+vqQZn9X1K76Rg8Qj3ETUAPAqLakqHAYsHrwMouIRuDhKx17JKClboYF72RVEDy90LkVuMNW91jRK18qNNb9AcZB9RH1FzAk1geV/RTTN5SOmY3Yj472/Tjy8weoOX8sSOJSljzVttUYPrt8q8s2cyLDbzsi+KGpxUuUijp1FuKmDx4HVM1AAAcKNN9kyGxSOLjw8AAAD//6BjmDAAAAAGSURBVAMAy+IoMbHLqDcAAAAASUVORK5CYII="});o();import{jsx as t}from"react/jsx-runtime";function D({size:p=22,color:c,strokeWidth:I=2}){return t(r,{source:n(),size:p,color:c})}export{D as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-O4HZNHTS.mjs";import{j as D}from"./chunk-SOJZCPJL.mjs";D();import{SdkLogger as R,ReactNativeDatadogSink as S,validateAPIKey as b}from"@crossmint/common-sdk-base";import{AppState as w}from"react-native";import I from"expo-constants";import*as e from"expo-device";function j(n,i){var s,c,f,g,v,m,u,l,p,k,L;let t=b(n);if(!t.isValid)throw new Error(`Invalid API key: ${t.message}`);let{environment:d,projectId:N}=t,a=new R({packageName:r.name,packageVersion:r.version,environment:d,projectId:N,platform:"react-native",consoleLogLevel:i}),h=(m=(v=(c=(s=I.expoConfig)==null?void 0:s.ios)==null?void 0:c.bundleIdentifier)!=null?v:(g=(f=I.expoConfig)==null?void 0:f.android)==null?void 0:g.package)!=null?m:void 0,o={};e!=null&&(o.device=(p=(l=(u=e.modelName)!=null?u:e.deviceName)!=null?l:e.brand)!=null?p:void 0,o.os_version=(k=e.osVersion)!=null?k:void 0,o.os_name=(L=e.osName)!=null?L:void 0);let C=new S(d,h,o);return a.addSink(C),y(a),a}function y(n){w.addEventListener("change",i=>{(i==="background"||i==="inactive")&&typeof n.flush=="function"&&n.flush()})}export{j as a};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEUIDKBS7js = require('./chunk-EUIDKBS7.js');var _chunkWJP5GQ35js = require('./chunk-WJP5GQ35.js');var _chunk37TKX2ASjs = require('./chunk-37TKX2AS.js');var _chunk7AMJYMILjs = require('./chunk-7AMJYMIL.js');var _chunkNBK4T7QJjs = require('./chunk-NBK4T7QJ.js');var _chunkFHG7Y3B2js = require('./chunk-FHG7Y3B2.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _reactnative = require('react-native');var _jsxruntime = require('react/jsx-runtime');var{width:U}=_reactnative.Dimensions.get("window");function L({phone:i,open:n,setOpen:O,step:x,onSubmitOTP:I,onResendOTPCode:M,onSubmitPhone:R,rejectRef:r,appearance:o}){var m,u,c,g,y,b;function s(){var h;n&&((h=r.current)==null||h.call(r,new Error("User cancelled")),O(!1))}let l=_reactnative.StyleSheet.create({modalOverlay:{flex:1,backgroundColor:"rgba(0, 0, 0, 0.5)",justifyContent:"center",alignItems:"center",padding:16},modalContainer:{backgroundColor:((m=o==null?void 0:o.colors)==null?void 0:m.background)||_chunkFHG7Y3B2js.a["cm-background-primary"],borderRadius:(o==null?void 0:o.borderRadius)||12,padding:32,width:Math.min(U-32,400),maxHeight:"80%",position:"relative",alignItems:"center",shadowColor:"#000",shadowOffset:{width:0,height:2},shadowOpacity:.25,shadowRadius:4,elevation:5},closeButton:{position:"absolute",top:16,right:16,width:32,height:32,borderRadius:6,backgroundColor:((u=o==null?void 0:o.colors)==null?void 0:u.inputBackground)||_chunkFHG7Y3B2js.a["cm-muted-primary"],alignItems:"center",justifyContent:"center",zIndex:1}});return n?_jsxruntime.jsx.call(void 0, _reactnative.Modal,{visible:n,transparent:!0,animationType:"fade",onRequestClose:s,statusBarTranslucent:!0,children:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:l.modalOverlay,children:_jsxruntime.jsxs.call(void 0, _reactnative.View,{style:l.modalContainer,children:[_jsxruntime.jsx.call(void 0, _reactnative.TouchableOpacity,{style:l.closeButton,onPress:s,hitSlop:{top:10,bottom:10,left:10,right:10},children:_jsxruntime.jsx.call(void 0, _chunk7AMJYMILjs.a,{size:16,color:((c=o==null?void 0:o.colors)==null?void 0:c.textSecondary)||_chunkFHG7Y3B2js.a["cm-text-secondary"]})}),x==="initial"?_jsxruntime.jsx.call(void 0, _chunkEUIDKBS7js.a,{contactInfo:i!=null?i:"",contactType:"phone",icon:_jsxruntime.jsx.call(void 0, _chunkWJP5GQ35js.a,{size:22,color:((g=o==null?void 0:o.colors)==null?void 0:g.textPrimary)||_chunkFHG7Y3B2js.a["cm-text-primary"]}),onConfirm:R,onCancel:s,appearance:o}):_jsxruntime.jsx.call(void 0, _chunkNBK4T7QJjs.a,{contactInfo:i!=null?i:"",contactType:"phone",icon:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:{backgroundColor:((y=o==null?void 0:o.colors)==null?void 0:y.accent)||_chunkFHG7Y3B2js.a["cm-accent"],borderRadius:999,padding:12},children:_jsxruntime.jsx.call(void 0, _chunk37TKX2ASjs.a,{size:22,color:((b=o==null?void 0:o.colors)==null?void 0:b.background)||_chunkFHG7Y3B2js.a["cm-background-primary"]})}),title:"Check your phone",description:_jsxruntime.jsxs.call(void 0, _reactnative.Text,{children:["A temporary login code has been sent via SMS to"," ",_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:{fontWeight:"bold"},children:i})]}),helpText:`Can't receive the SMS? Check your phone number.
|
|
2
|
+
Some messages may take several minutes to arrive.`,onSubmitOTP:I,onResendCode:M,appearance:o,otpLength:10,keyboardType:"number-pad",autoComplete:"sms-otp",textContentType:"oneTimeCode"})]})})}):null}exports.a = L;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-PZXSKAWQ.mjs";import{j as e}from"./chunk-SOJZCPJL.mjs";e();import{withAndroidManifest as r,AndroidConfig as l}from"@expo/config-plugins";var{addMetaDataItemToMainApplication:d,getMainApplicationOrThrow:m}=l.Manifest,p=(n,i={enableGooglePay:!1})=>i.enableGooglePay?r(n,o=>{let t=m(o.modResults);return d(t,"com.google.android.gms.wallet.api.enabled","true"),o.modResults=a(o.modResults,{intent:[{action:[{$:{"android:name":"org.chromium.intent.action.PAY"}}]},{action:[{$:{"android:name":"org.chromium.intent.action.IS_READY_TO_PAY"}}]},{action:[{$:{"android:name":"org.chromium.intent.action.UPDATE_PAYMENT_DETAILS"}}]}]}),o}):n;export{p as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as C}from"./chunk-UYWLWCLN.mjs";import{j as d}from"./chunk-SOJZCPJL.mjs";d();import{useMemo as l}from"react";import a from"expo-constants";import{CrossmintProvider as x,createLoggerContext as L}from"@crossmint/client-sdk-react-base";import{jsx as g}from"react/jsx-runtime";var P=L();function y({children:c,apiKey:o,overrideBaseUrl:v,appId:e,consoleLogLevel:r}){var t,i,s,n,m;let f=l(()=>C(o,r),[o,r]),p=(m=e!=null?e:(i=(t=a.expoConfig)==null?void 0:t.ios)==null?void 0:i.bundleIdentifier)!=null?m:(n=(s=a.expoConfig)==null?void 0:s.android)==null?void 0:n.package;return g(P.Provider,{value:f,children:g(x,{apiKey:o,appId:p,overrideBaseUrl:v,children:c})})}export{P as a,y as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./chunk-SOJZCPJL.mjs";o();
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _reactnative = require('react-native');var _expodevice = require('expo-device'); var e = _interopRequireWildcard(_expodevice);var o=e.osVersion||"0",l= exports.b =e.modelName||"Unknown",a= exports.c =_reactnative.Platform.OS==="ios"?`Mozilla/5.0 (iPhone; CPU iPhone OS ${o.toString().replace(/\./g,"_")} like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/${Math.floor(Number(o)/2)}.0 Mobile/15E148 Safari/604.1`:`Mozilla/5.0 (Linux; Android ${o}; ${l}) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.181 Mobile Safari/537.36`;exports.a = o; exports.b = l; exports.c = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./chunk-SOJZCPJL.mjs";e();import r from"mitt";var n=r();export{n as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDCWNSPWCjs = require('./chunk-DCWNSPWC.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var p=_chunk4EVH2LVPjs.f.call(void 0, (D,i)=>{i.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABZ0lEQVR4AbTUC1LDMAwE0MDFgJMBJwNOBn4ZLyNcUuzSdroj67crxWnvtxt/qsBj03pr+CzgvzT/4m8EkCAjUsn4zy3ANrP+jcBDb31t9q6A39yNCLuMCGRCm1SS+MnX3NQ5Au+9+mKi3n9iInCSuFYgAh+dcNxg9HvZvIlAHlEuOwzeLOdctvMSIpCmOnEuGHnOqZu2EbABaIxI/HErNdOIgAaTsnnnCQDBf2+AGBkgBLEqmpj4NOoGmvI2uVyEBCMitrzJKIAghHlUY4xvGHAmfPgHOQqkyeQ2QJBYFUYKhlCnJuB/x38TUFjJqshTS0YcUXM3scM/yCMBJFXEtMjEEcqBs5hckIH2AY4EFCsMgWLPWSw555Fc7gfOCShEQMS0fM+2ComdxV8CaTZtRMSqkJwNQY7PGm6bFdCg0WUSAjFC4I7Adny5/Te1IqAJCEEVMy3Isx6rmqUNNI9AAgiBKEtkr/0CAAD//0s8Y9YAAAAGSURBVAMAIbpVMfA3cdgAAAAASUVORK5CYII="});_chunk4EVH2LVPjs.j.call(void 0, );var _jsxruntime = require('react/jsx-runtime');function t({size:c=22,color:n,strokeWidth:e=2}){return _jsxruntime.jsx.call(void 0, _chunkDCWNSPWCjs.a,{source:p(),size:c,color:n})}exports.a = t;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./chunk-SOJZCPJL.mjs";o();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkDCWNSPWCjs = require('./chunk-DCWNSPWC.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');var i=_chunk4EVH2LVPjs.f.call(void 0, (p,e)=>{e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABV0lEQVR4AdzUXVKDQBAEYPRi6snUk+nNdL4pmiIEE5DkJSl6l52Z7t4/8jzc+fdYBq+1W1+Fn4Og8VEa/WSLBCSYdOJAQ+O9+PohBi8V8HxW83QQNEpiYDIZtJvoDfA9arRmVjDG2tV2Zby3x7XVE29pIGFpDlqx8RaYLQ7uSf3S4K2y8z28ZkLYjKGog+2hMeS3NFBAdG5iZmLhpBcjzEQMhzgN48bSoIPVILtNSDWczoYYEM52EFSLo/YEfxmkCGluQhiYEDZjSP1Zf80AgYkZxoiwd8Le1SwhD9N3sCxYG8eIsPe1msTkYZdByLv6LVu0S3Asdk53WwFxl6C9soIcVrt2ZlujHlIdcXodj0GfeFW52z6sS2hi1Xr8C+MQBjMn7iLIT4csyETfiY0NIRzC4F1somcFAmYm6c5fgjr1AU4m5z3x7ucGHfhnw/RMnNatDGit4hcAAP//I+bVpgAAAAZJREFUAwC4slUxPmyOTgAAAABJRU5ErkJggg=="});_chunk4EVH2LVPjs.j.call(void 0, );var _jsxruntime = require('react/jsx-runtime');function v({size:n=22,color:t,strokeWidth:I=2}){return _jsxruntime.jsx.call(void 0, _chunkDCWNSPWCjs.a,{source:i(),size:n,color:t})}exports.a = v;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-AXQNJ6P5.mjs";import{f as I,j as o}from"./chunk-SOJZCPJL.mjs";var p=I((D,i)=>{i.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAYCAYAAADgdz34AAABZ0lEQVR4AbTUC1LDMAwE0MDFgJMBJwNOBn4ZLyNcUuzSdroj67crxWnvtxt/qsBj03pr+CzgvzT/4m8EkCAjUsn4zy3ANrP+jcBDb31t9q6A39yNCLuMCGRCm1SS+MnX3NQ5Au+9+mKi3n9iInCSuFYgAh+dcNxg9HvZvIlAHlEuOwzeLOdctvMSIpCmOnEuGHnOqZu2EbABaIxI/HErNdOIgAaTsnnnCQDBf2+AGBkgBLEqmpj4NOoGmvI2uVyEBCMitrzJKIAghHlUY4xvGHAmfPgHOQqkyeQ2QJBYFUYKhlCnJuB/x38TUFjJqshTS0YcUXM3scM/yCMBJFXEtMjEEcqBs5hckIH2AY4EFCsMgWLPWSw555Fc7gfOCShEQMS0fM+2ComdxV8CaTZtRMSqkJwNQY7PGm6bFdCg0WUSAjFC4I7Adny5/Te1IqAJCEEVMy3Isx6rmqUNNI9AAgiBKEtkr/0CAAD//0s8Y9YAAAAGSURBVAMAIbpVMfA3cdgAAAAASUVORK5CYII="});o();import{jsx as P}from"react/jsx-runtime";function y({size:c=22,color:n,strokeWidth:e=2}){return P(r,{source:p(),size:c,color:n})}export{y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk3FBCOA5Qjs = require('./chunk-3FBCOA5Q.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _commonsdkbase = require('@crossmint/common-sdk-base');var _reactnative = require('react-native');var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _expodevice = require('expo-device'); var e = _interopRequireWildcard(_expodevice);function _(n,i){var s,c,f,g,v,m,u,l,p,k,L;let t=_commonsdkbase.validateAPIKey.call(void 0, n);if(!t.isValid)throw new Error(`Invalid API key: ${t.message}`);let{environment:d,projectId:N}=t,a=new (0, _commonsdkbase.SdkLogger)({packageName:_chunk3FBCOA5Qjs.a.name,packageVersion:_chunk3FBCOA5Qjs.a.version,environment:d,projectId:N,platform:"react-native",consoleLogLevel:i}),h=(m=(v=(c=(s=_expoconstants2.default.expoConfig)==null?void 0:s.ios)==null?void 0:c.bundleIdentifier)!=null?v:(g=(f=_expoconstants2.default.expoConfig)==null?void 0:f.android)==null?void 0:g.package)!=null?m:void 0,o={};e!=null&&(o.device=(p=(l=(u=e.modelName)!=null?u:e.deviceName)!=null?l:e.brand)!=null?p:void 0,o.os_version=(k=e.osVersion)!=null?k:void 0,o.os_name=(L=e.osName)!=null?L:void 0);let C=new (0, _commonsdkbase.ReactNativeDatadogSink)(d,h,o);return a.addSink(C),y(a),a}function y(n){_reactnative.AppState.addEventListener("change",i=>{(i==="background"||i==="inactive")&&typeof n.flush=="function"&&n.flush()})}exports.a = _;
|