@wagmi/core 1.4.0-cjs → 1.4.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.
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});var __accessCheck = (obj, member, msg) => {
1
+ var __accessCheck = (obj, member, msg) => {
2
2
  if (!member.has(obj))
3
3
  throw TypeError("Cannot " + msg);
4
4
  };
@@ -21,9 +21,9 @@ var __privateMethod = (obj, member, method) => {
21
21
  return method;
22
22
  };
23
23
 
24
-
25
-
26
-
27
-
28
-
29
- exports.__privateGet = __privateGet; exports.__privateAdd = __privateAdd; exports.__privateSet = __privateSet; exports.__privateMethod = __privateMethod;
24
+ export {
25
+ __privateGet,
26
+ __privateAdd,
27
+ __privateSet,
28
+ __privateMethod
29
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/connectors/coinbaseWallet.ts
4
- var _coinbaseWallet = require('@wagmi/connectors/coinbaseWallet');
5
-
6
-
7
- exports.CoinbaseWalletConnector = _coinbaseWallet.CoinbaseWalletConnector;
4
+ import { CoinbaseWalletConnector } from "@wagmi/connectors/coinbaseWallet";
5
+ export {
6
+ CoinbaseWalletConnector
7
+ };
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkBVC4KGLQjs = require('../chunk-BVC4KGLQ.js');
5
- require('../chunk-MQXBDTVK.js');
6
-
7
-
8
-
9
- exports.Connector = _chunkBVC4KGLQjs.Connector; exports.InjectedConnector = _chunkBVC4KGLQjs.InjectedConnector;
1
+ import {
2
+ Connector,
3
+ InjectedConnector
4
+ } from "../chunk-BVC4KGLQ.js";
5
+ import "../chunk-MQXBDTVK.js";
6
+ export {
7
+ Connector,
8
+ InjectedConnector
9
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
- var _chunkEQOEZP46js = require('../chunk-EQOEZP46.js');
4
- require('../chunk-MQXBDTVK.js');
5
-
6
-
7
- exports.InjectedConnector = _chunkEQOEZP46js.InjectedConnector;
1
+ import {
2
+ InjectedConnector
3
+ } from "../chunk-EQOEZP46.js";
4
+ import "../chunk-MQXBDTVK.js";
5
+ export {
6
+ InjectedConnector
7
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/connectors/ledger.ts
4
- var _ledger = require('@wagmi/connectors/ledger');
5
-
6
-
7
- exports.LedgerConnector = _ledger.LedgerConnector;
4
+ import { LedgerConnector } from "@wagmi/connectors/ledger";
5
+ export {
6
+ LedgerConnector
7
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/connectors/metaMask.ts
4
- var _metaMask = require('@wagmi/connectors/metaMask');
5
-
6
-
7
- exports.MetaMaskConnector = _metaMask.MetaMaskConnector;
4
+ import { MetaMaskConnector } from "@wagmi/connectors/metaMask";
5
+ export {
6
+ MetaMaskConnector
7
+ };
@@ -1,9 +1,9 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkKFW652VNjs = require('../chunk-KFW652VN.js');
5
- require('../chunk-MQXBDTVK.js');
6
-
7
-
8
-
9
- exports.MockConnector = _chunkKFW652VNjs.MockConnector; exports.MockProvider = _chunkKFW652VNjs.MockProvider;
1
+ import {
2
+ MockConnector,
3
+ MockProvider
4
+ } from "../chunk-KFW652VN.js";
5
+ import "../chunk-MQXBDTVK.js";
6
+ export {
7
+ MockConnector,
8
+ MockProvider
9
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/connectors/safe.ts
4
- var _safe = require('@wagmi/connectors/safe');
5
-
6
-
7
- exports.SafeConnector = _safe.SafeConnector;
4
+ import { SafeConnector } from "@wagmi/connectors/safe";
5
+ export {
6
+ SafeConnector
7
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/connectors/walletConnect.ts
4
- var _walletConnect = require('@wagmi/connectors/walletConnect');
5
-
6
-
7
- exports.WalletConnectConnector = _walletConnect.WalletConnectConnector;
4
+ import { WalletConnectConnector } from "@wagmi/connectors/walletConnect";
5
+ export {
6
+ WalletConnectConnector
7
+ };
@@ -1,7 +1,7 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/connectors/walletConnectLegacy.ts
4
- var _walletConnectLegacy = require('@wagmi/connectors/walletConnectLegacy');
5
-
6
-
7
- exports.WalletConnectLegacyConnector = _walletConnectLegacy.WalletConnectLegacyConnector;
4
+ import { WalletConnectLegacyConnector } from "@wagmi/connectors/walletConnectLegacy";
5
+ export {
6
+ WalletConnectLegacyConnector
7
+ };
package/dist/index.js CHANGED
@@ -1,135 +1,135 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunk4E64EZ7Vjs = require('./chunk-4E64EZ7V.js');
5
-
6
-
7
-
8
-
9
-
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
-
18
-
19
-
20
-
21
-
22
-
23
-
24
-
25
-
26
-
27
-
28
-
29
-
30
-
31
-
32
-
33
-
34
-
35
-
36
-
37
-
38
-
39
-
40
-
41
-
42
-
43
-
44
-
45
-
46
-
47
-
48
-
49
-
50
-
51
-
52
-
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
61
-
62
-
63
-
64
- var _chunkLAFZBYO7js = require('./chunk-LAFZBYO7.js');
65
-
66
-
67
- var _chunkBVC4KGLQjs = require('./chunk-BVC4KGLQ.js');
68
-
69
-
70
- var _chunkEQOEZP46js = require('./chunk-EQOEZP46.js');
71
- require('./chunk-MQXBDTVK.js');
72
-
73
-
74
-
75
-
76
-
77
-
78
-
79
-
80
-
81
-
82
-
83
-
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
-
98
-
99
-
100
-
101
-
102
-
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
-
122
-
123
-
124
-
125
-
126
-
127
-
128
-
129
-
130
-
131
-
132
-
133
-
134
-
135
- exports.ChainMismatchError = _chunkLAFZBYO7js.ChainMismatchError; exports.ChainNotConfiguredError = _chunkLAFZBYO7js.ChainNotConfiguredError; exports.Config = _chunkLAFZBYO7js.Config; exports.ConfigChainsNotFound = _chunkLAFZBYO7js.ConfigChainsNotFound; exports.Connector = _chunkBVC4KGLQjs.Connector; exports.ConnectorAlreadyConnectedError = _chunkLAFZBYO7js.ConnectorAlreadyConnectedError; exports.ConnectorNotFoundError = _chunkLAFZBYO7js.ConnectorNotFoundError; exports.InjectedConnector = _chunkEQOEZP46js.InjectedConnector; exports.SwitchChainNotSupportedError = _chunkLAFZBYO7js.SwitchChainNotSupportedError; exports.configureChains = _chunkLAFZBYO7js.configureChains; exports.connect = _chunkLAFZBYO7js.connect; exports.createConfig = _chunkLAFZBYO7js.createConfig; exports.createStorage = _chunkLAFZBYO7js.createStorage; exports.deepEqual = _chunkLAFZBYO7js.deepEqual; exports.deserialize = _chunkLAFZBYO7js.deserialize; exports.disconnect = _chunkLAFZBYO7js.disconnect; exports.erc20ABI = _chunkLAFZBYO7js.erc20ABI; exports.erc4626ABI = _chunkLAFZBYO7js.erc4626ABI; exports.erc721ABI = _chunkLAFZBYO7js.erc721ABI; exports.fetchBalance = _chunkLAFZBYO7js.fetchBalance; exports.fetchBlockNumber = _chunkLAFZBYO7js.fetchBlockNumber; exports.fetchEnsAddress = _chunkLAFZBYO7js.fetchEnsAddress; exports.fetchEnsAvatar = _chunkLAFZBYO7js.fetchEnsAvatar; exports.fetchEnsName = _chunkLAFZBYO7js.fetchEnsName; exports.fetchEnsResolver = _chunkLAFZBYO7js.fetchEnsResolver; exports.fetchFeeData = _chunkLAFZBYO7js.fetchFeeData; exports.fetchToken = _chunkLAFZBYO7js.fetchToken; exports.fetchTransaction = _chunkLAFZBYO7js.fetchTransaction; exports.getAccount = _chunkLAFZBYO7js.getAccount; exports.getConfig = _chunkLAFZBYO7js.getConfig; exports.getContract = _chunkLAFZBYO7js.getContract; exports.getNetwork = _chunkLAFZBYO7js.getNetwork; exports.getPublicClient = _chunkLAFZBYO7js.getPublicClient; exports.getUnit = _chunkLAFZBYO7js.getUnit; exports.getWalletClient = _chunkLAFZBYO7js.getWalletClient; exports.getWebSocketPublicClient = _chunkLAFZBYO7js.getWebSocketPublicClient; exports.mainnet = _chunk4E64EZ7Vjs.mainnet; exports.multicall = _chunkLAFZBYO7js.multicall; exports.noopStorage = _chunkLAFZBYO7js.noopStorage; exports.prepareSendTransaction = _chunkLAFZBYO7js.prepareSendTransaction; exports.prepareWriteContract = _chunkLAFZBYO7js.prepareWriteContract; exports.readContract = _chunkLAFZBYO7js.readContract; exports.readContracts = _chunkLAFZBYO7js.readContracts; exports.sendTransaction = _chunkLAFZBYO7js.sendTransaction; exports.sepolia = _chunk4E64EZ7Vjs.sepolia; exports.serialize = _chunkLAFZBYO7js.serialize; exports.signMessage = _chunkLAFZBYO7js.signMessage; exports.signTypedData = _chunkLAFZBYO7js.signTypedData; exports.switchNetwork = _chunkLAFZBYO7js.switchNetwork; exports.waitForTransaction = _chunkLAFZBYO7js.waitForTransaction; exports.watchAccount = _chunkLAFZBYO7js.watchAccount; exports.watchBlockNumber = _chunkLAFZBYO7js.watchBlockNumber; exports.watchContractEvent = _chunkLAFZBYO7js.watchContractEvent; exports.watchMulticall = _chunkLAFZBYO7js.watchMulticall; exports.watchNetwork = _chunkLAFZBYO7js.watchNetwork; exports.watchPendingTransactions = _chunkLAFZBYO7js.watchPendingTransactions; exports.watchPublicClient = _chunkLAFZBYO7js.watchPublicClient; exports.watchReadContract = _chunkLAFZBYO7js.watchReadContract; exports.watchReadContracts = _chunkLAFZBYO7js.watchReadContracts; exports.watchWalletClient = _chunkLAFZBYO7js.watchWalletClient; exports.watchWebSocketPublicClient = _chunkLAFZBYO7js.watchWebSocketPublicClient; exports.writeContract = _chunkLAFZBYO7js.writeContract;
1
+ import {
2
+ mainnet,
3
+ sepolia
4
+ } from "./chunk-4E64EZ7V.js";
5
+ import {
6
+ ChainMismatchError,
7
+ ChainNotConfiguredError,
8
+ Config,
9
+ ConfigChainsNotFound,
10
+ ConnectorAlreadyConnectedError,
11
+ ConnectorNotFoundError,
12
+ SwitchChainNotSupportedError,
13
+ configureChains,
14
+ connect,
15
+ createConfig,
16
+ createStorage,
17
+ deepEqual,
18
+ deserialize,
19
+ disconnect,
20
+ erc20ABI,
21
+ erc4626ABI,
22
+ erc721ABI,
23
+ fetchBalance,
24
+ fetchBlockNumber,
25
+ fetchEnsAddress,
26
+ fetchEnsAvatar,
27
+ fetchEnsName,
28
+ fetchEnsResolver,
29
+ fetchFeeData,
30
+ fetchToken,
31
+ fetchTransaction,
32
+ getAccount,
33
+ getConfig,
34
+ getContract,
35
+ getNetwork,
36
+ getPublicClient,
37
+ getUnit,
38
+ getWalletClient,
39
+ getWebSocketPublicClient,
40
+ multicall,
41
+ noopStorage,
42
+ prepareSendTransaction,
43
+ prepareWriteContract,
44
+ readContract,
45
+ readContracts,
46
+ sendTransaction,
47
+ serialize,
48
+ signMessage,
49
+ signTypedData,
50
+ switchNetwork,
51
+ waitForTransaction,
52
+ watchAccount,
53
+ watchBlockNumber,
54
+ watchContractEvent,
55
+ watchMulticall,
56
+ watchNetwork,
57
+ watchPendingTransactions,
58
+ watchPublicClient,
59
+ watchReadContract,
60
+ watchReadContracts,
61
+ watchWalletClient,
62
+ watchWebSocketPublicClient,
63
+ writeContract
64
+ } from "./chunk-LAFZBYO7.js";
65
+ import {
66
+ Connector
67
+ } from "./chunk-BVC4KGLQ.js";
68
+ import {
69
+ InjectedConnector
70
+ } from "./chunk-EQOEZP46.js";
71
+ import "./chunk-MQXBDTVK.js";
72
+ export {
73
+ ChainMismatchError,
74
+ ChainNotConfiguredError,
75
+ Config,
76
+ ConfigChainsNotFound,
77
+ Connector,
78
+ ConnectorAlreadyConnectedError,
79
+ ConnectorNotFoundError,
80
+ InjectedConnector,
81
+ SwitchChainNotSupportedError,
82
+ configureChains,
83
+ connect,
84
+ createConfig,
85
+ createStorage,
86
+ deepEqual,
87
+ deserialize,
88
+ disconnect,
89
+ erc20ABI,
90
+ erc4626ABI,
91
+ erc721ABI,
92
+ fetchBalance,
93
+ fetchBlockNumber,
94
+ fetchEnsAddress,
95
+ fetchEnsAvatar,
96
+ fetchEnsName,
97
+ fetchEnsResolver,
98
+ fetchFeeData,
99
+ fetchToken,
100
+ fetchTransaction,
101
+ getAccount,
102
+ getConfig,
103
+ getContract,
104
+ getNetwork,
105
+ getPublicClient,
106
+ getUnit,
107
+ getWalletClient,
108
+ getWebSocketPublicClient,
109
+ mainnet,
110
+ multicall,
111
+ noopStorage,
112
+ prepareSendTransaction,
113
+ prepareWriteContract,
114
+ readContract,
115
+ readContracts,
116
+ sendTransaction,
117
+ sepolia,
118
+ serialize,
119
+ signMessage,
120
+ signTypedData,
121
+ switchNetwork,
122
+ waitForTransaction,
123
+ watchAccount,
124
+ watchBlockNumber,
125
+ watchContractEvent,
126
+ watchMulticall,
127
+ watchNetwork,
128
+ watchPendingTransactions,
129
+ watchPublicClient,
130
+ watchReadContract,
131
+ watchReadContracts,
132
+ watchWalletClient,
133
+ watchWebSocketPublicClient,
134
+ writeContract
135
+ };
@@ -1,10 +1,10 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
-
3
-
4
- var _chunkLAFZBYO7js = require('../chunk-LAFZBYO7.js');
5
- require('../chunk-BVC4KGLQ.js');
6
- require('../chunk-MQXBDTVK.js');
7
-
8
-
9
-
10
- exports.getCallParameters = _chunkLAFZBYO7js.getCallParameters; exports.getSendTransactionParameters = _chunkLAFZBYO7js.getSendTransactionParameters;
1
+ import {
2
+ getCallParameters,
3
+ getSendTransactionParameters
4
+ } from "../chunk-LAFZBYO7.js";
5
+ import "../chunk-BVC4KGLQ.js";
6
+ import "../chunk-MQXBDTVK.js";
7
+ export {
8
+ getCallParameters,
9
+ getSendTransactionParameters
10
+ };
@@ -1,36 +1,36 @@
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-LAFZBYO7.js');
3
- require('../chunk-BVC4KGLQ.js');
4
- require('../chunk-EQOEZP46.js');
5
- require('../chunk-KFW652VN.js');
6
- require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-4E64EZ7V.js";
2
+ import "../chunk-LAFZBYO7.js";
3
+ import "../chunk-BVC4KGLQ.js";
4
+ import "../chunk-EQOEZP46.js";
5
+ import "../chunk-KFW652VN.js";
6
+ import "../chunk-MQXBDTVK.js";
7
7
 
8
8
  // test/utils.ts
9
- var _viem = require('viem');
10
-
11
-
12
-
13
-
14
-
15
-
16
-
17
- var _accounts = require('viem/accounts');
18
- var _chains = require('viem/chains');
19
- var _utils = require('viem/utils');
9
+ import { RpcRequestError } from "viem";
10
+ import {
11
+ createPublicClient,
12
+ createWalletClient,
13
+ custom,
14
+ http,
15
+ webSocket
16
+ } from "viem";
17
+ import { privateKeyToAccount } from "viem/accounts";
18
+ import { foundry, goerli, mainnet, optimism, polygon } from "viem/chains";
19
+ import { rpc } from "viem/utils";
20
20
  var foundryMainnet = {
21
- ..._chains.mainnet,
22
- rpcUrls: _chains.foundry.rpcUrls
21
+ ...mainnet,
22
+ rpcUrls: foundry.rpcUrls
23
23
  };
24
- var testChains = [foundryMainnet, _chains.mainnet, _chains.goerli, _chains.optimism, _chains.polygon];
24
+ var testChains = [foundryMainnet, mainnet, goerli, optimism, polygon];
25
25
  function getPublicClient({
26
26
  chains = testChains,
27
27
  chainId
28
28
  } = {}) {
29
- const chain = _nullishCoalesce(chains.find((x) => x.id === chainId), () => ( foundryMainnet));
29
+ const chain = chains.find((x) => x.id === chainId) ?? foundryMainnet;
30
30
  const url = foundryMainnet.rpcUrls.default.http[0];
31
- const publicClient = _viem.createPublicClient.call(void 0, {
31
+ const publicClient = createPublicClient({
32
32
  chain,
33
- transport: _viem.http.call(void 0, url),
33
+ transport: http(url),
34
34
  pollingInterval: 1e3
35
35
  });
36
36
  return Object.assign(publicClient, {
@@ -134,11 +134,11 @@ function getWalletClients() {
134
134
  method,
135
135
  params
136
136
  };
137
- const { result, error } = await _utils.rpc.http(url, {
137
+ const { result, error } = await rpc.http(url, {
138
138
  body
139
139
  });
140
140
  if (error) {
141
- throw new (0, _viem.RpcRequestError)({
141
+ throw new RpcRequestError({
142
142
  body,
143
143
  error,
144
144
  url
@@ -147,14 +147,14 @@ function getWalletClients() {
147
147
  return result;
148
148
  };
149
149
  return accounts.map(
150
- (x) => _viem.createWalletClient.call(void 0, {
151
- account: _accounts.privateKeyToAccount.call(void 0, x.privateKey).address,
150
+ (x) => createWalletClient({
151
+ account: privateKeyToAccount(x.privateKey).address,
152
152
  chain: publicClient.chain,
153
- transport: _viem.custom.call(void 0, publicClient)
153
+ transport: custom(publicClient)
154
154
  })
155
155
  );
156
156
  }
157
-
158
-
159
-
160
- exports.getWalletClients = getWalletClients; exports.testChains = testChains;
157
+ export {
158
+ getWalletClients,
159
+ testChains
160
+ };
@@ -1,12 +1,12 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/providers/alchemy.ts
4
4
  function alchemyProvider({
5
5
  apiKey
6
6
  }) {
7
7
  return function(chain) {
8
- const baseHttpUrl = _optionalChain([chain, 'access', _ => _.rpcUrls, 'access', _2 => _2.alchemy, 'optionalAccess', _3 => _3.http, 'access', _4 => _4[0]]);
9
- const baseWsUrl = _optionalChain([chain, 'access', _5 => _5.rpcUrls, 'access', _6 => _6.alchemy, 'optionalAccess', _7 => _7.webSocket, 'optionalAccess', _8 => _8[0]]);
8
+ const baseHttpUrl = chain.rpcUrls.alchemy?.http[0];
9
+ const baseWsUrl = chain.rpcUrls.alchemy?.webSocket?.[0];
10
10
  if (!baseHttpUrl)
11
11
  return null;
12
12
  return {
@@ -24,6 +24,6 @@ function alchemyProvider({
24
24
  };
25
25
  };
26
26
  }
27
-
28
-
29
- exports.alchemyProvider = alchemyProvider;
27
+ export {
28
+ alchemyProvider
29
+ };
@@ -1,12 +1,12 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true}); 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; }require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/providers/infura.ts
4
4
  function infuraProvider({
5
5
  apiKey
6
6
  }) {
7
7
  return function(chain) {
8
- const baseHttpUrl = _optionalChain([chain, 'access', _ => _.rpcUrls, 'access', _2 => _2.infura, 'optionalAccess', _3 => _3.http, 'access', _4 => _4[0]]);
9
- const baseWsUrl = _optionalChain([chain, 'access', _5 => _5.rpcUrls, 'access', _6 => _6.infura, 'optionalAccess', _7 => _7.webSocket, 'optionalAccess', _8 => _8[0]]);
8
+ const baseHttpUrl = chain.rpcUrls.infura?.http[0];
9
+ const baseWsUrl = chain.rpcUrls.infura?.webSocket?.[0];
10
10
  if (!baseHttpUrl)
11
11
  return null;
12
12
  return {
@@ -24,6 +24,6 @@ function infuraProvider({
24
24
  };
25
25
  };
26
26
  }
27
-
28
-
29
- exports.infuraProvider = infuraProvider;
27
+ export {
28
+ infuraProvider
29
+ };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/providers/jsonRpc.ts
4
4
  function jsonRpcProvider({
@@ -23,6 +23,6 @@ function jsonRpcProvider({
23
23
  };
24
24
  };
25
25
  }
26
-
27
-
28
- exports.jsonRpcProvider = jsonRpcProvider;
26
+ export {
27
+ jsonRpcProvider
28
+ };
@@ -1,4 +1,4 @@
1
- "use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
1
+ import "../chunk-MQXBDTVK.js";
2
2
 
3
3
  // src/providers/public.ts
4
4
  function publicProvider() {
@@ -11,6 +11,6 @@ function publicProvider() {
11
11
  };
12
12
  };
13
13
  }
14
-
15
-
16
- exports.publicProvider = publicProvider;
14
+ export {
15
+ publicProvider
16
+ };
package/dist/window.js CHANGED
@@ -1 +0,0 @@
1
- "use strict";