{"id":28576869,"url":"https://github.com/ethaccount/sendop","last_synced_at":"2026-03-09T22:03:01.488Z","repository":{"id":276254210,"uuid":"905561483","full_name":"ethaccount/sendop","owner":"ethaccount","description":"ERC-4337 utilities for sending user operations with ethers.js","archived":false,"fork":false,"pushed_at":"2025-09-06T03:56:14.000Z","size":1850,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-06T05:44:04.421Z","etag":null,"topics":["account-abstraction","eip-7702","erc-7579","erc4337","ethereum","ethersjs","smart-account"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ethaccount.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-19T04:44:25.000Z","updated_at":"2025-08-29T01:41:16.000Z","dependencies_parsed_at":"2025-04-17T09:24:30.238Z","dependency_job_id":"89785b85-6dd3-4f3e-bc60-7c191ca35996","html_url":"https://github.com/ethaccount/sendop","commit_stats":null,"previous_names":["johnson86tw/sendop","ethaccount/sendop"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/ethaccount/sendop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethaccount%2Fsendop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethaccount%2Fsendop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethaccount%2Fsendop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethaccount%2Fsendop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ethaccount","download_url":"https://codeload.github.com/ethaccount/sendop/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ethaccount%2Fsendop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30314403,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-09T20:05:46.299Z","status":"ssl_error","status_checked_at":"2026-03-09T19:57:04.425Z","response_time":61,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["account-abstraction","eip-7702","erc-7579","erc4337","ethereum","ethersjs","smart-account"],"created_at":"2025-06-11T00:07:42.682Z","updated_at":"2026-03-09T22:03:01.482Z","avatar_url":"https://github.com/ethaccount.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sendop\n\nA TypeScript library for ERC-4337 account abstraction, making smart contract wallets simple and accessible.\n\nFor usage examples of this library, see [Smart Account Manager](https://github.com/ethaccount/SAManager), an open web wallet built on ERC-4337.\n\n## Features\n\n- **Multiple Account Types**: Support for Kernel, Nexus, Safe7579, and Simple7702 accounts\n- **Modular Accounts**: Full support for ERC-7579 modular account standard\n- **EIP-7702 Support**: Utilities for EIP-7702 and ERC-4337 integration\n- **Flexible Validation**: ECDSA, WebAuthn, and custom validator support\n- **Paymaster Integration**: Public Paymaster and USDC Paymaster support\n- **Multi-Bundler Support**: Works with Alchemy, Pimlico, and other ERC-4337 bundlers\n- **UserOpBuilder**: Intuitive chainable API for constructing user operations\n\n## Installation\n\n```sh\nnpm install ethers sendop\n```\n\n## Quick Start (v0.5.x)\n\n### Deploy a Kernel account and increment the counter\n\n```ts\nimport { getBytes, hexlify, JsonRpcProvider, randomBytes, Wallet } from 'ethers'\nimport { alchemy, pimlico } from 'evm-providers'\nimport {\n\tADDRESS,\n\tERC4337Bundler,\n\tERC4337Error,\n\tfetchGasPricePimlico,\n\tgetECDSAValidator,\n\tgetPublicPaymaster,\n\tINTERFACES,\n\tKernelAccountAPI,\n\tKernelAPI,\n\tSingleEOAValidation,\n\tUserOpBuilder,\n} from 'sendop'\n\nconst { ALCHEMY_API_KEY = '', PIMLICO_API_KEY = '', PRIVATE_KEY = '' } = process.env\n\n// Setup providers\nconst CHAIN_ID = 84532 // Base Sepolia\nconst client = new JsonRpcProvider(alchemy(CHAIN_ID, ALCHEMY_API_KEY))\nconst bundler = new ERC4337Bundler(pimlico(CHAIN_ID, PIMLICO_API_KEY))\n\n// Setup signer and validator\nconst signer = new Wallet(PRIVATE_KEY)\nconst ecdsaValidator = getECDSAValidator({ ownerAddress: signer.address })\n\nconst { accountAddress, factory, factoryData } = await KernelAPI.getDeployment({\n\tclient,\n\tvalidatorAddress: ecdsaValidator.address,\n\tvalidatorData: ecdsaValidator.initData,\n\tsalt: hexlify(randomBytes(32)),\n})\n\n// Create account API\nconst kernelAPI = new KernelAccountAPI({\n\tvalidation: new SingleEOAValidation(),\n\tvalidatorAddress: ecdsaValidator.address,\n})\n\n// Define operations to execute\nconst executions = [\n\t{\n\t\tto: ADDRESS.Counter,\n\t\tvalue: 0n,\n\t\tdata: INTERFACES.Counter.encodeFunctionData('increment'),\n\t},\n]\n\n// Build operation\nconst op = new UserOpBuilder({\n\tchainId: CHAIN_ID,\n\tbundler,\n\tentryPointAddress: kernelAPI.entryPointAddress,\n})\n\t.setSender(accountAddress)\n\t.setFactory({\n\t\tfactory,\n\t\tfactoryData,\n\t})\n\t.setCallData(await kernelAPI.getCallData(executions))\n\t.setNonce(await kernelAPI.getNonce(client, accountAddress))\n\t.setSignature(await kernelAPI.getDummySignature())\n\n// Set paymaster and gas price\nop.setPaymaster(getPublicPaymaster())\nop.setGasPrice(await fetchGasPricePimlico(pimlico(CHAIN_ID, PIMLICO_API_KEY)))\n\n// Estimate gas\nawait op.estimateGas()\n\n// Inspect userop\nconsole.log('op.preview', op.preview())\nconsole.log('op.toRequestParams', op.toRequestParams())\nconsole.log('op.toSendRequest', op.toSendRequest())\nconsole.log('op.encodeHandleOpsDataWithDefaultGas', op.encodeHandleOpsDataWithDefaultGas())\n\n// Sign and send\nconst sig = await signer.signMessage(getBytes(op.hash()))\nop.setSignature(await kernelAPI.formatSignature(sig))\n\ntry {\n\tawait op.send()\n} catch (error) {\n\tif (error instanceof ERC4337Error) {\n\t\tconsole.error('error.message', error.message)\n\t\tconsole.error('error.code', error.code)\n\t\tconsole.error('error.method', error.method)\n\t\tconsole.error('error.payload', error.payload)\n\t\tconsole.error('error.userOp', error.userOp)\n\t}\n\tprocess.exit(1)\n}\n\nconst receipt = await op.wait()\n\nconsole.log('Operation success:', receipt.success)\n```\n\n\n\n### Run Tests\n\n```sh\nbun run test # vitest (recommended)\n\nbun test # bun built-in test; some tests may fail\nbun test -t 'test case'\n```\n\n### Dev Commands\n\n```sh\nbun install\nbun typecheck\nbun run build\nbun run build:contract-types\n```\n\n## License\n\nCopyright (C) 2024-2025 Johnson Chen\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License version 3\nas published by the Free Software Foundation.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethaccount%2Fsendop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fethaccount%2Fsendop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fethaccount%2Fsendop/lists"}