@coinbase/cdp-react 0.0.67 → 0.0.69
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/assets/ExportWallet.css +1 -1
- package/dist/assets/IframeButton.css +1 -1
- package/dist/components/CopyEvmKeyButton/index.d.ts +2 -1
- package/dist/components/CopyEvmKeyButton/index.js +52 -37
- package/dist/components/CopySolanaKeyButton/index.d.ts +2 -1
- package/dist/components/CopySolanaKeyButton/index.js +55 -40
- package/dist/components/ExportWallet/index.d.ts +13 -3
- package/dist/components/ExportWallet/index.js +185 -155
- package/dist/components/ExportWalletModal/index.d.ts +3 -3
- package/dist/components/ExportWalletModal/index.js +7 -6
- package/dist/components/Fund/utils/setupOnrampEventListeners.d.ts +1 -2
- package/dist/components/Fund/utils/setupOnrampEventListeners.js +10 -12
- package/dist/components/Fund/utils/subscribeToWindowMessage.d.ts +2 -2
- package/dist/components/Fund/utils/subscribeToWindowMessage.js +11 -11
- package/dist/components/ui/IframeButton/index.js +107 -81
- package/dist/components/ui/SwitchFadeTransition/index.d.ts +1 -1
- package/dist/components/ui/SwitchSlideTransition/index.d.ts +1 -1
- package/dist/hooks/useKeyExportPostMessage.d.ts +2 -22
- package/dist/hooks/useKeyExportPostMessage.js +57 -63
- package/dist/index.js +1 -1
- package/dist/theme/theme.d.ts +8 -0
- package/dist/theme/tokens.d.ts +24 -0
- package/dist/theme/tokens.js +28 -17
- package/dist/types/secureIframe.d.ts +24 -5
- package/dist/types/secureIframe.js +7 -3
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +6 -5
|
@@ -22,6 +22,11 @@ export type IframeTheme = {
|
|
|
22
22
|
fontFamily: string;
|
|
23
23
|
};
|
|
24
24
|
export type SecureIframeAuthState = Parameters<AuthManager["setAuthState"]>[0];
|
|
25
|
+
export type SecureIframeChainType = "evm" | "solana";
|
|
26
|
+
export type SecureIframeContext = {
|
|
27
|
+
authState: SecureIframeAuthState;
|
|
28
|
+
theme?: IframeTheme;
|
|
29
|
+
};
|
|
25
30
|
export declare const SECURE_IFRAME_EVENT_TYPE_PREFIX = "CDP_WEB_SECURE_IFRAME_";
|
|
26
31
|
export declare const SECURE_IFRAME_EVENT_TYPE: {
|
|
27
32
|
readonly INIT: "CDP_WEB_SECURE_IFRAME_INIT";
|
|
@@ -32,10 +37,7 @@ export declare const SECURE_IFRAME_EVENT_TYPE: {
|
|
|
32
37
|
export type SecureIframeEventType = typeof SECURE_IFRAME_EVENT_TYPE;
|
|
33
38
|
export type SecureIframeInitMessage = {
|
|
34
39
|
type: SecureIframeEventType["INIT"];
|
|
35
|
-
payload:
|
|
36
|
-
authState: SecureIframeAuthState;
|
|
37
|
-
theme?: IframeTheme;
|
|
38
|
-
};
|
|
40
|
+
payload: SecureIframeContext;
|
|
39
41
|
};
|
|
40
42
|
export type SecureIframeThemeMessage = {
|
|
41
43
|
type: SecureIframeEventType["THEME"];
|
|
@@ -47,7 +49,7 @@ export type SecureIframeIncomingMessage = SecureIframeInitMessage | SecureIframe
|
|
|
47
49
|
export type SecureIframeListeningMessage = {
|
|
48
50
|
type: SecureIframeEventType["LISTENING"];
|
|
49
51
|
};
|
|
50
|
-
export type SecureIframeStatus = "ready" | "success" | "error";
|
|
52
|
+
export type SecureIframeStatus = "ready" | "success" | "error" | "expiring" | "expired";
|
|
51
53
|
export type SecureIframeStatusMessage = {
|
|
52
54
|
type: SecureIframeEventType["STATUS"];
|
|
53
55
|
payload: {
|
|
@@ -56,3 +58,20 @@ export type SecureIframeStatusMessage = {
|
|
|
56
58
|
};
|
|
57
59
|
};
|
|
58
60
|
export type SecureIframeOutgoingMessage = SecureIframeListeningMessage | SecureIframeStatusMessage;
|
|
61
|
+
export declare const SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE: {
|
|
62
|
+
readonly GET_PRIVATE_KEY: "CDP_WEB_SECURE_IFRAME_GET_PRIVATE_KEY";
|
|
63
|
+
readonly INIT: "CDP_WEB_SECURE_IFRAME_INIT";
|
|
64
|
+
readonly LISTENING: "CDP_WEB_SECURE_IFRAME_LISTENING";
|
|
65
|
+
readonly STATUS: "CDP_WEB_SECURE_IFRAME_STATUS";
|
|
66
|
+
readonly THEME: "CDP_WEB_SECURE_IFRAME_THEME";
|
|
67
|
+
};
|
|
68
|
+
export type SecureIframeKeyExportEventType = typeof SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE;
|
|
69
|
+
export type SecureIframeGetPrivateKeyMessage = {
|
|
70
|
+
type: SecureIframeKeyExportEventType["GET_PRIVATE_KEY"];
|
|
71
|
+
payload: SecureIframeContext & {
|
|
72
|
+
address: string;
|
|
73
|
+
type: SecureIframeChainType;
|
|
74
|
+
};
|
|
75
|
+
};
|
|
76
|
+
export type SecureIframeKeyExportIncomingMessage = SecureIframeIncomingMessage | SecureIframeGetPrivateKeyMessage;
|
|
77
|
+
export type SecureIframeKeyExportOutgoingMessage = SecureIframeOutgoingMessage;
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import "@coinbase/cdp-core";
|
|
2
|
-
const E = "CDP_WEB_SECURE_IFRAME_",
|
|
2
|
+
const E = "CDP_WEB_SECURE_IFRAME_", T = {
|
|
3
3
|
INIT: `${E}INIT`,
|
|
4
4
|
LISTENING: `${E}LISTENING`,
|
|
5
5
|
STATUS: `${E}STATUS`,
|
|
6
6
|
THEME: `${E}THEME`
|
|
7
|
+
}, I = {
|
|
8
|
+
...T,
|
|
9
|
+
GET_PRIVATE_KEY: `${E}GET_PRIVATE_KEY`
|
|
7
10
|
};
|
|
8
11
|
export {
|
|
9
|
-
|
|
10
|
-
E as SECURE_IFRAME_EVENT_TYPE_PREFIX
|
|
12
|
+
T as SECURE_IFRAME_EVENT_TYPE,
|
|
13
|
+
E as SECURE_IFRAME_EVENT_TYPE_PREFIX,
|
|
14
|
+
I as SECURE_IFRAME_KEY_EXPORT_EVENT_TYPE
|
|
11
15
|
};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const VERSION = "0.0.
|
|
1
|
+
export declare const VERSION = "0.0.69";
|
package/dist/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coinbase/cdp-react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.69",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@internationalized/number": "3.6.4",
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
},
|
|
16
16
|
"peerDependencies": {
|
|
17
17
|
"react": ">=18.2.0 <19.2.0",
|
|
18
|
-
"@coinbase/cdp-core": "^0.0.
|
|
19
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
18
|
+
"@coinbase/cdp-core": "^0.0.69",
|
|
19
|
+
"@coinbase/cdp-hooks": "^0.0.69"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|
|
22
22
|
"@size-limit/preset-big-lib": "^11.2.0",
|
|
@@ -36,6 +36,7 @@
|
|
|
36
36
|
"eslint-plugin-react": "^7.37.5",
|
|
37
37
|
"eslint-plugin-react-hooks": "^5.2.0",
|
|
38
38
|
"glob": "^11.0.3",
|
|
39
|
+
"jest-canvas-mock": "2.5.2",
|
|
39
40
|
"react": "~19.1.0",
|
|
40
41
|
"react-dom": "~19.1.0",
|
|
41
42
|
"rollup-plugin-visualizer": "^6.0.3",
|
|
@@ -46,8 +47,8 @@
|
|
|
46
47
|
"vite": "^7.0.4",
|
|
47
48
|
"vite-plugin-dts": "^4.5.4",
|
|
48
49
|
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
49
|
-
"@coinbase/cdp-core": "^0.0.
|
|
50
|
-
"@coinbase/cdp-hooks": "^0.0.
|
|
50
|
+
"@coinbase/cdp-core": "^0.0.69",
|
|
51
|
+
"@coinbase/cdp-hooks": "^0.0.69"
|
|
51
52
|
},
|
|
52
53
|
"size-limit": [
|
|
53
54
|
{
|