@crossmint/client-sdk-react-native-ui 1.1.13 → 1.2.0

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.
Files changed (51) hide show
  1. package/dist/{chunk-NKQULQ2K.mjs → chunk-2Z7H7ZOJ.mjs} +1 -1
  2. package/dist/{chunk-UCVMMUSM.mjs → chunk-54ZSDFQE.mjs} +1 -1
  3. package/dist/{chunk-MIEAYZKV.js → chunk-B5WVGQSC.js} +1 -1
  4. package/dist/chunk-BQWVOXAH.mjs +1 -0
  5. package/dist/{chunk-IYRQDVVR.mjs → chunk-DB3CFKPU.mjs} +1 -1
  6. package/dist/{chunk-VCUXRZ25.mjs → chunk-GKEJP2H3.mjs} +1 -1
  7. package/dist/{chunk-UE4NJAT7.js → chunk-GYNCKBJC.js} +1 -1
  8. package/dist/chunk-LJXWVJKP.js +1 -0
  9. package/dist/{chunk-O44WLLHJ.js → chunk-MTCDVKME.js} +1 -1
  10. package/dist/{chunk-LIS64E2K.mjs → chunk-OCYSQB6Q.mjs} +1 -1
  11. package/dist/{chunk-PDPIGJ5L.mjs → chunk-OSBAFKPS.mjs} +1 -1
  12. package/dist/chunk-OUDLZKER.mjs +1 -0
  13. package/dist/{chunk-CFVNEE2L.js → chunk-OXZEQH33.js} +1 -1
  14. package/dist/{chunk-P7CP6GPM.js → chunk-UVDWPMVR.js} +1 -1
  15. package/dist/{chunk-4LOO5RD2.js → chunk-VIF376PX.js} +1 -1
  16. package/dist/chunk-YSG2UAWG.js +1 -0
  17. package/dist/components/embed/index.js +1 -1
  18. package/dist/components/embed/index.mjs +1 -1
  19. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
  20. package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.mjs +1 -1
  21. package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.js +1 -1
  22. package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.mjs +1 -1
  23. package/dist/components/embed/v3/index.js +1 -1
  24. package/dist/components/embed/v3/index.mjs +1 -1
  25. package/dist/components/index.js +1 -1
  26. package/dist/components/index.mjs +1 -1
  27. package/dist/components/wallets/ExportPrivateKeyButton.d.mts +3 -1
  28. package/dist/components/wallets/ExportPrivateKeyButton.d.ts +3 -1
  29. package/dist/components/wallets/ExportPrivateKeyButton.js +1 -1
  30. package/dist/components/wallets/ExportPrivateKeyButton.mjs +1 -1
  31. package/dist/components/wallets/index.js +1 -1
  32. package/dist/components/wallets/index.mjs +1 -1
  33. package/dist/index.js +1 -1
  34. package/dist/index.mjs +1 -1
  35. package/dist/logger/init.js +1 -1
  36. package/dist/logger/init.mjs +1 -1
  37. package/dist/plugin/withCrossmintUI.js +1 -1
  38. package/dist/plugin/withCrossmintUI.mjs +1 -1
  39. package/dist/providers/CrossmintProvider.js +1 -1
  40. package/dist/providers/CrossmintProvider.mjs +1 -1
  41. package/dist/providers/CrossmintWalletProvider.js +1 -1
  42. package/dist/providers/CrossmintWalletProvider.mjs +1 -1
  43. package/dist/providers/index.js +1 -1
  44. package/dist/providers/index.mjs +1 -1
  45. package/dist/utils/createCrossmintApiClient.js +1 -1
  46. package/dist/utils/createCrossmintApiClient.mjs +1 -1
  47. package/package.json +8 -8
  48. package/dist/chunk-EIARIAHW.js +0 -1
  49. package/dist/chunk-FKHEMIRR.js +0 -1
  50. package/dist/chunk-IVKDLJHC.mjs +0 -1
  51. package/dist/chunk-VWIH3KHH.mjs +0 -1
@@ -1 +1 @@
1
- import{a as i}from"./chunk-VWIH3KHH.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};
1
+ import{a as i}from"./chunk-OUDLZKER.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};
@@ -1 +1 @@
1
- import{a as d}from"./chunk-IYRQDVVR.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};
1
+ import{a as d}from"./chunk-DB3CFKPU.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};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunk4LOO5RD2js = require('./chunk-4LOO5RD2.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, ()=>_chunk4LOO5RD2js.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;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkVIF376PXjs = require('./chunk-VIF376PX.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, ()=>_chunkVIF376PXjs.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{i as b,j as v}from"./chunk-SOJZCPJL.mjs";v();import{useState as C,useCallback as d,useRef as u,useEffect as w}from"react";import{View as m,Text as P,StyleSheet as W,Alert as E}from"react-native";import{useWallet as S,useCrossmint as F}from"@crossmint/client-sdk-react-base";import{environmentUrlConfig as I,exportSignerInboundEvents as k,exportSignerOutboundEvents as K}from"@crossmint/client-signers";import{isExportableSignerAdapter as y}from"@crossmint/wallets-sdk";import{validateAPIKey as U}from"@crossmint/common-sdk-base";import{WebViewParent as L,RNWebView as M}from"@crossmint/client-sdk-rn-window";import{jsx as i}from"react/jsx-runtime";function $({appearance:R,onExport:a}){let{wallet:r}=S(),{crossmint:l}=F(),s=u(null),c=u(null),n=u(a),[p,x]=C("");w(()=>{n.current=a},[a]),w(()=>{if(l!=null)try{let e=U(l.apiKey);if(e.isValid){let t=I[e.environment];x(`${t}/export`)}}catch(e){console.error("Failed to get TEE URL:",e)}},[l]);let V=d(e=>b(this,null,function*(){if(!(r==null||s.current==null||e.nativeEvent.loading))try{if(r.signer!=null&&y(r.signer)){let t=new L(s,{incomingEvents:K,outgoingEvents:k});c.current=t,yield t.handshakeWithChild(),yield r.signer._exportPrivateKey(t,n.current!=null?()=>{var f;return(f=n.current)==null?void 0:f.call(n)}:void 0)}}catch(t){console.error("Failed to export private key:",t),E.alert("Export Failed","Failed to export private key. Please try again.")}}),[r]),g=d(e=>{let{nativeEvent:t}=e;console.error("WebView error:",t),E.alert("Export Failed","Failed to load export interface. Please try again.")},[]),h=d(e=>{c.current&&c.current.handleMessage(e)},[]);return p===""||r==null||r.signer==null||!y(r.signer)?null:i(m,{style:o.webViewContainer,children:i(M,{ref:s,source:{uri:p},style:o.webView,javaScriptEnabled:!0,domStorageEnabled:!0,onLoadEnd:V,onError:g,onHttpError:g,onMessage:h,startInLoadingState:!0,renderLoading:()=>i(m,{style:o.loadingContainer,children:i(P,{style:o.loadingText,children:"Loading..."})})})})}var o=W.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{$ as a};
@@ -1 +1 @@
1
- import{a as b}from"./chunk-FUXBVE4N.mjs";import{c as y}from"./chunk-QZP5C7M5.mjs";import{a as h}from"./chunk-NKQULQ2K.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:void 0,opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!0,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};
1
+ import{a as b}from"./chunk-FUXBVE4N.mjs";import{c as y}from"./chunk-QZP5C7M5.mjs";import{a as h}from"./chunk-2Z7H7ZOJ.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:void 0,opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!0,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};
@@ -1 +1 @@
1
- import{a as r}from"./chunk-VWIH3KHH.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};
1
+ import{a as r}from"./chunk-OUDLZKER.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};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkL3XYSJK3js = require('./chunk-L3XYSJK3.js');var _chunkMIEAYZKVjs = require('./chunk-MIEAYZKV.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, _chunkMIEAYZKVjs.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;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkB5WVGQSCjs = require('./chunk-B5WVGQSC.js');var _chunkL3XYSJK3js = require('./chunk-L3XYSJK3.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, _chunkB5WVGQSCjs.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 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.2.0",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","README.md"],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;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP7CP6GPMjs = require('./chunk-P7CP6GPM.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, _chunkP7CP6GPMjs.a,_chunk4EVH2LVPjs.a.call(void 0, {},t))}exports.a = i;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUVDWPMVRjs = require('./chunk-UVDWPMVR.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, _chunkUVDWPMVRjs.a,_chunk4EVH2LVPjs.a.call(void 0, {},t))}exports.a = i;
@@ -1 +1 @@
1
- import{a as C}from"./chunk-VCUXRZ25.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};
1
+ import{a as C}from"./chunk-GKEJP2H3.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};
@@ -1 +1 @@
1
- import{a as H}from"./chunk-BP63EHIH.mjs";import{a as _}from"./chunk-LIS64E2K.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};
1
+ import{a as _}from"./chunk-OCYSQB6Q.mjs";import{a as H}from"./chunk-BP63EHIH.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 @@
1
+ var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.2.0",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","README.md"],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 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkEIARIAHWjs = require('./chunk-EIARIAHW.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:_chunkEIARIAHWjs.a.version},apiKeyExpectations:e}})}exports.a = C;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLJXWVJKPjs = require('./chunk-LJXWVJKP.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:_chunkLJXWVJKPjs.a.version},apiKeyExpectations:e}})}exports.a = C;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAY4NQNL2js = require('./chunk-AY4NQNL2.js');var _chunkVZ5LCEL6js = require('./chunk-VZ5LCEL6.js');var _chunkCFVNEE2Ljs = require('./chunk-CFVNEE2L.js');var _chunkDAERG6FMjs = require('./chunk-DAERG6FM.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _reactnative = require('react-native');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clientsdkrnwindow = require('@crossmint/client-sdk-rn-window');var _jsxruntime = require('react/jsx-runtime');function Y(t){var u;let[e,C]=_react.useState.call(void 0, null),[v,E]=_react.useState.call(void 0, 0),V=_react.useRef.call(void 0, (u=t.payment.crypto.payer)==null?void 0:u.initialChain),n=_react.useRef.call(void 0, t);if(F(t,n.current)){let r=_chunk4EVH2LVPjs.a.call(void 0, {},t),o=H(t,V.current);o.shouldPreserve&&(r.payment.crypto.payer=o.updatedPayer),n.current=r}let{crossmint:i}=_clientsdkreactbase.useCrossmint.call(void 0, ),P=_chunkCFVNEE2Ljs.a.call(void 0, i,{usageOrigin:"client"}),k=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:P}),s=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{let r=s.current;if(!r||e)return;let o=new (0, _clientsdkrnwindow.WebViewParent)({current:r},{incomingEvents:_clientsdkbase.embeddedCheckoutV3IncomingEvents,outgoingEvents:_clientsdkbase.embeddedCheckoutV3OutgoingEvents});C(o)},[s.current,e]),_react.useEffect.call(void 0, ()=>{if(e==null)return;let r=a=>E(a.height);e.on("ui:height.changed",r);let o=a=>{_chunkDAERG6FMjs.a.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 _jsxruntime.jsxs.call(void 0, _reactnative.View,{style:{flex:1},children:[_jsxruntime.jsx.call(void 0, _clientsdkrnwindow.RNWebView,{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:void 0,opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!0,bounces:!1,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,domStorageEnabled:!0,mixedContentMode:"always",allowFileAccess:!0,allowUniversalAccessFromFileURLs:!0,geolocationEnabled:!0,userAgent:_chunkVZ5LCEL6js.c,paymentRequestEnabled:!0}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkAY4NQNL2js.a,{payer:n.current.payment.crypto.payer,webViewClient:e}):_jsxruntime.jsx.call(void 0, 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:_chunk4EVH2LVPjs.b.call(void 0, _chunk4EVH2LVPjs.a.call(void 0, {},t.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}function L({message:t}){throw new Error(t)}exports.a = Y;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkAY4NQNL2js = require('./chunk-AY4NQNL2.js');var _chunkVZ5LCEL6js = require('./chunk-VZ5LCEL6.js');var _chunkOXZEQH33js = require('./chunk-OXZEQH33.js');var _chunkDAERG6FMjs = require('./chunk-DAERG6FM.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _react = require('react');var _reactnative = require('react-native');var _clientsdkbase = require('@crossmint/client-sdk-base');var _clientsdkrnwindow = require('@crossmint/client-sdk-rn-window');var _jsxruntime = require('react/jsx-runtime');function Y(t){var u;let[e,C]=_react.useState.call(void 0, null),[v,E]=_react.useState.call(void 0, 0),V=_react.useRef.call(void 0, (u=t.payment.crypto.payer)==null?void 0:u.initialChain),n=_react.useRef.call(void 0, t);if(F(t,n.current)){let r=_chunk4EVH2LVPjs.a.call(void 0, {},t),o=H(t,V.current);o.shouldPreserve&&(r.payment.crypto.payer=o.updatedPayer),n.current=r}let{crossmint:i}=_clientsdkreactbase.useCrossmint.call(void 0, ),P=_chunkOXZEQH33js.a.call(void 0, i,{usageOrigin:"client"}),k=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:P}),s=_react.useRef.call(void 0, null);_react.useEffect.call(void 0, ()=>{let r=s.current;if(!r||e)return;let o=new (0, _clientsdkrnwindow.WebViewParent)({current:r},{incomingEvents:_clientsdkbase.embeddedCheckoutV3IncomingEvents,outgoingEvents:_clientsdkbase.embeddedCheckoutV3OutgoingEvents});C(o)},[s.current,e]),_react.useEffect.call(void 0, ()=>{if(e==null)return;let r=a=>E(a.height);e.on("ui:height.changed",r);let o=a=>{_chunkDAERG6FMjs.a.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 _jsxruntime.jsxs.call(void 0, _reactnative.View,{style:{flex:1},children:[_jsxruntime.jsx.call(void 0, _clientsdkrnwindow.RNWebView,{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:void 0,opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!0,bounces:!1,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,domStorageEnabled:!0,mixedContentMode:"always",allowFileAccess:!0,allowUniversalAccessFromFileURLs:!0,geolocationEnabled:!0,userAgent:_chunkVZ5LCEL6js.c,paymentRequestEnabled:!0}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkAY4NQNL2js.a,{payer:n.current.payment.crypto.payer,webViewClient:e}):_jsxruntime.jsx.call(void 0, 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:_chunk4EVH2LVPjs.b.call(void 0, _chunk4EVH2LVPjs.a.call(void 0, {},t.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}function L({message:t}){throw new Error(t)}exports.a = Y;
@@ -1 +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 _chunkEIARIAHWjs = require('./chunk-EIARIAHW.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:_chunkEIARIAHWjs.a.name,packageVersion:_chunkEIARIAHWjs.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 = _;
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 _chunkLJXWVJKPjs = require('./chunk-LJXWVJKP.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:_chunkLJXWVJKPjs.a.name,packageVersion:_chunkLJXWVJKPjs.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 = _;
@@ -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 _({appearance:R,onExport:a}){let{wallet:r}=_clientsdkreactbase.useWallet.call(void 0, ),{crossmint:l}=_clientsdkreactbase.useCrossmint.call(void 0, ),s=_react.useRef.call(void 0, null),c=_react.useRef.call(void 0, null),n=_react.useRef.call(void 0, a),[p,x]=_react.useState.call(void 0, "");_react.useEffect.call(void 0, ()=>{n.current=a},[a]),_react.useEffect.call(void 0, ()=>{if(l!=null)try{let e=_commonsdkbase.validateAPIKey.call(void 0, l.apiKey);if(e.isValid){let t=_clientsigners.environmentUrlConfig[e.environment];x(`${t}/export`)}}catch(e){console.error("Failed to get TEE URL:",e)}},[l]);let V=_react.useCallback.call(void 0, e=>_chunk4EVH2LVPjs.i.call(void 0, this,null,function*(){if(!(r==null||s.current==null||e.nativeEvent.loading))try{if(r.signer!=null&&_walletssdk.isExportableSignerAdapter.call(void 0, r.signer)){let t=new (0, _clientsdkrnwindow.WebViewParent)(s,{incomingEvents:_clientsigners.exportSignerOutboundEvents,outgoingEvents:_clientsigners.exportSignerInboundEvents});c.current=t,yield t.handshakeWithChild(),yield r.signer._exportPrivateKey(t,n.current!=null?()=>{var f;return(f=n.current)==null?void 0:f.call(n)}:void 0)}}catch(t){console.error("Failed to export private key:",t),_reactnative.Alert.alert("Export Failed","Failed to export private key. Please try again.")}}),[r]),g=_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.")},[]),h=_react.useCallback.call(void 0, e=>{c.current&&c.current.handleMessage(e)},[]);return p===""||r==null||r.signer==null||!_walletssdk.isExportableSignerAdapter.call(void 0, r.signer)?null:_jsxruntime.jsx.call(void 0, _reactnative.View,{style:o.webViewContainer,children:_jsxruntime.jsx.call(void 0, _clientsdkrnwindow.RNWebView,{ref:s,source:{uri:p},style:o.webView,javaScriptEnabled:!0,domStorageEnabled:!0,onLoadEnd:V,onError:g,onHttpError:g,onMessage:h,startInLoadingState:!0,renderLoading:()=>_jsxruntime.jsx.call(void 0, _reactnative.View,{style:o.loadingContainer,children:_jsxruntime.jsx.call(void 0, _reactnative.Text,{style:o.loadingText,children:"Loading..."})})})})}var o=_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 = _;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-PEZ37X4S.js');require('../../chunk-EU5BBX2G.js');var _chunkO44WLLHJjs = require('../../chunk-O44WLLHJ.js');require('../../chunk-P7CP6GPM.js');require('../../chunk-AY4NQNL2.js');require('../../chunk-VZ5LCEL6.js');require('../../chunk-CFVNEE2L.js');require('../../chunk-DAERG6FM.js');require('../../chunk-EIARIAHW.js');require('../../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkO44WLLHJjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-PEZ37X4S.js');require('../../chunk-EU5BBX2G.js');var _chunkMTCDVKMEjs = require('../../chunk-MTCDVKME.js');require('../../chunk-UVDWPMVR.js');require('../../chunk-AY4NQNL2.js');require('../../chunk-VZ5LCEL6.js');require('../../chunk-OXZEQH33.js');require('../../chunk-DAERG6FM.js');require('../../chunk-LJXWVJKP.js');require('../../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkMTCDVKMEjs.a;
@@ -1 +1 @@
1
- import"../../chunk-VS54UJOO.mjs";import"../../chunk-JDI5YAT3.mjs";import{a}from"../../chunk-UCVMMUSM.mjs";import"../../chunk-IYRQDVVR.mjs";import"../../chunk-FUXBVE4N.mjs";import"../../chunk-QZP5C7M5.mjs";import"../../chunk-NKQULQ2K.mjs";import"../../chunk-W5BITU26.mjs";import"../../chunk-VWIH3KHH.mjs";import"../../chunk-SOJZCPJL.mjs";export{a as CrossmintEmbeddedCheckout};
1
+ import"../../chunk-VS54UJOO.mjs";import"../../chunk-JDI5YAT3.mjs";import{a}from"../../chunk-54ZSDFQE.mjs";import"../../chunk-DB3CFKPU.mjs";import"../../chunk-FUXBVE4N.mjs";import"../../chunk-QZP5C7M5.mjs";import"../../chunk-2Z7H7ZOJ.mjs";import"../../chunk-W5BITU26.mjs";import"../../chunk-OUDLZKER.mjs";import"../../chunk-SOJZCPJL.mjs";export{a as CrossmintEmbeddedCheckout};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkO44WLLHJjs = require('../../../chunk-O44WLLHJ.js');require('../../../chunk-P7CP6GPM.js');require('../../../chunk-AY4NQNL2.js');require('../../../chunk-VZ5LCEL6.js');require('../../../chunk-CFVNEE2L.js');require('../../../chunk-DAERG6FM.js');require('../../../chunk-EIARIAHW.js');require('../../../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkO44WLLHJjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMTCDVKMEjs = require('../../../chunk-MTCDVKME.js');require('../../../chunk-UVDWPMVR.js');require('../../../chunk-AY4NQNL2.js');require('../../../chunk-VZ5LCEL6.js');require('../../../chunk-OXZEQH33.js');require('../../../chunk-DAERG6FM.js');require('../../../chunk-LJXWVJKP.js');require('../../../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkMTCDVKMEjs.a;
@@ -1 +1 @@
1
- import{a}from"../../../chunk-UCVMMUSM.mjs";import"../../../chunk-IYRQDVVR.mjs";import"../../../chunk-FUXBVE4N.mjs";import"../../../chunk-QZP5C7M5.mjs";import"../../../chunk-NKQULQ2K.mjs";import"../../../chunk-W5BITU26.mjs";import"../../../chunk-VWIH3KHH.mjs";import"../../../chunk-SOJZCPJL.mjs";export{a as CrossmintEmbeddedCheckout};
1
+ import{a}from"../../../chunk-54ZSDFQE.mjs";import"../../../chunk-DB3CFKPU.mjs";import"../../../chunk-FUXBVE4N.mjs";import"../../../chunk-QZP5C7M5.mjs";import"../../../chunk-2Z7H7ZOJ.mjs";import"../../../chunk-W5BITU26.mjs";import"../../../chunk-OUDLZKER.mjs";import"../../../chunk-SOJZCPJL.mjs";export{a as CrossmintEmbeddedCheckout};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkP7CP6GPMjs = require('../../../chunk-P7CP6GPM.js');require('../../../chunk-AY4NQNL2.js');require('../../../chunk-VZ5LCEL6.js');require('../../../chunk-CFVNEE2L.js');require('../../../chunk-DAERG6FM.js');require('../../../chunk-EIARIAHW.js');require('../../../chunk-4EVH2LVP.js');exports.EmbeddedCheckoutV3WebView = _chunkP7CP6GPMjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUVDWPMVRjs = require('../../../chunk-UVDWPMVR.js');require('../../../chunk-AY4NQNL2.js');require('../../../chunk-VZ5LCEL6.js');require('../../../chunk-OXZEQH33.js');require('../../../chunk-DAERG6FM.js');require('../../../chunk-LJXWVJKP.js');require('../../../chunk-4EVH2LVP.js');exports.EmbeddedCheckoutV3WebView = _chunkUVDWPMVRjs.a;
@@ -1 +1 @@
1
- import{a}from"../../../chunk-IYRQDVVR.mjs";import"../../../chunk-FUXBVE4N.mjs";import"../../../chunk-QZP5C7M5.mjs";import"../../../chunk-NKQULQ2K.mjs";import"../../../chunk-W5BITU26.mjs";import"../../../chunk-VWIH3KHH.mjs";import"../../../chunk-SOJZCPJL.mjs";export{a as EmbeddedCheckoutV3WebView};
1
+ import{a}from"../../../chunk-DB3CFKPU.mjs";import"../../../chunk-FUXBVE4N.mjs";import"../../../chunk-QZP5C7M5.mjs";import"../../../chunk-2Z7H7ZOJ.mjs";import"../../../chunk-W5BITU26.mjs";import"../../../chunk-OUDLZKER.mjs";import"../../../chunk-SOJZCPJL.mjs";export{a as EmbeddedCheckoutV3WebView};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-EU5BBX2G.js');var _chunkO44WLLHJjs = require('../../../chunk-O44WLLHJ.js');require('../../../chunk-P7CP6GPM.js');require('../../../chunk-AY4NQNL2.js');require('../../../chunk-VZ5LCEL6.js');require('../../../chunk-CFVNEE2L.js');require('../../../chunk-DAERG6FM.js');require('../../../chunk-EIARIAHW.js');require('../../../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkO44WLLHJjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-EU5BBX2G.js');var _chunkMTCDVKMEjs = require('../../../chunk-MTCDVKME.js');require('../../../chunk-UVDWPMVR.js');require('../../../chunk-AY4NQNL2.js');require('../../../chunk-VZ5LCEL6.js');require('../../../chunk-OXZEQH33.js');require('../../../chunk-DAERG6FM.js');require('../../../chunk-LJXWVJKP.js');require('../../../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkMTCDVKMEjs.a;
@@ -1 +1 @@
1
- import"../../../chunk-JDI5YAT3.mjs";import{a}from"../../../chunk-UCVMMUSM.mjs";import"../../../chunk-IYRQDVVR.mjs";import"../../../chunk-FUXBVE4N.mjs";import"../../../chunk-QZP5C7M5.mjs";import"../../../chunk-NKQULQ2K.mjs";import"../../../chunk-W5BITU26.mjs";import"../../../chunk-VWIH3KHH.mjs";import"../../../chunk-SOJZCPJL.mjs";export{a as CrossmintEmbeddedCheckout};
1
+ import"../../../chunk-JDI5YAT3.mjs";import{a}from"../../../chunk-54ZSDFQE.mjs";import"../../../chunk-DB3CFKPU.mjs";import"../../../chunk-FUXBVE4N.mjs";import"../../../chunk-QZP5C7M5.mjs";import"../../../chunk-2Z7H7ZOJ.mjs";import"../../../chunk-W5BITU26.mjs";import"../../../chunk-OUDLZKER.mjs";import"../../../chunk-SOJZCPJL.mjs";export{a as CrossmintEmbeddedCheckout};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-A32QK47S.js');require('../chunk-LZHSNX3O.js');require('../chunk-GYFXX3S4.js');var _chunkFKHEMIRRjs = require('../chunk-FKHEMIRR.js');require('../chunk-PEZ37X4S.js');require('../chunk-EU5BBX2G.js');var _chunkO44WLLHJjs = require('../chunk-O44WLLHJ.js');require('../chunk-P7CP6GPM.js');require('../chunk-AY4NQNL2.js');require('../chunk-VZ5LCEL6.js');require('../chunk-CFVNEE2L.js');var _chunk5OGTOGBEjs = require('../chunk-5OGTOGBE.js');var _chunkUZIY546Tjs = require('../chunk-UZIY546T.js');require('../chunk-EUIDKBS7.js');require('../chunk-UJTROZMN.js');require('../chunk-TWZI6S7U.js');require('../chunk-WJP5GQ35.js');require('../chunk-37TKX2AS.js');require('../chunk-7AMJYMIL.js');require('../chunk-NBK4T7QJ.js');require('../chunk-FHG7Y3B2.js');require('../chunk-X5DFNNBV.js');require('../chunk-DCWNSPWC.js');require('../chunk-DAERG6FM.js');require('../chunk-EIARIAHW.js');require('../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkO44WLLHJjs.a; exports.EmailSignersDialog = _chunk5OGTOGBEjs.a; exports.ExportPrivateKeyButton = _chunkFKHEMIRRjs.a; exports.PhoneSignersDialog = _chunkUZIY546Tjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-A32QK47S.js');require('../chunk-LZHSNX3O.js');require('../chunk-GYFXX3S4.js');var _chunkYSG2UAWGjs = require('../chunk-YSG2UAWG.js');require('../chunk-PEZ37X4S.js');require('../chunk-EU5BBX2G.js');var _chunkMTCDVKMEjs = require('../chunk-MTCDVKME.js');require('../chunk-UVDWPMVR.js');require('../chunk-AY4NQNL2.js');require('../chunk-VZ5LCEL6.js');require('../chunk-OXZEQH33.js');var _chunk5OGTOGBEjs = require('../chunk-5OGTOGBE.js');var _chunkUZIY546Tjs = require('../chunk-UZIY546T.js');require('../chunk-EUIDKBS7.js');require('../chunk-UJTROZMN.js');require('../chunk-TWZI6S7U.js');require('../chunk-WJP5GQ35.js');require('../chunk-37TKX2AS.js');require('../chunk-7AMJYMIL.js');require('../chunk-NBK4T7QJ.js');require('../chunk-FHG7Y3B2.js');require('../chunk-X5DFNNBV.js');require('../chunk-DCWNSPWC.js');require('../chunk-DAERG6FM.js');require('../chunk-LJXWVJKP.js');require('../chunk-4EVH2LVP.js');exports.CrossmintEmbeddedCheckout = _chunkMTCDVKMEjs.a; exports.EmailSignersDialog = _chunk5OGTOGBEjs.a; exports.ExportPrivateKeyButton = _chunkYSG2UAWGjs.a; exports.PhoneSignersDialog = _chunkUZIY546Tjs.a;
@@ -1 +1 @@
1
- import"../chunk-CVNNPHHC.mjs";import"../chunk-3LVSYXD6.mjs";import"../chunk-WWBVTF23.mjs";import{a as d}from"../chunk-IVKDLJHC.mjs";import"../chunk-VS54UJOO.mjs";import"../chunk-JDI5YAT3.mjs";import{a as c}from"../chunk-UCVMMUSM.mjs";import"../chunk-IYRQDVVR.mjs";import"../chunk-FUXBVE4N.mjs";import"../chunk-QZP5C7M5.mjs";import"../chunk-NKQULQ2K.mjs";import{a}from"../chunk-TJRVTCJX.mjs";import{a as b}from"../chunk-7UXEUMEA.mjs";import"../chunk-MVBKLS3P.mjs";import"../chunk-S5O4QBFM.mjs";import"../chunk-67Z6QY5X.mjs";import"../chunk-XD7WEGQZ.mjs";import"../chunk-TZKIJ5KX.mjs";import"../chunk-XONQWEM5.mjs";import"../chunk-GTBJ6SM6.mjs";import"../chunk-4EBFS2LY.mjs";import"../chunk-7573EHPC.mjs";import"../chunk-AXQNJ6P5.mjs";import"../chunk-W5BITU26.mjs";import"../chunk-VWIH3KHH.mjs";import"../chunk-SOJZCPJL.mjs";export{c as CrossmintEmbeddedCheckout,a as EmailSignersDialog,d as ExportPrivateKeyButton,b as PhoneSignersDialog};
1
+ import"../chunk-CVNNPHHC.mjs";import"../chunk-3LVSYXD6.mjs";import"../chunk-WWBVTF23.mjs";import{a as d}from"../chunk-BQWVOXAH.mjs";import"../chunk-VS54UJOO.mjs";import"../chunk-JDI5YAT3.mjs";import{a as c}from"../chunk-54ZSDFQE.mjs";import"../chunk-DB3CFKPU.mjs";import"../chunk-FUXBVE4N.mjs";import"../chunk-QZP5C7M5.mjs";import"../chunk-2Z7H7ZOJ.mjs";import{a}from"../chunk-TJRVTCJX.mjs";import{a as b}from"../chunk-7UXEUMEA.mjs";import"../chunk-MVBKLS3P.mjs";import"../chunk-S5O4QBFM.mjs";import"../chunk-67Z6QY5X.mjs";import"../chunk-XD7WEGQZ.mjs";import"../chunk-TZKIJ5KX.mjs";import"../chunk-XONQWEM5.mjs";import"../chunk-GTBJ6SM6.mjs";import"../chunk-4EBFS2LY.mjs";import"../chunk-7573EHPC.mjs";import"../chunk-AXQNJ6P5.mjs";import"../chunk-W5BITU26.mjs";import"../chunk-OUDLZKER.mjs";import"../chunk-SOJZCPJL.mjs";export{c as CrossmintEmbeddedCheckout,a as EmailSignersDialog,d as ExportPrivateKeyButton,b as PhoneSignersDialog};
@@ -4,11 +4,13 @@ import { UIConfig } from '@crossmint/common-sdk-base';
4
4
  interface ExportPrivateKeyButtonProps {
5
5
  /** Optional appearance configuration for styling the export button. */
6
6
  appearance?: UIConfig;
7
+ /** Optional callback invoked after the user successfully exports (copies) their private key. */
8
+ onExport?: () => void | Promise<void>;
7
9
  }
8
10
  /**
9
11
  * Renders a button that allows the user to export their wallet's private key.
10
12
  * Only works with email and phone signers. Will not render for passkey or external wallet signers.
11
13
  */
12
- declare function ExportPrivateKeyButton({ appearance }: ExportPrivateKeyButtonProps): react_jsx_runtime.JSX.Element | null;
14
+ declare function ExportPrivateKeyButton({ appearance, onExport }: ExportPrivateKeyButtonProps): react_jsx_runtime.JSX.Element | null;
13
15
 
14
16
  export { ExportPrivateKeyButton, type ExportPrivateKeyButtonProps };
@@ -4,11 +4,13 @@ import { UIConfig } from '@crossmint/common-sdk-base';
4
4
  interface ExportPrivateKeyButtonProps {
5
5
  /** Optional appearance configuration for styling the export button. */
6
6
  appearance?: UIConfig;
7
+ /** Optional callback invoked after the user successfully exports (copies) their private key. */
8
+ onExport?: () => void | Promise<void>;
7
9
  }
8
10
  /**
9
11
  * Renders a button that allows the user to export their wallet's private key.
10
12
  * Only works with email and phone signers. Will not render for passkey or external wallet signers.
11
13
  */
12
- declare function ExportPrivateKeyButton({ appearance }: ExportPrivateKeyButtonProps): react_jsx_runtime.JSX.Element | null;
14
+ declare function ExportPrivateKeyButton({ appearance, onExport }: ExportPrivateKeyButtonProps): react_jsx_runtime.JSX.Element | null;
13
15
 
14
16
  export { ExportPrivateKeyButton, type ExportPrivateKeyButtonProps };
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkFKHEMIRRjs = require('../../chunk-FKHEMIRR.js');require('../../chunk-4EVH2LVP.js');exports.ExportPrivateKeyButton = _chunkFKHEMIRRjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYSG2UAWGjs = require('../../chunk-YSG2UAWG.js');require('../../chunk-4EVH2LVP.js');exports.ExportPrivateKeyButton = _chunkYSG2UAWGjs.a;
@@ -1 +1 @@
1
- import{a}from"../../chunk-IVKDLJHC.mjs";import"../../chunk-SOJZCPJL.mjs";export{a as ExportPrivateKeyButton};
1
+ import{a}from"../../chunk-BQWVOXAH.mjs";import"../../chunk-SOJZCPJL.mjs";export{a as ExportPrivateKeyButton};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-GYFXX3S4.js');var _chunkFKHEMIRRjs = require('../../chunk-FKHEMIRR.js');require('../../chunk-4EVH2LVP.js');exports.ExportPrivateKeyButton = _chunkFKHEMIRRjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-GYFXX3S4.js');var _chunkYSG2UAWGjs = require('../../chunk-YSG2UAWG.js');require('../../chunk-4EVH2LVP.js');exports.ExportPrivateKeyButton = _chunkYSG2UAWGjs.a;
@@ -1 +1 @@
1
- import"../../chunk-WWBVTF23.mjs";import{a}from"../../chunk-IVKDLJHC.mjs";import"../../chunk-SOJZCPJL.mjs";export{a as ExportPrivateKeyButton};
1
+ import"../../chunk-WWBVTF23.mjs";import{a}from"../../chunk-BQWVOXAH.mjs";import"../../chunk-SOJZCPJL.mjs";export{a as ExportPrivateKeyButton};
package/dist/index.js CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-CB4O4U7N.js');var _chunkUE4NJAT7js = require('./chunk-UE4NJAT7.js');require('./chunk-L3XYSJK3.js');var _chunkMIEAYZKVjs = require('./chunk-MIEAYZKV.js');require('./chunk-A32QK47S.js');require('./chunk-LZHSNX3O.js');require('./chunk-GYFXX3S4.js');var _chunkFKHEMIRRjs = require('./chunk-FKHEMIRR.js');require('./chunk-PEZ37X4S.js');require('./chunk-EU5BBX2G.js');var _chunkO44WLLHJjs = require('./chunk-O44WLLHJ.js');require('./chunk-P7CP6GPM.js');require('./chunk-AY4NQNL2.js');require('./chunk-VZ5LCEL6.js');require('./chunk-CFVNEE2L.js');var _chunk5OGTOGBEjs = require('./chunk-5OGTOGBE.js');var _chunkUZIY546Tjs = require('./chunk-UZIY546T.js');require('./chunk-EUIDKBS7.js');require('./chunk-UJTROZMN.js');require('./chunk-TWZI6S7U.js');require('./chunk-WJP5GQ35.js');require('./chunk-37TKX2AS.js');require('./chunk-7AMJYMIL.js');require('./chunk-NBK4T7QJ.js');require('./chunk-FHG7Y3B2.js');require('./chunk-X5DFNNBV.js');require('./chunk-DCWNSPWC.js');var _chunk3FPXEECQjs = require('./chunk-3FPXEECQ.js');require('./chunk-NR7JUGTU.js');var _chunk4GUZHOD6js = require('./chunk-4GUZHOD6.js');require('./chunk-DAERG6FM.js');require('./chunk-4LOO5RD2.js');require('./chunk-EIARIAHW.js');require('./chunk-INFBLVRX.js');require('./chunk-6SC5DDHW.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _walletssdk = require('@crossmint/wallets-sdk');exports.CrossmintAuthProvider = _chunk3FPXEECQjs.b; exports.CrossmintCheckoutProvider = _chunk4GUZHOD6js.a; exports.CrossmintEmbeddedCheckout = _chunkO44WLLHJjs.a; exports.CrossmintProvider = _chunkMIEAYZKVjs.b; exports.CrossmintWalletProvider = _chunkUE4NJAT7js.a; exports.EVMWallet = _walletssdk.EVMWallet; exports.EmailSignersDialog = _chunk5OGTOGBEjs.a; exports.ExportPrivateKeyButton = _chunkFKHEMIRRjs.a; exports.PhoneSignersDialog = _chunkUZIY546Tjs.a; exports.SolanaWallet = _walletssdk.SolanaWallet; exports.StellarWallet = _walletssdk.StellarWallet; exports.Wallet = _walletssdk.Wallet; exports.useCrossmint = _chunk3FPXEECQjs.d; exports.useCrossmintAuth = _chunk3FPXEECQjs.c; exports.useCrossmintCheckout = _chunk4GUZHOD6js.b; exports.useWallet = _chunk3FPXEECQjs.e; exports.useWalletOtpSigner = _chunk3FPXEECQjs.f;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-CB4O4U7N.js');var _chunkGYNCKBJCjs = require('./chunk-GYNCKBJC.js');var _chunkB5WVGQSCjs = require('./chunk-B5WVGQSC.js');require('./chunk-L3XYSJK3.js');require('./chunk-INFBLVRX.js');require('./chunk-6SC5DDHW.js');require('./chunk-A32QK47S.js');require('./chunk-LZHSNX3O.js');require('./chunk-GYFXX3S4.js');var _chunkYSG2UAWGjs = require('./chunk-YSG2UAWG.js');require('./chunk-PEZ37X4S.js');require('./chunk-EU5BBX2G.js');var _chunkMTCDVKMEjs = require('./chunk-MTCDVKME.js');require('./chunk-UVDWPMVR.js');require('./chunk-AY4NQNL2.js');require('./chunk-VZ5LCEL6.js');require('./chunk-OXZEQH33.js');var _chunk5OGTOGBEjs = require('./chunk-5OGTOGBE.js');var _chunkUZIY546Tjs = require('./chunk-UZIY546T.js');require('./chunk-EUIDKBS7.js');require('./chunk-UJTROZMN.js');require('./chunk-TWZI6S7U.js');require('./chunk-WJP5GQ35.js');require('./chunk-37TKX2AS.js');require('./chunk-7AMJYMIL.js');require('./chunk-NBK4T7QJ.js');require('./chunk-FHG7Y3B2.js');require('./chunk-X5DFNNBV.js');require('./chunk-DCWNSPWC.js');var _chunk3FPXEECQjs = require('./chunk-3FPXEECQ.js');require('./chunk-NR7JUGTU.js');var _chunk4GUZHOD6js = require('./chunk-4GUZHOD6.js');require('./chunk-DAERG6FM.js');require('./chunk-VIF376PX.js');require('./chunk-LJXWVJKP.js');var _chunk4EVH2LVPjs = require('./chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _walletssdk = require('@crossmint/wallets-sdk');exports.CrossmintAuthProvider = _chunk3FPXEECQjs.b; exports.CrossmintCheckoutProvider = _chunk4GUZHOD6js.a; exports.CrossmintEmbeddedCheckout = _chunkMTCDVKMEjs.a; exports.CrossmintProvider = _chunkB5WVGQSCjs.b; exports.CrossmintWalletProvider = _chunkGYNCKBJCjs.a; exports.EVMWallet = _walletssdk.EVMWallet; exports.EmailSignersDialog = _chunk5OGTOGBEjs.a; exports.ExportPrivateKeyButton = _chunkYSG2UAWGjs.a; exports.PhoneSignersDialog = _chunkUZIY546Tjs.a; exports.SolanaWallet = _walletssdk.SolanaWallet; exports.StellarWallet = _walletssdk.StellarWallet; exports.Wallet = _walletssdk.Wallet; exports.useCrossmint = _chunk3FPXEECQjs.d; exports.useCrossmintAuth = _chunk3FPXEECQjs.c; exports.useCrossmintCheckout = _chunk4GUZHOD6js.b; exports.useWallet = _chunk3FPXEECQjs.e; exports.useWalletOtpSigner = _chunk3FPXEECQjs.f;
package/dist/index.mjs CHANGED
@@ -1 +1 @@
1
- import"./chunk-E5XQNXJ6.mjs";import{a as y}from"./chunk-PDPIGJ5L.mjs";import"./chunk-BP63EHIH.mjs";import{b as l}from"./chunk-LIS64E2K.mjs";import"./chunk-CVNNPHHC.mjs";import"./chunk-3LVSYXD6.mjs";import"./chunk-WWBVTF23.mjs";import{a as x}from"./chunk-IVKDLJHC.mjs";import"./chunk-VS54UJOO.mjs";import"./chunk-JDI5YAT3.mjs";import{a as f}from"./chunk-UCVMMUSM.mjs";import"./chunk-IYRQDVVR.mjs";import"./chunk-FUXBVE4N.mjs";import"./chunk-QZP5C7M5.mjs";import"./chunk-NKQULQ2K.mjs";import{a as m}from"./chunk-TJRVTCJX.mjs";import{a as i}from"./chunk-7UXEUMEA.mjs";import"./chunk-MVBKLS3P.mjs";import"./chunk-S5O4QBFM.mjs";import"./chunk-67Z6QY5X.mjs";import"./chunk-XD7WEGQZ.mjs";import"./chunk-TZKIJ5KX.mjs";import"./chunk-XONQWEM5.mjs";import"./chunk-GTBJ6SM6.mjs";import"./chunk-4EBFS2LY.mjs";import"./chunk-7573EHPC.mjs";import"./chunk-AXQNJ6P5.mjs";import{b as o,c as a,d as n,e as s,f as p}from"./chunk-RZ5NAERX.mjs";import"./chunk-NAZHVLXC.mjs";import{a as e,b as r}from"./chunk-HCABBSIE.mjs";import"./chunk-W5BITU26.mjs";import"./chunk-VCUXRZ25.mjs";import"./chunk-VWIH3KHH.mjs";import"./chunk-4XI5PNDY.mjs";import"./chunk-ND3HLTOS.mjs";import{j as t}from"./chunk-SOJZCPJL.mjs";t();import{EVMWallet as C,SolanaWallet as g,StellarWallet as k,Wallet as M}from"@crossmint/wallets-sdk";export{o as CrossmintAuthProvider,e as CrossmintCheckoutProvider,f as CrossmintEmbeddedCheckout,l as CrossmintProvider,y as CrossmintWalletProvider,C as EVMWallet,m as EmailSignersDialog,x as ExportPrivateKeyButton,i as PhoneSignersDialog,g as SolanaWallet,k as StellarWallet,M as Wallet,n as useCrossmint,a as useCrossmintAuth,r as useCrossmintCheckout,s as useWallet,p as useWalletOtpSigner};
1
+ import"./chunk-E5XQNXJ6.mjs";import{a as y}from"./chunk-OSBAFKPS.mjs";import{b as l}from"./chunk-OCYSQB6Q.mjs";import"./chunk-BP63EHIH.mjs";import"./chunk-4XI5PNDY.mjs";import"./chunk-ND3HLTOS.mjs";import"./chunk-CVNNPHHC.mjs";import"./chunk-3LVSYXD6.mjs";import"./chunk-WWBVTF23.mjs";import{a as x}from"./chunk-BQWVOXAH.mjs";import"./chunk-VS54UJOO.mjs";import"./chunk-JDI5YAT3.mjs";import{a as f}from"./chunk-54ZSDFQE.mjs";import"./chunk-DB3CFKPU.mjs";import"./chunk-FUXBVE4N.mjs";import"./chunk-QZP5C7M5.mjs";import"./chunk-2Z7H7ZOJ.mjs";import{a as m}from"./chunk-TJRVTCJX.mjs";import{a as i}from"./chunk-7UXEUMEA.mjs";import"./chunk-MVBKLS3P.mjs";import"./chunk-S5O4QBFM.mjs";import"./chunk-67Z6QY5X.mjs";import"./chunk-XD7WEGQZ.mjs";import"./chunk-TZKIJ5KX.mjs";import"./chunk-XONQWEM5.mjs";import"./chunk-GTBJ6SM6.mjs";import"./chunk-4EBFS2LY.mjs";import"./chunk-7573EHPC.mjs";import"./chunk-AXQNJ6P5.mjs";import{b as o,c as a,d as n,e as s,f as p}from"./chunk-RZ5NAERX.mjs";import"./chunk-NAZHVLXC.mjs";import{a as e,b as r}from"./chunk-HCABBSIE.mjs";import"./chunk-W5BITU26.mjs";import"./chunk-GKEJP2H3.mjs";import"./chunk-OUDLZKER.mjs";import{j as t}from"./chunk-SOJZCPJL.mjs";t();import{EVMWallet as C,SolanaWallet as g,StellarWallet as k,Wallet as M}from"@crossmint/wallets-sdk";export{o as CrossmintAuthProvider,e as CrossmintCheckoutProvider,f as CrossmintEmbeddedCheckout,l as CrossmintProvider,y as CrossmintWalletProvider,C as EVMWallet,m as EmailSignersDialog,x as ExportPrivateKeyButton,i as PhoneSignersDialog,g as SolanaWallet,k as StellarWallet,M as Wallet,n as useCrossmint,a as useCrossmintAuth,r as useCrossmintCheckout,s as useWallet,p as useWalletOtpSigner};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk4LOO5RD2js = require('../chunk-4LOO5RD2.js');require('../chunk-EIARIAHW.js');require('../chunk-4EVH2LVP.js');exports.initReactNativeLogger = _chunk4LOO5RD2js.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVIF376PXjs = require('../chunk-VIF376PX.js');require('../chunk-LJXWVJKP.js');require('../chunk-4EVH2LVP.js');exports.initReactNativeLogger = _chunkVIF376PXjs.a;
@@ -1 +1 @@
1
- import{a}from"../chunk-VCUXRZ25.mjs";import"../chunk-VWIH3KHH.mjs";import"../chunk-SOJZCPJL.mjs";export{a as initReactNativeLogger};
1
+ import{a}from"../chunk-GKEJP2H3.mjs";import"../chunk-OUDLZKER.mjs";import"../chunk-SOJZCPJL.mjs";export{a as initReactNativeLogger};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkIMGW2ENFjs = require('../chunk-IMGW2ENF.js');var _chunk2LHAVQDLjs = require('../chunk-2LHAVQDL.js');require('../chunk-5276D2J3.js');var _chunk4EVH2LVPjs = require('../chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _configplugins = require('@expo/config-plugins');var i=_chunk4EVH2LVPjs.c.call(void 0, "@crossmint/client-sdk-react-native-ui/package.json"),p=(e,n)=>(e=_chunkIMGW2ENFjs.a.call(void 0, e),e=_chunk2LHAVQDLjs.a.call(void 0, e,n),e),a= exports.default =_configplugins.createRunOncePlugin.call(void 0, p,i.name,i.version);exports.default = a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunk2LHAVQDLjs = require('../chunk-2LHAVQDL.js');require('../chunk-5276D2J3.js');var _chunkIMGW2ENFjs = require('../chunk-IMGW2ENF.js');var _chunk4EVH2LVPjs = require('../chunk-4EVH2LVP.js');_chunk4EVH2LVPjs.j.call(void 0, );var _configplugins = require('@expo/config-plugins');var i=_chunk4EVH2LVPjs.c.call(void 0, "@crossmint/client-sdk-react-native-ui/package.json"),p=(e,n)=>(e=_chunkIMGW2ENFjs.a.call(void 0, e),e=_chunk2LHAVQDLjs.a.call(void 0, e,n),e),a= exports.default =_configplugins.createRunOncePlugin.call(void 0, p,i.name,i.version);exports.default = a;
@@ -1 +1 @@
1
- import{a as t}from"../chunk-OP5W4CEA.mjs";import{a as r}from"../chunk-VECZ4E3A.mjs";import"../chunk-PZXSKAWQ.mjs";import{c as P,j as o}from"../chunk-SOJZCPJL.mjs";o();import{createRunOncePlugin as l}from"@expo/config-plugins";var i=P("@crossmint/client-sdk-react-native-ui/package.json"),p=(e,n)=>(e=t(e),e=r(e,n),e),y=l(p,i.name,i.version);export{y as default};
1
+ import{a as r}from"../chunk-VECZ4E3A.mjs";import"../chunk-PZXSKAWQ.mjs";import{a as t}from"../chunk-OP5W4CEA.mjs";import{c as P,j as o}from"../chunk-SOJZCPJL.mjs";o();import{createRunOncePlugin as l}from"@expo/config-plugins";var i=P("@crossmint/client-sdk-react-native-ui/package.json"),p=(e,n)=>(e=t(e),e=r(e,n),e),y=l(p,i.name,i.version);export{y as default};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkMIEAYZKVjs = require('../chunk-MIEAYZKV.js');require('../chunk-4LOO5RD2.js');require('../chunk-EIARIAHW.js');require('../chunk-4EVH2LVP.js');exports.CrossmintProvider = _chunkMIEAYZKVjs.b; exports.LoggerContext = _chunkMIEAYZKVjs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkB5WVGQSCjs = require('../chunk-B5WVGQSC.js');require('../chunk-VIF376PX.js');require('../chunk-LJXWVJKP.js');require('../chunk-4EVH2LVP.js');exports.CrossmintProvider = _chunkB5WVGQSCjs.b; exports.LoggerContext = _chunkB5WVGQSCjs.a;
@@ -1 +1 @@
1
- import{a,b}from"../chunk-LIS64E2K.mjs";import"../chunk-VCUXRZ25.mjs";import"../chunk-VWIH3KHH.mjs";import"../chunk-SOJZCPJL.mjs";export{b as CrossmintProvider,a as LoggerContext};
1
+ import{a,b}from"../chunk-OCYSQB6Q.mjs";import"../chunk-GKEJP2H3.mjs";import"../chunk-OUDLZKER.mjs";import"../chunk-SOJZCPJL.mjs";export{b as CrossmintProvider,a as LoggerContext};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkUE4NJAT7js = require('../chunk-UE4NJAT7.js');require('../chunk-L3XYSJK3.js');require('../chunk-MIEAYZKV.js');require('../chunk-5OGTOGBE.js');require('../chunk-UZIY546T.js');require('../chunk-EUIDKBS7.js');require('../chunk-UJTROZMN.js');require('../chunk-TWZI6S7U.js');require('../chunk-WJP5GQ35.js');require('../chunk-37TKX2AS.js');require('../chunk-7AMJYMIL.js');require('../chunk-NBK4T7QJ.js');require('../chunk-FHG7Y3B2.js');require('../chunk-X5DFNNBV.js');require('../chunk-DCWNSPWC.js');require('../chunk-4LOO5RD2.js');require('../chunk-EIARIAHW.js');require('../chunk-INFBLVRX.js');require('../chunk-6SC5DDHW.js');require('../chunk-4EVH2LVP.js');exports.CrossmintWalletProvider = _chunkUE4NJAT7js.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkGYNCKBJCjs = require('../chunk-GYNCKBJC.js');require('../chunk-B5WVGQSC.js');require('../chunk-L3XYSJK3.js');require('../chunk-INFBLVRX.js');require('../chunk-6SC5DDHW.js');require('../chunk-5OGTOGBE.js');require('../chunk-UZIY546T.js');require('../chunk-EUIDKBS7.js');require('../chunk-UJTROZMN.js');require('../chunk-TWZI6S7U.js');require('../chunk-WJP5GQ35.js');require('../chunk-37TKX2AS.js');require('../chunk-7AMJYMIL.js');require('../chunk-NBK4T7QJ.js');require('../chunk-FHG7Y3B2.js');require('../chunk-X5DFNNBV.js');require('../chunk-DCWNSPWC.js');require('../chunk-VIF376PX.js');require('../chunk-LJXWVJKP.js');require('../chunk-4EVH2LVP.js');exports.CrossmintWalletProvider = _chunkGYNCKBJCjs.a;
@@ -1 +1 @@
1
- import{a}from"../chunk-PDPIGJ5L.mjs";import"../chunk-BP63EHIH.mjs";import"../chunk-LIS64E2K.mjs";import"../chunk-TJRVTCJX.mjs";import"../chunk-7UXEUMEA.mjs";import"../chunk-MVBKLS3P.mjs";import"../chunk-S5O4QBFM.mjs";import"../chunk-67Z6QY5X.mjs";import"../chunk-XD7WEGQZ.mjs";import"../chunk-TZKIJ5KX.mjs";import"../chunk-XONQWEM5.mjs";import"../chunk-GTBJ6SM6.mjs";import"../chunk-4EBFS2LY.mjs";import"../chunk-7573EHPC.mjs";import"../chunk-AXQNJ6P5.mjs";import"../chunk-VCUXRZ25.mjs";import"../chunk-VWIH3KHH.mjs";import"../chunk-4XI5PNDY.mjs";import"../chunk-ND3HLTOS.mjs";import"../chunk-SOJZCPJL.mjs";export{a as CrossmintWalletProvider};
1
+ import{a}from"../chunk-OSBAFKPS.mjs";import"../chunk-OCYSQB6Q.mjs";import"../chunk-BP63EHIH.mjs";import"../chunk-4XI5PNDY.mjs";import"../chunk-ND3HLTOS.mjs";import"../chunk-TJRVTCJX.mjs";import"../chunk-7UXEUMEA.mjs";import"../chunk-MVBKLS3P.mjs";import"../chunk-S5O4QBFM.mjs";import"../chunk-67Z6QY5X.mjs";import"../chunk-XD7WEGQZ.mjs";import"../chunk-TZKIJ5KX.mjs";import"../chunk-XONQWEM5.mjs";import"../chunk-GTBJ6SM6.mjs";import"../chunk-4EBFS2LY.mjs";import"../chunk-7573EHPC.mjs";import"../chunk-AXQNJ6P5.mjs";import"../chunk-GKEJP2H3.mjs";import"../chunk-OUDLZKER.mjs";import"../chunk-SOJZCPJL.mjs";export{a as CrossmintWalletProvider};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-CB4O4U7N.js');var _chunkUE4NJAT7js = require('../chunk-UE4NJAT7.js');require('../chunk-L3XYSJK3.js');var _chunkMIEAYZKVjs = require('../chunk-MIEAYZKV.js');require('../chunk-5OGTOGBE.js');require('../chunk-UZIY546T.js');require('../chunk-EUIDKBS7.js');require('../chunk-UJTROZMN.js');require('../chunk-TWZI6S7U.js');require('../chunk-WJP5GQ35.js');require('../chunk-37TKX2AS.js');require('../chunk-7AMJYMIL.js');require('../chunk-NBK4T7QJ.js');require('../chunk-FHG7Y3B2.js');require('../chunk-X5DFNNBV.js');require('../chunk-DCWNSPWC.js');var _chunk3FPXEECQjs = require('../chunk-3FPXEECQ.js');require('../chunk-NR7JUGTU.js');require('../chunk-4GUZHOD6.js');require('../chunk-DAERG6FM.js');require('../chunk-4LOO5RD2.js');require('../chunk-EIARIAHW.js');require('../chunk-INFBLVRX.js');require('../chunk-6SC5DDHW.js');require('../chunk-4EVH2LVP.js');exports.CrossmintAuthProvider = _chunk3FPXEECQjs.b; exports.CrossmintProvider = _chunkMIEAYZKVjs.b; exports.CrossmintWalletProvider = _chunkUE4NJAT7js.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-CB4O4U7N.js');var _chunkGYNCKBJCjs = require('../chunk-GYNCKBJC.js');var _chunkB5WVGQSCjs = require('../chunk-B5WVGQSC.js');require('../chunk-L3XYSJK3.js');require('../chunk-INFBLVRX.js');require('../chunk-6SC5DDHW.js');require('../chunk-5OGTOGBE.js');require('../chunk-UZIY546T.js');require('../chunk-EUIDKBS7.js');require('../chunk-UJTROZMN.js');require('../chunk-TWZI6S7U.js');require('../chunk-WJP5GQ35.js');require('../chunk-37TKX2AS.js');require('../chunk-7AMJYMIL.js');require('../chunk-NBK4T7QJ.js');require('../chunk-FHG7Y3B2.js');require('../chunk-X5DFNNBV.js');require('../chunk-DCWNSPWC.js');var _chunk3FPXEECQjs = require('../chunk-3FPXEECQ.js');require('../chunk-NR7JUGTU.js');require('../chunk-4GUZHOD6.js');require('../chunk-DAERG6FM.js');require('../chunk-VIF376PX.js');require('../chunk-LJXWVJKP.js');require('../chunk-4EVH2LVP.js');exports.CrossmintAuthProvider = _chunk3FPXEECQjs.b; exports.CrossmintProvider = _chunkB5WVGQSCjs.b; exports.CrossmintWalletProvider = _chunkGYNCKBJCjs.a;
@@ -1 +1 @@
1
- import"../chunk-E5XQNXJ6.mjs";import{a as c}from"../chunk-PDPIGJ5L.mjs";import"../chunk-BP63EHIH.mjs";import{b}from"../chunk-LIS64E2K.mjs";import"../chunk-TJRVTCJX.mjs";import"../chunk-7UXEUMEA.mjs";import"../chunk-MVBKLS3P.mjs";import"../chunk-S5O4QBFM.mjs";import"../chunk-67Z6QY5X.mjs";import"../chunk-XD7WEGQZ.mjs";import"../chunk-TZKIJ5KX.mjs";import"../chunk-XONQWEM5.mjs";import"../chunk-GTBJ6SM6.mjs";import"../chunk-4EBFS2LY.mjs";import"../chunk-7573EHPC.mjs";import"../chunk-AXQNJ6P5.mjs";import{b as a}from"../chunk-RZ5NAERX.mjs";import"../chunk-NAZHVLXC.mjs";import"../chunk-HCABBSIE.mjs";import"../chunk-W5BITU26.mjs";import"../chunk-VCUXRZ25.mjs";import"../chunk-VWIH3KHH.mjs";import"../chunk-4XI5PNDY.mjs";import"../chunk-ND3HLTOS.mjs";import"../chunk-SOJZCPJL.mjs";export{a as CrossmintAuthProvider,b as CrossmintProvider,c as CrossmintWalletProvider};
1
+ import"../chunk-E5XQNXJ6.mjs";import{a as c}from"../chunk-OSBAFKPS.mjs";import{b}from"../chunk-OCYSQB6Q.mjs";import"../chunk-BP63EHIH.mjs";import"../chunk-4XI5PNDY.mjs";import"../chunk-ND3HLTOS.mjs";import"../chunk-TJRVTCJX.mjs";import"../chunk-7UXEUMEA.mjs";import"../chunk-MVBKLS3P.mjs";import"../chunk-S5O4QBFM.mjs";import"../chunk-67Z6QY5X.mjs";import"../chunk-XD7WEGQZ.mjs";import"../chunk-TZKIJ5KX.mjs";import"../chunk-XONQWEM5.mjs";import"../chunk-GTBJ6SM6.mjs";import"../chunk-4EBFS2LY.mjs";import"../chunk-7573EHPC.mjs";import"../chunk-AXQNJ6P5.mjs";import{b as a}from"../chunk-RZ5NAERX.mjs";import"../chunk-NAZHVLXC.mjs";import"../chunk-HCABBSIE.mjs";import"../chunk-W5BITU26.mjs";import"../chunk-GKEJP2H3.mjs";import"../chunk-OUDLZKER.mjs";import"../chunk-SOJZCPJL.mjs";export{a as CrossmintAuthProvider,b as CrossmintProvider,c as CrossmintWalletProvider};
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkCFVNEE2Ljs = require('../chunk-CFVNEE2L.js');require('../chunk-EIARIAHW.js');require('../chunk-4EVH2LVP.js');exports.createCrossmintApiClient = _chunkCFVNEE2Ljs.a;
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkOXZEQH33js = require('../chunk-OXZEQH33.js');require('../chunk-LJXWVJKP.js');require('../chunk-4EVH2LVP.js');exports.createCrossmintApiClient = _chunkOXZEQH33js.a;
@@ -1 +1 @@
1
- import{a}from"../chunk-NKQULQ2K.mjs";import"../chunk-VWIH3KHH.mjs";import"../chunk-SOJZCPJL.mjs";export{a as createCrossmintApiClient};
1
+ import{a}from"../chunk-2Z7H7ZOJ.mjs";import"../chunk-OUDLZKER.mjs";import"../chunk-SOJZCPJL.mjs";export{a as createCrossmintApiClient};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crossmint/client-sdk-react-native-ui",
3
- "version": "1.1.13",
3
+ "version": "1.2.0",
4
4
  "repository": "https://github.com/Crossmint/crossmint-sdk",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Paella Labs Inc",
@@ -32,14 +32,14 @@
32
32
  "react-native-svg": "15.14.0",
33
33
  "react-native-webview": "13.15.0",
34
34
  "zod": "3.22.4",
35
- "@crossmint/client-sdk-auth": "1.3.9",
36
- "@crossmint/client-sdk-base": "2.3.3",
37
- "@crossmint/client-sdk-react-base": "2.0.16",
38
- "@crossmint/client-sdk-rn-window": "0.3.15",
39
- "@crossmint/client-signers": "0.1.2",
40
- "@crossmint/common-sdk-auth": "1.1.7",
35
+ "@crossmint/client-sdk-auth": "1.3.10",
36
+ "@crossmint/client-sdk-base": "2.3.4",
37
+ "@crossmint/client-sdk-react-base": "2.0.18",
38
+ "@crossmint/client-sdk-rn-window": "0.3.16",
39
+ "@crossmint/client-signers": "0.2.0",
40
+ "@crossmint/common-sdk-auth": "1.1.8",
41
41
  "@crossmint/common-sdk-base": "0.10.0",
42
- "@crossmint/wallets-sdk": "1.0.14"
42
+ "@crossmint/wallets-sdk": "1.1.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@expo/config-plugins": "^9.0.17",
@@ -1 +0,0 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.1.13",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","README.md"],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;
@@ -1 +0,0 @@
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;
@@ -1 +0,0 @@
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};
@@ -1 +0,0 @@
1
- var o={name:"@crossmint/client-sdk-react-native-ui",version:"1.1.13",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","README.md"],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};