@latticexyz/entrykit 2.2.22-09ca9d34ea0d53b2e8d007a5fa35dcd624c00bd1 → 2.2.22-1e9047e3056120ed1ab34976aec3df15df13b0e3
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.
|
@@ -189,31 +189,20 @@ function userOpExecutor({ executor }) {
|
|
|
189
189
|
}
|
|
190
190
|
|
|
191
191
|
// src/getBundlerTransport.ts
|
|
192
|
-
import { wiresaw } from "@latticexyz/common/internal";
|
|
193
192
|
function getBundlerTransport(chain) {
|
|
194
193
|
const bundlerHttpUrl = chain.rpcUrls.bundler?.http[0];
|
|
195
|
-
const
|
|
196
|
-
|
|
197
|
-
|
|
194
|
+
const bundlerTransport = bundlerHttpUrl ? http(bundlerHttpUrl) : chain.id === 31337 ? userOpExecutor({
|
|
195
|
+
executor: createClient({
|
|
196
|
+
chain,
|
|
197
|
+
transport: fallback([webSocket(), http()]),
|
|
198
|
+
account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
|
|
199
|
+
pollingInterval: 10
|
|
200
|
+
}).extend(transactionQueue())
|
|
201
|
+
}) : null;
|
|
202
|
+
if (!bundlerTransport) {
|
|
203
|
+
throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
|
|
198
204
|
}
|
|
199
|
-
|
|
200
|
-
if (wiresawHttpUrl) {
|
|
201
|
-
return wiresaw({ wiresaw: http(wiresawHttpUrl), fallbackBundler: http(bundlerHttpUrl) });
|
|
202
|
-
}
|
|
203
|
-
if (bundlerHttpUrl) {
|
|
204
|
-
return http(bundlerHttpUrl);
|
|
205
|
-
}
|
|
206
|
-
if (chain.id === 31337) {
|
|
207
|
-
return userOpExecutor({
|
|
208
|
-
executor: createClient({
|
|
209
|
-
chain,
|
|
210
|
-
transport: fallback([webSocket(), http()]),
|
|
211
|
-
account: privateKeyToAccount(keccak256(stringToHex("local user op executor"))),
|
|
212
|
-
pollingInterval: 10
|
|
213
|
-
}).extend(transactionQueue())
|
|
214
|
-
});
|
|
215
|
-
}
|
|
216
|
-
throw new Error(`Chain ${chain.id} config did not include a bundler RPC URL.`);
|
|
205
|
+
return bundlerTransport;
|
|
217
206
|
}
|
|
218
207
|
|
|
219
208
|
// src/EntryKitConfigProvider.tsx
|