@etherspot/remote-signer
Version:
Etherspot Permissioned Signer SDK - signs the UserOp with SessionKey and sends it to the Bundler
1 lines • 1.32 kB
Source Map (JSON)
{"version":3,"sources":["../../src/sdk/bundler/providers/EtherspotBundler.ts"],"sourcesContent":["import { Exception } from \"../../common\";\nimport { getNetworkConfig } from \"../../network/constants\";\nimport { BundlerProvider } from \"../interface\";\n\nexport class EtherspotBundler implements BundlerProvider {\n readonly url: string;\n readonly apiKey: string;\n readonly chainId: string;\n\n constructor(chainId: number, apiKey?: string, bundlerUrl?: string) {\n if (!bundlerUrl) {\n const networkConfig = getNetworkConfig(chainId);\n if (!networkConfig || networkConfig.bundler == '') throw new Exception('No bundler url provided')\n bundlerUrl = networkConfig.bundler;\n }\n if (apiKey) {\n if (bundlerUrl.includes('?api-key=')) this.url = bundlerUrl + apiKey;\n else this.url = bundlerUrl + '?api-key=' + apiKey;\n }\n else this.url = bundlerUrl;\n this.apiKey = apiKey;\n }\n}"],"mappings":";;;;;;;;AAIO,IAAM,mBAAN,MAAkD;AAAA,EAKvD,YAAY,SAAiB,QAAiB,YAAqB;AACjE,QAAI,CAAC,YAAY;AACf,YAAM,gBAAgB,iBAAiB,OAAO;AAC9C,UAAI,CAAC,iBAAiB,cAAc,WAAW,GAAI,OAAM,IAAI,UAAU,yBAAyB;AAChG,mBAAa,cAAc;AAAA,IAC7B;AACA,QAAI,QAAQ;AACV,UAAI,WAAW,SAAS,WAAW,EAAG,MAAK,MAAM,aAAa;AAAA,UACzD,MAAK,MAAM,aAAa,cAAc;AAAA,IAC7C,MACK,MAAK,MAAM;AAChB,SAAK,SAAS;AAAA,EAChB;AACF;","names":[]}