@wagmi/core 0.7.6 → 0.7.8
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/{base-5bd9b5ed.d.ts → base-a32d0b91.d.ts} +2 -2
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-MS4CUBFJ.js → chunk-HEIMP7HQ.js} +131 -31
- package/dist/connectors/coinbaseWallet.d.ts +3 -3
- package/dist/connectors/coinbaseWallet.js +1 -1
- package/dist/connectors/metaMask.d.ts +4 -6
- package/dist/connectors/metaMask.js +36 -43
- package/dist/connectors/mock/index.d.ts +5 -5
- package/dist/connectors/mock/index.js +1 -1
- package/dist/connectors/walletConnect.d.ts +4 -4
- package/dist/connectors/walletConnect.js +13 -5
- package/dist/{contracts-3c4d70a1.d.ts → contracts-3880ee54.d.ts} +24 -24
- package/dist/{index-bacc1c49.d.ts → index-58cffc47.d.ts} +23 -23
- package/dist/index.d.ts +133 -112
- package/dist/index.js +5 -1
- package/dist/{injected-6980e5c3.d.ts → injected-82510902.d.ts} +12 -4
- package/dist/internal.d.ts +2 -2
- package/dist/internal.js +1 -1
- package/dist/providers/alchemy.d.ts +2 -2
- package/dist/providers/infura.d.ts +2 -2
- package/dist/providers/jsonRpc.d.ts +2 -2
- package/dist/providers/public.d.ts +2 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
createClient,
|
|
25
25
|
createStorage,
|
|
26
26
|
deepEqual,
|
|
27
|
+
deserialize,
|
|
27
28
|
disconnect,
|
|
28
29
|
erc20ABI,
|
|
29
30
|
erc4626ABI,
|
|
@@ -53,6 +54,7 @@ import {
|
|
|
53
54
|
readContract,
|
|
54
55
|
readContracts,
|
|
55
56
|
sendTransaction,
|
|
57
|
+
serialize,
|
|
56
58
|
signMessage,
|
|
57
59
|
signTypedData,
|
|
58
60
|
switchNetwork,
|
|
@@ -69,7 +71,7 @@ import {
|
|
|
69
71
|
watchSigner,
|
|
70
72
|
watchWebSocketProvider,
|
|
71
73
|
writeContract
|
|
72
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-HEIMP7HQ.js";
|
|
73
75
|
import {
|
|
74
76
|
alchemyRpcUrls,
|
|
75
77
|
allChains,
|
|
@@ -114,6 +116,7 @@ export {
|
|
|
114
116
|
deepEqual,
|
|
115
117
|
defaultChains,
|
|
116
118
|
defaultL2Chains,
|
|
119
|
+
deserialize,
|
|
117
120
|
disconnect,
|
|
118
121
|
erc20ABI,
|
|
119
122
|
erc4626ABI,
|
|
@@ -146,6 +149,7 @@ export {
|
|
|
146
149
|
readContract,
|
|
147
150
|
readContracts,
|
|
148
151
|
sendTransaction,
|
|
152
|
+
serialize,
|
|
149
153
|
signMessage,
|
|
150
154
|
signTypedData,
|
|
151
155
|
switchNetwork,
|
|
@@ -1,11 +1,18 @@
|
|
|
1
|
-
import { C as Chain, E as Ethereum } from './index-
|
|
1
|
+
import { C as Chain, E as Ethereum } from './index-58cffc47.js';
|
|
2
2
|
import { Address } from 'abitype';
|
|
3
3
|
import { providers } from 'ethers';
|
|
4
|
-
import { C as Connector } from './base-
|
|
4
|
+
import { C as Connector } from './base-a32d0b91.js';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type InjectedConnectorOptions = {
|
|
7
7
|
/** Name of connector */
|
|
8
8
|
name?: string | ((detectedName: string | string[]) => string);
|
|
9
|
+
/**
|
|
10
|
+
* [EIP-1193](https://eips.ethereum.org/EIPS/eip-1193) Ethereum Provider to target
|
|
11
|
+
*
|
|
12
|
+
* @default
|
|
13
|
+
* () => typeof window !== 'undefined' ? window.ethereum : undefined
|
|
14
|
+
*/
|
|
15
|
+
getProvider?: () => Window['ethereum'] | undefined;
|
|
9
16
|
/**
|
|
10
17
|
* MetaMask 10.9.3 emits disconnect event when chain is changed.
|
|
11
18
|
* This flag prevents the `"disconnect"` event from being emitted upon switching chains. See [GitHub issue](https://github.com/MetaMask/metamask-extension/issues/13375#issuecomment-1027663334) for more info.
|
|
@@ -18,7 +25,8 @@ declare type InjectedConnectorOptions = {
|
|
|
18
25
|
*/
|
|
19
26
|
shimDisconnect?: boolean;
|
|
20
27
|
};
|
|
21
|
-
|
|
28
|
+
type ConnectorOptions = InjectedConnectorOptions & Required<Pick<InjectedConnectorOptions, 'getProvider'>>;
|
|
29
|
+
declare class InjectedConnector extends Connector<Window['ethereum'], ConnectorOptions, providers.JsonRpcSigner> {
|
|
22
30
|
#private;
|
|
23
31
|
readonly id: string;
|
|
24
32
|
readonly name: string;
|
package/dist/internal.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import './index-
|
|
2
|
-
export { g as AbiParameter, h as ContractConfig, b as ContractsConfig, c as ContractsResult, E as Event, i as GetArgs, G as GetConfig, d as GetReturnType, f as IsNever, N as NotEqual, j as Optional, e as Or } from './contracts-
|
|
1
|
+
import './index-58cffc47.js';
|
|
2
|
+
export { g as AbiParameter, h as ContractConfig, b as ContractsConfig, c as ContractsResult, E as Event, i as GetArgs, G as GetConfig, d as GetReturnType, f as IsNever, N as NotEqual, j as Optional, e as Or } from './contracts-3880ee54.js';
|
|
3
3
|
import 'abitype';
|
|
4
4
|
import 'ethers';
|
|
5
5
|
|
package/dist/internal.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { providers } from 'ethers';
|
|
2
|
-
import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-
|
|
2
|
+
import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-58cffc47.js';
|
|
3
3
|
import 'abitype';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type AlchemyProviderConfig = FallbackProviderConfig & {
|
|
6
6
|
/** Your Alchemy API key from the [Alchemy Dashboard](https://dashboard.alchemyapi.io/). */
|
|
7
7
|
apiKey: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { providers } from 'ethers';
|
|
2
|
-
import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-
|
|
2
|
+
import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-58cffc47.js';
|
|
3
3
|
import 'abitype';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type InfuraProviderConfig = FallbackProviderConfig & {
|
|
6
6
|
/** Your Infura API key from the [Infura Dashboard](https://infura.io/login). */
|
|
7
7
|
apiKey: string;
|
|
8
8
|
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { providers } from 'ethers';
|
|
2
|
-
import { F as FallbackProviderConfig, C as Chain, a as ChainProviderFn } from '../index-
|
|
2
|
+
import { F as FallbackProviderConfig, C as Chain, a as ChainProviderFn } from '../index-58cffc47.js';
|
|
3
3
|
import 'abitype';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type JsonRpcProviderConfig = FallbackProviderConfig & {
|
|
6
6
|
rpc: (chain: Chain) => {
|
|
7
7
|
http: string;
|
|
8
8
|
webSocket?: string;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { providers } from 'ethers';
|
|
2
|
-
import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-
|
|
2
|
+
import { F as FallbackProviderConfig, a as ChainProviderFn } from '../index-58cffc47.js';
|
|
3
3
|
import 'abitype';
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
type PublicProviderConfig = FallbackProviderConfig;
|
|
6
6
|
declare function publicProvider({ priority, stallTimeout, weight, }?: PublicProviderConfig): ChainProviderFn<providers.StaticJsonRpcProvider>;
|
|
7
7
|
|
|
8
8
|
export { PublicProviderConfig, publicProvider };
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@wagmi/core",
|
|
3
3
|
"description": "Vanilla JS library for Ethereum",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.7.
|
|
5
|
+
"version": "0.7.8",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/wagmi-dev/wagmi.git",
|
|
@@ -102,7 +102,7 @@
|
|
|
102
102
|
"devDependencies": {
|
|
103
103
|
"@coinbase/wallet-sdk": "^3.4.1",
|
|
104
104
|
"@walletconnect/ethereum-provider": "^1.7.8",
|
|
105
|
-
"typescript": "^4.
|
|
105
|
+
"typescript": "^4.9.3"
|
|
106
106
|
},
|
|
107
107
|
"keywords": [
|
|
108
108
|
"eth",
|