@wagmi/core 1.1.0 → 1.1.1-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.
- package/dist/chains.js +193 -193
- package/dist/chunk-BVC4KGLQ.js +8 -8
- package/dist/chunk-EQOEZP46.js +5 -5
- package/dist/chunk-JNJVMJJ2.js +194 -194
- package/dist/chunk-KFW652VN.js +6 -6
- package/dist/chunk-KX4UEHS5.js +1 -0
- package/dist/chunk-MQXBDTVK.js +7 -7
- package/dist/chunk-OKULXQAF.js +231 -231
- package/dist/connectors/coinbaseWallet.js +5 -5
- package/dist/connectors/index.js +9 -9
- package/dist/connectors/injected.js +7 -7
- package/dist/connectors/ledger.js +5 -5
- package/dist/connectors/metaMask.js +5 -5
- package/dist/connectors/mock.js +9 -9
- package/dist/connectors/safe.js +5 -5
- package/dist/connectors/walletConnect.js +5 -5
- package/dist/connectors/walletConnectLegacy.js +5 -5
- package/dist/index.js +136 -136
- package/dist/internal/index.js +10 -10
- package/dist/internal/test.d.ts +4 -4
- package/dist/internal/test.js +50 -40
- package/dist/providers/alchemy.js +6 -6
- package/dist/providers/infura.js +6 -6
- package/dist/providers/jsonRpc.js +4 -4
- package/dist/providers/public.js +4 -4
- package/dist/window.js +1 -0
- package/package.json +6 -7
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
|
|
2
2
|
|
|
3
3
|
// src/connectors/coinbaseWallet.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var _coinbaseWallet = require('@wagmi/connectors/coinbaseWallet');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.CoinbaseWalletConnector = _coinbaseWallet.CoinbaseWalletConnector;
|
package/dist/connectors/index.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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,7 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
|
|
2
2
|
|
|
3
3
|
// src/connectors/ledger.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var _ledger = require('@wagmi/connectors/ledger');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.LedgerConnector = _ledger.LedgerConnector;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
|
|
2
2
|
|
|
3
3
|
// src/connectors/metaMask.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var _metaMask = require('@wagmi/connectors/metaMask');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.MetaMaskConnector = _metaMask.MetaMaskConnector;
|
package/dist/connectors/mock.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
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;
|
package/dist/connectors/safe.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
|
|
2
2
|
|
|
3
3
|
// src/connectors/safe.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var _safe = require('@wagmi/connectors/safe');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.SafeConnector = _safe.SafeConnector;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
|
|
2
2
|
|
|
3
3
|
// src/connectors/walletConnect.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var _walletConnect = require('@wagmi/connectors/walletConnect');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.WalletConnectConnector = _walletConnect.WalletConnectConnector;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-MQXBDTVK.js');
|
|
2
2
|
|
|
3
3
|
// src/connectors/walletConnectLegacy.ts
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
4
|
+
var _walletConnectLegacy = require('@wagmi/connectors/walletConnectLegacy');
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
exports.WalletConnectLegacyConnector = _walletConnectLegacy.WalletConnectLegacyConnector;
|
package/dist/index.js
CHANGED
|
@@ -1,136 +1,136 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
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
|
-
|
|
136
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-KX4UEHS5.js');
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
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
|
+
var _chunkOKULXQAFjs = require('./chunk-OKULXQAF.js');
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
var _chunkJNJVMJJ2js = require('./chunk-JNJVMJJ2.js');
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
var _chunkBVC4KGLQjs = require('./chunk-BVC4KGLQ.js');
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
var _chunkEQOEZP46js = require('./chunk-EQOEZP46.js');
|
|
72
|
+
require('./chunk-MQXBDTVK.js');
|
|
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
|
+
|
|
136
|
+
exports.ChainMismatchError = _chunkOKULXQAFjs.ChainMismatchError; exports.ChainNotConfiguredError = _chunkOKULXQAFjs.ChainNotConfiguredError; exports.Config = _chunkOKULXQAFjs.Config; exports.ConfigChainsNotFound = _chunkOKULXQAFjs.ConfigChainsNotFound; exports.Connector = _chunkBVC4KGLQjs.Connector; exports.ConnectorAlreadyConnectedError = _chunkOKULXQAFjs.ConnectorAlreadyConnectedError; exports.ConnectorNotFoundError = _chunkOKULXQAFjs.ConnectorNotFoundError; exports.InjectedConnector = _chunkEQOEZP46js.InjectedConnector; exports.SwitchChainNotSupportedError = _chunkOKULXQAFjs.SwitchChainNotSupportedError; exports.configureChains = _chunkOKULXQAFjs.configureChains; exports.connect = _chunkOKULXQAFjs.connect; exports.createConfig = _chunkOKULXQAFjs.createConfig; exports.createStorage = _chunkOKULXQAFjs.createStorage; exports.deepEqual = _chunkOKULXQAFjs.deepEqual; exports.deserialize = _chunkOKULXQAFjs.deserialize; exports.disconnect = _chunkOKULXQAFjs.disconnect; exports.erc20ABI = _chunkOKULXQAFjs.erc20ABI; exports.erc4626ABI = _chunkOKULXQAFjs.erc4626ABI; exports.erc721ABI = _chunkOKULXQAFjs.erc721ABI; exports.fetchBalance = _chunkOKULXQAFjs.fetchBalance; exports.fetchBlockNumber = _chunkOKULXQAFjs.fetchBlockNumber; exports.fetchEnsAddress = _chunkOKULXQAFjs.fetchEnsAddress; exports.fetchEnsAvatar = _chunkOKULXQAFjs.fetchEnsAvatar; exports.fetchEnsName = _chunkOKULXQAFjs.fetchEnsName; exports.fetchEnsResolver = _chunkOKULXQAFjs.fetchEnsResolver; exports.fetchFeeData = _chunkOKULXQAFjs.fetchFeeData; exports.fetchToken = _chunkOKULXQAFjs.fetchToken; exports.fetchTransaction = _chunkOKULXQAFjs.fetchTransaction; exports.getAccount = _chunkOKULXQAFjs.getAccount; exports.getConfig = _chunkOKULXQAFjs.getConfig; exports.getContract = _chunkOKULXQAFjs.getContract; exports.getNetwork = _chunkOKULXQAFjs.getNetwork; exports.getPublicClient = _chunkOKULXQAFjs.getPublicClient; exports.getUnit = _chunkOKULXQAFjs.getUnit; exports.getWalletClient = _chunkOKULXQAFjs.getWalletClient; exports.getWebSocketPublicClient = _chunkOKULXQAFjs.getWebSocketPublicClient; exports.mainnet = _chunkJNJVMJJ2js.mainnet; exports.multicall = _chunkOKULXQAFjs.multicall; exports.noopStorage = _chunkOKULXQAFjs.noopStorage; exports.prepareSendTransaction = _chunkOKULXQAFjs.prepareSendTransaction; exports.prepareWriteContract = _chunkOKULXQAFjs.prepareWriteContract; exports.readContract = _chunkOKULXQAFjs.readContract; exports.readContracts = _chunkOKULXQAFjs.readContracts; exports.sendTransaction = _chunkOKULXQAFjs.sendTransaction; exports.sepolia = _chunkJNJVMJJ2js.sepolia; exports.serialize = _chunkOKULXQAFjs.serialize; exports.signMessage = _chunkOKULXQAFjs.signMessage; exports.signTypedData = _chunkOKULXQAFjs.signTypedData; exports.switchNetwork = _chunkOKULXQAFjs.switchNetwork; exports.waitForTransaction = _chunkOKULXQAFjs.waitForTransaction; exports.watchAccount = _chunkOKULXQAFjs.watchAccount; exports.watchBlockNumber = _chunkOKULXQAFjs.watchBlockNumber; exports.watchContractEvent = _chunkOKULXQAFjs.watchContractEvent; exports.watchMulticall = _chunkOKULXQAFjs.watchMulticall; exports.watchNetwork = _chunkOKULXQAFjs.watchNetwork; exports.watchPendingTransactions = _chunkOKULXQAFjs.watchPendingTransactions; exports.watchPublicClient = _chunkOKULXQAFjs.watchPublicClient; exports.watchReadContract = _chunkOKULXQAFjs.watchReadContract; exports.watchReadContracts = _chunkOKULXQAFjs.watchReadContracts; exports.watchWalletClient = _chunkOKULXQAFjs.watchWalletClient; exports.watchWebSocketPublicClient = _chunkOKULXQAFjs.watchWebSocketPublicClient; exports.writeContract = _chunkOKULXQAFjs.writeContract;
|
package/dist/internal/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
var _chunkOKULXQAFjs = require('../chunk-OKULXQAF.js');
|
|
5
|
+
require('../chunk-BVC4KGLQ.js');
|
|
6
|
+
require('../chunk-MQXBDTVK.js');
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
exports.getCallParameters = _chunkOKULXQAFjs.getCallParameters; exports.getSendTransactionParameters = _chunkOKULXQAFjs.getSendTransactionParameters;
|
package/dist/internal/test.d.ts
CHANGED
|
@@ -44,8 +44,8 @@ declare const testChains: (Chain | {
|
|
|
44
44
|
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
45
45
|
};
|
|
46
46
|
readonly ensUniversalResolver: {
|
|
47
|
-
readonly address: "
|
|
48
|
-
readonly blockCreated:
|
|
47
|
+
readonly address: "0x56522D00C410a43BFfDF00a9A569489297385790";
|
|
48
|
+
readonly blockCreated: 8765204;
|
|
49
49
|
};
|
|
50
50
|
readonly multicall3: {
|
|
51
51
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
|
@@ -93,8 +93,8 @@ declare const testChains: (Chain | {
|
|
|
93
93
|
readonly address: "0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";
|
|
94
94
|
};
|
|
95
95
|
readonly ensUniversalResolver: {
|
|
96
|
-
readonly address: "
|
|
97
|
-
readonly blockCreated:
|
|
96
|
+
readonly address: "0xc0497E381f536Be9ce14B0dD3817cBcAe57d2F62";
|
|
97
|
+
readonly blockCreated: 16966585;
|
|
98
98
|
};
|
|
99
99
|
readonly multicall3: {
|
|
100
100
|
readonly address: "0xca11bde05977b3631167028862be2a173976ca11";
|
package/dist/internal/test.js
CHANGED
|
@@ -1,41 +1,42 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } }require('../chunk-KX4UEHS5.js');
|
|
2
|
+
require('../chunk-OKULXQAF.js');
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
var _chunkJNJVMJJ2js = require('../chunk-JNJVMJJ2.js');
|
|
10
|
+
require('../chunk-BVC4KGLQ.js');
|
|
11
|
+
require('../chunk-EQOEZP46.js');
|
|
12
|
+
require('../chunk-KFW652VN.js');
|
|
13
|
+
require('../chunk-MQXBDTVK.js');
|
|
14
14
|
|
|
15
15
|
// test/utils.ts
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
16
|
+
var _viem = require('viem');
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
var _accounts = require('viem/accounts');
|
|
25
|
+
var _utils = require('viem/utils');
|
|
25
26
|
var foundryMainnet = {
|
|
26
|
-
...mainnet,
|
|
27
|
-
rpcUrls: foundry.rpcUrls
|
|
27
|
+
..._chunkJNJVMJJ2js.mainnet,
|
|
28
|
+
rpcUrls: _chunkJNJVMJJ2js.foundry.rpcUrls
|
|
28
29
|
};
|
|
29
|
-
var testChains = [foundryMainnet, mainnet, goerli, optimism, polygon];
|
|
30
|
+
var testChains = [foundryMainnet, _chunkJNJVMJJ2js.mainnet, _chunkJNJVMJJ2js.goerli, _chunkJNJVMJJ2js.optimism, _chunkJNJVMJJ2js.polygon];
|
|
30
31
|
function getPublicClient({
|
|
31
32
|
chains = testChains,
|
|
32
33
|
chainId
|
|
33
34
|
} = {}) {
|
|
34
|
-
const chain = chains.find((x) => x.id === chainId)
|
|
35
|
+
const chain = _nullishCoalesce(chains.find((x) => x.id === chainId), () => ( foundryMainnet));
|
|
35
36
|
const url = foundryMainnet.rpcUrls.default.http[0];
|
|
36
|
-
const publicClient = createPublicClient({
|
|
37
|
+
const publicClient = _viem.createPublicClient.call(void 0, {
|
|
37
38
|
chain,
|
|
38
|
-
transport: http(url),
|
|
39
|
+
transport: _viem.http.call(void 0, url),
|
|
39
40
|
pollingInterval: 1e3
|
|
40
41
|
});
|
|
41
42
|
return Object.assign(publicClient, {
|
|
@@ -134,23 +135,32 @@ function getWalletClients() {
|
|
|
134
135
|
method = "eth_sign";
|
|
135
136
|
params = [params[1], params[0]];
|
|
136
137
|
}
|
|
137
|
-
const
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
138
|
+
const url = foundryMainnet.rpcUrls.default.http[0];
|
|
139
|
+
const body = {
|
|
140
|
+
method,
|
|
141
|
+
params
|
|
142
|
+
};
|
|
143
|
+
const { result, error } = await _utils.rpc.http(url, {
|
|
144
|
+
body
|
|
142
145
|
});
|
|
146
|
+
if (error) {
|
|
147
|
+
throw new (0, _viem.RpcRequestError)({
|
|
148
|
+
body,
|
|
149
|
+
error,
|
|
150
|
+
url
|
|
151
|
+
});
|
|
152
|
+
}
|
|
143
153
|
return result;
|
|
144
154
|
};
|
|
145
155
|
return accounts.map(
|
|
146
|
-
(x) => createWalletClient({
|
|
147
|
-
account: privateKeyToAccount(x.privateKey).address,
|
|
156
|
+
(x) => _viem.createWalletClient.call(void 0, {
|
|
157
|
+
account: _accounts.privateKeyToAccount.call(void 0, x.privateKey).address,
|
|
148
158
|
chain: publicClient.chain,
|
|
149
|
-
transport: custom(publicClient)
|
|
159
|
+
transport: _viem.custom.call(void 0, publicClient)
|
|
150
160
|
})
|
|
151
161
|
);
|
|
152
162
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
163
|
+
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
exports.getWalletClients = getWalletClients; exports.testChains = testChains;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
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');
|
|
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 = chain.rpcUrls.alchemy
|
|
9
|
-
const baseWsUrl = chain.rpcUrls.alchemy
|
|
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]]);
|
|
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
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.alchemyProvider = alchemyProvider;
|
package/dist/providers/infura.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
|
|
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');
|
|
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 = chain.rpcUrls.infura
|
|
9
|
-
const baseWsUrl = chain.rpcUrls.infura
|
|
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]]);
|
|
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
|
-
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
exports.infuraProvider = infuraProvider;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../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
|
-
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
exports.jsonRpcProvider = jsonRpcProvider;
|