@dynamic-labs/wagmi-connector 1.1.0-alpha.12 → 1.1.0-alpha.13

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/CHANGELOG.md CHANGED
@@ -1,4 +1,22 @@
1
1
 
2
+ ## [1.1.0-alpha.13](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.12...v1.1.0-alpha.13) (2024-01-23)
3
+
4
+
5
+ ### Features
6
+
7
+ * add createWalletClientFromWallet helper function ([#4416](https://github.com/dynamic-labs/DynamicAuth/issues/4416)) ([b384898](https://github.com/dynamic-labs/DynamicAuth/commit/b384898061bb3f9b38b2ed670b6650cfc1d4b429))
8
+ * add hardware wallets to wallet book ([#4445](https://github.com/dynamic-labs/DynamicAuth/issues/4445)) ([66c0f5b](https://github.com/dynamic-labs/DynamicAuth/commit/66c0f5b29a6a700099bb95a6f7622f6178e0bccf))
9
+ * add support for Argent Web and Mobile ([#4328](https://github.com/dynamic-labs/DynamicAuth/issues/4328)) ([bce20b8](https://github.com/dynamic-labs/DynamicAuth/commit/bce20b8f35a8630f2621f53a541a1acb06a38fc0))
10
+ * enable ledger for glow, solflare and backpack ([#4392](https://github.com/dynamic-labs/DynamicAuth/issues/4392)) ([fa7b992](https://github.com/dynamic-labs/DynamicAuth/commit/fa7b992f87ebc43560f87b43ac56f2cd9909b306))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * breaking changes script ([#4440](https://github.com/dynamic-labs/DynamicAuth/issues/4440)) ([446173d](https://github.com/dynamic-labs/DynamicAuth/commit/446173d074d652d81856c6412e304b46b1565320))
16
+ * broken help icon in create passkey view ([#4428](https://github.com/dynamic-labs/DynamicAuth/issues/4428)) ([e0ffc02](https://github.com/dynamic-labs/DynamicAuth/commit/e0ffc02ffea34b7ac3198ff6e1baf7f9907acddd))
17
+ * infinite loop when connecting with trust wallet ([#4448](https://github.com/dynamic-labs/DynamicAuth/issues/4448)) ([4e20edf](https://github.com/dynamic-labs/DynamicAuth/commit/4e20edf9abaabf20e5e9f9167b44d7f691e844f1))
18
+ * render wagmi elements based on react version ([#4453](https://github.com/dynamic-labs/DynamicAuth/issues/4453)) ([43c624c](https://github.com/dynamic-labs/DynamicAuth/commit/43c624ca996b0c51de1454910f19fdf908149938))
19
+
2
20
  ## [1.1.0-alpha.12](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.11...v1.1.0-alpha.12) (2024-01-18)
3
21
 
4
22
 
@@ -21,6 +21,11 @@ function __awaiter(thisArg, _arguments, P, generator) {
21
21
  function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
22
22
  step((generator = generator.apply(thisArg, _arguments || [])).next());
23
23
  });
24
- }
24
+ }
25
+
26
+ typeof SuppressedError === "function" ? SuppressedError : function (error, suppressed, message) {
27
+ var e = new Error(message);
28
+ return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
29
+ };
25
30
 
26
31
  export { __awaiter };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wagmi-connector",
3
- "version": "1.1.0-alpha.12",
3
+ "version": "1.1.0-alpha.13",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -8,12 +8,12 @@
8
8
  },
9
9
  "peerDependencies": {
10
10
  "react": "^17.0.2 || ^18.0.0",
11
- "viem": "^1.19.13",
11
+ "viem": "^1.19.13 || ^2.2.0",
12
12
  "wagmi": "^1.4.12",
13
- "@dynamic-labs/rpc-providers": "1.1.0-alpha.12",
14
- "@dynamic-labs/sdk-react-core": "1.1.0-alpha.12",
15
- "@dynamic-labs/types": "1.1.0-alpha.12",
16
- "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.12",
13
+ "@dynamic-labs/rpc-providers": "1.1.0-alpha.13",
14
+ "@dynamic-labs/sdk-react-core": "1.1.0-alpha.13",
15
+ "@dynamic-labs/types": "1.1.0-alpha.13",
16
+ "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.13",
17
17
  "eventemitter3": "5.0.1"
18
18
  },
19
19
  "license": "MIT",
@@ -63,10 +63,10 @@ export declare class Connector extends BaseWagmiConnector<WalletClient<Transport
63
63
  [x: string]: Record<string, any>;
64
64
  eth_accounts: Record<string, any>;
65
65
  }) => Promise<import("viem").RequestPermissionsReturnType>;
66
- sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
66
+ sendRawTransaction: (args: import("node_modules/viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
67
67
  sendTransaction: <TChainOverride_2 extends Chain | undefined = undefined>(args: import("viem").SendTransactionParameters<Chain, Account, TChainOverride_2>) => Promise<`0x${string}`>;
68
68
  signMessage: (args: import("viem").SignMessageParameters<Account>) => Promise<`0x${string}`>;
69
- signTransaction: <TChainOverride_3 extends Chain | undefined = undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<Chain, Account, TChainOverride_3>) => Promise<`0x${string}`>;
69
+ signTransaction: <TChainOverride_3 extends Chain | undefined = undefined>(args: import("node_modules/viem/_types/actions/wallet/signTransaction").SignTransactionParameters<Chain, Account, TChainOverride_3>) => Promise<`0x${string}`>;
70
70
  signTypedData: <const TTypedData extends {
71
71
  [x: string]: readonly import("viem").TypedDataParameter[];
72
72
  [x: `string[${string}]`]: undefined;
@@ -329,7 +329,7 @@ export declare class Connector extends BaseWagmiConnector<WalletClient<Transport
329
329
  [x: string]: Record<string, any>;
330
330
  eth_accounts: Record<string, any>;
331
331
  }) => Promise<import("viem").RequestPermissionsReturnType>;
332
- sendRawTransaction: (args: import("viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
332
+ sendRawTransaction: (args: import("node_modules/viem/_types/actions/wallet/sendRawTransaction").SendRawTransactionParameters) => Promise<`0x${string}`>;
333
333
  sendTransaction: <TChainOverride_7 extends Chain | undefined = undefined>(args: import("viem").SendTransactionParameters<Chain, {
334
334
  address: `0x${string}`;
335
335
  type: "json-rpc";
@@ -338,7 +338,7 @@ export declare class Connector extends BaseWagmiConnector<WalletClient<Transport
338
338
  address: `0x${string}`;
339
339
  type: "json-rpc";
340
340
  }>) => Promise<`0x${string}`>;
341
- signTransaction: <TChainOverride_8 extends Chain | undefined = undefined>(args: import("viem/_types/actions/wallet/signTransaction").SignTransactionParameters<Chain, {
341
+ signTransaction: <TChainOverride_8 extends Chain | undefined = undefined>(args: import("node_modules/viem/_types/actions/wallet/signTransaction").SignTransactionParameters<Chain, {
342
342
  address: `0x${string}`;
343
343
  type: "json-rpc";
344
344
  }, TChainOverride_8>) => Promise<`0x${string}`>;
@@ -1,8 +1,8 @@
1
- import React, { ReactNode } from 'react';
1
+ import { ReactNode } from 'react';
2
2
  import { WagmiEvmNetworks } from './types';
3
3
  type DynamicWagmiConnectorProps = {
4
4
  children: ReactNode;
5
5
  evmNetworks?: WagmiEvmNetworks[];
6
6
  };
7
- export declare const DynamicWagmiConnector: ({ evmNetworks: customerSuppliedEvmNetworks, children, }: DynamicWagmiConnectorProps) => React.FunctionComponentElement<React.PropsWithChildren<import("wagmi").WagmiConfigProps<import("@wagmi/core/dist/index-e744bbc2").P, import("@wagmi/core/dist/index-e744bbc2").W>>>;
7
+ export declare const DynamicWagmiConnector: ({ evmNetworks: customerSuppliedEvmNetworks, children, }: DynamicWagmiConnectorProps) => JSX.Element;
8
8
  export {};
@@ -1,3 +1,4 @@
1
+ import { jsx } from 'react/jsx-runtime';
1
2
  import React, { useRef, useMemo, useEffect } from 'react';
2
3
  import { configureChains, mainnet, createConfig, WagmiConfig } from 'wagmi';
3
4
  import { publicProvider } from 'wagmi/providers/public';
@@ -59,6 +60,9 @@ const DynamicWagmiConnector = ({ evmNetworks: customerSuppliedEvmNetworks, child
59
60
  config.setWebSocketPublicClient(webSocketPublicClient);
60
61
  config.setConnectors(connector ? [connector] : []);
61
62
  }, [connector, publicClient, webSocketPublicClient]);
63
+ if (React.version.startsWith('18')) {
64
+ return (jsx(WagmiConfig, { config: config, children: jsx(SyncDynamicWagmi, { connector: connector, preventWagmiSyncFromCallingLogout: preventWagmiSyncFromCallingLogout, wallets: wallets, children: children }) }));
65
+ }
62
66
  // use React.createElement to prevent bunding react/jsx-runtime,
63
67
  // which is not compatible when bundling apps using React 17
64
68
  return React.createElement(WagmiConfig, { config: config }, React.createElement(SyncDynamicWagmi, { connector, preventWagmiSyncFromCallingLogout, wallets }, children));
@@ -6,6 +6,4 @@ export type SyncDynamicWagmiProps = React.PropsWithChildren<{
6
6
  wallets: Wallet[];
7
7
  preventWagmiSyncFromCallingLogout: MutableRefObject<boolean>;
8
8
  }>;
9
- export declare const SyncDynamicWagmi: ({ children, connector, wallets, preventWagmiSyncFromCallingLogout, }: SyncDynamicWagmiProps) => React.FunctionComponentElement<{
10
- children?: React.ReactNode;
11
- }>;
9
+ export declare const SyncDynamicWagmi: ({ children, connector, wallets, preventWagmiSyncFromCallingLogout, }: SyncDynamicWagmiProps) => JSX.Element;
@@ -1,3 +1,4 @@
1
+ import { jsx, Fragment } from 'react/jsx-runtime';
1
2
  import React, { useRef, useEffect } from 'react';
2
3
  import { useConfig, useConnect, useDisconnect } from 'wagmi';
3
4
  import { useDynamicContext } from '@dynamic-labs/sdk-react-core';
@@ -51,6 +52,10 @@ const SyncDynamicWagmi = ({ children, connector, wallets, preventWagmiSyncFromCa
51
52
  walletConnector,
52
53
  wallets,
53
54
  ]);
55
+ if (React.version.startsWith('18')) {
56
+ // eslint-disable-next-line react/jsx-no-useless-fragment
57
+ return jsx(Fragment, { children: children });
58
+ }
54
59
  // use React.createElement to prevent bunding react/jsx-runtime,
55
60
  // which is not compatible when bundling apps using React 17
56
61
  return React.createElement(React.Fragment, null, children);