@openfort/react 0.1.2 → 0.1.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/README.md +5 -9
- package/build/assets/icons.d.ts +0 -3
- package/build/components/ConnectModal/ConnectWithQRCode.d.ts +1 -4
- package/build/components/Openfort/types.d.ts +1 -0
- package/build/components/contexts/web3/index.d.ts +1 -29
- package/build/hooks/openfort/useGrantPermissions.d.ts +1 -2
- package/build/hooks/openfort/useRevokePermissions.d.ts +58 -0
- package/build/hooks/useConnectors.d.ts +0 -1
- package/build/index.d.ts +1 -0
- package/build/index.es.js +229 -348
- package/build/index.es.js.map +1 -1
- package/build/utils/index.d.ts +0 -2
- package/build/version.d.ts +1 -1
- package/package.json +2 -2
- package/build/assets/ScanIconWithLogos.d.ts +0 -5
- package/build/hooks/connectors/useWalletConnectUri.d.ts +0 -7
package/README.md
CHANGED
|
@@ -76,11 +76,7 @@ pnpm add @openfort/react @tanstack/react-query wagmi viem
|
|
|
76
76
|
|
|
77
77
|
## Examples
|
|
78
78
|
|
|
79
|
-
There are various runnable examples included in this repository in the [examples folder](https://github.com/openfort-xyz/openfort-react/tree/main/examples)
|
|
80
|
-
|
|
81
|
-
- [Create React App Example (TypeScript)](https://github.com/openfort-xyz/openfort-react/tree/main/examples/cra)
|
|
82
|
-
- [Next.js Example (TypeScript)](https://github.com/openfort-xyz/openfort-react/tree/main/examples/nextjs)
|
|
83
|
-
- [Vite Example (TypeScript)](https://github.com/openfort-xyz/openfort-react/tree/main/examples/vite)
|
|
79
|
+
There are various runnable examples included in this repository in the [examples folder](https://github.com/openfort-xyz/openfort-react/tree/main/examples)
|
|
84
80
|
|
|
85
81
|
### Running Examples Locally
|
|
86
82
|
|
|
@@ -95,15 +91,15 @@ $ pnpm install
|
|
|
95
91
|
and start the code bundler:
|
|
96
92
|
|
|
97
93
|
```sh
|
|
98
|
-
$ pnpm dev
|
|
94
|
+
$ pnpm dev
|
|
99
95
|
```
|
|
100
96
|
|
|
101
97
|
and then simply select the example you'd like to run:
|
|
102
98
|
|
|
103
99
|
```sh
|
|
104
|
-
$ pnpm dev:
|
|
105
|
-
$ pnpm dev:
|
|
106
|
-
$ pnpm dev:
|
|
100
|
+
$ pnpm dev:playground # Playground
|
|
101
|
+
$ pnpm dev:headless # Headless
|
|
102
|
+
$ pnpm dev:openfort-ui # Openfort UI
|
|
107
103
|
```
|
|
108
104
|
|
|
109
105
|
## License
|
package/build/assets/icons.d.ts
CHANGED
|
@@ -109,6 +109,7 @@ export type OpenfortWalletConfig = CommonWalletConfig & EncryptionSession;
|
|
|
109
109
|
type OpenfortUIOptions = {
|
|
110
110
|
linkWalletOnSignUp?: LinkWalletOnSignUpOption;
|
|
111
111
|
authProviders: UIAuthProvider[];
|
|
112
|
+
authProvidersLength?: number;
|
|
112
113
|
skipEmailVerification?: boolean;
|
|
113
114
|
termsOfServiceUrl?: string;
|
|
114
115
|
privacyPolicyUrl?: string;
|
|
@@ -1,30 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
* Provides reusable Web3 state and helpers to descendant components.
|
|
3
|
-
*
|
|
4
|
-
* @example
|
|
5
|
-
* ```tsx
|
|
6
|
-
* <Web3ContextProvider>
|
|
7
|
-
* <WalletSelector />
|
|
8
|
-
* </Web3ContextProvider>
|
|
9
|
-
* ```
|
|
10
|
-
*/
|
|
11
|
-
import type { Address, Chain } from 'viem';
|
|
12
|
-
type Web3Context = {
|
|
13
|
-
connect: {
|
|
14
|
-
getUri: (id?: string) => string;
|
|
15
|
-
};
|
|
16
|
-
dapp: {
|
|
17
|
-
chains: Chain[];
|
|
18
|
-
};
|
|
19
|
-
account?: {
|
|
20
|
-
chain: Chain;
|
|
21
|
-
chainIsSupported: boolean;
|
|
22
|
-
address: Address;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
25
|
-
declare const Web3Context: import("react").Context<Web3Context>;
|
|
26
|
-
export declare const Web3ContextProvider: ({ enabled, children }: {
|
|
27
|
-
enabled?: boolean;
|
|
1
|
+
export declare const Web3ContextProvider: ({ children }: {
|
|
28
2
|
children: React.ReactNode;
|
|
29
3
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
30
4
|
/**
|
|
@@ -37,5 +11,3 @@ export declare const Web3ContextProvider: ({ enabled, children }: {
|
|
|
37
11
|
* const { account } = useWeb3();
|
|
38
12
|
* ```
|
|
39
13
|
*/
|
|
40
|
-
export declare const useWeb3: () => Web3Context;
|
|
41
|
-
export {};
|
|
@@ -7,7 +7,6 @@ type GrantPermissionsRequest = {
|
|
|
7
7
|
};
|
|
8
8
|
type GrantPermissionsResult = {
|
|
9
9
|
address: `0x${string}`;
|
|
10
|
-
privateKey: `0x${string}`;
|
|
11
10
|
} & GrantPermissionsReturnType;
|
|
12
11
|
type GrantPermissionsHookResult = {
|
|
13
12
|
error?: OpenfortError;
|
|
@@ -100,7 +99,7 @@ export declare const useGrantPermissions: (hookOptions?: GrantPermissionsHookOpt
|
|
|
100
99
|
isError: boolean;
|
|
101
100
|
isSuccess: boolean;
|
|
102
101
|
error: OpenfortError | null | undefined;
|
|
103
|
-
grantPermissions: ({ request
|
|
102
|
+
grantPermissions: ({ request }: GrantPermissionsRequest, options?: GrantPermissionsHookOptions) => Promise<GrantPermissionsHookResult>;
|
|
104
103
|
data: GrantPermissionsResult | null;
|
|
105
104
|
reset: () => void;
|
|
106
105
|
};
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { SessionResponse } from '@openfort/openfort-js';
|
|
2
|
+
import type { Hex } from 'viem';
|
|
3
|
+
import { OpenfortError, type OpenfortHookOptions } from '../../types';
|
|
4
|
+
type RevokePermissionsRequest = {
|
|
5
|
+
sessionKey: Hex;
|
|
6
|
+
};
|
|
7
|
+
type RevokePermissionsResult = SessionResponse;
|
|
8
|
+
type RevokePermissionsHookResult = {
|
|
9
|
+
error?: OpenfortError;
|
|
10
|
+
} & Partial<RevokePermissionsResult>;
|
|
11
|
+
type RevokePermissionsHookOptions = OpenfortHookOptions<RevokePermissionsHookResult>;
|
|
12
|
+
/**
|
|
13
|
+
* Hook for revoking permissions to session keys (EIP-7715)
|
|
14
|
+
*
|
|
15
|
+
* This hook manages the creation and authorization of session keys, allowing users to
|
|
16
|
+
* delegate permissions to specific accounts for a limited time. This enables use cases
|
|
17
|
+
* like session-based authentication and gasless transactions within defined scopes.
|
|
18
|
+
* The hook leverages EIP-7715 for permission revocation.
|
|
19
|
+
*
|
|
20
|
+
* @param hookOptions - Optional configuration with callback functions
|
|
21
|
+
* @returns Current revoke permissions state and actions
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
|
|
26
|
+
* import { useRevokePermissions } from '@openfort/openfort-react';
|
|
27
|
+
*
|
|
28
|
+
* const { revokePermissions, isLoading, isError, error } = useRevokePermissions({
|
|
29
|
+
* onSuccess: (result) => console.log('Permissions revoked:', result),
|
|
30
|
+
* onError: (error) => console.error('Permission revoke failed:', error),
|
|
31
|
+
* });
|
|
32
|
+
*
|
|
33
|
+
* // Revoke Permissions to a session key
|
|
34
|
+
* const handleRevokePermissions = async () => {
|
|
35
|
+
* try {
|
|
36
|
+
* const sessionKey = '0x...'; // The session key to revoke permissions for
|
|
37
|
+
*
|
|
38
|
+
* const result = await revokePermissions({
|
|
39
|
+
* sessionKey,
|
|
40
|
+
* });
|
|
41
|
+
*
|
|
42
|
+
* console.log('Revoke result:', result);
|
|
43
|
+
* } catch (error) {
|
|
44
|
+
* console.error('Error revoking permissions:', error);
|
|
45
|
+
* }
|
|
46
|
+
* };
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
export declare const useRevokePermissions: (hookOptions?: RevokePermissionsHookOptions) => {
|
|
50
|
+
isLoading: boolean;
|
|
51
|
+
isError: boolean;
|
|
52
|
+
isSuccess: boolean;
|
|
53
|
+
error: OpenfortError | null | undefined;
|
|
54
|
+
revokePermissions: ({ sessionKey }: RevokePermissionsRequest, options?: RevokePermissionsHookOptions) => Promise<RevokePermissionsHookResult>;
|
|
55
|
+
data: SessionResponse | null;
|
|
56
|
+
reset: () => void;
|
|
57
|
+
};
|
|
58
|
+
export {};
|
|
@@ -3,4 +3,3 @@ export declare function useConnectors(): readonly Connector<import("wagmi").Crea
|
|
|
3
3
|
export declare function useConnector(id: string, uuid?: string): Connector<import("wagmi").CreateConnectorFn> | undefined;
|
|
4
4
|
export declare function useFamilyAccountsConnector(): Connector<import("wagmi").CreateConnectorFn> | undefined;
|
|
5
5
|
export declare function useFamilyConnector(): Connector<import("wagmi").CreateConnectorFn> | undefined;
|
|
6
|
-
export declare function useWalletConnectConnector(): Connector<import("wagmi").CreateConnectorFn> | undefined;
|
package/build/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { useWalletAuth } from './hooks/openfort/auth/useWalletAuth';
|
|
|
16
16
|
export { type SignAuthorizationParameters, type SignAuthorizationReturnType, use7702Authorization, } from './hooks/openfort/use7702Authorization';
|
|
17
17
|
export { useConnectWithSiwe } from './hooks/openfort/useConnectWithSiwe';
|
|
18
18
|
export { useGrantPermissions } from './hooks/openfort/useGrantPermissions';
|
|
19
|
+
export { useRevokePermissions } from './hooks/openfort/useRevokePermissions';
|
|
19
20
|
export { useUI } from './hooks/openfort/useUI';
|
|
20
21
|
export { useUser } from './hooks/openfort/useUser';
|
|
21
22
|
export { UserWallet, useWallets } from './hooks/openfort/useWallets';
|
package/build/index.es.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Openfort as Openfort$1, EmbeddedState, AccountTypeEnum, RecoveryMethod, MissingRecoveryPasswordError, ChainTypeEnum, OAuthProvider, OpenfortError as OpenfortError$1, OpenfortErrorType as OpenfortErrorType$1 } from '@openfort/openfort-js';
|
|
2
2
|
export { AccountTypeEnum, OAuthProvider, OpenfortEvents, RecoveryMethod, ThirdPartyOAuthProvider, openfortEvents } from '@openfort/openfort-js';
|
|
3
3
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import React, { useState, useEffect, createContext, useRef, useId, useMemo, useCallback, createElement, useLayoutEffect
|
|
4
|
+
import React, { useState, useEffect, createContext, useRef, useId, useMemo, useCallback, createElement, useLayoutEffect } from 'react';
|
|
5
5
|
import { normalize } from 'viem/ens';
|
|
6
6
|
import { useEnsAddress, useEnsName, useEnsAvatar, useConfig, useAccount, useBlockNumber, useBalance, useConnectors as useConnectors$1, useConnect as useConnect$1, useDisconnect, useChainId, http, useSwitchChain, usePublicClient, WagmiContext, useWalletClient } from 'wagmi';
|
|
7
7
|
import { motion, AnimatePresence, MotionConfig } from 'framer-motion';
|
|
@@ -15,7 +15,6 @@ import { safe, injected, coinbaseWallet, walletConnect } from '@wagmi/connectors
|
|
|
15
15
|
import { useTransition } from 'react-transition-state';
|
|
16
16
|
import ResizeObserver from 'resize-observer-polyfill';
|
|
17
17
|
import { createPortal } from 'react-dom';
|
|
18
|
-
import { walletConnect as walletConnect$1 } from 'wagmi/connectors';
|
|
19
18
|
import calculateEntropy from 'fast-password-entropy';
|
|
20
19
|
import QRCodeUtil from 'qrcode';
|
|
21
20
|
import { switchChain, signMessage } from '@wagmi/core';
|
|
@@ -3683,9 +3682,7 @@ function flattenChildren(children) {
|
|
|
3683
3682
|
}, []);
|
|
3684
3683
|
}
|
|
3685
3684
|
const isWalletConnectConnector = (connectorId) => connectorId === 'walletConnect';
|
|
3686
|
-
const isFamilyAccountsConnector = (connectorId) => connectorId === 'familyAccountsProvider';
|
|
3687
3685
|
const isCoinbaseWalletConnector = (connectorId) => connectorId === 'coinbaseWalletSDK';
|
|
3688
|
-
const isPortoConnector = (connectorId) => connectorId === 'xyz.ithaca.porto';
|
|
3689
3686
|
const isSafeConnector = (connectorId) => connectorId === 'safe';
|
|
3690
3687
|
const isInjectedConnector = (connectorId) => connectorId === 'injected';
|
|
3691
3688
|
|
|
@@ -3984,7 +3981,7 @@ styled(motion.div) `
|
|
|
3984
3981
|
display: block;
|
|
3985
3982
|
}
|
|
3986
3983
|
`;
|
|
3987
|
-
const IconContainer$
|
|
3984
|
+
const IconContainer$4 = styled(motion.div) `
|
|
3988
3985
|
pointer-events: none;
|
|
3989
3986
|
user-select: none;
|
|
3990
3987
|
position: relative;
|
|
@@ -4144,7 +4141,7 @@ function OpenfortButtonInner({ label, showAvatar, separator, }) {
|
|
|
4144
4141
|
return (jsx(AnimatePresence, { initial: false, children: user || address ? (jsxs(TextContainer, { initial: 'initial', animate: 'animate', exit: 'exit', variants: addressVariants, style: {
|
|
4145
4142
|
height: 40,
|
|
4146
4143
|
//padding: !showAvatar ? '0 5px' : undefined,
|
|
4147
|
-
}, children: [showAvatar && (jsxs(IconContainer$
|
|
4144
|
+
}, children: [showAvatar && (jsxs(IconContainer$4, { children: [jsx(AnimatePresence, { initial: false, children: !isChainSupported && (jsx(UnsupportedNetworkContainer, { initial: { opacity: 0 }, animate: { opacity: 1 }, exit: { opacity: 0 }, children: jsxs("svg", { width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx("title", { children: "Unsupported network" }), jsx("path", { d: "M1.68831 13.5H12.0764C13.1026 13.5 13.7647 12.7197 13.7647 11.763C13.7647 11.4781 13.6985 11.1863 13.5462 10.9149L8.34225 1.37526C8.02445 0.791754 7.45505 0.5 6.88566 0.5C6.31627 0.5 5.73364 0.791754 5.42246 1.37526L0.225108 10.9217C0.0728291 11.1863 0 11.4781 0 11.763C0 12.7197 0.662083 13.5 1.68831 13.5ZM6.88566 8.8048C6.49503 8.8048 6.27655 8.5809 6.26331 8.1738L6.16399 5.0595C6.15075 4.64562 6.44869 4.34708 6.87904 4.34708C7.30278 4.34708 7.61396 4.6524 7.60071 5.06628L7.5014 8.16701C7.48154 8.5809 7.26305 8.8048 6.88566 8.8048ZM6.88566 11.3492C6.44207 11.3492 6.07792 11.0303 6.07792 10.5757C6.07792 10.1211 6.44207 9.80219 6.88566 9.80219C7.32926 9.80219 7.69341 10.1143 7.69341 10.5757C7.69341 11.0371 7.32264 11.3492 6.88566 11.3492Z", fill: "currentColor" })] }) })) }), jsx(Avatar, { size: 24, address: address })] })), jsx("div", { style: {
|
|
4148
4145
|
position: 'relative',
|
|
4149
4146
|
paddingRight: showAvatar ? 1 : 0,
|
|
4150
4147
|
}, children: jsx(AnimatePresence, { initial: false, children: jsx(TextContainer, { initial: 'initial', animate: 'animate', exit: 'exit', variants: textVariants$2, style: {
|
|
@@ -4235,16 +4232,6 @@ function useFamilyAccountsConnector() {
|
|
|
4235
4232
|
function useFamilyConnector() {
|
|
4236
4233
|
return useConnector('co.family.wallet');
|
|
4237
4234
|
}
|
|
4238
|
-
function useWalletConnectConnector() {
|
|
4239
|
-
/*
|
|
4240
|
-
options: {
|
|
4241
|
-
qrcode: false,
|
|
4242
|
-
// or
|
|
4243
|
-
showQrModal: false,
|
|
4244
|
-
}
|
|
4245
|
-
*/
|
|
4246
|
-
return useConnector('walletConnect');
|
|
4247
|
-
}
|
|
4248
4235
|
|
|
4249
4236
|
function useGoogleFont(font) {
|
|
4250
4237
|
useEffect(() => {
|
|
@@ -4717,7 +4704,6 @@ const defaultConnectors = ({ app, walletConnectProjectId, coinbaseWalletPreferen
|
|
|
4717
4704
|
}));
|
|
4718
4705
|
if (walletConnectProjectId) {
|
|
4719
4706
|
connectors.push(walletConnect({
|
|
4720
|
-
showQrModal: false,
|
|
4721
4707
|
projectId: walletConnectProjectId,
|
|
4722
4708
|
metadata: hasAllAppData
|
|
4723
4709
|
? {
|
|
@@ -4729,13 +4715,6 @@ const defaultConnectors = ({ app, walletConnectProjectId, coinbaseWalletPreferen
|
|
|
4729
4715
|
: undefined,
|
|
4730
4716
|
}));
|
|
4731
4717
|
}
|
|
4732
|
-
/*
|
|
4733
|
-
connectors.push(
|
|
4734
|
-
injected({
|
|
4735
|
-
shimDisconnect: true,
|
|
4736
|
-
})
|
|
4737
|
-
);
|
|
4738
|
-
*/
|
|
4739
4718
|
return connectors;
|
|
4740
4719
|
};
|
|
4741
4720
|
|
|
@@ -4757,7 +4736,6 @@ const defaultConfig = ({ appName = 'Openfort', appIcon, appDescription, appUrl,
|
|
|
4757
4736
|
walletConnectProjectId,
|
|
4758
4737
|
coinbaseWalletPreference,
|
|
4759
4738
|
});
|
|
4760
|
-
logger.log('OPENFORT CHAINS', { chains, transports, propsTransports: props === null || props === void 0 ? void 0 : props.transports });
|
|
4761
4739
|
const config = {
|
|
4762
4740
|
...props,
|
|
4763
4741
|
chains,
|
|
@@ -4767,10 +4745,6 @@ const defaultConfig = ({ appName = 'Openfort', appIcon, appDescription, appUrl,
|
|
|
4767
4745
|
return config;
|
|
4768
4746
|
};
|
|
4769
4747
|
|
|
4770
|
-
const ExternalLinkIcon = ({ ...props }) => (jsxs("svg", { "aria-hidden": "true", width: "16", height: "16", viewBox: "0 0 16 16", fill: "none", xmlns: "http://www.w3.org/2000/svg", style: {
|
|
4771
|
-
left: 0,
|
|
4772
|
-
top: 0,
|
|
4773
|
-
}, ...props, children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M4 4C2.89543 4 2 4.89543 2 6V12C2 13.1046 2.89543 14 4 14H10C11.1046 14 12 13.1046 12 12V9.66667C12 9.11438 12.4477 8.66667 13 8.66667C13.5523 8.66667 14 9.11438 14 9.66667V12C14 14.2091 12.2091 16 10 16H4C1.79086 16 0 14.2091 0 12V6C0 3.79086 1.79086 2 4 2H6.33333C6.88562 2 7.33333 2.44772 7.33333 3C7.33333 3.55228 6.88562 4 6.33333 4H4Z", fill: "currentColor", fillOpacity: 0.3 }), jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5 1C9.5 0.447715 9.94772 0 10.5 0H15C15.5523 0 16 0.447715 16 1V5.5C16 6.05228 15.5523 6.5 15 6.5C14.4477 6.5 14 6.05228 14 5.5V3.41421L8.70711 8.70711C8.31658 9.09763 7.68342 9.09763 7.29289 8.70711C6.90237 8.31658 6.90237 7.68342 7.29289 7.29289L12.5858 2H10.5C9.94772 2 9.5 1.55228 9.5 1Z", fill: "currentColor", fillOpacity: 0.3 })] }));
|
|
4774
4748
|
const AlertIcon = ({ ...props }) => {
|
|
4775
4749
|
return (jsxs("svg", { "aria-hidden": "true", width: "19", height: "18", viewBox: "0 0 19 18", fill: "none", xmlns: "http://www.w3.org/2000/svg", ...props, children: [jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M6.81753 1.60122C7.39283 0.530035 8.46953 0 9.50409 0C10.5507 0 11.6022 0.539558 12.1805 1.59767L18.6047 13.3334C18.882 13.8283 19 14.3568 19 14.8622C19 16.5296 17.7949 18 15.9149 18H3.08514C1.20508 18 0 16.5296 0 14.8622C0 14.3454 0.131445 13.8172 0.405555 13.3379L6.81753 1.60122ZM9.50409 2C9.13355 2 8.77256 2.18675 8.57866 2.54907L8.57458 2.5567L2.14992 14.3166L2.144 14.3268C2.04638 14.4959 2 14.6817 2 14.8622C2 15.5497 2.43032 16 3.08514 16H15.9149C16.5697 16 17 15.5497 17 14.8622C17 14.6681 16.9554 14.4805 16.8588 14.309L16.8529 14.2986L10.4259 2.55741C10.2191 2.1792 9.86395 2 9.50409 2Z", fill: "currentColor" }), jsx("path", { d: "M9.5 11.2297C9.01639 11.2297 8.7459 10.9419 8.72951 10.4186L8.60656 6.4157C8.59016 5.88372 8.95902 5.5 9.4918 5.5C10.0164 5.5 10.4016 5.89244 10.3852 6.42442L10.2623 10.4099C10.2377 10.9419 9.96721 11.2297 9.5 11.2297ZM9.5 14.5C8.95082 14.5 8.5 14.0901 8.5 13.5058C8.5 12.9215 8.95082 12.5116 9.5 12.5116C10.0492 12.5116 10.5 12.9128 10.5 13.5058C10.5 14.0988 10.041 14.5 9.5 14.5Z", fill: "currentColor" })] }));
|
|
4776
4750
|
};
|
|
@@ -5485,7 +5459,7 @@ const FitText = ({ children, maxFontSize = 100, minFontSize = 70, }) => {
|
|
|
5485
5459
|
};
|
|
5486
5460
|
FitText.displayName = 'FitText';
|
|
5487
5461
|
|
|
5488
|
-
const OPENFORT_VERSION = '0.1.
|
|
5462
|
+
const OPENFORT_VERSION = '0.1.4';
|
|
5489
5463
|
|
|
5490
5464
|
const Portal = (props) => {
|
|
5491
5465
|
props = {
|
|
@@ -6723,7 +6697,7 @@ const InnerContainer = styled.div `
|
|
|
6723
6697
|
text-overflow: ellipsis;
|
|
6724
6698
|
*/
|
|
6725
6699
|
`;
|
|
6726
|
-
const IconContainer$
|
|
6700
|
+
const IconContainer$3 = styled(motion.div) `
|
|
6727
6701
|
position: relative;
|
|
6728
6702
|
display: inline-block;
|
|
6729
6703
|
vertical-align: middle;
|
|
@@ -6788,7 +6762,7 @@ disabled, icon, iconPosition = 'left', roundedIcon, waiting, arrow, download, hr
|
|
|
6788
6762
|
}, transition: {
|
|
6789
6763
|
...transition,
|
|
6790
6764
|
delay: 0.2,
|
|
6791
|
-
}, children: [icon && iconPosition === 'left' && jsx(IconContainer$
|
|
6765
|
+
}, children: [icon && iconPosition === 'left' && jsx(IconContainer$3, { "$rounded": roundedIcon, children: icon }), download && (jsx(DownloadArrow, { children: jsx(DownloadArrowInner, { children: jsxs(Arrow, { width: "13", height: "12", viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx(ArrowLine, { stroke: "currentColor", x1: "1", y1: "6", x2: "12", y2: "6", strokeWidth: "var(--stroke-width)", strokeLinecap: "round" }), jsx(ArrowChevron, { stroke: "currentColor", d: "M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314", strokeWidth: "var(--stroke-width)", strokeLinecap: "round" })] }) }) })), jsx(InnerContainer, { style: { paddingLeft: arrow ? 6 : 0 }, children: jsx(FitText, { children: children }) }), icon && iconPosition === 'right' && jsx(IconContainer$3, { "$rounded": roundedIcon, children: icon }), arrow && (jsxs(Arrow, { width: "13", height: "12", viewBox: "0 0 13 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsx(ArrowLine, { stroke: "currentColor", x1: "1", y1: "6", x2: "12", y2: "6", strokeWidth: "2", strokeLinecap: "round" }), jsx(ArrowChevron, { stroke: "currentColor", d: "M7.51431 1.5L11.757 5.74264M7.5 10.4858L11.7426 6.24314", strokeWidth: "2", strokeLinecap: "round" })] }))] }, key), waiting && (jsx(SpinnerContainer$2, { children: jsx(Spinner$3, {}) }))] }) }));
|
|
6792
6766
|
};
|
|
6793
6767
|
|
|
6794
6768
|
var OpenfortErrorType;
|
|
@@ -6990,7 +6964,7 @@ const PageContent = ({ children, width, onBack = 'back', logoutOnBack }) => {
|
|
|
6990
6964
|
else
|
|
6991
6965
|
setOnBack(null);
|
|
6992
6966
|
// else setOnBack(() => () => alert('REMOVE DEBUG ON BACK STRING!'))
|
|
6993
|
-
}, [
|
|
6967
|
+
}, []);
|
|
6994
6968
|
return jsx(PageContentStyle, { style: { width }, children: children });
|
|
6995
6969
|
};
|
|
6996
6970
|
|
|
@@ -7905,18 +7879,17 @@ function useWalletConnectModal() {
|
|
|
7905
7879
|
const w3mcss = document.createElement('style');
|
|
7906
7880
|
w3mcss.innerHTML = `w3m-modal, wcm-modal{ --wcm-z-index: 2147483647; --w3m-z-index:2147483647; }`;
|
|
7907
7881
|
document.head.appendChild(w3mcss);
|
|
7882
|
+
const removeChild = () => {
|
|
7883
|
+
if (document.head.contains(w3mcss)) {
|
|
7884
|
+
document.head.removeChild(w3mcss);
|
|
7885
|
+
}
|
|
7886
|
+
};
|
|
7908
7887
|
const clientConnector = connectors.find((c) => isWalletConnectConnector(c.id));
|
|
7909
7888
|
if (clientConnector) {
|
|
7910
7889
|
try {
|
|
7911
|
-
const provider = await clientConnector.getProvider();
|
|
7912
|
-
const projectId = provider.rpc.projectId;
|
|
7913
|
-
const connector = walletConnect$1({
|
|
7914
|
-
projectId,
|
|
7915
|
-
showQrModal: true,
|
|
7916
|
-
});
|
|
7917
7890
|
setIsOpen(true);
|
|
7918
7891
|
try {
|
|
7919
|
-
await connectAsync({ connector:
|
|
7892
|
+
await connectAsync({ connector: clientConnector });
|
|
7920
7893
|
}
|
|
7921
7894
|
catch (err) {
|
|
7922
7895
|
logger.log('WalletConnect', err);
|
|
@@ -7925,18 +7898,19 @@ function useWalletConnectModal() {
|
|
|
7925
7898
|
};
|
|
7926
7899
|
}
|
|
7927
7900
|
setIsOpen(false);
|
|
7928
|
-
|
|
7929
|
-
document.head.removeChild(w3mcss);
|
|
7901
|
+
removeChild();
|
|
7930
7902
|
return {};
|
|
7931
7903
|
}
|
|
7932
7904
|
catch (err) {
|
|
7933
7905
|
logger.log('Could not get WalletConnect provider', err);
|
|
7906
|
+
removeChild();
|
|
7934
7907
|
return {
|
|
7935
7908
|
error: 'Could not get WalletConnect provider',
|
|
7936
7909
|
};
|
|
7937
7910
|
}
|
|
7938
7911
|
}
|
|
7939
7912
|
else {
|
|
7913
|
+
removeChild();
|
|
7940
7914
|
logger.log('Configuration error: Please provide a WalletConnect Project ID in your wagmi config.');
|
|
7941
7915
|
return {
|
|
7942
7916
|
error: 'Configuration error: Please provide a WalletConnect Project ID in your wagmi config.',
|
|
@@ -7967,140 +7941,6 @@ const useLastConnector = () => {
|
|
|
7967
7941
|
};
|
|
7968
7942
|
};
|
|
7969
7943
|
|
|
7970
|
-
function useWalletConnectUri({ enabled } = {
|
|
7971
|
-
enabled: true,
|
|
7972
|
-
}) {
|
|
7973
|
-
const [uri, setUri] = useState(undefined);
|
|
7974
|
-
const connector = useWalletConnectConnector();
|
|
7975
|
-
const { isConnected } = useAccount();
|
|
7976
|
-
const { connectAsync } = useConnect();
|
|
7977
|
-
const { disconnect } = useDisconnect();
|
|
7978
|
-
useEffect(() => {
|
|
7979
|
-
if (!enabled)
|
|
7980
|
-
return;
|
|
7981
|
-
async function handleMessage(message) {
|
|
7982
|
-
const { type, data } = message;
|
|
7983
|
-
logger.log('WC Message', type, data);
|
|
7984
|
-
if (type === 'display_uri') {
|
|
7985
|
-
setUri(data);
|
|
7986
|
-
}
|
|
7987
|
-
/*
|
|
7988
|
-
// This has the URI as well, but we're probably better off using the one in the display_uri event
|
|
7989
|
-
if (type === 'connecting') {
|
|
7990
|
-
const p = await connector.getProvider();
|
|
7991
|
-
const uri = p.signer.uri;
|
|
7992
|
-
setConnectorUri(uri);
|
|
7993
|
-
}
|
|
7994
|
-
*/
|
|
7995
|
-
}
|
|
7996
|
-
async function handleDisconnect() {
|
|
7997
|
-
logger.log('WC Disconnect');
|
|
7998
|
-
if (connector)
|
|
7999
|
-
connectWallet(connector);
|
|
8000
|
-
}
|
|
8001
|
-
async function connectWallet(connector) {
|
|
8002
|
-
if (isConnected)
|
|
8003
|
-
disconnect();
|
|
8004
|
-
const result = await connectAsync({ connector });
|
|
8005
|
-
if (result)
|
|
8006
|
-
return result;
|
|
8007
|
-
return false;
|
|
8008
|
-
}
|
|
8009
|
-
async function connectWalletConnect(connector) {
|
|
8010
|
-
try {
|
|
8011
|
-
await connectWallet(connector);
|
|
8012
|
-
}
|
|
8013
|
-
catch (error) {
|
|
8014
|
-
logger.log('catch error');
|
|
8015
|
-
logger.log(error);
|
|
8016
|
-
if (error.code) {
|
|
8017
|
-
switch (error.code) {
|
|
8018
|
-
case 4001:
|
|
8019
|
-
logger.log('error.code - User rejected');
|
|
8020
|
-
connectWalletConnect(connector); // Regenerate QR code
|
|
8021
|
-
break;
|
|
8022
|
-
default:
|
|
8023
|
-
logger.log('error.code - Unknown Error');
|
|
8024
|
-
break;
|
|
8025
|
-
}
|
|
8026
|
-
}
|
|
8027
|
-
else {
|
|
8028
|
-
// Sometimes the error doesn't respond with a code
|
|
8029
|
-
logger.log('WalletConnect cannot connect.', error);
|
|
8030
|
-
}
|
|
8031
|
-
}
|
|
8032
|
-
}
|
|
8033
|
-
if (isConnected) {
|
|
8034
|
-
setUri(undefined);
|
|
8035
|
-
}
|
|
8036
|
-
else {
|
|
8037
|
-
if (!connector || uri)
|
|
8038
|
-
return;
|
|
8039
|
-
if (connector && !isConnected) {
|
|
8040
|
-
connectWalletConnect(connector);
|
|
8041
|
-
logger.log('add wc listeners');
|
|
8042
|
-
connector.emitter.on('message', handleMessage);
|
|
8043
|
-
connector.emitter.on('disconnect', handleDisconnect);
|
|
8044
|
-
return () => {
|
|
8045
|
-
logger.log('remove wc listeners');
|
|
8046
|
-
connector.emitter.off('message', handleMessage);
|
|
8047
|
-
connector.emitter.off('disconnect', handleDisconnect);
|
|
8048
|
-
};
|
|
8049
|
-
}
|
|
8050
|
-
}
|
|
8051
|
-
}, [enabled, connector, isConnected]);
|
|
8052
|
-
return {
|
|
8053
|
-
uri,
|
|
8054
|
-
};
|
|
8055
|
-
}
|
|
8056
|
-
|
|
8057
|
-
const Web3Context = createContext({
|
|
8058
|
-
connect: {
|
|
8059
|
-
getUri: () => '',
|
|
8060
|
-
},
|
|
8061
|
-
dapp: {
|
|
8062
|
-
chains: [],
|
|
8063
|
-
},
|
|
8064
|
-
account: undefined,
|
|
8065
|
-
});
|
|
8066
|
-
const Web3ContextProvider = ({ enabled, children }) => {
|
|
8067
|
-
const { uri: walletConnectUri } = useWalletConnectUri({
|
|
8068
|
-
enabled,
|
|
8069
|
-
});
|
|
8070
|
-
const { address: currentAddress, chain } = useAccount();
|
|
8071
|
-
const chainIsSupported = useChainIsSupported(chain === null || chain === void 0 ? void 0 : chain.id);
|
|
8072
|
-
const chains = useChains();
|
|
8073
|
-
const value = {
|
|
8074
|
-
connect: {
|
|
8075
|
-
getUri: (_id) => {
|
|
8076
|
-
return walletConnectUri;
|
|
8077
|
-
},
|
|
8078
|
-
},
|
|
8079
|
-
dapp: {
|
|
8080
|
-
chains,
|
|
8081
|
-
},
|
|
8082
|
-
account: currentAddress
|
|
8083
|
-
? {
|
|
8084
|
-
chain,
|
|
8085
|
-
chainIsSupported,
|
|
8086
|
-
address: currentAddress,
|
|
8087
|
-
}
|
|
8088
|
-
: undefined,
|
|
8089
|
-
};
|
|
8090
|
-
return jsx(Web3Context.Provider, { value: value, children: children });
|
|
8091
|
-
};
|
|
8092
|
-
/**
|
|
8093
|
-
* React hook to access the {@link Web3Context} values.
|
|
8094
|
-
*
|
|
8095
|
-
* @returns Shared Web3 utilities exposed by the provider.
|
|
8096
|
-
*
|
|
8097
|
-
* @example
|
|
8098
|
-
* ```ts
|
|
8099
|
-
* const { account } = useWeb3();
|
|
8100
|
-
* ```
|
|
8101
|
-
*/
|
|
8102
|
-
const useWeb3 = () => useContext(Web3Context);
|
|
8103
|
-
|
|
8104
7944
|
const AlertContainer = styled(motion.div) `
|
|
8105
7945
|
display: flex;
|
|
8106
7946
|
gap: 8px;
|
|
@@ -8136,7 +7976,7 @@ const AlertContainer = styled(motion.div) `
|
|
|
8136
7976
|
`;
|
|
8137
7977
|
}}
|
|
8138
7978
|
`;
|
|
8139
|
-
const IconContainer$
|
|
7979
|
+
const IconContainer$2 = styled(motion.div) `
|
|
8140
7980
|
width: 24px;
|
|
8141
7981
|
height: 24px;
|
|
8142
7982
|
display: flex;
|
|
@@ -8150,7 +7990,7 @@ const IconContainer$3 = styled(motion.div) `
|
|
|
8150
7990
|
`;
|
|
8151
7991
|
|
|
8152
7992
|
const Alert = ({ children, error, icon }) => {
|
|
8153
|
-
return (jsxs(AlertContainer, { "$error": error, children: [icon && jsx(IconContainer$
|
|
7993
|
+
return (jsxs(AlertContainer, { "$error": error, children: [icon && jsx(IconContainer$2, { children: icon }), jsx("div", { children: children })] }));
|
|
8154
7994
|
};
|
|
8155
7995
|
Alert.displayName = 'Alert';
|
|
8156
7996
|
|
|
@@ -8708,47 +8548,19 @@ const ConnectorList = () => {
|
|
|
8708
8548
|
return (jsxs(ScrollArea, { mobileDirection: 'horizontal', children: [filteredWallets.length === 0 && jsx(Alert, { error: true, children: "No connectors found in Openfort config." }), filteredWallets.length > 0 && (jsx(ConnectorsContainer, { "$mobile": isMobile, "$totalResults": walletsToDisplay.length, children: filteredWallets.map((wallet) => (jsx(ConnectorItem, { wallet: wallet, isRecent: wallet.id === lastConnectorId }, wallet.id))) }))] }));
|
|
8709
8549
|
};
|
|
8710
8550
|
const ConnectorItem = ({ wallet, isRecent }) => {
|
|
8711
|
-
var _a;
|
|
8712
|
-
const { connect: { getUri }, } = useWeb3();
|
|
8713
|
-
const wcUri = getUri();
|
|
8714
8551
|
const isMobile = useIsMobile();
|
|
8715
8552
|
const context = useOpenfort();
|
|
8716
|
-
const { connect } = useConnect();
|
|
8717
|
-
/*
|
|
8718
|
-
const [ready, setReady] = useState(false);
|
|
8719
|
-
useEffect(() => {
|
|
8720
|
-
(async () => {
|
|
8721
|
-
const provider = await wallet.connector.getProvider();
|
|
8722
|
-
setReady(!!provider);
|
|
8723
|
-
})();
|
|
8724
|
-
}, [wallet, setReady]);
|
|
8725
|
-
*/
|
|
8726
|
-
let deeplink = (!wallet.isInstalled && isMobile) || (wallet.shouldDeeplinkDesktop && !isMobile)
|
|
8727
|
-
? (_a = wallet.getWalletConnectDeeplink) === null || _a === void 0 ? void 0 : _a.call(wallet, wcUri !== null && wcUri !== void 0 ? wcUri : '')
|
|
8728
|
-
: undefined;
|
|
8729
8553
|
const redirectToMoreWallets = isMobile && isWalletConnectConnector(wallet.id);
|
|
8730
8554
|
// Safari requires opening popup on user gesture, so we connect immediately here
|
|
8731
|
-
const shouldConnectImmediately = (detectBrowser() === 'safari' || detectBrowser() === 'ios') &&
|
|
8732
|
-
(isCoinbaseWalletConnector(wallet.connector.id) || isPortoConnector(wallet.connector.id));
|
|
8733
|
-
if (redirectToMoreWallets || shouldConnectImmediately)
|
|
8734
|
-
deeplink = undefined; // mobile redirects to more wallets page
|
|
8735
8555
|
const content = () => {
|
|
8736
8556
|
var _a, _b;
|
|
8737
8557
|
return (jsxs(Fragment, { children: [jsx(ConnectorIcon, { "data-small": wallet.iconShouldShrink, "data-shape": wallet.iconShape, "data-background": redirectToMoreWallets, children: (_a = wallet.iconConnector) !== null && _a !== void 0 ? _a : wallet.icon }), jsxs(ConnectorLabel, { children: [isMobile ? ((_b = wallet.shortName) !== null && _b !== void 0 ? _b : wallet.name) : wallet.name, !context.uiConfig.hideRecentBadge && isRecent && (jsx(RecentlyUsedTag, { children: jsx("span", { children: "Recent" }) }))] })] }));
|
|
8738
8558
|
};
|
|
8739
8559
|
return (jsx(ConnectorButton, { type: "button", onClick: () => {
|
|
8740
|
-
if (isMobile && deeplink) {
|
|
8741
|
-
context.setRoute(routes.CONNECT_WITH_MOBILE);
|
|
8742
|
-
context.setConnector({ id: wallet.id });
|
|
8743
|
-
return;
|
|
8744
|
-
}
|
|
8745
8560
|
if (redirectToMoreWallets) {
|
|
8746
8561
|
context.setRoute(routes.MOBILECONNECTORS);
|
|
8747
8562
|
}
|
|
8748
8563
|
else {
|
|
8749
|
-
if (shouldConnectImmediately) {
|
|
8750
|
-
connect({ connector: wallet === null || wallet === void 0 ? void 0 : wallet.connector });
|
|
8751
|
-
}
|
|
8752
8564
|
context.setRoute({ route: routes.CONNECT, connectType: 'linkIfUserConnectIfNoUser' });
|
|
8753
8565
|
context.setConnector({ id: wallet.id });
|
|
8754
8566
|
}
|
|
@@ -8758,7 +8570,6 @@ const ConnectorItem = ({ wallet, isRecent }) => {
|
|
|
8758
8570
|
const ConnectWithMobile$1 = () => {
|
|
8759
8571
|
const { open: openWalletConnectModal } = useWalletConnectModal();
|
|
8760
8572
|
const [error, setError] = useState(undefined);
|
|
8761
|
-
const { connect, connectors } = useConnect();
|
|
8762
8573
|
const { connector, address } = useAccount();
|
|
8763
8574
|
const { setRoute, setConnector } = useOpenfort();
|
|
8764
8575
|
const openWCModal = async () => {
|
|
@@ -8770,7 +8581,7 @@ const ConnectWithMobile$1 = () => {
|
|
|
8770
8581
|
};
|
|
8771
8582
|
useEffect(() => {
|
|
8772
8583
|
openWCModal();
|
|
8773
|
-
}, [
|
|
8584
|
+
}, []);
|
|
8774
8585
|
useEffect(() => {
|
|
8775
8586
|
if (connector && address) {
|
|
8776
8587
|
const walletConnectDeeplinkChoice = localStorage.getItem('WALLETCONNECT_DEEPLINK_CHOICE');
|
|
@@ -8788,9 +8599,7 @@ const ConnectWithMobile$1 = () => {
|
|
|
8788
8599
|
};
|
|
8789
8600
|
const Connectors = ({ logoutOnBack }) => {
|
|
8790
8601
|
const isMobile = useIsMobile();
|
|
8791
|
-
return (
|
|
8792
|
-
// TODO: logout on back
|
|
8793
|
-
jsx(PageContent, { logoutOnBack: logoutOnBack, width: 312, children: isMobile ? jsx(ConnectWithMobile$1, {}) : jsx(ConnectorList, {}) }));
|
|
8602
|
+
return (jsx(PageContent, { logoutOnBack: logoutOnBack, width: 312, children: isMobile ? jsx(ConnectWithMobile$1, {}) : jsx(ConnectorList, {}) }));
|
|
8794
8603
|
};
|
|
8795
8604
|
|
|
8796
8605
|
/**
|
|
@@ -11652,7 +11461,7 @@ const LoadWallets = () => {
|
|
|
11652
11461
|
return (jsx(PageContent, { onBack: !user ? 'back' : null, children: jsx(Loader, { header: "Setting up wallet", isError: isError, description: isError ? errorMessage : 'Setting up wallets' }) }));
|
|
11653
11462
|
};
|
|
11654
11463
|
|
|
11655
|
-
const IconContainer$
|
|
11464
|
+
const IconContainer$1 = styled(motion.div) `
|
|
11656
11465
|
transition: all 220ms cubic-bezier(0.175, 0.885, 0.32, 1.1);
|
|
11657
11466
|
display: flex;
|
|
11658
11467
|
align-items: center;
|
|
@@ -11710,7 +11519,7 @@ const IconContainer$2 = styled(motion.div) `
|
|
|
11710
11519
|
}
|
|
11711
11520
|
`}
|
|
11712
11521
|
`;
|
|
11713
|
-
const CopyToClipboardIcon = ({ copied, small }) => (jsx(IconContainer$
|
|
11522
|
+
const CopyToClipboardIcon = ({ copied, small }) => (jsx(IconContainer$1, { "$clipboard": copied, children: jsx(CopyToClipboardIcon$1, { style: {
|
|
11714
11523
|
transform: small ? 'scale(1)' : 'translateX(3px) scale(1.5)',
|
|
11715
11524
|
opacity: small || copied ? 1 : 0.3,
|
|
11716
11525
|
} }) }));
|
|
@@ -11833,8 +11642,6 @@ const MobileConnectors = () => {
|
|
|
11833
11642
|
var _a;
|
|
11834
11643
|
const context = useOpenfort();
|
|
11835
11644
|
const locales = useLocales();
|
|
11836
|
-
const { connect: { getUri }, } = useWeb3();
|
|
11837
|
-
const wcUri = getUri();
|
|
11838
11645
|
const { open: openW3M, isOpen: isOpenW3M } = useWalletConnectModal();
|
|
11839
11646
|
const wallets = useWagmiWallets();
|
|
11840
11647
|
// filter out installed wallets
|
|
@@ -11850,7 +11657,7 @@ const MobileConnectors = () => {
|
|
|
11850
11657
|
context.setRoute(routes.CONNECT_WITH_MOBILE);
|
|
11851
11658
|
context.setConnector({ id: walletId });
|
|
11852
11659
|
};
|
|
11853
|
-
return (jsx(PageContent, { width: 312, onBack: routes.PROVIDERS, children: jsxs(Container$2, { children: [jsx(ModalContent, { style: { paddingBottom: 0 }, children: jsx(ScrollArea, { height: 340, children: jsxs(WalletList, {
|
|
11660
|
+
return (jsx(PageContent, { width: 312, onBack: routes.PROVIDERS, children: jsxs(Container$2, { children: [jsx(ModalContent, { style: { paddingBottom: 0 }, children: jsx(ScrollArea, { height: 340, children: jsxs(WalletList, { children: [walletsIdsToDisplay
|
|
11854
11661
|
.sort(
|
|
11855
11662
|
// sort by name
|
|
11856
11663
|
(a, b) => {
|
|
@@ -11882,7 +11689,7 @@ const MobileConnectors = () => {
|
|
|
11882
11689
|
justifyContent: 'center',
|
|
11883
11690
|
gap: 14,
|
|
11884
11691
|
paddingTop: 8,
|
|
11885
|
-
}, children: jsx(CopyToClipboard, { variant: "button",
|
|
11692
|
+
}, children: jsx(CopyToClipboard, { variant: "button", children: locales.copyToClipboard }) }))] }) }));
|
|
11886
11693
|
};
|
|
11887
11694
|
|
|
11888
11695
|
const Introduction = () => {
|
|
@@ -12515,7 +12322,7 @@ const PoweredByFooter = ({ showDisclaimer }) => {
|
|
|
12515
12322
|
const { uiConfig: options } = useOpenfort();
|
|
12516
12323
|
return (jsxs(Container, { children: [showDisclaimer && (jsx(Disclaimer, { children: (options === null || options === void 0 ? void 0 : options.disclaimer) ? (options.disclaimer) : (jsxs("div", { children: ["By logging in, you agree to our", ' ', jsx("a", { href: (_a = options === null || options === void 0 ? void 0 : options.termsOfServiceUrl) !== null && _a !== void 0 ? _a : 'https://www.openfort.io/terms', target: "_blank", rel: "noopener noreferrer", children: "Terms of Service" }), ' ', "&", ' ', jsx("a", { href: (_b = options === null || options === void 0 ? void 0 : options.privacyPolicyUrl) !== null && _b !== void 0 ? _b : 'https://www.openfort.io/privacy', target: "_blank", rel: "noopener noreferrer", children: "Privacy Policy" }), "."] })) })), jsxs(TextButton, { onClick: () => {
|
|
12517
12324
|
window.open('https://www.openfort.io/', '_blank');
|
|
12518
|
-
}, children: [jsx("span", { children: "Powered by" }), jsx(IconContainer
|
|
12325
|
+
}, children: [jsx("span", { children: "Powered by" }), jsx(IconContainer, { children: jsx(Logos.Openfort, {}) }), jsx("span", { children: "Openfort" })] })] }));
|
|
12519
12326
|
};
|
|
12520
12327
|
const Disclaimer = styled(motion.div) `
|
|
12521
12328
|
padding: 8px 50px 0px 50px;
|
|
@@ -12538,7 +12345,7 @@ const Disclaimer = styled(motion.div) `
|
|
|
12538
12345
|
}
|
|
12539
12346
|
}
|
|
12540
12347
|
`;
|
|
12541
|
-
const IconContainer
|
|
12348
|
+
const IconContainer = styled.div `
|
|
12542
12349
|
width: 20px;
|
|
12543
12350
|
height: 20px;
|
|
12544
12351
|
margin-left: 5px;
|
|
@@ -12629,7 +12436,7 @@ function useProviders() {
|
|
|
12629
12436
|
logger.error(new OpenfortError('When using external third party auth providers, openfort Auth providers are not available. Either remove the `thirdPartyAuth` or authenticate your users using Auth hooks.', OpenfortErrorType.CONFIGURATION_ERROR));
|
|
12630
12437
|
}
|
|
12631
12438
|
}, [thirdPartyAuth, setOpen]);
|
|
12632
|
-
const maxProviders = 4;
|
|
12439
|
+
const maxProviders = (options === null || options === void 0 ? void 0 : options.authProvidersLength) || 4;
|
|
12633
12440
|
const { mainProviders, hasExcessProviders, remainingSocialProviders } = useMemo(() => {
|
|
12634
12441
|
const activeProviders = user ? availableProviders : allProviders;
|
|
12635
12442
|
if (activeProviders.length <= maxProviders) {
|
|
@@ -12891,9 +12698,9 @@ const AddressButNoUserCase = () => {
|
|
|
12891
12698
|
}, []);
|
|
12892
12699
|
return (jsx(PageContent, { children: jsx(Loader, { header: "Updating user" }) }));
|
|
12893
12700
|
};
|
|
12894
|
-
const SocialProvidersButton = () => {
|
|
12701
|
+
const SocialProvidersButton = ({ thereAreSocialsAlready }) => {
|
|
12895
12702
|
const { setRoute } = useOpenfort();
|
|
12896
|
-
return (jsx(ProviderButton, { onClick: () => setRoute(routes.SOCIAL_PROVIDERS), icon: jsx(OtherSocials, {}), children:
|
|
12703
|
+
return (jsx(ProviderButton, { onClick: () => setRoute(routes.SOCIAL_PROVIDERS), icon: jsx(OtherSocials, {}), children: thereAreSocialsAlready ? 'Other socials' : 'Social providers' }));
|
|
12897
12704
|
};
|
|
12898
12705
|
const Providers = () => {
|
|
12899
12706
|
const { user } = useOpenfortCore();
|
|
@@ -12902,7 +12709,7 @@ const Providers = () => {
|
|
|
12902
12709
|
if (address && !user) {
|
|
12903
12710
|
return jsx(AddressButNoUserCase, {});
|
|
12904
12711
|
}
|
|
12905
|
-
return (jsxs(PageContent, { onBack: null, children: [mainProviders.map((auth) => (jsx(ProviderButtonSwitch, { provider: auth }, auth))), hasExcessProviders && jsx(SocialProvidersButton, {}), jsx(PoweredByFooter, { showDisclaimer: true })] }));
|
|
12712
|
+
return (jsxs(PageContent, { onBack: null, children: [mainProviders.map((auth) => (jsx(ProviderButtonSwitch, { provider: auth }, auth))), hasExcessProviders && (jsx(SocialProvidersButton, { thereAreSocialsAlready: !!mainProviders.find((p) => socialProviders.includes(p)) })), jsx(PoweredByFooter, { showDisclaimer: true })] }));
|
|
12906
12713
|
};
|
|
12907
12714
|
|
|
12908
12715
|
// Hook to get the props of a specific route
|
|
@@ -12955,11 +12762,9 @@ const RecoverPasswordWallet = ({ wallet, onBack, logoutOnBack, }) => {
|
|
|
12955
12762
|
if (recoveryError)
|
|
12956
12763
|
triggerResize();
|
|
12957
12764
|
}, [recoveryError]);
|
|
12958
|
-
const ensFallbackConfig = useEnsFallbackConfig();
|
|
12959
12765
|
const { data: ensName } = useEnsName({
|
|
12960
12766
|
chainId: 1,
|
|
12961
12767
|
address: wallet.address,
|
|
12962
|
-
config: ensFallbackConfig,
|
|
12963
12768
|
});
|
|
12964
12769
|
return (jsxs(PageContent, { onBack: onBack, logoutOnBack: logoutOnBack, children: [jsx(FloatingGraphic, { height: "130px", logoCenter: {
|
|
12965
12770
|
logo: jsx(KeyIcon, {}),
|
|
@@ -13766,113 +13571,67 @@ const ConnectWithOAuth = () => {
|
|
|
13766
13571
|
} }) }));
|
|
13767
13572
|
};
|
|
13768
13573
|
|
|
13769
|
-
const
|
|
13770
|
-
|
|
13771
|
-
|
|
13772
|
-
align-items: center;
|
|
13773
|
-
justify-content: center;
|
|
13774
|
-
width: 47px;
|
|
13775
|
-
height: 52px;
|
|
13776
|
-
min-width: 47px;
|
|
13777
|
-
min-height: 52px;
|
|
13778
|
-
svg {
|
|
13779
|
-
display: block;
|
|
13780
|
-
max-width: 100%;
|
|
13781
|
-
height: auto;
|
|
13782
|
-
}
|
|
13783
|
-
`;
|
|
13784
|
-
const ScanIconWithLogos = ({ logo }) => {
|
|
13785
|
-
const logoList = [
|
|
13786
|
-
jsx(Logos.MetaMask, { background: true }),
|
|
13787
|
-
jsx(Logos.Coinbase, { background: true }),
|
|
13788
|
-
jsx(Logos.Crypto, {}),
|
|
13789
|
-
jsx(Logos.ImToken, {}),
|
|
13790
|
-
jsx(Logos.Argent, {}),
|
|
13791
|
-
jsx(Logos.Trust, {}),
|
|
13792
|
-
];
|
|
13793
|
-
return (jsx(IconContainer, { children: jsxs("svg", { "aria-hidden": "true", width: "47", height: "52", viewBox: "0 0 47 52", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [jsxs("g", { mask: "url(#gradient-mask)", children: [jsx("path", { d: "M7 14.5C7 11.4624 9.46243 9 12.5 9H31.5C34.5376 9 37 11.4624 37 14.5V47H7V14.5Z", fill: "var(--ck-graphic-scaniconwithlogos-04)" }), logo ? (jsx("foreignObject", { x: "13", y: "21", width: "18", height: "18", rx: "5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 5 }, children: logo }) })) : (jsxs(Fragment, { children: [jsx("foreignObject", { x: "12", y: "15", width: "9", height: "9", rx: "2.5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: logoList[0] }) }), jsx("foreignObject", { x: "23", y: "15", width: "9", height: "9", rx: "2.5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: logoList[1] }) }), jsx("foreignObject", { x: "12", y: "26", width: "9", height: "9", rx: "2.5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: logoList[2] }) }) }), jsx("foreignObject", { x: "23", y: "26", width: "9", height: "9", rx: "2.5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: logoList[3] }) }), jsx("foreignObject", { x: "12", y: "37", width: "9", height: "9", rx: "2.5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: logoList[4] }) }), jsx("foreignObject", { x: "23", y: "37", width: "9", height: "9", rx: "2.5", children: jsx("div", { style: { overflow: 'hidden', borderRadius: 2.5 }, children: logoList[5] }) })] })), jsx("path", { d: "M36 47V13.7143C36 11.1107 33.8893 9 31.2857 9H12.7143C10.1107 9 8 11.1107 8 13.7143V47", stroke: "url(#paint0_linear_924_12568)", strokeWidth: "2" }), jsx("path", { d: "M15 10H29C29 11.1046 28.1046 12 27 12H17C15.8954 12 15 11.1046 15 10Z", fill: "var(--ck-graphic-scaniconwithlogos-01)" }), jsx("rect", { x: "1", y: "47", width: "43", height: "5", fill: "var(--ck-tooltip-background)" }), jsx("rect", { x: "22", y: "1", width: "24", height: "24", rx: "12", fill: "var(--ck-graphic-scaniconwithlogos-03)", stroke: "var(--ck-tooltip-background)", strokeWidth: "2" }), jsx("rect", { x: "34.5", y: "10", width: "2.5", height: "2.5", rx: "0.75", fill: "#373737" }), jsx("rect", { x: "31", y: "10", width: "2.5", height: "2.5", rx: "0.75", fill: "#373737" }), jsx("rect", { x: "31", y: "13.5", width: "2.5", height: "2.5", rx: "0.75", fill: "#373737" }), jsx("rect", { x: "34.5", y: "13.5", width: "2.5", height: "2.5", rx: "0.75", fill: "#373737" }), jsx("path", { d: "M28.5 10.5V9C28.5 8.17157 29.1716 7.5 30 7.5H31.5", stroke: "#373737", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M36.5 7.5L38 7.5C38.8284 7.5 39.5 8.17157 39.5 9L39.5 10.5", stroke: "#373737", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M39.5 15.5L39.5 17C39.5 17.8284 38.8284 18.5 38 18.5L36.5 18.5", stroke: "#373737", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }), jsx("path", { d: "M31.5 18.5L30 18.5C29.1716 18.5 28.5 17.8284 28.5 17L28.5 15.5", stroke: "#373737", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" })] }), jsxs("defs", { children: [jsxs("linearGradient", { id: "paint0_linear_924_12568", x1: "22", y1: "8.2549", x2: "22", y2: "47", gradientUnits: "userSpaceOnUse", children: [jsx("stop", { stopColor: "var(--ck-graphic-scaniconwithlogos-01)" }), jsx("stop", { offset: "1", stopColor: "var(--ck-graphic-scaniconwithlogos-02)" })] }), jsxs("linearGradient", { id: "linear-gradient-mask", x1: "47", y1: "42", x2: "47", y2: "47", gradientUnits: "userSpaceOnUse", children: [jsx("stop", { stopColor: "white" }), jsx("stop", { offset: "1", stopColor: "black", stopOpacity: "0" })] }), jsx("mask", { id: "gradient-mask", children: jsx("rect", { x: "0", y: "0", width: "47", height: "52", fill: "url(#linear-gradient-mask)" }) })] })] }) }));
|
|
13794
|
-
};
|
|
13795
|
-
|
|
13796
|
-
const ConnectWithQRCode = ({ switchConnectMethod }) => {
|
|
13797
|
-
var _a, _b, _c, _d;
|
|
13798
|
-
const { connector, setRoute, uiConfig } = useOpenfort();
|
|
13799
|
-
const id = connector.id;
|
|
13574
|
+
const ConnectWithSiwe = () => {
|
|
13575
|
+
const { isConnected, address } = useAccount();
|
|
13576
|
+
const { connector, setRoute } = useOpenfort();
|
|
13800
13577
|
const wallet = useWallet(connector.id);
|
|
13801
|
-
const
|
|
13802
|
-
const
|
|
13803
|
-
const
|
|
13804
|
-
const
|
|
13805
|
-
|
|
13806
|
-
|
|
13807
|
-
|
|
13808
|
-
|
|
13809
|
-
|
|
13810
|
-
|
|
13811
|
-
|
|
13812
|
-
|
|
13578
|
+
const [error, setError] = useState(undefined);
|
|
13579
|
+
const siwe = useConnectWithSiwe();
|
|
13580
|
+
const [description, setDescription] = useState(undefined);
|
|
13581
|
+
const connectWithSiwe = () => {
|
|
13582
|
+
setDescription('Requesting signature to verify wallet...');
|
|
13583
|
+
siwe({
|
|
13584
|
+
walletClientType: connector.id,
|
|
13585
|
+
onConnect: () => {
|
|
13586
|
+
setRoute(routes.PROFILE);
|
|
13587
|
+
},
|
|
13588
|
+
onError: (error) => {
|
|
13589
|
+
setError(error || 'Connection failed');
|
|
13590
|
+
setDescription(undefined);
|
|
13591
|
+
},
|
|
13592
|
+
});
|
|
13593
|
+
};
|
|
13813
13594
|
useEffect(() => {
|
|
13814
|
-
|
|
13815
|
-
|
|
13816
|
-
setIsFirstFrame(false);
|
|
13817
|
-
if (isConnected) {
|
|
13818
|
-
disconnect();
|
|
13819
|
-
}
|
|
13595
|
+
if (isConnected) {
|
|
13596
|
+
connectWithSiwe();
|
|
13820
13597
|
}
|
|
13821
|
-
|
|
13822
|
-
|
|
13823
|
-
|
|
13824
|
-
|
|
13825
|
-
|
|
13826
|
-
|
|
13827
|
-
|
|
13828
|
-
|
|
13829
|
-
|
|
13830
|
-
|
|
13831
|
-
|
|
13832
|
-
|
|
13833
|
-
|
|
13834
|
-
|
|
13835
|
-
|
|
13598
|
+
}, [isConnected]);
|
|
13599
|
+
const { data: ensName } = useEnsName({
|
|
13600
|
+
chainId: 1,
|
|
13601
|
+
address: address,
|
|
13602
|
+
});
|
|
13603
|
+
return (jsxs(PageContent, { children: [jsxs(ModalBody, { style: { textAlign: 'center' }, children: ["Connected with", jsx(CopyToClipboard, { string: address, children: ensName !== null && ensName !== void 0 ? ensName : truncateEthAddress(address) })] }), jsx(Loader, { header: 'Sign in to your wallet', icon: wallet === null || wallet === void 0 ? void 0 : wallet.icon, isError: !!error, description: error !== null && error !== void 0 ? error : description, onRetry: () => connectWithSiwe() })] }));
|
|
13604
|
+
};
|
|
13605
|
+
const ConnectWithWalletConnect = () => {
|
|
13606
|
+
const { connector } = useOpenfort();
|
|
13607
|
+
const wallet = useWallet(connector.id);
|
|
13608
|
+
const [error, setError] = useState(undefined);
|
|
13609
|
+
const { open: openWalletConnectModal } = useWalletConnectModal();
|
|
13610
|
+
useEffect(() => {
|
|
13611
|
+
openWCModal();
|
|
13612
|
+
}, []);
|
|
13613
|
+
const openWCModal = async () => {
|
|
13614
|
+
setError(undefined);
|
|
13615
|
+
const { error } = await openWalletConnectModal();
|
|
13616
|
+
if (error) {
|
|
13617
|
+
setError(error);
|
|
13836
13618
|
}
|
|
13619
|
+
};
|
|
13620
|
+
return (jsx(PageContent, { children: jsx(Loader, { header: error ? 'Error connecting wallet.' : `Connecting...`, icon: wallet === null || wallet === void 0 ? void 0 : wallet.icon, isError: !!error, description: error, onRetry: () => openWCModal() }) }));
|
|
13621
|
+
};
|
|
13622
|
+
const ConnectWithQRCode = () => {
|
|
13623
|
+
const { connector, triggerResize } = useOpenfort();
|
|
13624
|
+
const { isConnected } = useAccount();
|
|
13625
|
+
useEffect(() => {
|
|
13626
|
+
triggerResize();
|
|
13837
13627
|
}, [isConnected]);
|
|
13628
|
+
const wallet = useWallet(connector.id);
|
|
13838
13629
|
if (!wallet)
|
|
13839
|
-
return
|
|
13840
|
-
|
|
13841
|
-
|
|
13842
|
-
|
|
13843
|
-
|
|
13844
|
-
brave: downloads === null || downloads === void 0 ? void 0 : downloads.brave,
|
|
13845
|
-
edge: downloads === null || downloads === void 0 ? void 0 : downloads.edge,
|
|
13846
|
-
safari: downloads === null || downloads === void 0 ? void 0 : downloads.safari,
|
|
13847
|
-
};
|
|
13848
|
-
detectBrowser();
|
|
13849
|
-
const hasApps = downloads && Object.keys(downloads).length !== 0;
|
|
13850
|
-
extensions
|
|
13851
|
-
? {
|
|
13852
|
-
name: Object.keys(extensions)[0],
|
|
13853
|
-
label: ((_c = Object.keys(extensions)[0]) === null || _c === void 0 ? void 0 : _c.charAt(0).toUpperCase()) + ((_d = Object.keys(extensions)[0]) === null || _d === void 0 ? void 0 : _d.slice(1)), // Capitalise first letter, but this might be better suited as a lookup table
|
|
13854
|
-
url: extensions[Object.keys(extensions)[0]],
|
|
13855
|
-
}
|
|
13856
|
-
: undefined;
|
|
13857
|
-
const showAdditionalOptions = isWalletConnectConnector(id);
|
|
13858
|
-
return (jsxs(PageContent, { children: [jsxs(ModalContent, { style: { paddingBottom: 8, gap: 14 }, children: [jsx(CustomQRCode, { value: uri, image: wallet === null || wallet === void 0 ? void 0 : wallet.icon, tooltipMessage: isWalletConnectConnector(id) ? (jsxs(Fragment, { children: [jsx(ScanIconWithLogos, {}), jsx("span", { children: locales.scanScreen_tooltip_walletConnect })] })) : (jsxs(Fragment, { children: [jsx(ScanIconWithLogos, { logo: wallet === null || wallet === void 0 ? void 0 : wallet.icon }), jsx("span", { children: locales.scanScreen_tooltip_default })] })) }), showAdditionalOptions ? jsx(OrDivider, {}) : hasApps && jsx(OrDivider, { children: locales.dontHaveTheApp })] }), showAdditionalOptions && ( // for walletConnect
|
|
13859
|
-
jsxs("div", { style: {
|
|
13860
|
-
display: 'flex',
|
|
13861
|
-
alignItems: 'center',
|
|
13862
|
-
justifyContent: 'center',
|
|
13863
|
-
gap: 14,
|
|
13864
|
-
}, children: [uiConfig.walletConnectCTA !== 'modal' && (jsx(CopyToClipboard, { variant: "button", string: uri, children: uiConfig.walletConnectCTA === 'link' ? locales.copyToClipboard : locales.copyCode })), uiConfig.walletConnectCTA !== 'link' && (jsx(Button, { icon: jsx(ExternalLinkIcon, {}), onClick: openW3M, disabled: isOpenW3M, waiting: isOpenW3M, children: uiConfig.walletConnectCTA === 'modal' ? locales.useWalletConnectModal : locales.useModal }))] })), isFamilyAccountsConnector(wallet.id) && (jsxs(Fragment, { children: [jsx(OrDivider, {}), jsx(Button, { onClick: () => switchConnectMethod(id), children: locales.loginWithEmailOrPhone })] })), hasApps && (jsx(Button, { onClick: () => {
|
|
13865
|
-
setRoute(routes.DOWNLOAD);
|
|
13866
|
-
},
|
|
13867
|
-
/*
|
|
13868
|
-
icon={
|
|
13869
|
-
<div style={{ background: connectorInfo?.icon }}>
|
|
13870
|
-
{connectorInfo?.logos.default}
|
|
13871
|
-
</div>
|
|
13872
|
-
}
|
|
13873
|
-
roundedIcon
|
|
13874
|
-
*/
|
|
13875
|
-
download: true, children: locales.getWalletName }))] }));
|
|
13630
|
+
return jsx(Loader, { header: `Connector not found: ${connector.id}`, isError: true });
|
|
13631
|
+
if (isConnected) {
|
|
13632
|
+
return jsx(ConnectWithSiwe, {});
|
|
13633
|
+
}
|
|
13634
|
+
return jsx(ConnectWithWalletConnect, {});
|
|
13876
13635
|
};
|
|
13877
13636
|
|
|
13878
13637
|
const states$1 = {
|
|
@@ -13907,11 +13666,7 @@ const ConnectUsing = () => {
|
|
|
13907
13666
|
return jsx(ConnectWithOAuth, {});
|
|
13908
13667
|
if (!wallet)
|
|
13909
13668
|
return jsxs(Alert, { children: ["Connector not found ", context.connector.id] });
|
|
13910
|
-
return (jsxs(AnimatePresence, { children: [status === states$1.QRCODE && (jsx(motion.div, { initial: 'initial', animate: 'animate', exit: 'exit', variants: contentVariants$1, children: jsx(ConnectWithQRCode, { switchConnectMethod: (_id) => {
|
|
13911
|
-
//if (id) setId(id);
|
|
13912
|
-
setStatus(states$1.INJECTOR);
|
|
13913
|
-
setTimeout(context.triggerResize, 10); // delay required here for modal to resize
|
|
13914
|
-
} }) }, states$1.QRCODE)), status === states$1.INJECTOR && (jsx(motion.div, { initial: 'initial', animate: 'animate', exit: 'exit', variants: contentVariants$1, children: jsx(ConnectWithInjector, { switchConnectMethod: (_id) => {
|
|
13669
|
+
return (jsxs(AnimatePresence, { children: [status === states$1.QRCODE && (jsx(motion.div, { initial: 'initial', animate: 'animate', exit: 'exit', variants: contentVariants$1, children: jsx(ConnectWithQRCode, {}) }, states$1.QRCODE)), status === states$1.INJECTOR && (jsx(motion.div, { initial: 'initial', animate: 'animate', exit: 'exit', variants: contentVariants$1, children: jsx(ConnectWithInjector, { switchConnectMethod: (_id) => {
|
|
13915
13670
|
//if (id) setId(id);
|
|
13916
13671
|
setStatus(states$1.QRCODE);
|
|
13917
13672
|
setTimeout(context.triggerResize, 10); // delay required here for modal to resize
|
|
@@ -13960,21 +13715,13 @@ const ConnectWithMobile = () => {
|
|
|
13960
13715
|
const { isConnected } = useAccount();
|
|
13961
13716
|
const [status, setStatus] = useState(isConnected ? states.INIT : states.CONNECTING);
|
|
13962
13717
|
const [description, setDescription] = useState(undefined);
|
|
13963
|
-
const { connect: { getUri }, } = useWeb3();
|
|
13964
|
-
const wcUri = getUri();
|
|
13965
13718
|
const [hasReturned, setHasReturned] = useState(false);
|
|
13966
13719
|
const siwe = useConnectWithSiwe();
|
|
13967
|
-
const openApp = (
|
|
13720
|
+
const openApp = () => {
|
|
13968
13721
|
var _a;
|
|
13969
|
-
const uri = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.getWalletConnectDeeplink) === null || _a === void 0 ? void 0 : _a.call(wallet,
|
|
13970
|
-
logger.log('Opening wallet app with uri', { uri, url, wallet, walletId, walletConfigs, connectorId: connector.id });
|
|
13722
|
+
const uri = (_a = wallet === null || wallet === void 0 ? void 0 : wallet.getWalletConnectDeeplink) === null || _a === void 0 ? void 0 : _a.call(wallet, '');
|
|
13971
13723
|
if (uri) {
|
|
13972
|
-
|
|
13973
|
-
window.location.href = uri;
|
|
13974
|
-
}
|
|
13975
|
-
else {
|
|
13976
|
-
window.location.href = uri.replace('?uri=', '');
|
|
13977
|
-
}
|
|
13724
|
+
window.location.href = uri.replace('?uri=', '');
|
|
13978
13725
|
}
|
|
13979
13726
|
else {
|
|
13980
13727
|
setStatus(states.ERROR);
|
|
@@ -14001,7 +13748,6 @@ const ConnectWithMobile = () => {
|
|
|
14001
13748
|
useEffect(() => {
|
|
14002
13749
|
switch (status) {
|
|
14003
13750
|
case states.INIT:
|
|
14004
|
-
openApp(wcUri);
|
|
14005
13751
|
break;
|
|
14006
13752
|
case states.CONNECTING:
|
|
14007
13753
|
setDescription('Requesting signature to verify wallet...');
|
|
@@ -14024,7 +13770,7 @@ const ConnectWithMobile = () => {
|
|
|
14024
13770
|
} }), isConnected ? (jsx(Button, { onClick: () => {
|
|
14025
13771
|
openApp();
|
|
14026
13772
|
}, children: "Sign in App" })) : (jsx(Button, { onClick: () => {
|
|
14027
|
-
openApp(
|
|
13773
|
+
openApp();
|
|
14028
13774
|
}, children: "Sign in App" })), jsx(DownloadFooter, { children: jsxs(FitText, { children: ["Don't have ", (_a = wallet.name) !== null && _a !== void 0 ? _a : connector.id.split(',')[0], " installed?", ' ', jsx("a", { style: { marginLeft: 5 }, href: isAndroid() ? (_b = wallet === null || wallet === void 0 ? void 0 : wallet.downloadUrls) === null || _b === void 0 ? void 0 : _b.android : (_c = wallet === null || wallet === void 0 ? void 0 : wallet.downloadUrls) === null || _c === void 0 ? void 0 : _c.ios, target: "_blank", rel: "noreferrer", children: "GET" })] }) })] }));
|
|
14029
13775
|
};
|
|
14030
13776
|
|
|
@@ -14154,6 +13900,34 @@ const ConnectModal = ({ mode = 'auto', theme = 'auto', customTheme = customTheme
|
|
|
14154
13900
|
return (jsx(ConnectKitThemeProvider, { theme: theme, customTheme: customTheme, mode: mode, children: jsx(Modal, { open: context.open, pages: pages, pageId: route, onClose: closeable ? hide : undefined }) }));
|
|
14155
13901
|
};
|
|
14156
13902
|
|
|
13903
|
+
const Web3Context = createContext({
|
|
13904
|
+
connect: {
|
|
13905
|
+
getUri: () => '',
|
|
13906
|
+
},
|
|
13907
|
+
dapp: {
|
|
13908
|
+
chains: [],
|
|
13909
|
+
},
|
|
13910
|
+
account: undefined,
|
|
13911
|
+
});
|
|
13912
|
+
const Web3ContextProvider = ({ children }) => {
|
|
13913
|
+
const { address: currentAddress, chain } = useAccount();
|
|
13914
|
+
const chainIsSupported = useChainIsSupported(chain === null || chain === void 0 ? void 0 : chain.id);
|
|
13915
|
+
const chains = useChains();
|
|
13916
|
+
const value = {
|
|
13917
|
+
dapp: {
|
|
13918
|
+
chains,
|
|
13919
|
+
},
|
|
13920
|
+
account: currentAddress
|
|
13921
|
+
? {
|
|
13922
|
+
chain,
|
|
13923
|
+
chainIsSupported,
|
|
13924
|
+
address: currentAddress,
|
|
13925
|
+
}
|
|
13926
|
+
: undefined,
|
|
13927
|
+
};
|
|
13928
|
+
return jsx(Web3Context.Provider, { value: value, children: children });
|
|
13929
|
+
};
|
|
13930
|
+
|
|
14157
13931
|
/**
|
|
14158
13932
|
* Provides Openfort configuration and context to descendant components.
|
|
14159
13933
|
*
|
|
@@ -14372,7 +14146,7 @@ const OpenfortProvider = ({ children, uiConfig, onConnect, onDisconnect, debugMo
|
|
|
14372
14146
|
overrides,
|
|
14373
14147
|
thirdPartyAuth,
|
|
14374
14148
|
};
|
|
14375
|
-
return createElement(Openfortcontext.Provider, { value }, jsx(Web3ContextProvider, {
|
|
14149
|
+
return createElement(Openfortcontext.Provider, { value }, jsx(Web3ContextProvider, { children: jsxs(CoreOpenfortProvider, { openfortConfig: {
|
|
14376
14150
|
baseConfiguration: {
|
|
14377
14151
|
publishableKey,
|
|
14378
14152
|
},
|
|
@@ -15133,8 +14907,9 @@ const useGrantPermissions = (hookOptions = {}) => {
|
|
|
15133
14907
|
});
|
|
15134
14908
|
const walletClient = useExtendedWalletClient();
|
|
15135
14909
|
const [data, setData] = useState(null);
|
|
15136
|
-
const grantPermissions = useCallback(async ({ request
|
|
14910
|
+
const grantPermissions = useCallback(async ({ request }, options = {}) => {
|
|
15137
14911
|
try {
|
|
14912
|
+
logger.log('Granting permissions with request:', request);
|
|
15138
14913
|
if (!walletClient) {
|
|
15139
14914
|
throw new OpenfortError('Wallet client not available', OpenfortErrorType.WALLET_ERROR);
|
|
15140
14915
|
}
|
|
@@ -15152,9 +14927,9 @@ const useGrantPermissions = (hookOptions = {}) => {
|
|
|
15152
14927
|
const grantPermissionsResult = await walletClient.grantPermissions(request);
|
|
15153
14928
|
const data = {
|
|
15154
14929
|
address: account,
|
|
15155
|
-
privateKey: sessionKey,
|
|
15156
14930
|
...grantPermissionsResult,
|
|
15157
14931
|
};
|
|
14932
|
+
logger.log('Grant permissions result:', data);
|
|
15158
14933
|
setData(data);
|
|
15159
14934
|
setStatus({
|
|
15160
14935
|
status: 'success',
|
|
@@ -15191,6 +14966,112 @@ const useGrantPermissions = (hookOptions = {}) => {
|
|
|
15191
14966
|
};
|
|
15192
14967
|
};
|
|
15193
14968
|
|
|
14969
|
+
/**
|
|
14970
|
+
* Hook for revoking permissions to session keys (EIP-7715)
|
|
14971
|
+
*
|
|
14972
|
+
* This hook manages the creation and authorization of session keys, allowing users to
|
|
14973
|
+
* delegate permissions to specific accounts for a limited time. This enables use cases
|
|
14974
|
+
* like session-based authentication and gasless transactions within defined scopes.
|
|
14975
|
+
* The hook leverages EIP-7715 for permission revocation.
|
|
14976
|
+
*
|
|
14977
|
+
* @param hookOptions - Optional configuration with callback functions
|
|
14978
|
+
* @returns Current revoke permissions state and actions
|
|
14979
|
+
*
|
|
14980
|
+
* @example
|
|
14981
|
+
* ```tsx
|
|
14982
|
+
* import { generatePrivateKey, privateKeyToAccount } from 'viem/accounts';
|
|
14983
|
+
* import { useRevokePermissions } from '@openfort/openfort-react';
|
|
14984
|
+
*
|
|
14985
|
+
* const { revokePermissions, isLoading, isError, error } = useRevokePermissions({
|
|
14986
|
+
* onSuccess: (result) => console.log('Permissions revoked:', result),
|
|
14987
|
+
* onError: (error) => console.error('Permission revoke failed:', error),
|
|
14988
|
+
* });
|
|
14989
|
+
*
|
|
14990
|
+
* // Revoke Permissions to a session key
|
|
14991
|
+
* const handleRevokePermissions = async () => {
|
|
14992
|
+
* try {
|
|
14993
|
+
* const sessionKey = '0x...'; // The session key to revoke permissions for
|
|
14994
|
+
*
|
|
14995
|
+
* const result = await revokePermissions({
|
|
14996
|
+
* sessionKey,
|
|
14997
|
+
* });
|
|
14998
|
+
*
|
|
14999
|
+
* console.log('Revoke result:', result);
|
|
15000
|
+
* } catch (error) {
|
|
15001
|
+
* console.error('Error revoking permissions:', error);
|
|
15002
|
+
* }
|
|
15003
|
+
* };
|
|
15004
|
+
* ```
|
|
15005
|
+
*/
|
|
15006
|
+
const useRevokePermissions = (hookOptions = {}) => {
|
|
15007
|
+
const chains = useChains();
|
|
15008
|
+
const chainId = useChainId();
|
|
15009
|
+
const [status, setStatus] = useState({
|
|
15010
|
+
status: 'idle',
|
|
15011
|
+
});
|
|
15012
|
+
const walletClient = useExtendedWalletClient();
|
|
15013
|
+
const [data, setData] = useState(null);
|
|
15014
|
+
const revokePermissions = useCallback(async ({ sessionKey }, options = {}) => {
|
|
15015
|
+
try {
|
|
15016
|
+
if (!walletClient) {
|
|
15017
|
+
throw new OpenfortError('Wallet client not available', OpenfortErrorType.WALLET_ERROR);
|
|
15018
|
+
}
|
|
15019
|
+
logger.log('Revoking permissions for session key:', sessionKey);
|
|
15020
|
+
setStatus({
|
|
15021
|
+
status: 'loading',
|
|
15022
|
+
});
|
|
15023
|
+
// Get the current chain configuration
|
|
15024
|
+
const chain = chains.find((c) => c.id === chainId);
|
|
15025
|
+
if (!chain) {
|
|
15026
|
+
throw new OpenfortError('No chain configured', OpenfortErrorType.CONFIGURATION_ERROR);
|
|
15027
|
+
}
|
|
15028
|
+
// Get the account address
|
|
15029
|
+
const revokePermissionsResult = await walletClient.request({
|
|
15030
|
+
method: 'wallet_revokePermissions',
|
|
15031
|
+
params: [
|
|
15032
|
+
{
|
|
15033
|
+
permissionContext: sessionKey,
|
|
15034
|
+
},
|
|
15035
|
+
],
|
|
15036
|
+
});
|
|
15037
|
+
logger.log('Revoke permissions result:', revokePermissionsResult);
|
|
15038
|
+
const data = revokePermissionsResult;
|
|
15039
|
+
setData(data);
|
|
15040
|
+
setStatus({
|
|
15041
|
+
status: 'success',
|
|
15042
|
+
});
|
|
15043
|
+
return onSuccess({
|
|
15044
|
+
hookOptions,
|
|
15045
|
+
options,
|
|
15046
|
+
data,
|
|
15047
|
+
});
|
|
15048
|
+
}
|
|
15049
|
+
catch (error) {
|
|
15050
|
+
const openfortError = new OpenfortError('Failed to revoke permissions', OpenfortErrorType.WALLET_ERROR, {
|
|
15051
|
+
error,
|
|
15052
|
+
});
|
|
15053
|
+
setStatus({
|
|
15054
|
+
status: 'error',
|
|
15055
|
+
error: openfortError,
|
|
15056
|
+
});
|
|
15057
|
+
return onError({
|
|
15058
|
+
hookOptions,
|
|
15059
|
+
options,
|
|
15060
|
+
error: openfortError,
|
|
15061
|
+
});
|
|
15062
|
+
}
|
|
15063
|
+
}, [chains, chainId, setStatus, hookOptions]);
|
|
15064
|
+
return {
|
|
15065
|
+
revokePermissions,
|
|
15066
|
+
data,
|
|
15067
|
+
reset: () => {
|
|
15068
|
+
setStatus({ status: 'idle' });
|
|
15069
|
+
setData(null);
|
|
15070
|
+
},
|
|
15071
|
+
...mapStatus(status),
|
|
15072
|
+
};
|
|
15073
|
+
};
|
|
15074
|
+
|
|
15194
15075
|
const wallets = Object.keys(walletConfigs).reduce((acc, key) => {
|
|
15195
15076
|
var _a, _b, _c, _d, _e, _f;
|
|
15196
15077
|
const config = walletConfigs[key];
|
|
@@ -15217,5 +15098,5 @@ const wallets = Object.keys(walletConfigs).reduce((acc, key) => {
|
|
|
15217
15098
|
return acc;
|
|
15218
15099
|
}, {});
|
|
15219
15100
|
|
|
15220
|
-
export { UIAuthProvider as AuthProvider, Avatar, Chain as ChainIcon, LinkWalletOnSignUpOption, OPENFORT_VERSION, OpenfortButton, OpenfortError, OpenfortErrorType, OpenfortProvider, embeddedWalletId, defaultConfig as getDefaultConfig, defaultConnectors as getDefaultConnectors, use7702Authorization, useAuthCallback, useChainIsSupported, useChains, useConnectWithSiwe, useEmailAuth, useGrantPermissions, useGuestAuth, useOAuth, useOpenfortCore as useOpenfort, useSignOut, useUI, useUser, useWalletAuth, useWallets, wallets };
|
|
15101
|
+
export { UIAuthProvider as AuthProvider, Avatar, Chain as ChainIcon, LinkWalletOnSignUpOption, OPENFORT_VERSION, OpenfortButton, OpenfortError, OpenfortErrorType, OpenfortProvider, embeddedWalletId, defaultConfig as getDefaultConfig, defaultConnectors as getDefaultConnectors, use7702Authorization, useAuthCallback, useChainIsSupported, useChains, useConnectWithSiwe, useEmailAuth, useGrantPermissions, useGuestAuth, useOAuth, useOpenfortCore as useOpenfort, useRevokePermissions, useSignOut, useUI, useUser, useWalletAuth, useWallets, wallets };
|
|
15221
15102
|
//# sourceMappingURL=index.es.js.map
|
package/build/index.es.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/build/utils/index.d.ts
CHANGED
|
@@ -7,9 +7,7 @@ declare const isMobile: () => boolean;
|
|
|
7
7
|
type ReactChildArray = ReturnType<typeof React.Children.toArray>;
|
|
8
8
|
declare function flattenChildren(children: React.ReactNode): ReactChildArray;
|
|
9
9
|
export declare const isWalletConnectConnector: (connectorId?: string) => connectorId is "walletConnect";
|
|
10
|
-
export declare const isFamilyAccountsConnector: (connectorId?: string) => connectorId is "familyAccountsProvider";
|
|
11
10
|
export declare const isCoinbaseWalletConnector: (connectorId?: string) => connectorId is "coinbaseWalletSDK";
|
|
12
|
-
export declare const isPortoConnector: (connectorId?: string) => connectorId is "xyz.ithaca.porto";
|
|
13
11
|
export declare const isSafeConnector: (connectorId?: string) => connectorId is "safe";
|
|
14
12
|
export declare const isInjectedConnector: (connectorId?: string) => connectorId is "injected";
|
|
15
13
|
export { nFormatter, truncateEthAddress, isMobile, isAndroid, detectBrowser, flattenChildren };
|
package/build/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OPENFORT_VERSION = "0.1.
|
|
1
|
+
export declare const OPENFORT_VERSION = "0.1.4";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openfort/react",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.4",
|
|
4
4
|
"author": "Openfort (https://www.openfort.io)",
|
|
5
5
|
"license": "BSD-2-Clause license",
|
|
6
6
|
"description": "The easiest way to integrate Openfort to your project.",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"react"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@openfort/openfort-js": "^0.10.
|
|
35
|
+
"@openfort/openfort-js": "^0.10.32",
|
|
36
36
|
"axios": "^1.7.7",
|
|
37
37
|
"buffer": "^6.0.3",
|
|
38
38
|
"detect-browser": "^5.3.0",
|