wagmi 0.0.17 ā 0.1.0
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 +10 -0
- package/connectors/injected/dist/wagmi-connectors-injected.cjs.d.ts +1 -0
- package/connectors/injected/dist/wagmi-connectors-injected.cjs.dev.js +12 -0
- package/connectors/injected/dist/wagmi-connectors-injected.cjs.js +7 -0
- package/connectors/injected/dist/wagmi-connectors-injected.cjs.prod.js +12 -0
- package/connectors/injected/dist/wagmi-connectors-injected.esm.js +1 -0
- package/connectors/injected/package.json +4 -0
- package/connectors/walletConnect/dist/wagmi-connectors-walletConnect.cjs.d.ts +1 -0
- package/connectors/walletConnect/dist/wagmi-connectors-walletConnect.cjs.dev.js +12 -0
- package/connectors/walletConnect/dist/wagmi-connectors-walletConnect.cjs.js +7 -0
- package/connectors/walletConnect/dist/wagmi-connectors-walletConnect.cjs.prod.js +12 -0
- package/connectors/walletConnect/dist/wagmi-connectors-walletConnect.esm.js +1 -0
- package/connectors/walletConnect/package.json +4 -0
- package/connectors/walletLink/dist/wagmi-connectors-walletLink.cjs.d.ts +1 -0
- package/connectors/walletLink/dist/wagmi-connectors-walletLink.cjs.dev.js +12 -0
- package/connectors/walletLink/dist/wagmi-connectors-walletLink.cjs.js +7 -0
- package/connectors/walletLink/dist/wagmi-connectors-walletLink.cjs.prod.js +12 -0
- package/connectors/walletLink/dist/wagmi-connectors-walletLink.esm.js +1 -0
- package/connectors/walletLink/package.json +4 -0
- package/dist/declarations/src/connectors/injected.d.ts +1 -0
- package/dist/declarations/src/connectors/walletConnect.d.ts +1 -0
- package/dist/declarations/src/connectors/walletLink.d.ts +1 -0
- package/dist/declarations/src/context.d.ts +1 -1
- package/dist/declarations/src/index.d.ts +1 -1
- package/dist/wagmi.cjs.dev.js +0 -8
- package/dist/wagmi.cjs.prod.js +0 -8
- package/dist/wagmi.esm.js +1 -1
- package/package.json +22 -6
package/README.md
CHANGED
|
@@ -73,6 +73,16 @@ Every component inside the `Provider` is set up with the default `InjectedConnec
|
|
|
73
73
|
|
|
74
74
|
Want to learn more? Check out the [guides](https://wagmi-xyz.vercel.app/guides/connect-wallet) or browse the [API docs](https://wagmi-xyz.vercel.app/docs/provider).
|
|
75
75
|
|
|
76
|
+
## Community
|
|
77
|
+
|
|
78
|
+
Feel free to join the [discussions on GitHub](https://github.com/tmm/wagmi/discussions) or reach out [on Twitter](https://twitter.com/awkweb)!
|
|
79
|
+
|
|
80
|
+
## Support
|
|
81
|
+
|
|
82
|
+
- awkweb.eth
|
|
83
|
+
- [GitHub Sponsors](https://github.com/sponsors/tmm)
|
|
84
|
+
- Sign the [guestbook](https://github.com/tmm/wagmi/discussions/2)
|
|
85
|
+
|
|
76
86
|
## Thanks
|
|
77
87
|
|
|
78
88
|
- [ricmoo.eth](https://twitter.com/ricmoo) for creating and continued work on [ethers.js](https://github.com/ethers-io/ethers.js)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/declarations/src/connectors/injected";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var wagmiPrivate = require('wagmi-private');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'InjectedConnector', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return wagmiPrivate.InjectedConnector; }
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var wagmiPrivate = require('wagmi-private');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'InjectedConnector', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return wagmiPrivate.InjectedConnector; }
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InjectedConnector } from 'wagmi-private';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/declarations/src/connectors/walletConnect";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var walletConnect = require('wagmi-private/connectors/walletConnect');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'WalletConnectConnector', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return walletConnect.WalletConnectConnector; }
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var walletConnect = require('wagmi-private/connectors/walletConnect');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'WalletConnectConnector', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return walletConnect.WalletConnectConnector; }
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletConnectConnector } from 'wagmi-private/connectors/walletConnect';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "../../../dist/declarations/src/connectors/walletLink";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var walletLink = require('wagmi-private/connectors/walletLink');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'WalletLinkConnector', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return walletLink.WalletLinkConnector; }
|
|
12
|
+
});
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var walletLink = require('wagmi-private/connectors/walletLink');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'WalletLinkConnector', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return walletLink.WalletLinkConnector; }
|
|
12
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletLinkConnector } from 'wagmi-private/connectors/walletLink';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InjectedConnector } from 'wagmi-private';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletConnectConnector } from 'wagmi-private/connectors/walletConnect';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { WalletLinkConnector } from 'wagmi-private/connectors/walletLink';
|
|
@@ -53,7 +53,7 @@ export declare type Props = {
|
|
|
53
53
|
webSocketProvider?: WebSocketProvider | ((config: {
|
|
54
54
|
chainId?: number;
|
|
55
55
|
connector?: Connector;
|
|
56
|
-
}) => WebSocketProvider);
|
|
56
|
+
}) => WebSocketProvider | undefined);
|
|
57
57
|
};
|
|
58
58
|
export declare const Provider: ({ autoConnect, children, connectors: connectors_, connectorStorageKey, provider: provider_, webSocketProvider: webSocketProvider_, }: React.PropsWithChildren<Props>) => React.FunctionComponentElement<React.ProviderProps<ContextValue | null>>;
|
|
59
59
|
export declare const useContext: () => ContextValue;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { Provider, useContext } from './context';
|
|
2
2
|
export type { Props as ProviderProps } from './context';
|
|
3
3
|
export { useAccount, useBalance, useBlockNumber, useConnect, useContract, useContractEvent, useContractRead, useContractWrite, useEnsAvatar, useEnsLookup, useEnsResolver, useFeeData, useNetwork, useProvider, useSignMessage, useToken, useTransaction, useWaitForTransaction, useWebSocketProvider, } from './hooks';
|
|
4
|
-
export { Connector, InjectedConnector,
|
|
4
|
+
export { Connector, InjectedConnector, chain, defaultChains, defaultL2Chains, developmentChains, erc1155ABI, erc20ABI, erc721ABI, normalizeChainId, } from 'wagmi-private';
|
|
5
5
|
export type { Chain, Data } from 'wagmi-private';
|
package/dist/wagmi.cjs.dev.js
CHANGED
|
@@ -1500,14 +1500,6 @@ Object.defineProperty(exports, 'InjectedConnector', {
|
|
|
1500
1500
|
enumerable: true,
|
|
1501
1501
|
get: function () { return wagmiPrivate.InjectedConnector; }
|
|
1502
1502
|
});
|
|
1503
|
-
Object.defineProperty(exports, 'WalletConnectConnector', {
|
|
1504
|
-
enumerable: true,
|
|
1505
|
-
get: function () { return wagmiPrivate.WalletConnectConnector; }
|
|
1506
|
-
});
|
|
1507
|
-
Object.defineProperty(exports, 'WalletLinkConnector', {
|
|
1508
|
-
enumerable: true,
|
|
1509
|
-
get: function () { return wagmiPrivate.WalletLinkConnector; }
|
|
1510
|
-
});
|
|
1511
1503
|
Object.defineProperty(exports, 'chain', {
|
|
1512
1504
|
enumerable: true,
|
|
1513
1505
|
get: function () { return wagmiPrivate.chain; }
|
package/dist/wagmi.cjs.prod.js
CHANGED
|
@@ -1500,14 +1500,6 @@ Object.defineProperty(exports, 'InjectedConnector', {
|
|
|
1500
1500
|
enumerable: true,
|
|
1501
1501
|
get: function () { return wagmiPrivate.InjectedConnector; }
|
|
1502
1502
|
});
|
|
1503
|
-
Object.defineProperty(exports, 'WalletConnectConnector', {
|
|
1504
|
-
enumerable: true,
|
|
1505
|
-
get: function () { return wagmiPrivate.WalletConnectConnector; }
|
|
1506
|
-
});
|
|
1507
|
-
Object.defineProperty(exports, 'WalletLinkConnector', {
|
|
1508
|
-
enumerable: true,
|
|
1509
|
-
get: function () { return wagmiPrivate.WalletLinkConnector; }
|
|
1510
|
-
});
|
|
1511
1503
|
Object.defineProperty(exports, 'chain', {
|
|
1512
1504
|
enumerable: true,
|
|
1513
1505
|
get: function () { return wagmiPrivate.chain; }
|
package/dist/wagmi.esm.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { getDefaultProvider } from '@ethersproject/providers';
|
|
3
3
|
import { erc20ABI, defaultChains, defaultL2Chains, ConnectorNotFoundError, UserRejectedRequestError, InjectedConnector } from 'wagmi-private';
|
|
4
|
-
export { Connector, InjectedConnector,
|
|
4
|
+
export { Connector, InjectedConnector, chain, defaultChains, defaultL2Chains, developmentChains, erc1155ABI, erc20ABI, erc721ABI, normalizeChainId } from 'wagmi-private';
|
|
5
5
|
import { utils, ethers, Contract } from 'ethers';
|
|
6
6
|
|
|
7
7
|
function _defineProperty(obj, key, value) {
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "wagmi",
|
|
3
3
|
"description": "React Hooks library for Ethereum",
|
|
4
4
|
"license": "MIT",
|
|
5
|
-
"version": "0.0
|
|
5
|
+
"version": "0.1.0",
|
|
6
6
|
"ethereum": "awkweb.eth",
|
|
7
7
|
"repository": "tmm/wagmi",
|
|
8
8
|
"homepage": "https://wagmi-xyz.vercel.app",
|
|
@@ -14,14 +14,30 @@
|
|
|
14
14
|
".": {
|
|
15
15
|
"module": "./dist/wagmi.esm.js",
|
|
16
16
|
"default": "./dist/wagmi.cjs.js"
|
|
17
|
+
},
|
|
18
|
+
"./connectors/injected": {
|
|
19
|
+
"main": "./connectors/injected/dist/wagmi-connectors-injected.cjs.js",
|
|
20
|
+
"module": "./connectors/injected/dist/wagmi-connectors-injected.esm.js"
|
|
21
|
+
},
|
|
22
|
+
"./connectors/walletConnect": {
|
|
23
|
+
"main": "./connectors/walletConnect/dist/wagmi-connectors-walletConnect.cjs.js",
|
|
24
|
+
"module": "./connectors/walletConnect/dist/wagmi-connectors-walletConnect.esm.js"
|
|
25
|
+
},
|
|
26
|
+
"./connectors/walletLink": {
|
|
27
|
+
"main": "./connectors/walletLink/dist/wagmi-connectors-walletLink.cjs.js",
|
|
28
|
+
"module": "./connectors/walletLink/dist/wagmi-connectors-walletLink.esm.js"
|
|
17
29
|
}
|
|
18
30
|
},
|
|
19
31
|
"files": [
|
|
20
|
-
"/dist"
|
|
32
|
+
"/dist",
|
|
33
|
+
"/connectors"
|
|
21
34
|
],
|
|
22
35
|
"preconstruct": {
|
|
23
36
|
"entrypoints": [
|
|
24
|
-
"index.ts"
|
|
37
|
+
"index.ts",
|
|
38
|
+
"connectors/injected.ts",
|
|
39
|
+
"connectors/walletConnect.ts",
|
|
40
|
+
"connectors/walletLink.ts"
|
|
25
41
|
]
|
|
26
42
|
},
|
|
27
43
|
"peerDependencies": {
|
|
@@ -31,7 +47,7 @@
|
|
|
31
47
|
"dependencies": {
|
|
32
48
|
"@walletconnect/ethereum-provider": "^1.6.6",
|
|
33
49
|
"@ethersproject/providers": "^5.5.1",
|
|
34
|
-
"wagmi-private": "0.0
|
|
50
|
+
"wagmi-private": "0.1.0",
|
|
35
51
|
"walletlink": "^2.2.8"
|
|
36
52
|
},
|
|
37
53
|
"devDependencies": {
|
|
@@ -41,7 +57,7 @@
|
|
|
41
57
|
"ethers": "^5.5.1",
|
|
42
58
|
"react": "^17.0.0",
|
|
43
59
|
"walletlink": "^2.2.8",
|
|
44
|
-
"wagmi-testing": "0.0
|
|
60
|
+
"wagmi-testing": "0.1.0"
|
|
45
61
|
},
|
|
46
|
-
"readme": "<p>\n <a aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/wagmi\">\n <img\n alt=\"\"\n src=\"https://img.shields.io/npm/v/wagmi.svg?style=for-the-badge&labelColor=161c22\"\n />\n </a>\n <a aria-label=\"License\" href=\"/LICENSE\">\n <img\n alt=\"\"\n src=\"https://img.shields.io/npm/l/wagmi.svg?style=for-the-badge&labelColor=161c22\"\n />\n </a>\n</p>\n\n# wagmi\n\n**React Hooks library for Ethereum, built on [ethers.js](https://github.com/ethers-io/ethers.js).**\n\nš 20+ hooks for working with wallets, ENS, contracts, transactions, signing, etc.\n\nš¼ Built-in wallet connectors for MetaMask, WalletConnect, and Coinbase Wallet\n\nš Auto-refresh data on wallet and network changes\n\nš¦ TypeScript ready\n\nšØ Zero-dependencies (besides ethers.js peer dependency)\n\nš³ Test suite and documentation\n\nš MIT License\n\n## Documentation\n\nVisit https://wagmi-xyz.vercel.app to view the full documentation.\n\n## Usage\n\n1. Install the dependencies.\n\n```bash\npnpm add wagmi ethers\n```\n\n2. Wrap your app with the `Provider` component.\n\n```tsx\nimport { Provider } from 'wagmi'\n\nconst App = () => (\n <Provider>\n <YourRoutes />\n </Provider>\n)\n```\n\n3. Use hooks.\n\n```tsx\nimport { useAccount } from 'wagmi'\n\nconst Page = () => {\n const [{ data, error, loading }, disconnect] = useAccount({\n fetchEns: true,\n })\n\n return ...\n}\n```\n\nEvery component inside the `Provider` is set up with the default `InjectedConnector` for connecting wallets and ethers.js [Default Provider](https://docs.ethers.io/v5/api/providers/#providers-getDefaultProvider) for fetching data.\n\nWant to learn more? Check out the [guides](https://wagmi-xyz.vercel.app/guides/connect-wallet) or browse the [API docs](https://wagmi-xyz.vercel.app/docs/provider).\n\n## Thanks\n\n- [ricmoo.eth](https://twitter.com/ricmoo) for creating and continued work on [ethers.js](https://github.com/ethers-io/ethers.js)\n- [Mirror](https://mirror.xyz) for creating space to do good work\n\n## License\n\nMIT.\n\n<br />\n\nwagmi\n"
|
|
62
|
+
"readme": "<p>\n <a aria-label=\"NPM version\" href=\"https://www.npmjs.com/package/wagmi\">\n <img\n alt=\"\"\n src=\"https://img.shields.io/npm/v/wagmi.svg?style=for-the-badge&labelColor=161c22\"\n />\n </a>\n <a aria-label=\"License\" href=\"/LICENSE\">\n <img\n alt=\"\"\n src=\"https://img.shields.io/npm/l/wagmi.svg?style=for-the-badge&labelColor=161c22\"\n />\n </a>\n</p>\n\n# wagmi\n\n**React Hooks library for Ethereum, built on [ethers.js](https://github.com/ethers-io/ethers.js).**\n\nš 20+ hooks for working with wallets, ENS, contracts, transactions, signing, etc.\n\nš¼ Built-in wallet connectors for MetaMask, WalletConnect, and Coinbase Wallet\n\nš Auto-refresh data on wallet and network changes\n\nš¦ TypeScript ready\n\nšØ Zero-dependencies (besides ethers.js peer dependency)\n\nš³ Test suite and documentation\n\nš MIT License\n\n## Documentation\n\nVisit https://wagmi-xyz.vercel.app to view the full documentation.\n\n## Usage\n\n1. Install the dependencies.\n\n```bash\npnpm add wagmi ethers\n```\n\n2. Wrap your app with the `Provider` component.\n\n```tsx\nimport { Provider } from 'wagmi'\n\nconst App = () => (\n <Provider>\n <YourRoutes />\n </Provider>\n)\n```\n\n3. Use hooks.\n\n```tsx\nimport { useAccount } from 'wagmi'\n\nconst Page = () => {\n const [{ data, error, loading }, disconnect] = useAccount({\n fetchEns: true,\n })\n\n return ...\n}\n```\n\nEvery component inside the `Provider` is set up with the default `InjectedConnector` for connecting wallets and ethers.js [Default Provider](https://docs.ethers.io/v5/api/providers/#providers-getDefaultProvider) for fetching data.\n\nWant to learn more? Check out the [guides](https://wagmi-xyz.vercel.app/guides/connect-wallet) or browse the [API docs](https://wagmi-xyz.vercel.app/docs/provider).\n\n## Community\n\nFeel free to join the [discussions on GitHub](https://github.com/tmm/wagmi/discussions) or reach out [on Twitter](https://twitter.com/awkweb)!\n\n## Support\n\n- awkweb.eth\n- [GitHub Sponsors](https://github.com/sponsors/tmm)\n- Sign the [guestbook](https://github.com/tmm/wagmi/discussions/2)\n\n## Thanks\n\n- [ricmoo.eth](https://twitter.com/ricmoo) for creating and continued work on [ethers.js](https://github.com/ethers-io/ethers.js)\n- [Mirror](https://mirror.xyz) for creating space to do good work\n\n## License\n\nMIT.\n\n<br />\n\nwagmi\n"
|
|
47
63
|
}
|