@coinbase/cdp-wagmi 0.0.86 → 0.0.88
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/esm/index2.js +34 -29
- package/dist/esm/index3.js +1 -1
- package/package.json +3 -3
package/dist/esm/index2.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import
|
|
1
|
+
import E from "./index5.js";
|
|
2
2
|
import { getFramework as m } from "./index6.js";
|
|
3
|
-
const
|
|
4
|
-
function
|
|
5
|
-
const
|
|
6
|
-
return
|
|
7
|
-
|
|
3
|
+
const v = "1f8d3e558f493e38a037dbfadb8ba344", y = "d473b1dcc969105adab157226cd9cf63", i = Symbol.for("@coinbase/cdp-analytics");
|
|
4
|
+
function u() {
|
|
5
|
+
const n = globalThis;
|
|
6
|
+
return n[i] || (n[i] = {
|
|
7
|
+
developerIdentifier: "",
|
|
8
|
+
endUserIdentifier: "",
|
|
8
9
|
enabled: !0,
|
|
9
10
|
isProduction: !1,
|
|
10
11
|
isUsingMocks: !1,
|
|
@@ -12,33 +13,37 @@ function g() {
|
|
|
12
13
|
sendActionCallEvent: (e) => o({ ...e, type: "action_call" }),
|
|
13
14
|
sendHookCallEvent: (e) => o({ ...e, type: "hook_call" }),
|
|
14
15
|
sendComponentCallEvent: (e) => o({ ...e, type: "component_call" }),
|
|
16
|
+
sendSessionRefreshEvent: (e) => o({ ...e, type: "session_refresh" }),
|
|
15
17
|
versionRegistry: {},
|
|
16
18
|
registerPackageVersion: (e, s) => {
|
|
17
|
-
|
|
19
|
+
t.versionRegistry[e] = s;
|
|
18
20
|
}
|
|
19
|
-
}),
|
|
21
|
+
}), n[i];
|
|
20
22
|
}
|
|
21
|
-
const
|
|
22
|
-
async function o(
|
|
23
|
-
if (!
|
|
23
|
+
const t = u(), _ = /* @__PURE__ */ new Set(["session_refresh"]);
|
|
24
|
+
async function o(n) {
|
|
25
|
+
if (!t.enabled)
|
|
26
|
+
return;
|
|
27
|
+
const s = _.has(n.type) ? t.endUserIdentifier : t.developerIdentifier;
|
|
28
|
+
if (!s)
|
|
24
29
|
return;
|
|
25
|
-
const
|
|
26
|
-
user_id:
|
|
27
|
-
event_type:
|
|
28
|
-
platform:
|
|
29
|
-
timestamp:
|
|
30
|
+
const a = Date.now(), d = [{
|
|
31
|
+
user_id: s,
|
|
32
|
+
event_type: n.type,
|
|
33
|
+
platform: r() ? "web" : "native",
|
|
34
|
+
timestamp: a,
|
|
30
35
|
event_properties: {
|
|
31
36
|
project_name: "cdp-embedded-wallet",
|
|
32
37
|
framework: m(),
|
|
33
|
-
isLocalHost:
|
|
34
|
-
isUsingMocks:
|
|
35
|
-
package_versions:
|
|
36
|
-
...
|
|
38
|
+
isLocalHost: g(),
|
|
39
|
+
isUsingMocks: t.isUsingMocks,
|
|
40
|
+
package_versions: t.versionRegistry,
|
|
41
|
+
...n
|
|
37
42
|
}
|
|
38
|
-
}],
|
|
39
|
-
client:
|
|
40
|
-
e:
|
|
41
|
-
checksum:
|
|
43
|
+
}], c = JSON.stringify(d), l = a.toString(), f = E(c + l), p = {
|
|
44
|
+
client: t.isProduction ? y : v,
|
|
45
|
+
e: c,
|
|
46
|
+
checksum: f
|
|
42
47
|
};
|
|
43
48
|
await fetch("https://cca-lite.coinbase.com/amp", {
|
|
44
49
|
method: "POST",
|
|
@@ -46,15 +51,15 @@ async function o(t) {
|
|
|
46
51
|
headers: {
|
|
47
52
|
"Content-Type": "application/json"
|
|
48
53
|
},
|
|
49
|
-
body: JSON.stringify(
|
|
54
|
+
body: JSON.stringify(p)
|
|
50
55
|
});
|
|
51
56
|
}
|
|
52
|
-
function
|
|
57
|
+
function r() {
|
|
53
58
|
return typeof window < "u" && typeof document < "u";
|
|
54
59
|
}
|
|
55
|
-
function
|
|
56
|
-
return
|
|
60
|
+
function g() {
|
|
61
|
+
return r() ? window.location.hostname === "localhost" || window.location.hostname === "127.0.0.1" : !1;
|
|
57
62
|
}
|
|
58
63
|
export {
|
|
59
|
-
|
|
64
|
+
t as Analytics
|
|
60
65
|
};
|
package/dist/esm/index3.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-wagmi",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.88",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/**",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"react": ">=18.2.0",
|
|
20
20
|
"viem": "^2.33.0",
|
|
21
21
|
"wagmi": "^2.16.0",
|
|
22
|
-
"@coinbase/cdp-core": "^0.0.
|
|
22
|
+
"@coinbase/cdp-core": "^0.0.88"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@tanstack/react-query": "^5.0.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"@size-limit/webpack": "^11.2.0",
|
|
36
36
|
"@size-limit/webpack-why": "^11.2.0",
|
|
37
37
|
"size-limit": "^11.2.0",
|
|
38
|
-
"@coinbase/cdp-core": "^0.0.
|
|
38
|
+
"@coinbase/cdp-core": "^0.0.88"
|
|
39
39
|
},
|
|
40
40
|
"size-limit": [
|
|
41
41
|
{
|