UNPKG

@etherspot/remote-signer

Version:

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

1 lines 1.68 kB
{"version":3,"sources":["../../src/sdk/base/Bootstrap.ts"],"sourcesContent":["import { encodeFunctionData, parseAbi } from \"viem\";\nimport { modulesAbi } from \"../common/abis\";\n\nexport interface BootstrapConfig {\n module: string;\n data: string;\n}\n\nexport function _makeBootstrapConfig(module: string, data: string): BootstrapConfig {\n const config: BootstrapConfig = {\n module: \"\",\n data: \"\"\n };\n config.module = module;\n const encodedFunctionData = encodeFunctionData({\n functionName: 'onInstall',\n abi: parseAbi(modulesAbi),\n args: [data],\n });\n\n config.data = encodedFunctionData;\n\n return config;\n}\n\nexport function makeBootstrapConfig(module: string, data: string): BootstrapConfig[] {\n const config: BootstrapConfig[] = [];\n const encodedFunctionData = encodeFunctionData({\n functionName: 'onInstall',\n abi: parseAbi(modulesAbi),\n args: [data],\n });\n const newConfig: BootstrapConfig = {\n module: module,\n data: encodedFunctionData\n };\n config.push(newConfig);\n return config;\n}\n"],"mappings":";;;;;;;;;AAQO,SAAS,qBAAqB,QAAgB,MAA+B;AAChF,QAAM,SAA0B;AAAA,IAC5B,QAAQ;AAAA,IACR,MAAM;AAAA,EACV;AACA,SAAO,SAAS;AAChB,QAAM,sBAAsB,mBAAmB;AAAA,IAC3C,cAAc;AAAA,IACd,KAAK,SAAS,UAAU;AAAA,IACxB,MAAM,CAAC,IAAI;AAAA,EACb,CAAC;AAEH,SAAO,OAAO;AAEd,SAAO;AACX;AAEO,SAAS,oBAAoB,QAAgB,MAAiC;AACjF,QAAM,SAA4B,CAAC;AACnC,QAAM,sBAAsB,mBAAmB;AAAA,IAC3C,cAAc;AAAA,IACd,KAAK,SAAS,UAAU;AAAA,IACxB,MAAM,CAAC,IAAI;AAAA,EACb,CAAC;AACH,QAAM,YAA6B;AAAA,IAC/B;AAAA,IACA,MAAM;AAAA,EACV;AACA,SAAO,KAAK,SAAS;AACrB,SAAO;AACX;","names":[]}