@coinbase/create-cdp-app 0.0.123 → 0.0.125
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/package.json
CHANGED
|
@@ -13,6 +13,23 @@ config.resolver.resolveRequest = (context, moduleName, platform) => {
|
|
|
13
13
|
return context.resolveRequest(context, result, platform);
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
+
// The @x402/* packages are optional peer dependencies of @coinbase/cdp-core,
|
|
17
|
+
// used behind lazy import()s in fetchWithX402/useX402. Metro resolves all
|
|
18
|
+
// import() calls statically though, so an app that doesn't use x402 (or only
|
|
19
|
+
// uses one account family, e.g. EVM but not Solana) still needs every
|
|
20
|
+
// @x402/* subpath to resolve to *something* at bundle time. If a package is
|
|
21
|
+
// installed, resolve it normally; otherwise stub it out so the bundle still
|
|
22
|
+
// succeeds — the corresponding scheme/module just won't be reachable at
|
|
23
|
+
// runtime for that app.
|
|
24
|
+
if (moduleName.startsWith("@x402/")) {
|
|
25
|
+
try {
|
|
26
|
+
const result = require.resolve(moduleName);
|
|
27
|
+
return context.resolveRequest(context, result, platform);
|
|
28
|
+
} catch {
|
|
29
|
+
return { type: "empty" };
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
16
33
|
return context.resolveRequest(context, moduleName, platform);
|
|
17
34
|
};
|
|
18
35
|
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
"@react-native-async-storage/async-storage": "^2.2.0",
|
|
16
16
|
"@solana/web3.js": "^1.98.4",
|
|
17
17
|
"@ungap/structured-clone": "^1.3.0",
|
|
18
|
+
"@x402/core": "^2.25.0",
|
|
19
|
+
"@x402/evm": "^2.25.0",
|
|
20
|
+
"@x402/fetch": "^2.25.0",
|
|
21
|
+
"@x402/svm": "^2.25.0",
|
|
18
22
|
"buffer": "^6.0.3",
|
|
19
23
|
"expo": "~53.0.22",
|
|
20
24
|
"expo-asset": "~11.1.7",
|
|
@@ -28,8 +32,7 @@
|
|
|
28
32
|
"react-native-get-random-values": "^1.11.0",
|
|
29
33
|
"react-native-quick-crypto": "^0.7.17",
|
|
30
34
|
"readable-stream": "^4.6.0",
|
|
31
|
-
"viem": "^2.21.45"
|
|
32
|
-
"x402-fetch": "^0.7.0"
|
|
35
|
+
"viem": "^2.21.45"
|
|
33
36
|
},
|
|
34
37
|
"devDependencies": {
|
|
35
38
|
"@babel/core": "^7.25.2",
|