@wagmi/core 1.4.2-cjs → 1.4.3-cjs
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.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } } function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } async function _asyncNullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return await rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; }
|
|
2
2
|
|
|
3
3
|
var _chunkBVC4KGLQjs = require('./chunk-BVC4KGLQ.js');
|
|
4
4
|
|
|
@@ -2356,7 +2356,7 @@ async function writeContract(config2) {
|
|
|
2356
2356
|
}
|
|
2357
2357
|
const hash = await walletClient.writeContract({
|
|
2358
2358
|
...request,
|
|
2359
|
-
chain: null
|
|
2359
|
+
chain: config2.chainId ? { id: config2.chainId } : null
|
|
2360
2360
|
});
|
|
2361
2361
|
return { hash };
|
|
2362
2362
|
}
|
|
@@ -2577,14 +2577,14 @@ function watchNetwork(callback, { selector = (x) => x } = {}) {
|
|
|
2577
2577
|
|
|
2578
2578
|
// src/actions/ens/fetchEnsAddress.ts
|
|
2579
2579
|
|
|
2580
|
-
var _ens = require('viem/ens');
|
|
2581
2580
|
async function fetchEnsAddress({
|
|
2582
2581
|
chainId,
|
|
2583
2582
|
name
|
|
2584
2583
|
}) {
|
|
2584
|
+
const { normalize } = await Promise.resolve().then(() => _interopRequireWildcard(require("viem/ens")));
|
|
2585
2585
|
const publicClient = getPublicClient({ chainId });
|
|
2586
2586
|
const address = await publicClient.getEnsAddress({
|
|
2587
|
-
name:
|
|
2587
|
+
name: normalize(name)
|
|
2588
2588
|
});
|
|
2589
2589
|
try {
|
|
2590
2590
|
if (address === "0x0000000000000000000000000000000000000000")
|
|
@@ -2596,13 +2596,13 @@ async function fetchEnsAddress({
|
|
|
2596
2596
|
}
|
|
2597
2597
|
|
|
2598
2598
|
// src/actions/ens/fetchEnsAvatar.ts
|
|
2599
|
-
|
|
2600
2599
|
async function fetchEnsAvatar({
|
|
2601
2600
|
name,
|
|
2602
2601
|
chainId
|
|
2603
2602
|
}) {
|
|
2603
|
+
const { normalize } = await Promise.resolve().then(() => _interopRequireWildcard(require("viem/ens")));
|
|
2604
2604
|
const publicClient = getPublicClient({ chainId });
|
|
2605
|
-
const avatar = await publicClient.getEnsAvatar({ name:
|
|
2605
|
+
const avatar = await publicClient.getEnsAvatar({ name: normalize(name) });
|
|
2606
2606
|
return avatar;
|
|
2607
2607
|
}
|
|
2608
2608
|
|
|
@@ -2619,13 +2619,13 @@ async function fetchEnsName({
|
|
|
2619
2619
|
}
|
|
2620
2620
|
|
|
2621
2621
|
// src/actions/ens/fetchEnsResolver.ts
|
|
2622
|
-
|
|
2623
2622
|
async function fetchEnsResolver({
|
|
2624
2623
|
chainId,
|
|
2625
2624
|
name
|
|
2626
2625
|
}) {
|
|
2626
|
+
const { normalize } = await Promise.resolve().then(() => _interopRequireWildcard(require("viem/ens")));
|
|
2627
2627
|
const publicClient = getPublicClient({ chainId });
|
|
2628
|
-
const resolver = await publicClient.getEnsResolver({ name:
|
|
2628
|
+
const resolver = await publicClient.getEnsResolver({ name: normalize(name) });
|
|
2629
2629
|
return resolver;
|
|
2630
2630
|
}
|
|
2631
2631
|
|
|
@@ -2786,7 +2786,10 @@ async function sendTransaction({
|
|
|
2786
2786
|
value
|
|
2787
2787
|
});
|
|
2788
2788
|
}
|
|
2789
|
-
const hash = await walletClient.sendTransaction({
|
|
2789
|
+
const hash = await walletClient.sendTransaction({
|
|
2790
|
+
...args,
|
|
2791
|
+
chain: chainId ? { id: chainId } : null
|
|
2792
|
+
});
|
|
2790
2793
|
return { hash };
|
|
2791
2794
|
}
|
|
2792
2795
|
|
package/dist/index.js
CHANGED
|
@@ -61,7 +61,7 @@ var _chunk4E64EZ7Vjs = require('./chunk-4E64EZ7V.js');
|
|
|
61
61
|
|
|
62
62
|
|
|
63
63
|
|
|
64
|
-
var
|
|
64
|
+
var _chunkYAPWLAI7js = require('./chunk-YAPWLAI7.js');
|
|
65
65
|
|
|
66
66
|
|
|
67
67
|
var _chunkBVC4KGLQjs = require('./chunk-BVC4KGLQ.js');
|
|
@@ -132,4 +132,4 @@ require('./chunk-MQXBDTVK.js');
|
|
|
132
132
|
|
|
133
133
|
|
|
134
134
|
|
|
135
|
-
exports.ChainMismatchError =
|
|
135
|
+
exports.ChainMismatchError = _chunkYAPWLAI7js.ChainMismatchError; exports.ChainNotConfiguredError = _chunkYAPWLAI7js.ChainNotConfiguredError; exports.Config = _chunkYAPWLAI7js.Config; exports.ConfigChainsNotFound = _chunkYAPWLAI7js.ConfigChainsNotFound; exports.Connector = _chunkBVC4KGLQjs.Connector; exports.ConnectorAlreadyConnectedError = _chunkYAPWLAI7js.ConnectorAlreadyConnectedError; exports.ConnectorNotFoundError = _chunkYAPWLAI7js.ConnectorNotFoundError; exports.InjectedConnector = _chunkEQOEZP46js.InjectedConnector; exports.SwitchChainNotSupportedError = _chunkYAPWLAI7js.SwitchChainNotSupportedError; exports.configureChains = _chunkYAPWLAI7js.configureChains; exports.connect = _chunkYAPWLAI7js.connect; exports.createConfig = _chunkYAPWLAI7js.createConfig; exports.createStorage = _chunkYAPWLAI7js.createStorage; exports.deepEqual = _chunkYAPWLAI7js.deepEqual; exports.deserialize = _chunkYAPWLAI7js.deserialize; exports.disconnect = _chunkYAPWLAI7js.disconnect; exports.erc20ABI = _chunkYAPWLAI7js.erc20ABI; exports.erc4626ABI = _chunkYAPWLAI7js.erc4626ABI; exports.erc721ABI = _chunkYAPWLAI7js.erc721ABI; exports.fetchBalance = _chunkYAPWLAI7js.fetchBalance; exports.fetchBlockNumber = _chunkYAPWLAI7js.fetchBlockNumber; exports.fetchEnsAddress = _chunkYAPWLAI7js.fetchEnsAddress; exports.fetchEnsAvatar = _chunkYAPWLAI7js.fetchEnsAvatar; exports.fetchEnsName = _chunkYAPWLAI7js.fetchEnsName; exports.fetchEnsResolver = _chunkYAPWLAI7js.fetchEnsResolver; exports.fetchFeeData = _chunkYAPWLAI7js.fetchFeeData; exports.fetchToken = _chunkYAPWLAI7js.fetchToken; exports.fetchTransaction = _chunkYAPWLAI7js.fetchTransaction; exports.getAccount = _chunkYAPWLAI7js.getAccount; exports.getConfig = _chunkYAPWLAI7js.getConfig; exports.getContract = _chunkYAPWLAI7js.getContract; exports.getNetwork = _chunkYAPWLAI7js.getNetwork; exports.getPublicClient = _chunkYAPWLAI7js.getPublicClient; exports.getUnit = _chunkYAPWLAI7js.getUnit; exports.getWalletClient = _chunkYAPWLAI7js.getWalletClient; exports.getWebSocketPublicClient = _chunkYAPWLAI7js.getWebSocketPublicClient; exports.mainnet = _chunk4E64EZ7Vjs.mainnet; exports.multicall = _chunkYAPWLAI7js.multicall; exports.noopStorage = _chunkYAPWLAI7js.noopStorage; exports.prepareSendTransaction = _chunkYAPWLAI7js.prepareSendTransaction; exports.prepareWriteContract = _chunkYAPWLAI7js.prepareWriteContract; exports.readContract = _chunkYAPWLAI7js.readContract; exports.readContracts = _chunkYAPWLAI7js.readContracts; exports.sendTransaction = _chunkYAPWLAI7js.sendTransaction; exports.sepolia = _chunk4E64EZ7Vjs.sepolia; exports.serialize = _chunkYAPWLAI7js.serialize; exports.signMessage = _chunkYAPWLAI7js.signMessage; exports.signTypedData = _chunkYAPWLAI7js.signTypedData; exports.switchNetwork = _chunkYAPWLAI7js.switchNetwork; exports.waitForTransaction = _chunkYAPWLAI7js.waitForTransaction; exports.watchAccount = _chunkYAPWLAI7js.watchAccount; exports.watchBlockNumber = _chunkYAPWLAI7js.watchBlockNumber; exports.watchContractEvent = _chunkYAPWLAI7js.watchContractEvent; exports.watchMulticall = _chunkYAPWLAI7js.watchMulticall; exports.watchNetwork = _chunkYAPWLAI7js.watchNetwork; exports.watchPendingTransactions = _chunkYAPWLAI7js.watchPendingTransactions; exports.watchPublicClient = _chunkYAPWLAI7js.watchPublicClient; exports.watchReadContract = _chunkYAPWLAI7js.watchReadContract; exports.watchReadContracts = _chunkYAPWLAI7js.watchReadContracts; exports.watchWalletClient = _chunkYAPWLAI7js.watchWalletClient; exports.watchWebSocketPublicClient = _chunkYAPWLAI7js.watchWebSocketPublicClient; exports.writeContract = _chunkYAPWLAI7js.writeContract;
|
package/dist/internal/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkYAPWLAI7js = require('../chunk-YAPWLAI7.js');
|
|
5
5
|
require('../chunk-BVC4KGLQ.js');
|
|
6
6
|
require('../chunk-MQXBDTVK.js');
|
|
7
7
|
|
|
8
8
|
|
|
9
9
|
|
|
10
|
-
exports.getCallParameters =
|
|
10
|
+
exports.getCallParameters = _chunkYAPWLAI7js.getCallParameters; exports.getSendTransactionParameters = _chunkYAPWLAI7js.getSendTransactionParameters;
|
package/dist/internal/test.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }require('../chunk-4E64EZ7V.js');
|
|
2
|
-
require('../chunk-
|
|
2
|
+
require('../chunk-YAPWLAI7.js');
|
|
3
3
|
require('../chunk-BVC4KGLQ.js');
|
|
4
4
|
require('../chunk-EQOEZP46.js');
|
|
5
5
|
require('../chunk-KFW652VN.js');
|
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": "1.4.
|
|
5
|
+
"version": "1.4.3-cjs",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
8
8
|
"url": "https://github.com/wagmi-dev/wagmi.git",
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"abitype": "0.8.7",
|
|
123
123
|
"eventemitter3": "^4.0.7",
|
|
124
124
|
"zustand": "^4.3.1",
|
|
125
|
-
"@wagmi/connectors": "3.1.2
|
|
125
|
+
"@wagmi/connectors": "3.1.2"
|
|
126
126
|
},
|
|
127
127
|
"devDependencies": {
|
|
128
128
|
"viem": "^1.0.0"
|