UNPKG

@etherspot/remote-signer

Version:

Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler

27 lines (25 loc) 761 B
import { Exception } from "./chunk-6OZFJI4F.mjs"; import { getNetworkConfig } from "./chunk-NJPIYKQV.mjs"; // src/sdk/bundler/providers/EtherspotBundler.ts var EtherspotBundler = class { constructor(chainId, apiKey, bundlerUrl) { if (!bundlerUrl) { const networkConfig = getNetworkConfig(chainId); if (!networkConfig || networkConfig.bundler == "") throw new Exception("No bundler url provided"); bundlerUrl = networkConfig.bundler; } if (apiKey) { if (bundlerUrl.includes("?api-key=")) this.url = bundlerUrl + apiKey; else this.url = bundlerUrl + "?api-key=" + apiKey; } else this.url = bundlerUrl; this.apiKey = apiKey; } }; export { EtherspotBundler }; //# sourceMappingURL=chunk-DHYNFLYW.mjs.map