@crossmint/client-sdk-react-native-ui 0.13.2 → 0.13.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunk-A3OLN6DV.js +1 -0
- package/dist/chunk-C5OFI35N.mjs +1 -0
- package/dist/chunk-J36PDK5V.mjs +1 -0
- package/dist/{chunk-DXCA2J5G.js → chunk-KEQROZQT.js} +1 -1
- package/dist/{chunk-ZJ2UJJGI.mjs → chunk-KPJ2TLTH.mjs} +1 -1
- package/dist/chunk-LOWHFH2U.js +1 -0
- package/dist/{chunk-MN3TB5OP.js → chunk-M6QYYMLH.js} +1 -1
- package/dist/{chunk-DRGW4OWO.mjs → chunk-PPCFBEW2.mjs} +1 -1
- package/dist/chunk-QPXWIB5H.mjs +1 -0
- package/dist/chunk-R53VL63J.js +1 -0
- package/dist/chunk-TETUIGAB.mjs +1 -0
- package/dist/chunk-VHALUNVO.js +1 -0
- package/dist/chunk-YDVGBH2H.js +1 -0
- package/dist/chunk-ZCMT733Z.mjs +1 -0
- package/dist/components/embed/index.js +1 -1
- package/dist/components/embed/index.mjs +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.js +1 -1
- package/dist/components/embed/v3/CrossmintEmbeddedCheckoutV3.mjs +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.js +1 -1
- package/dist/components/embed/v3/EmbeddedCheckoutV3WebView.mjs +1 -1
- package/dist/components/embed/v3/index.js +1 -1
- package/dist/components/embed/v3/index.mjs +1 -1
- package/dist/components/index.js +1 -1
- package/dist/components/index.mjs +1 -1
- package/dist/hooks/index.js +1 -1
- package/dist/hooks/index.mjs +1 -1
- package/dist/hooks/useAuth.js +1 -1
- package/dist/hooks/useAuth.mjs +1 -1
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/logger/init.d.mts +17 -0
- package/dist/logger/init.d.ts +17 -0
- package/dist/logger/init.js +1 -0
- package/dist/logger/init.mjs +1 -0
- package/dist/providers/CrossmintAuthProvider.js +1 -1
- package/dist/providers/CrossmintAuthProvider.mjs +1 -1
- package/dist/providers/CrossmintProvider.d.mts +4 -1
- package/dist/providers/CrossmintProvider.d.ts +4 -1
- package/dist/providers/CrossmintProvider.js +1 -1
- package/dist/providers/CrossmintProvider.mjs +1 -1
- package/dist/providers/CrossmintWalletProvider.js +1 -1
- package/dist/providers/CrossmintWalletProvider.mjs +1 -1
- package/dist/providers/index.js +1 -1
- package/dist/providers/index.mjs +1 -1
- package/dist/utils/createCrossmintApiClient.js +1 -1
- package/dist/utils/createCrossmintApiClient.mjs +1 -1
- package/package.json +10 -9
- package/dist/chunk-DIX2XCMR.mjs +0 -1
- package/dist/chunk-JZZOVKVC.js +0 -1
- package/dist/chunk-O5JUQOMA.js +0 -1
- package/dist/chunk-RQOORLYR.mjs +0 -1
- package/dist/chunk-TZRTTC6Q.mjs +0 -1
- package/dist/chunk-ZMB227CA.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYDVGBH2Hjs = require('./chunk-YDVGBH2H.js');var _chunkYJORUMPBjs = require('./chunk-YJORUMPB.js');var _chunkMVVSGLQLjs = require('./chunk-MVVSGLQL.js');var _chunkJ42HASCIjs = require('./chunk-J42HASCI.js');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');function _({children:w,createOnLogin:k,appearance:U,headlessSigningFlow:b=!0,callbacks:O}){let{crossmint:R}=_clientsdkreactbase.useCrossmint.call(void 0, "CrossmintWalletProvider must be used within CrossmintProvider"),n=_clientsdkreactbase.useLogger.call(void 0, _chunkYDVGBH2Hjs.a),{apiKey:g,appId:u}=R,m=_react.useMemo.call(void 0, ()=>{let e=_commonsdkbase.validateAPIKey.call(void 0, g);if(!e.isValid)throw new Error("Invalid API key");return e},[g]),L=_react.useMemo.call(void 0, ()=>_clientsigners.environmentUrlConfig[m.environment],[m.environment]),a=_react.useRef.call(void 0, null),t=_react.useRef.call(void 0, null),[h,M]=_react.useState.call(void 0, !1),T=_react.useMemo.call(void 0, ()=>u!=null?{crossmintAppId:u}:{},[u]);_react.useEffect.call(void 0, ()=>{a.current!=null&&t.current==null&&(n.info("react-native.wallet.webview.initializing"),t.current=new (0, _clientsdkrnwindow.WebViewParent)(a,{incomingEvents:_clientsigners.signerOutboundEvents,outgoingEvents:_clientsigners.signerInboundEvents,recovery:{recoverableErrorCodes:[_clientsigners.SignerErrorCode.IndexedDbFatal]}}),n.info("react-native.wallet.webview.initialized"))},[h,n]);let A=_react.useCallback.call(void 0, ()=>_chunkJ42HASCIjs.e.call(void 0, this,null,function*(){let e=t.current;if(e!=null)try{n.info("react-native.wallet.webview.handshake.start"),e.isConnected=!1,yield e.handshakeWithChild(),n.info("react-native.wallet.webview.handshake.success")}catch(r){n.error("react-native.wallet.webview.handshake.error",{error:r instanceof Error?r.message:String(r)}),console.error("[CrossmintWalletProvider] Handshake error:",r)}}),[n]),N=_react.useCallback.call(void 0, e=>{let r=t.current;if(r!=null){try{let o=JSON.parse(e.nativeEvent.data);if(o&&typeof o.type=="string"&&o.type.startsWith("console.")){let p=o.type.split(".")[1],s=(o.data||[]).map(i=>{try{return i==="[Function]"||i==="[Circular Reference]"||i==="[Unserializable Object]"?i:JSON.parse(i)}catch(Z){return i}}),c=`[WebView:${p.toUpperCase()}]`;switch(p){case"log":console.log(c,...s);break;case"error":console.error(c,...s);break;case"warn":console.warn(c,...s);break;case"info":console.info(c,...s);break;default:console.log(`[WebView Unknown:${p}]`,...s)}return}}catch(o){}r.handleMessage(e)}},[]);return _jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletUIBaseProvider,{createOnLogin:k,appearance:U,headlessSigningFlow:b,initializeWebView:()=>_chunkJ42HASCIjs.e.call(void 0, this,null,function*(){n.info("react-native.wallet.webview.init.start"),M(!0);let e=0,r=100;for(;t.current==null&&e<r;)yield new Promise(o=>setTimeout(o,50)),e++;if(t.current==null)throw n.error("react-native.wallet.webview.init.timeout",{attempts:e}),new Error("WebView not ready or handshake incomplete");n.info("react-native.wallet.webview.init.success",{attempts:e})}),callbacks:O,renderUI:b?void 0:({emailSignerProps:e,phoneSignerProps:r})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkYJORUMPBjs.a,_chunkJ42HASCIjs.a.call(void 0, {},e)),_jsxruntime.jsx.call(void 0, _chunkMVVSGLQLjs.a,_chunkJ42HASCIjs.a.call(void 0, {},r))]}),clientTEEConnection:()=>{if(t.current==null)throw new Error("WebView not ready or handshake incomplete");return t.current},children:[w,h&&_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:a,source:{uri:L},globals:T,onLoadEnd:A,onMessage:N,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var e;return(e=a.current)==null?void 0:e.reload()},onRenderProcessGone:()=>{var e;return(e=a.current)==null?void 0:e.reload()},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[_clientsigners.environmentUrlConfig[m.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function we(w){return _jsxruntime.jsx.call(void 0, _,_chunkJ42HASCIjs.a.call(void 0, {},w))}exports.a = we;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as n}from"./chunk-TETUIGAB.mjs";import{CrossmintApiClient as e}from"@crossmint/common-sdk-base";function C(i,t){return new e(i,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:n.version},apiKeyExpectations:t}})}export{C as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as t}from"./chunk-TETUIGAB.mjs";import{e as r}from"./chunk-PSSAAY7D.mjs";import{DATADOG_CLIENT_TOKEN as g,SdkLogger as m,ReactNativeDatadogSink as p,validateAPIKey as v}from"@crossmint/common-sdk-base";import n from"expo-constants";import*as s from"@datadog/mobile-react-native";var{DdSdkReactNative:f,DatadogProviderConfiguration:u}=s;function D(i){return r(this,null,function*(){var o;try{let e=new u(g,(o=i.environment)!=null?o:"production","crossmint-sdk",!1,!1,!1);e.site="datadoghq.com",yield f.initialize(e)}catch(e){e instanceof Error&&e.message.includes("Native modules require")?console.warn("[React Native UI SDK] Datadog SDK initialization failed. Native modules require a development build (not Expo Go).",e):console.warn("[React Native UI SDK]",e instanceof Error?e.message:String(e))}})}function w(i){let o=v(i);if(!o.isValid)throw new Error(`Invalid API key: ${o.message}`);let{environment:e,projectId:c}=o,a=new m({packageName:t.name,packageVersion:t.version,environment:e,projectId:c,platform:"react-native"}),d=n.executionEnvironment==="storeClient"||n.appOwnership==="expo"||!!n.expoVersion;D({environment:e,isExpoGo:d});let l=new p(e,s);return a.addSink(l),a}export{D as a,w as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkM6QYYMLHjs = require('./chunk-M6QYYMLH.js');var _chunkJ42HASCIjs = require('./chunk-J42HASCI.js');var _jsxruntime = require('react/jsx-runtime');function s(d){return _jsxruntime.jsx.call(void 0, _chunkM6QYYMLHjs.a,_chunkJ42HASCIjs.a.call(void 0, {},d))}exports.a = s;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
1
|
+
import{a as o}from"./chunk-PPCFBEW2.mjs";import{a as e}from"./chunk-PSSAAY7D.mjs";import{jsx as t}from"react/jsx-runtime";function i(d){return t(o,e({},d))}export{i as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var t={name:"@crossmint/client-sdk-react-native-ui",version:"0.13.4",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","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch"},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:*","@datadog/mobile-react-native":"2.13.2","@solana/web3.js":"1.98.1",bs58:"^5.0.0","lucide-react-native":"0.548.0",mitt:"3.0.1","react-native-svg":"15.14.0",zod:"3.22.4"},devDependencies:{"@expo/config-plugins":"^9.0.17","@types/react":"19.1.10","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8"},peerDependencies:{"@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-constants":">=17 <19","expo-device":">=7 <9","expo-secure-store":">=14 <16","expo-web-browser":">=14 <16",react:">=17.0.2","react-native":">=0.74.3","react-native-webview":">=13.15.0 <14"}};exports.a = t;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYQEWHOQ7js = require('./chunk-YQEWHOQ7.js');var _chunkVACQTZRTjs = require('./chunk-VACQTZRT.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYQEWHOQ7js = require('./chunk-YQEWHOQ7.js');var _chunkVACQTZRTjs = require('./chunk-VACQTZRT.js');var _chunkVHALUNVOjs = require('./chunk-VHALUNVO.js');var _chunk2D2RJCVXjs = require('./chunk-2D2RJCVX.js');var _chunkJ42HASCIjs = require('./chunk-J42HASCI.js');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 Q(t){var u;let[e,w]=_react.useState.call(void 0, null),[C,v]=_react.useState.call(void 0, 0),E=_react.useRef.call(void 0, (u=t.payment.crypto.payer)==null?void 0:u.initialChain),n=_react.useRef.call(void 0, t);if(U(t,n.current)){let r=_chunkJ42HASCIjs.a.call(void 0, {},t),o=F(t,E.current);o.shouldPreserve&&(r.payment.crypto.payer=o.updatedPayer),n.current=r}let{crossmint:i}=_clientsdkreactbase.useCrossmint.call(void 0, ),V=_chunkVHALUNVOjs.a.call(void 0, i,{usageOrigin:"client"}),P=_clientsdkbase.crossmintEmbeddedCheckoutV3Service.call(void 0, {apiClient:V}),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});w(o)},[s.current,e]),_react.useEffect.call(void 0, ()=>{if(e==null)return;let r=a=>v(a.height);e.on("ui:height.changed",r);let o=a=>{_chunk2D2RJCVXjs.a.emit("order:updated",a)};return e.on("order:updated",o),()=>{e.off("ui:height.changed"),e.off("order:updated")}},[e]);let k=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:P.iframe.getUrl(n.current)},onMessage:k,style:{width:"100%",minWidth:"100%",height:C,backgroundColor:"transparent",overflow:"hidden",opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!1,bounces:!1,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,domStorageEnabled:!0,mixedContentMode:"always",allowFileAccess:!0,allowUniversalAccessFromFileURLs:!0,geolocationEnabled:!0,userAgent:_chunkYQEWHOQ7js.c,paymentRequestEnabled:!0}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?_jsxruntime.jsx.call(void 0, _chunkVACQTZRTjs.a,{payer:n.current.payment.crypto.payer,webViewClient:e}):_jsxruntime.jsx.call(void 0, H,{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 U(t,e){return JSON.stringify(t)!==JSON.stringify(e)}function F(t,e){return t.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:_chunkJ42HASCIjs.b.call(void 0, _chunkJ42HASCIjs.a.call(void 0, {},t.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}function H({message:t}){throw new Error(t)}exports.a = Q;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as h}from"./chunk-PCJMDUSI.mjs";import{a as y}from"./chunk-FX23A4BR.mjs";import{a as f}from"./chunk-
|
|
1
|
+
import{c as h}from"./chunk-PCJMDUSI.mjs";import{a as y}from"./chunk-FX23A4BR.mjs";import{a as f}from"./chunk-C5OFI35N.mjs";import{a as p}from"./chunk-FFQ6EQCL.mjs";import{a as d,b as m}from"./chunk-PSSAAY7D.mjs";import{useCrossmint as S}from"@crossmint/client-sdk-react-base";import{useEffect as b,useRef as l,useState as g}from"react";import{View as W}from"react-native";import{crossmintEmbeddedCheckoutV3Service as I}from"@crossmint/client-sdk-base";import{RNWebView as A,WebViewParent as M}from"@crossmint/client-sdk-rn-window";import{embeddedCheckoutV3IncomingEvents as R,embeddedCheckoutV3OutgoingEvents as O}from"@crossmint/client-sdk-base";import{jsx as c,jsxs as L}from"react/jsx-runtime";function Y(t){var u;let[e,w]=g(null),[C,v]=g(0),E=l((u=t.payment.crypto.payer)==null?void 0:u.initialChain),n=l(t);if(U(t,n.current)){let r=d({},t),o=F(t,E.current);o.shouldPreserve&&(r.payment.crypto.payer=o.updatedPayer),n.current=r}let{crossmint:i}=S(),V=f(i,{usageOrigin:"client"}),P=I({apiClient:V}),s=l(null);b(()=>{let r=s.current;if(!r||e)return;let o=new M({current:r},{incomingEvents:R,outgoingEvents:O});w(o)},[s.current,e]),b(()=>{if(e==null)return;let r=a=>v(a.height);e.on("ui:height.changed",r);let o=a=>{p.emit("order:updated",a)};return e.on("order:updated",o),()=>{e.off("ui:height.changed"),e.off("order:updated")}},[e]);let k=r=>{e&&e.handleMessage(r)};return L(W,{style:{flex:1},children:[c(A,{ref:s,globals:i.appId?{crossmintAppId:i.appId}:void 0,source:{uri:P.iframe.getUrl(n.current)},onMessage:k,style:{width:"100%",minWidth:"100%",height:C,backgroundColor:"transparent",overflow:"hidden",opacity:1,padding:0,boxShadow:"none",borderWidth:0,transform:[{translateX:0}]},allowsInlineMediaPlayback:!0,mediaPlaybackRequiresUserAction:!1,allowsBackForwardNavigationGestures:!1,allowsLinkPreview:!1,scrollEnabled:!1,bounces:!1,showsHorizontalScrollIndicator:!1,showsVerticalScrollIndicator:!1,domStorageEnabled:!0,mixedContentMode:"always",allowFileAccess:!0,allowUniversalAccessFromFileURLs:!0,geolocationEnabled:!0,userAgent:h,paymentRequestEnabled:!0}),n.current.payment.crypto.enabled?n.current.payment.crypto.payer!=null?c(y,{payer:n.current.payment.crypto.payer,webViewClient:e}):c(H,{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 U(t,e){return JSON.stringify(t)!==JSON.stringify(e)}function F(t,e){return t.payment.crypto.payer&&e!=null?{shouldPreserve:!0,updatedPayer:m(d({},t.payment.crypto.payer),{initialChain:e})}:{shouldPreserve:!1}}function H({message:t}){throw new Error(t)}export{Y as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as s}from"./chunk-J36PDK5V.mjs";import{useMemo as c}from"react";import m from"expo-constants";import{CrossmintProvider as f,createLoggerContext as v}from"@crossmint/client-sdk-react-base";import{jsx as a}from"react/jsx-runtime";var P=v();function I({children:d,apiKey:o,overrideBaseUrl:p}){var r,e,t,i,n;let g=c(()=>s(o),[o]),C=(n=(e=(r=m.expoConfig)==null?void 0:r.ios)==null?void 0:e.bundleIdentifier)!=null?n:(i=(t=m.expoConfig)==null?void 0:t.android)==null?void 0:i.package;return a(P.Provider,{value:g,children:a(f,{apiKey:o,appId:C,overrideBaseUrl:p,children:d})})}export{P as a,I as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkLOWHFH2Ujs = require('./chunk-LOWHFH2U.js');var _chunkJ42HASCIjs = require('./chunk-J42HASCI.js');var _commonsdkbase = require('@crossmint/common-sdk-base');var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _mobilereactnative = require('@datadog/mobile-react-native'); var s = _interopRequireWildcard(_mobilereactnative);var{DdSdkReactNative:f,DatadogProviderConfiguration:u}=s;function D(i){return _chunkJ42HASCIjs.e.call(void 0, this,null,function*(){var o;try{let e=new u(_commonsdkbase.DATADOG_CLIENT_TOKEN,(o=i.environment)!=null?o:"production","crossmint-sdk",!1,!1,!1);e.site="datadoghq.com",yield f.initialize(e)}catch(e){e instanceof Error&&e.message.includes("Native modules require")?console.warn("[React Native UI SDK] Datadog SDK initialization failed. Native modules require a development build (not Expo Go).",e):console.warn("[React Native UI SDK]",e instanceof Error?e.message:String(e))}})}function x(i){let o=_commonsdkbase.validateAPIKey.call(void 0, i);if(!o.isValid)throw new Error(`Invalid API key: ${o.message}`);let{environment:e,projectId:c}=o,a=new (0, _commonsdkbase.SdkLogger)({packageName:_chunkLOWHFH2Ujs.a.name,packageVersion:_chunkLOWHFH2Ujs.a.version,environment:e,projectId:c,platform:"react-native"}),d=_expoconstants2.default.executionEnvironment==="storeClient"||_expoconstants2.default.appOwnership==="expo"||!!_expoconstants2.default.expoVersion;D({environment:e,isExpoGo:d});let l=new (0, _commonsdkbase.ReactNativeDatadogSink)(e,s);return a.addSink(l),a}exports.a = D; exports.b = x;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var t={name:"@crossmint/client-sdk-react-native-ui",version:"0.13.4",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","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch"},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:*","@datadog/mobile-react-native":"2.13.2","@solana/web3.js":"1.98.1",bs58:"^5.0.0","lucide-react-native":"0.548.0",mitt:"3.0.1","react-native-svg":"15.14.0",zod:"3.22.4"},devDependencies:{"@expo/config-plugins":"^9.0.17","@types/react":"19.1.10","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8"},peerDependencies:{"@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-constants":">=17 <19","expo-device":">=7 <9","expo-secure-store":">=14 <16","expo-web-browser":">=14 <16",react:">=17.0.2","react-native":">=0.74.3","react-native-webview":">=13.15.0 <14"}};export{t as a};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkLOWHFH2Ujs = require('./chunk-LOWHFH2U.js');var _commonsdkbase = require('@crossmint/common-sdk-base');function a(i,t){return new (0, _commonsdkbase.CrossmintApiClient)(i,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:_chunkLOWHFH2Ujs.a.version},apiKeyExpectations:t}})}exports.a = a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _chunkR53VL63Jjs = require('./chunk-R53VL63J.js');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 k({children:d,apiKey:o,overrideBaseUrl:p}){var r,e,t,i,n;let g=_react.useMemo.call(void 0, ()=>_chunkR53VL63Jjs.b.call(void 0, o),[o]),C=(n=(e=(r=_expoconstants2.default.expoConfig)==null?void 0:r.ios)==null?void 0:e.bundleIdentifier)!=null?n:(i=(t=_expoconstants2.default.expoConfig)==null?void 0:t.android)==null?void 0:i.package;return _jsxruntime.jsx.call(void 0, P.Provider,{value:g,children:_jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintProvider,{apiKey:o,appId:C,overrideBaseUrl:p,children:d})})}exports.a = P; exports.b = k;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as W}from"./chunk-QPXWIB5H.mjs";import{a as C}from"./chunk-XNDIT72O.mjs";import{a as E}from"./chunk-3QSVHCEH.mjs";import{a as d,e as f}from"./chunk-PSSAAY7D.mjs";import{useCallback as P,useRef as y,useMemo as v,useEffect as D,useState as S}from"react";import{View as z}from"react-native";import{RNWebView as x,WebViewParent as F}from"@crossmint/client-sdk-rn-window";import{environmentUrlConfig as V,signerInboundEvents as j,signerOutboundEvents as H,SignerErrorCode as K}from"@crossmint/client-signers";import{validateAPIKey as B}from"@crossmint/common-sdk-base";import{CrossmintWalletUIBaseProvider as G,useCrossmint as J}from"@crossmint/client-sdk-react-base";import{useLogger as $}from"@crossmint/client-sdk-react-base";import{Fragment as q,jsx as l,jsxs as I}from"react/jsx-runtime";function _({children:w,createOnLogin:k,appearance:U,headlessSigningFlow:b=!0,callbacks:O}){let{crossmint:R}=J("CrossmintWalletProvider must be used within CrossmintProvider"),n=$(W),{apiKey:g,appId:u}=R,m=v(()=>{let e=B(g);if(!e.isValid)throw new Error("Invalid API key");return e},[g]),L=v(()=>V[m.environment],[m.environment]),a=y(null),t=y(null),[h,M]=S(!1),T=v(()=>u!=null?{crossmintAppId:u}:{},[u]);D(()=>{a.current!=null&&t.current==null&&(n.info("react-native.wallet.webview.initializing"),t.current=new F(a,{incomingEvents:H,outgoingEvents:j,recovery:{recoverableErrorCodes:[K.IndexedDbFatal]}}),n.info("react-native.wallet.webview.initialized"))},[h,n]);let A=P(()=>f(this,null,function*(){let e=t.current;if(e!=null)try{n.info("react-native.wallet.webview.handshake.start"),e.isConnected=!1,yield e.handshakeWithChild(),n.info("react-native.wallet.webview.handshake.success")}catch(r){n.error("react-native.wallet.webview.handshake.error",{error:r instanceof Error?r.message:String(r)}),console.error("[CrossmintWalletProvider] Handshake error:",r)}}),[n]),N=P(e=>{let r=t.current;if(r!=null){try{let o=JSON.parse(e.nativeEvent.data);if(o&&typeof o.type=="string"&&o.type.startsWith("console.")){let p=o.type.split(".")[1],s=(o.data||[]).map(i=>{try{return i==="[Function]"||i==="[Circular Reference]"||i==="[Unserializable Object]"?i:JSON.parse(i)}catch(Z){return i}}),c=`[WebView:${p.toUpperCase()}]`;switch(p){case"log":console.log(c,...s);break;case"error":console.error(c,...s);break;case"warn":console.warn(c,...s);break;case"info":console.info(c,...s);break;default:console.log(`[WebView Unknown:${p}]`,...s)}return}}catch(o){}r.handleMessage(e)}},[]);return I(G,{createOnLogin:k,appearance:U,headlessSigningFlow:b,initializeWebView:()=>f(this,null,function*(){n.info("react-native.wallet.webview.init.start"),M(!0);let e=0,r=100;for(;t.current==null&&e<r;)yield new Promise(o=>setTimeout(o,50)),e++;if(t.current==null)throw n.error("react-native.wallet.webview.init.timeout",{attempts:e}),new Error("WebView not ready or handshake incomplete");n.info("react-native.wallet.webview.init.success",{attempts:e})}),callbacks:O,renderUI:b?void 0:({emailSignerProps:e,phoneSignerProps:r})=>I(q,{children:[l(C,d({},e)),l(E,d({},r))]}),clientTEEConnection:()=>{if(t.current==null)throw new Error("WebView not ready or handshake incomplete");return t.current},children:[w,h&&l(z,{style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:l(x,{ref:a,source:{uri:L},globals:T,onLoadEnd:A,onMessage:N,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var e;return(e=a.current)==null?void 0:e.reload()},onRenderProcessGone:()=>{var e;return(e=a.current)==null?void 0:e.reload()},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[V[m.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function ue(w){return l(_,d({},w))}export{ue as a};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-DKQZSNOO.js');require('../../chunk-72MMCJ2E.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../chunk-DKQZSNOO.js');require('../../chunk-72MMCJ2E.js');var _chunkKEQROZQTjs = require('../../chunk-KEQROZQT.js');require('../../chunk-M6QYYMLH.js');require('../../chunk-YQEWHOQ7.js');require('../../chunk-VACQTZRT.js');require('../../chunk-VHALUNVO.js');require('../../chunk-2D2RJCVX.js');require('../../chunk-LOWHFH2U.js');require('../../chunk-J42HASCI.js');exports.CrossmintEmbeddedCheckout = _chunkKEQROZQTjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../chunk-TIQGKXQA.mjs";import"../../chunk-MB7H3PBJ.mjs";import{a}from"../../chunk-
|
|
1
|
+
import"../../chunk-TIQGKXQA.mjs";import"../../chunk-MB7H3PBJ.mjs";import{a}from"../../chunk-KPJ2TLTH.mjs";import"../../chunk-PPCFBEW2.mjs";import"../../chunk-PCJMDUSI.mjs";import"../../chunk-FX23A4BR.mjs";import"../../chunk-C5OFI35N.mjs";import"../../chunk-FFQ6EQCL.mjs";import"../../chunk-TETUIGAB.mjs";import"../../chunk-PSSAAY7D.mjs";export{a as CrossmintEmbeddedCheckout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkKEQROZQTjs = require('../../../chunk-KEQROZQT.js');require('../../../chunk-M6QYYMLH.js');require('../../../chunk-YQEWHOQ7.js');require('../../../chunk-VACQTZRT.js');require('../../../chunk-VHALUNVO.js');require('../../../chunk-2D2RJCVX.js');require('../../../chunk-LOWHFH2U.js');require('../../../chunk-J42HASCI.js');exports.CrossmintEmbeddedCheckout = _chunkKEQROZQTjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-KPJ2TLTH.mjs";import"../../../chunk-PPCFBEW2.mjs";import"../../../chunk-PCJMDUSI.mjs";import"../../../chunk-FX23A4BR.mjs";import"../../../chunk-C5OFI35N.mjs";import"../../../chunk-FFQ6EQCL.mjs";import"../../../chunk-TETUIGAB.mjs";import"../../../chunk-PSSAAY7D.mjs";export{a as CrossmintEmbeddedCheckout};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkM6QYYMLHjs = require('../../../chunk-M6QYYMLH.js');require('../../../chunk-YQEWHOQ7.js');require('../../../chunk-VACQTZRT.js');require('../../../chunk-VHALUNVO.js');require('../../../chunk-2D2RJCVX.js');require('../../../chunk-LOWHFH2U.js');require('../../../chunk-J42HASCI.js');exports.EmbeddedCheckoutV3WebView = _chunkM6QYYMLHjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../../../chunk-
|
|
1
|
+
import{a}from"../../../chunk-PPCFBEW2.mjs";import"../../../chunk-PCJMDUSI.mjs";import"../../../chunk-FX23A4BR.mjs";import"../../../chunk-C5OFI35N.mjs";import"../../../chunk-FFQ6EQCL.mjs";import"../../../chunk-TETUIGAB.mjs";import"../../../chunk-PSSAAY7D.mjs";export{a as EmbeddedCheckoutV3WebView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-72MMCJ2E.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../../../chunk-72MMCJ2E.js');var _chunkKEQROZQTjs = require('../../../chunk-KEQROZQT.js');require('../../../chunk-M6QYYMLH.js');require('../../../chunk-YQEWHOQ7.js');require('../../../chunk-VACQTZRT.js');require('../../../chunk-VHALUNVO.js');require('../../../chunk-2D2RJCVX.js');require('../../../chunk-LOWHFH2U.js');require('../../../chunk-J42HASCI.js');exports.CrossmintEmbeddedCheckout = _chunkKEQROZQTjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../chunk-MB7H3PBJ.mjs";import{a}from"../../../chunk-
|
|
1
|
+
import"../../../chunk-MB7H3PBJ.mjs";import{a}from"../../../chunk-KPJ2TLTH.mjs";import"../../../chunk-PPCFBEW2.mjs";import"../../../chunk-PCJMDUSI.mjs";import"../../../chunk-FX23A4BR.mjs";import"../../../chunk-C5OFI35N.mjs";import"../../../chunk-FFQ6EQCL.mjs";import"../../../chunk-TETUIGAB.mjs";import"../../../chunk-PSSAAY7D.mjs";export{a as CrossmintEmbeddedCheckout};
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-2PX34LDU.js');require('../chunk-AJMHVVST.js');require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-2PX34LDU.js');require('../chunk-AJMHVVST.js');var _chunkUA34B5QBjs = require('../chunk-UA34B5QB.js');require('../chunk-DKQZSNOO.js');require('../chunk-72MMCJ2E.js');var _chunkKEQROZQTjs = require('../chunk-KEQROZQT.js');require('../chunk-M6QYYMLH.js');require('../chunk-YQEWHOQ7.js');require('../chunk-VACQTZRT.js');require('../chunk-VHALUNVO.js');require('../chunk-I4D3YJW2.js');var _chunkYJORUMPBjs = require('../chunk-YJORUMPB.js');var _chunkMVVSGLQLjs = require('../chunk-MVVSGLQL.js');require('../chunk-F7VXWATP.js');require('../chunk-DC5HCBPK.js');require('../chunk-EI5LOD4Y.js');require('../chunk-2D2RJCVX.js');require('../chunk-LOWHFH2U.js');require('../chunk-J42HASCI.js');exports.CrossmintEmbeddedCheckout = _chunkKEQROZQTjs.a; exports.EmailSignersDialog = _chunkYJORUMPBjs.a; exports.ExportPrivateKeyButton = _chunkUA34B5QBjs.a; exports.PhoneSignersDialog = _chunkMVVSGLQLjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-UBHIBMTA.mjs";import"../chunk-5CLFJLE4.mjs";import"../chunk-
|
|
1
|
+
import"../chunk-UBHIBMTA.mjs";import"../chunk-5CLFJLE4.mjs";import{a as d}from"../chunk-EF2YTIUF.mjs";import"../chunk-TIQGKXQA.mjs";import"../chunk-MB7H3PBJ.mjs";import{a as c}from"../chunk-KPJ2TLTH.mjs";import"../chunk-PPCFBEW2.mjs";import"../chunk-PCJMDUSI.mjs";import"../chunk-FX23A4BR.mjs";import"../chunk-C5OFI35N.mjs";import"../chunk-J7Q2R6UH.mjs";import{a}from"../chunk-XNDIT72O.mjs";import{a as b}from"../chunk-3QSVHCEH.mjs";import"../chunk-D5QADN6Z.mjs";import"../chunk-YLJDAK2S.mjs";import"../chunk-7USVT6EZ.mjs";import"../chunk-FFQ6EQCL.mjs";import"../chunk-TETUIGAB.mjs";import"../chunk-PSSAAY7D.mjs";export{c as CrossmintEmbeddedCheckout,a as EmailSignersDialog,d as ExportPrivateKeyButton,b as PhoneSignersDialog};
|
package/dist/hooks/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');var _chunk77GXCNDPjs = require('../chunk-77GXCNDP.js');
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');var _chunk77GXCNDPjs = require('../chunk-77GXCNDP.js');require('../chunk-2D2RJCVX.js');var _chunkMKCQJOIOjs = require('../chunk-MKCQJOIO.js');require('../chunk-J42HASCI.js');exports.CrossmintCheckoutProvider = _chunk77GXCNDPjs.a; exports.useAuth = _chunkK75IJHIBjs.d; exports.useCrossmint = _chunkK75IJHIBjs.e; exports.useCrossmintAuth = _chunkK75IJHIBjs.c; exports.useCrossmintCheckout = _chunk77GXCNDPjs.b; exports.useWallet = _chunkK75IJHIBjs.f; exports.useWalletEmailSigner = _chunkMKCQJOIOjs.a;
|
package/dist/hooks/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as d,d as e,e as f,f as g}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import{a as b,b as c}from"../chunk-IUDQDPIN.mjs";import
|
|
1
|
+
import{c as d,d as e,e as f,f as g}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import{a as b,b as c}from"../chunk-IUDQDPIN.mjs";import"../chunk-FFQ6EQCL.mjs";import{a}from"../chunk-J477SX6P.mjs";import"../chunk-PSSAAY7D.mjs";export{b as CrossmintCheckoutProvider,e as useAuth,f as useCrossmint,d as useCrossmintAuth,c as useCrossmintCheckout,g as useWallet,a as useWalletEmailSigner};
|
package/dist/hooks/useAuth.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');require('../chunk-77GXCNDP.js');require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');require('../chunk-77GXCNDP.js');require('../chunk-2D2RJCVX.js');require('../chunk-MKCQJOIO.js');require('../chunk-J42HASCI.js');exports.useAuth = _chunkK75IJHIBjs.d; exports.useCrossmintAuth = _chunkK75IJHIBjs.c;
|
package/dist/hooks/useAuth.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a,d as b}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import"../chunk-IUDQDPIN.mjs";import"../chunk-
|
|
1
|
+
import{c as a,d as b}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import"../chunk-IUDQDPIN.mjs";import"../chunk-FFQ6EQCL.mjs";import"../chunk-J477SX6P.mjs";import"../chunk-PSSAAY7D.mjs";export{b as useAuth,a as useCrossmintAuth};
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-C62HRWJA.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-C62HRWJA.js');var _chunkA3OLN6DVjs = require('./chunk-A3OLN6DV.js');var _chunkYDVGBH2Hjs = require('./chunk-YDVGBH2H.js');require('./chunk-2PX34LDU.js');require('./chunk-AJMHVVST.js');var _chunkUA34B5QBjs = require('./chunk-UA34B5QB.js');require('./chunk-DKQZSNOO.js');require('./chunk-72MMCJ2E.js');var _chunkKEQROZQTjs = require('./chunk-KEQROZQT.js');require('./chunk-M6QYYMLH.js');require('./chunk-YQEWHOQ7.js');require('./chunk-VACQTZRT.js');require('./chunk-VHALUNVO.js');require('./chunk-I4D3YJW2.js');var _chunkYJORUMPBjs = require('./chunk-YJORUMPB.js');var _chunkMVVSGLQLjs = require('./chunk-MVVSGLQL.js');require('./chunk-F7VXWATP.js');require('./chunk-DC5HCBPK.js');require('./chunk-EI5LOD4Y.js');var _chunkK75IJHIBjs = require('./chunk-K75IJHIB.js');require('./chunk-SHTETN4C.js');var _chunk77GXCNDPjs = require('./chunk-77GXCNDP.js');require('./chunk-2D2RJCVX.js');var _chunkMKCQJOIOjs = require('./chunk-MKCQJOIO.js');require('./chunk-R53VL63J.js');require('./chunk-LOWHFH2U.js');require('./chunk-J42HASCI.js');var _walletssdk = require('@crossmint/wallets-sdk');exports.CrossmintAuthProvider = _chunkK75IJHIBjs.b; exports.CrossmintCheckoutProvider = _chunk77GXCNDPjs.a; exports.CrossmintEmbeddedCheckout = _chunkKEQROZQTjs.a; exports.CrossmintProvider = _chunkYDVGBH2Hjs.b; exports.CrossmintWalletProvider = _chunkA3OLN6DVjs.a; exports.EVMWallet = _walletssdk.EVMWallet; exports.EmailSignersDialog = _chunkYJORUMPBjs.a; exports.ExportPrivateKeyButton = _chunkUA34B5QBjs.a; exports.PhoneSignersDialog = _chunkMVVSGLQLjs.a; exports.SolanaWallet = _walletssdk.SolanaWallet; exports.Wallet = _walletssdk.Wallet; exports.useAuth = _chunkK75IJHIBjs.d; exports.useCrossmint = _chunkK75IJHIBjs.e; exports.useCrossmintAuth = _chunkK75IJHIBjs.c; exports.useCrossmintCheckout = _chunk77GXCNDPjs.b; exports.useWallet = _chunkK75IJHIBjs.f; exports.useWalletEmailSigner = _chunkMKCQJOIOjs.a;
|
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./chunk-I3QSTPTV.mjs";import{a as
|
|
1
|
+
import"./chunk-I3QSTPTV.mjs";import{a as y}from"./chunk-ZCMT733Z.mjs";import{b as i}from"./chunk-QPXWIB5H.mjs";import"./chunk-UBHIBMTA.mjs";import"./chunk-5CLFJLE4.mjs";import{a as x}from"./chunk-EF2YTIUF.mjs";import"./chunk-TIQGKXQA.mjs";import"./chunk-MB7H3PBJ.mjs";import{a as c}from"./chunk-KPJ2TLTH.mjs";import"./chunk-PPCFBEW2.mjs";import"./chunk-PCJMDUSI.mjs";import"./chunk-FX23A4BR.mjs";import"./chunk-C5OFI35N.mjs";import"./chunk-J7Q2R6UH.mjs";import{a as m}from"./chunk-XNDIT72O.mjs";import{a as l}from"./chunk-3QSVHCEH.mjs";import"./chunk-D5QADN6Z.mjs";import"./chunk-YLJDAK2S.mjs";import"./chunk-7USVT6EZ.mjs";import{b as o,c as a,d as n,e as p,f as s}from"./chunk-HS74BZSE.mjs";import"./chunk-ZCKUSOGC.mjs";import{a as e,b as r}from"./chunk-IUDQDPIN.mjs";import"./chunk-FFQ6EQCL.mjs";import{a as t}from"./chunk-J477SX6P.mjs";import"./chunk-J36PDK5V.mjs";import"./chunk-TETUIGAB.mjs";import"./chunk-PSSAAY7D.mjs";import{EVMWallet as C,SolanaWallet as W,Wallet as k}from"@crossmint/wallets-sdk";export{o as CrossmintAuthProvider,e as CrossmintCheckoutProvider,c as CrossmintEmbeddedCheckout,i as CrossmintProvider,y as CrossmintWalletProvider,C as EVMWallet,m as EmailSignersDialog,x as ExportPrivateKeyButton,l as PhoneSignersDialog,W as SolanaWallet,k as Wallet,n as useAuth,p as useCrossmint,a as useCrossmintAuth,r as useCrossmintCheckout,s as useWallet,t as useWalletEmailSigner};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { APIKeyEnvironmentPrefix, SdkLogger } from '@crossmint/common-sdk-base';
|
|
2
|
+
|
|
3
|
+
type InitializeDatadogOptions = {
|
|
4
|
+
environment: APIKeyEnvironmentPrefix;
|
|
5
|
+
isExpoGo: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function initializeDatadog(options: InitializeDatadogOptions): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the SDK logger for the React Native UI SDK
|
|
10
|
+
* Should be called once when the SDK is initialized (typically in CrossmintProvider)
|
|
11
|
+
* This handles React Native-specific Datadog sink initialization
|
|
12
|
+
* @param apiKey - API key to determine environment (development/staging/production) and project ID
|
|
13
|
+
* @returns The initialized logger instance
|
|
14
|
+
*/
|
|
15
|
+
declare function initReactNativeLogger(apiKey: string): SdkLogger;
|
|
16
|
+
|
|
17
|
+
export { initReactNativeLogger, initializeDatadog };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { APIKeyEnvironmentPrefix, SdkLogger } from '@crossmint/common-sdk-base';
|
|
2
|
+
|
|
3
|
+
type InitializeDatadogOptions = {
|
|
4
|
+
environment: APIKeyEnvironmentPrefix;
|
|
5
|
+
isExpoGo: boolean;
|
|
6
|
+
};
|
|
7
|
+
declare function initializeDatadog(options: InitializeDatadogOptions): Promise<void>;
|
|
8
|
+
/**
|
|
9
|
+
* Initialize the SDK logger for the React Native UI SDK
|
|
10
|
+
* Should be called once when the SDK is initialized (typically in CrossmintProvider)
|
|
11
|
+
* This handles React Native-specific Datadog sink initialization
|
|
12
|
+
* @param apiKey - API key to determine environment (development/staging/production) and project ID
|
|
13
|
+
* @returns The initialized logger instance
|
|
14
|
+
*/
|
|
15
|
+
declare function initReactNativeLogger(apiKey: string): SdkLogger;
|
|
16
|
+
|
|
17
|
+
export { initReactNativeLogger, initializeDatadog };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkR53VL63Jjs = require('../chunk-R53VL63J.js');require('../chunk-LOWHFH2U.js');require('../chunk-J42HASCI.js');exports.initReactNativeLogger = _chunkR53VL63Jjs.b; exports.initializeDatadog = _chunkR53VL63Jjs.a;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"../chunk-J36PDK5V.mjs";import"../chunk-TETUIGAB.mjs";import"../chunk-PSSAAY7D.mjs";export{b as initReactNativeLogger,a as initializeDatadog};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');require('../chunk-77GXCNDP.js');require('../chunk-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');require('../chunk-77GXCNDP.js');require('../chunk-2D2RJCVX.js');require('../chunk-MKCQJOIO.js');require('../chunk-J42HASCI.js');exports.AuthContext = _chunkK75IJHIBjs.a; exports.CrossmintAuthProvider = _chunkK75IJHIBjs.b;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a,b}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import"../chunk-IUDQDPIN.mjs";import"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import"../chunk-IUDQDPIN.mjs";import"../chunk-FFQ6EQCL.mjs";import"../chunk-J477SX6P.mjs";import"../chunk-PSSAAY7D.mjs";export{a as AuthContext,b as CrossmintAuthProvider};
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import * as _crossmint_common_sdk_base from '@crossmint/common-sdk-base';
|
|
3
5
|
import { CrossmintConfig } from '@crossmint/common-sdk-base';
|
|
4
6
|
|
|
7
|
+
declare const LoggerContext: react.Context<_crossmint_common_sdk_base.SdkLogger | null>;
|
|
5
8
|
declare function CrossmintProvider({ children, apiKey, overrideBaseUrl, }: Pick<CrossmintConfig, "apiKey" | "overrideBaseUrl"> & {
|
|
6
9
|
children: ReactNode;
|
|
7
10
|
}): react_jsx_runtime.JSX.Element;
|
|
8
11
|
|
|
9
|
-
export { CrossmintProvider };
|
|
12
|
+
export { CrossmintProvider, LoggerContext };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
+
import * as react from 'react';
|
|
2
3
|
import { ReactNode } from 'react';
|
|
4
|
+
import * as _crossmint_common_sdk_base from '@crossmint/common-sdk-base';
|
|
3
5
|
import { CrossmintConfig } from '@crossmint/common-sdk-base';
|
|
4
6
|
|
|
7
|
+
declare const LoggerContext: react.Context<_crossmint_common_sdk_base.SdkLogger | null>;
|
|
5
8
|
declare function CrossmintProvider({ children, apiKey, overrideBaseUrl, }: Pick<CrossmintConfig, "apiKey" | "overrideBaseUrl"> & {
|
|
6
9
|
children: ReactNode;
|
|
7
10
|
}): react_jsx_runtime.JSX.Element;
|
|
8
11
|
|
|
9
|
-
export { CrossmintProvider };
|
|
12
|
+
export { CrossmintProvider, LoggerContext };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYDVGBH2Hjs = require('../chunk-YDVGBH2H.js');require('../chunk-R53VL63J.js');require('../chunk-LOWHFH2U.js');require('../chunk-J42HASCI.js');exports.CrossmintProvider = _chunkYDVGBH2Hjs.b; exports.LoggerContext = _chunkYDVGBH2Hjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a,b}from"../chunk-QPXWIB5H.mjs";import"../chunk-J36PDK5V.mjs";import"../chunk-TETUIGAB.mjs";import"../chunk-PSSAAY7D.mjs";export{b as CrossmintProvider,a as LoggerContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkA3OLN6DVjs = require('../chunk-A3OLN6DV.js');require('../chunk-YDVGBH2H.js');require('../chunk-YJORUMPB.js');require('../chunk-MVVSGLQL.js');require('../chunk-F7VXWATP.js');require('../chunk-DC5HCBPK.js');require('../chunk-EI5LOD4Y.js');require('../chunk-R53VL63J.js');require('../chunk-LOWHFH2U.js');require('../chunk-J42HASCI.js');exports.CrossmintWalletProvider = _chunkA3OLN6DVjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-ZCMT733Z.mjs";import"../chunk-QPXWIB5H.mjs";import"../chunk-XNDIT72O.mjs";import"../chunk-3QSVHCEH.mjs";import"../chunk-D5QADN6Z.mjs";import"../chunk-YLJDAK2S.mjs";import"../chunk-7USVT6EZ.mjs";import"../chunk-J36PDK5V.mjs";import"../chunk-TETUIGAB.mjs";import"../chunk-PSSAAY7D.mjs";export{a as CrossmintWalletProvider};
|
package/dist/providers/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-C62HRWJA.js');var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-C62HRWJA.js');var _chunkA3OLN6DVjs = require('../chunk-A3OLN6DV.js');var _chunkYDVGBH2Hjs = require('../chunk-YDVGBH2H.js');require('../chunk-YJORUMPB.js');require('../chunk-MVVSGLQL.js');require('../chunk-F7VXWATP.js');require('../chunk-DC5HCBPK.js');require('../chunk-EI5LOD4Y.js');var _chunkK75IJHIBjs = require('../chunk-K75IJHIB.js');require('../chunk-SHTETN4C.js');require('../chunk-77GXCNDP.js');require('../chunk-2D2RJCVX.js');require('../chunk-MKCQJOIO.js');require('../chunk-R53VL63J.js');require('../chunk-LOWHFH2U.js');require('../chunk-J42HASCI.js');exports.CrossmintAuthProvider = _chunkK75IJHIBjs.b; exports.CrossmintProvider = _chunkYDVGBH2Hjs.b; exports.CrossmintWalletProvider = _chunkA3OLN6DVjs.a;
|
package/dist/providers/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../chunk-I3QSTPTV.mjs";import{a as
|
|
1
|
+
import"../chunk-I3QSTPTV.mjs";import{a as c}from"../chunk-ZCMT733Z.mjs";import{b}from"../chunk-QPXWIB5H.mjs";import"../chunk-XNDIT72O.mjs";import"../chunk-3QSVHCEH.mjs";import"../chunk-D5QADN6Z.mjs";import"../chunk-YLJDAK2S.mjs";import"../chunk-7USVT6EZ.mjs";import{b as a}from"../chunk-HS74BZSE.mjs";import"../chunk-ZCKUSOGC.mjs";import"../chunk-IUDQDPIN.mjs";import"../chunk-FFQ6EQCL.mjs";import"../chunk-J477SX6P.mjs";import"../chunk-J36PDK5V.mjs";import"../chunk-TETUIGAB.mjs";import"../chunk-PSSAAY7D.mjs";export{a as CrossmintAuthProvider,b as CrossmintProvider,c as CrossmintWalletProvider};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkVHALUNVOjs = require('../chunk-VHALUNVO.js');require('../chunk-LOWHFH2U.js');require('../chunk-J42HASCI.js');exports.createCrossmintApiClient = _chunkVHALUNVOjs.a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a}from"../chunk-
|
|
1
|
+
import{a}from"../chunk-C5OFI35N.mjs";import"../chunk-TETUIGAB.mjs";import"../chunk-PSSAAY7D.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": "0.13.
|
|
3
|
+
"version": "0.13.4",
|
|
4
4
|
"repository": "https://github.com/Crossmint/crossmint-sdk",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "Paella Labs Inc",
|
|
@@ -14,20 +14,21 @@
|
|
|
14
14
|
"LICENSE"
|
|
15
15
|
],
|
|
16
16
|
"dependencies": {
|
|
17
|
+
"@datadog/mobile-react-native": "2.13.2",
|
|
17
18
|
"@solana/web3.js": "1.98.1",
|
|
18
19
|
"bs58": "^5.0.0",
|
|
19
20
|
"lucide-react-native": "0.548.0",
|
|
20
21
|
"mitt": "3.0.1",
|
|
21
22
|
"react-native-svg": "15.14.0",
|
|
22
23
|
"zod": "3.22.4",
|
|
23
|
-
"@crossmint/client-sdk-auth": "1.2.
|
|
24
|
-
"@crossmint/client-sdk-base": "1.7.
|
|
25
|
-
"@crossmint/client-sdk-react-base": "0.7.
|
|
26
|
-
"@crossmint/client-sdk-rn-window": "0.3.
|
|
27
|
-
"@crossmint/client-signers": "0.1.
|
|
28
|
-
"@crossmint/common-sdk-auth": "1.0.
|
|
29
|
-
"@crossmint/common-sdk-base": "0.9.
|
|
30
|
-
"@crossmint/wallets-sdk": "0.18.
|
|
24
|
+
"@crossmint/client-sdk-auth": "1.2.39",
|
|
25
|
+
"@crossmint/client-sdk-base": "1.7.6",
|
|
26
|
+
"@crossmint/client-sdk-react-base": "0.7.7",
|
|
27
|
+
"@crossmint/client-sdk-rn-window": "0.3.12",
|
|
28
|
+
"@crossmint/client-signers": "0.1.2",
|
|
29
|
+
"@crossmint/common-sdk-auth": "1.0.61",
|
|
30
|
+
"@crossmint/common-sdk-base": "0.9.10",
|
|
31
|
+
"@crossmint/wallets-sdk": "0.18.6"
|
|
31
32
|
},
|
|
32
33
|
"devDependencies": {
|
|
33
34
|
"@expo/config-plugins": "^9.0.17",
|
package/dist/chunk-DIX2XCMR.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{CrossmintApiClient as n}from"@crossmint/common-sdk-base";var e={name:"@crossmint/client-sdk-react-native-ui",version:"0.13.2",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","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch"},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:*","@solana/web3.js":"1.98.1",bs58:"^5.0.0","lucide-react-native":"0.548.0",mitt:"3.0.1","react-native-svg":"15.14.0",zod:"3.22.4"},devDependencies:{"@expo/config-plugins":"^9.0.17","@types/react":"19.1.10","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8"},peerDependencies:{"@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-constants":">=17 <19","expo-device":">=7 <9","expo-secure-store":">=14 <16","expo-web-browser":">=14 <16",react:">=17.0.2","react-native":">=0.74.3","react-native-webview":">=13.15.0 <14"}};function d(s,t){return new n(s,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:e.version},apiKeyExpectations:t}})}export{d as a};
|
package/dist/chunk-JZZOVKVC.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _commonsdkbase = require('@crossmint/common-sdk-base');var e={name:"@crossmint/client-sdk-react-native-ui",version:"0.13.2",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","app.plugin.js","LICENSE"],scripts:{build:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup",dev:"cross-env NODE_OPTIONS='--max-old-space-size=8192' tsup --watch"},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:*","@solana/web3.js":"1.98.1",bs58:"^5.0.0","lucide-react-native":"0.548.0",mitt:"3.0.1","react-native-svg":"15.14.0",zod:"3.22.4"},devDependencies:{"@expo/config-plugins":"^9.0.17","@types/react":"19.1.10","expo-constants":"~18.0.9","expo-device":"~8.0.9","expo-secure-store":"~15.0.7","expo-web-browser":"~15.0.8"},peerDependencies:{"@expo/config-plugins":">=9.0.0","@solana/web3.js":"^1.98.1","expo-constants":">=17 <19","expo-device":">=7 <9","expo-secure-store":">=14 <16","expo-web-browser":">=14 <16",react:">=17.0.2","react-native":">=0.74.3","react-native-webview":">=13.15.0 <14"}};function p(s,t){return new (0, _commonsdkbase.CrossmintApiClient)(s,{internalConfig:{sdkMetadata:{name:"@crossmint/client-sdk-react-native-ui",version:e.version},apiKeyExpectations:t}})}exports.a = p;
|
package/dist/chunk-O5JUQOMA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }var _expoconstants = require('expo-constants'); var _expoconstants2 = _interopRequireDefault(_expoconstants);var _clientsdkreactbase = require('@crossmint/client-sdk-react-base');var _jsxruntime = require('react/jsx-runtime');function g({children:t,apiKey:a,overrideBaseUrl:d}){var o,r,e,i,s;let m=(s=(r=(o=_expoconstants2.default.expoConfig)==null?void 0:o.ios)==null?void 0:r.bundleIdentifier)!=null?s:(i=(e=_expoconstants2.default.expoConfig)==null?void 0:e.android)==null?void 0:i.package;return _jsxruntime.jsx.call(void 0, _clientsdkreactbase.CrossmintProvider,{apiKey:a,appId:m,overrideBaseUrl:d,children:t})}exports.a = g;
|
package/dist/chunk-RQOORLYR.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import n from"expo-constants";import{CrossmintProvider as p}from"@crossmint/client-sdk-react-base";import{jsx as C}from"react/jsx-runtime";function P({children:t,apiKey:a,overrideBaseUrl:d}){var o,r,e,i,s;let m=(s=(r=(o=n.expoConfig)==null?void 0:o.ios)==null?void 0:r.bundleIdentifier)!=null?s:(i=(e=n.expoConfig)==null?void 0:e.android)==null?void 0:i.package;return C(p,{apiKey:a,appId:m,overrideBaseUrl:d,children:t})}export{P as a};
|
package/dist/chunk-TZRTTC6Q.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{a as W}from"./chunk-XNDIT72O.mjs";import{a as g}from"./chunk-3QSVHCEH.mjs";import{a as c,e as f}from"./chunk-PSSAAY7D.mjs";import{useCallback as C,useRef as E,useMemo as w,useEffect as L,useState as N}from"react";import{View as D}from"react-native";import{RNWebView as S,WebViewParent as x}from"@crossmint/client-sdk-rn-window";import{environmentUrlConfig as P,signerInboundEvents as z,signerOutboundEvents as F,SignerErrorCode as j}from"@crossmint/client-signers";import{validateAPIKey as H}from"@crossmint/common-sdk-base";import{CrossmintWalletUIBaseProvider as K,useCrossmint as B}from"@crossmint/client-sdk-react-base";import{Fragment as J,jsx as a,jsxs as y}from"react/jsx-runtime";function G({children:d,createOnLogin:V,appearance:I,headlessSigningFlow:b=!0,callbacks:k}){let{crossmint:U}=B("CrossmintWalletProvider must be used within CrossmintProvider"),{apiKey:v,appId:u}=U,p=w(()=>{let e=H(v);if(!e.isValid)throw new Error("Invalid API key");return e},[v]),O=w(()=>P[p.environment],[p.environment]),i=E(null),r=E(null),[h,R]=N(!1),M=w(()=>u!=null?{crossmintAppId:u}:{},[u]);L(()=>{i.current!=null&&r.current==null&&(r.current=new x(i,{incomingEvents:F,outgoingEvents:z,recovery:{recoverableErrorCodes:[j.IndexedDbFatal]}}))},[h]);let T=C(()=>f(this,null,function*(){let e=r.current;if(e!=null)try{e.isConnected=!1,yield e.handshakeWithChild()}catch(n){console.error("[CrossmintWalletProvider] Handshake error:",n)}}),[]),A=C(e=>{let n=r.current;if(n!=null){try{let t=JSON.parse(e.nativeEvent.data);if(t&&typeof t.type=="string"&&t.type.startsWith("console.")){let m=t.type.split(".")[1],s=(t.data||[]).map(o=>{try{return o==="[Function]"||o==="[Circular Reference]"||o==="[Unserializable Object]"?o:JSON.parse(o)}catch(Q){return o}}),l=`[WebView:${m.toUpperCase()}]`;switch(m){case"log":console.log(l,...s);break;case"error":console.error(l,...s);break;case"warn":console.warn(l,...s);break;case"info":console.info(l,...s);break;default:console.log(`[WebView Unknown:${m}]`,...s)}return}}catch(t){}n.handleMessage(e)}},[]);return y(K,{createOnLogin:V,appearance:I,headlessSigningFlow:b,initializeWebView:()=>f(this,null,function*(){R(!0);let e=0,n=100;for(;r.current==null&&e<n;)yield new Promise(t=>setTimeout(t,50)),e++;if(r.current==null)throw new Error("WebView not ready or handshake incomplete")}),callbacks:k,renderUI:b?void 0:({emailSignerProps:e,phoneSignerProps:n})=>y(J,{children:[a(W,c({},e)),a(g,c({},n))]}),clientTEEConnection:()=>{if(r.current==null)throw new Error("WebView not ready or handshake incomplete");return r.current},children:[d,h&&a(D,{style:{position:"absolute",width:0,height:0,overflow:"hidden"},children:a(S,{ref:i,source:{uri:O},globals:M,onLoadEnd:T,onMessage:A,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var e;return(e=i.current)==null?void 0:e.reload()},onRenderProcessGone:()=>{var e;return(e=i.current)==null?void 0:e.reload()},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[P[p.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function ae(d){return a(G,c({},d))}export{ae as a};
|
package/dist/chunk-ZMB227CA.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true});var _chunkYJORUMPBjs = require('./chunk-YJORUMPB.js');var _chunkMVVSGLQLjs = require('./chunk-MVVSGLQL.js');var _chunkJ42HASCIjs = require('./chunk-J42HASCI.js');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');function G({children:d,createOnLogin:V,appearance:I,headlessSigningFlow:b=!0,callbacks:k}){let{crossmint:U}=_clientsdkreactbase.useCrossmint.call(void 0, "CrossmintWalletProvider must be used within CrossmintProvider"),{apiKey:v,appId:u}=U,p=_react.useMemo.call(void 0, ()=>{let e=_commonsdkbase.validateAPIKey.call(void 0, v);if(!e.isValid)throw new Error("Invalid API key");return e},[v]),O=_react.useMemo.call(void 0, ()=>_clientsigners.environmentUrlConfig[p.environment],[p.environment]),i=_react.useRef.call(void 0, null),r=_react.useRef.call(void 0, null),[h,R]=_react.useState.call(void 0, !1),M=_react.useMemo.call(void 0, ()=>u!=null?{crossmintAppId:u}:{},[u]);_react.useEffect.call(void 0, ()=>{i.current!=null&&r.current==null&&(r.current=new (0, _clientsdkrnwindow.WebViewParent)(i,{incomingEvents:_clientsigners.signerOutboundEvents,outgoingEvents:_clientsigners.signerInboundEvents,recovery:{recoverableErrorCodes:[_clientsigners.SignerErrorCode.IndexedDbFatal]}}))},[h]);let T=_react.useCallback.call(void 0, ()=>_chunkJ42HASCIjs.e.call(void 0, this,null,function*(){let e=r.current;if(e!=null)try{e.isConnected=!1,yield e.handshakeWithChild()}catch(n){console.error("[CrossmintWalletProvider] Handshake error:",n)}}),[]),A=_react.useCallback.call(void 0, e=>{let n=r.current;if(n!=null){try{let t=JSON.parse(e.nativeEvent.data);if(t&&typeof t.type=="string"&&t.type.startsWith("console.")){let m=t.type.split(".")[1],s=(t.data||[]).map(o=>{try{return o==="[Function]"||o==="[Circular Reference]"||o==="[Unserializable Object]"?o:JSON.parse(o)}catch(Q){return o}}),l=`[WebView:${m.toUpperCase()}]`;switch(m){case"log":console.log(l,...s);break;case"error":console.error(l,...s);break;case"warn":console.warn(l,...s);break;case"info":console.info(l,...s);break;default:console.log(`[WebView Unknown:${m}]`,...s)}return}}catch(t){}n.handleMessage(e)}},[]);return _jsxruntime.jsxs.call(void 0, _clientsdkreactbase.CrossmintWalletUIBaseProvider,{createOnLogin:V,appearance:I,headlessSigningFlow:b,initializeWebView:()=>_chunkJ42HASCIjs.e.call(void 0, this,null,function*(){R(!0);let e=0,n=100;for(;r.current==null&&e<n;)yield new Promise(t=>setTimeout(t,50)),e++;if(r.current==null)throw new Error("WebView not ready or handshake incomplete")}),callbacks:k,renderUI:b?void 0:({emailSignerProps:e,phoneSignerProps:n})=>_jsxruntime.jsxs.call(void 0, _jsxruntime.Fragment,{children:[_jsxruntime.jsx.call(void 0, _chunkYJORUMPBjs.a,_chunkJ42HASCIjs.a.call(void 0, {},e)),_jsxruntime.jsx.call(void 0, _chunkMVVSGLQLjs.a,_chunkJ42HASCIjs.a.call(void 0, {},n))]}),clientTEEConnection:()=>{if(r.current==null)throw new Error("WebView not ready or handshake incomplete");return r.current},children:[d,h&&_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:i,source:{uri:O},globals:M,onLoadEnd:T,onMessage:A,onError:e=>{console.error("[CrossmintWalletProvider] WebView error:",e.nativeEvent)},onHttpError:e=>{console.error("[CrossmintWalletProvider] WebView HTTP error:",e.nativeEvent)},onContentProcessDidTerminate:()=>{var e;return(e=i.current)==null?void 0:e.reload()},onRenderProcessGone:()=>{var e;return(e=i.current)==null?void 0:e.reload()},style:{width:1,height:1},javaScriptCanOpenWindowsAutomatically:!1,thirdPartyCookiesEnabled:!1,sharedCookiesEnabled:!1,incognito:!1,setSupportMultipleWindows:!1,originWhitelist:[_clientsigners.environmentUrlConfig[p.environment]],cacheEnabled:!0,cacheMode:"LOAD_DEFAULT"})})]})}function se(d){return _jsxruntime.jsx.call(void 0, G,_chunkJ42HASCIjs.a.call(void 0, {},d))}exports.a = se;
|