@pepu-chain/sdk 0.2.0 → 0.2.1

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.
Files changed (61) hide show
  1. package/README.md +25 -0
  2. package/dist/aa/kernel.cjs +1 -0
  3. package/dist/aa/kernel.guard.js +15 -0
  4. package/dist/aa/react-direct.cjs +4 -3
  5. package/dist/aa/react-direct.guard.js +15 -0
  6. package/dist/aa/react-direct.js +2 -2
  7. package/dist/aa/react.cjs +4 -3
  8. package/dist/aa/react.d.cts +1 -1
  9. package/dist/aa/react.d.ts +1 -1
  10. package/dist/aa/react.guard.js +15 -0
  11. package/dist/aa/react.js +2 -2
  12. package/dist/aa.cjs +9 -9
  13. package/dist/aa.d.cts +1 -1
  14. package/dist/aa.d.ts +1 -1
  15. package/dist/aa.js +2 -2
  16. package/dist/{chunk-MBA4CLA5.js → chunk-7PVR7QSE.js} +3 -3
  17. package/dist/{chunk-MBA4CLA5.js.map → chunk-7PVR7QSE.js.map} +1 -1
  18. package/dist/{chunk-SLW7FRTL.cjs → chunk-BGALSKAF.cjs} +50 -20
  19. package/dist/chunk-BGALSKAF.cjs.map +1 -0
  20. package/dist/{chunk-KIIFL4VM.js → chunk-F2R473FR.js} +41 -11
  21. package/dist/chunk-F2R473FR.js.map +1 -0
  22. package/dist/{chunk-TIEAZYHF.cjs → chunk-K7JSQPZO.cjs} +8 -2
  23. package/dist/chunk-K7JSQPZO.cjs.map +1 -0
  24. package/dist/{chunk-FCXSP2YF.js → chunk-KJYNF5KH.js} +8 -3
  25. package/dist/chunk-KJYNF5KH.js.map +1 -0
  26. package/dist/{chunk-ET3P6TX6.cjs → chunk-RCMKPJZO.cjs} +4 -4
  27. package/dist/{chunk-ET3P6TX6.cjs.map → chunk-RCMKPJZO.cjs.map} +1 -1
  28. package/dist/combo/react.cjs +1 -0
  29. package/dist/combo/react.guard.js +15 -0
  30. package/dist/combo.cjs +4 -3
  31. package/dist/combo.guard.js +15 -0
  32. package/dist/combo.js +2 -2
  33. package/dist/index.cjs +26 -22
  34. package/dist/index.d.cts +2 -2
  35. package/dist/index.d.ts +2 -2
  36. package/dist/index.js +4 -4
  37. package/dist/paymaster.cjs +2 -2
  38. package/dist/paymaster.js +1 -1
  39. package/dist/privy/react.cjs +1 -0
  40. package/dist/privy/react.guard.js +15 -0
  41. package/dist/privy/server.cjs +1 -0
  42. package/dist/privy/server.guard.js +15 -0
  43. package/dist/privy/wagmi.guard.js +15 -0
  44. package/dist/react.cjs +4 -3
  45. package/dist/react.d.cts +1 -1
  46. package/dist/react.d.ts +1 -1
  47. package/dist/react.guard.js +15 -0
  48. package/dist/react.js +2 -2
  49. package/dist/session/kernel.cjs +1 -0
  50. package/dist/session/kernel.guard.js +15 -0
  51. package/dist/session/react.cjs +1 -0
  52. package/dist/session/react.guard.js +15 -0
  53. package/dist/session/server.cjs +1 -0
  54. package/dist/session/server.guard.js +15 -0
  55. package/dist/{status-DwkkOrGQ.d.ts → status-Dx9zAFo9.d.ts} +42 -10
  56. package/dist/{status-CmOsyPmO.d.cts → status-wgTM26V7.d.cts} +42 -10
  57. package/package.json +38 -2
  58. package/dist/chunk-FCXSP2YF.js.map +0 -1
  59. package/dist/chunk-KIIFL4VM.js.map +0 -1
  60. package/dist/chunk-SLW7FRTL.cjs.map +0 -1
  61. package/dist/chunk-TIEAZYHF.cjs.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pepu-chain/sdk",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Chain definitions, contract registry, token list, and viem helpers for Pepe Unchained V2.",
5
5
  "license": "MIT",
6
6
  "author": "Pepe Unchained <contact@pepeunchained.com> (https://pepeunchained.com)",
@@ -26,6 +26,9 @@
26
26
  },
27
27
  "./react": {
28
28
  "types": "./dist/react.d.ts",
29
+ "node": {
30
+ "import": "./dist/react.guard.js"
31
+ },
29
32
  "import": "./dist/react.js",
30
33
  "require": "./dist/react.cjs"
31
34
  },
@@ -36,15 +39,24 @@
36
39
  },
37
40
  "./privy/react": {
38
41
  "types": "./dist/privy/react.d.ts",
42
+ "node": {
43
+ "import": "./dist/privy/react.guard.js"
44
+ },
39
45
  "import": "./dist/privy/react.js",
40
46
  "require": "./dist/privy/react.cjs"
41
47
  },
42
48
  "./privy/wagmi": {
43
49
  "types": "./dist/privy/wagmi.d.ts",
50
+ "node": {
51
+ "import": "./dist/privy/wagmi.guard.js"
52
+ },
44
53
  "import": "./dist/privy/wagmi.js"
45
54
  },
46
55
  "./privy/server": {
47
56
  "types": "./dist/privy/server.d.ts",
57
+ "node": {
58
+ "import": "./dist/privy/server.guard.js"
59
+ },
48
60
  "import": "./dist/privy/server.js",
49
61
  "require": "./dist/privy/server.cjs"
50
62
  },
@@ -55,16 +67,25 @@
55
67
  },
56
68
  "./session/server": {
57
69
  "types": "./dist/session/server.d.ts",
70
+ "node": {
71
+ "import": "./dist/session/server.guard.js"
72
+ },
58
73
  "import": "./dist/session/server.js",
59
74
  "require": "./dist/session/server.cjs"
60
75
  },
61
76
  "./session/react": {
62
77
  "types": "./dist/session/react.d.ts",
78
+ "node": {
79
+ "import": "./dist/session/react.guard.js"
80
+ },
63
81
  "import": "./dist/session/react.js",
64
82
  "require": "./dist/session/react.cjs"
65
83
  },
66
84
  "./session/kernel": {
67
85
  "types": "./dist/session/kernel.d.ts",
86
+ "node": {
87
+ "import": "./dist/session/kernel.guard.js"
88
+ },
68
89
  "import": "./dist/session/kernel.js",
69
90
  "require": "./dist/session/kernel.cjs"
70
91
  },
@@ -75,16 +96,25 @@
75
96
  },
76
97
  "./aa/kernel": {
77
98
  "types": "./dist/aa/kernel.d.ts",
99
+ "node": {
100
+ "import": "./dist/aa/kernel.guard.js"
101
+ },
78
102
  "import": "./dist/aa/kernel.js",
79
103
  "require": "./dist/aa/kernel.cjs"
80
104
  },
81
105
  "./aa/react": {
82
106
  "types": "./dist/aa/react.d.ts",
107
+ "node": {
108
+ "import": "./dist/aa/react.guard.js"
109
+ },
83
110
  "import": "./dist/aa/react.js",
84
111
  "require": "./dist/aa/react.cjs"
85
112
  },
86
113
  "./aa/react-direct": {
87
114
  "types": "./dist/aa/react-direct.d.ts",
115
+ "node": {
116
+ "import": "./dist/aa/react-direct.guard.js"
117
+ },
88
118
  "import": "./dist/aa/react-direct.js",
89
119
  "require": "./dist/aa/react-direct.cjs"
90
120
  },
@@ -100,11 +130,17 @@
100
130
  },
101
131
  "./combo": {
102
132
  "types": "./dist/combo.d.ts",
133
+ "node": {
134
+ "import": "./dist/combo.guard.js"
135
+ },
103
136
  "import": "./dist/combo.js",
104
137
  "require": "./dist/combo.cjs"
105
138
  },
106
139
  "./combo/react": {
107
140
  "types": "./dist/combo/react.d.ts",
141
+ "node": {
142
+ "import": "./dist/combo/react.guard.js"
143
+ },
108
144
  "import": "./dist/combo/react.js",
109
145
  "require": "./dist/combo/react.cjs"
110
146
  },
@@ -203,7 +239,7 @@
203
239
  "access": "public"
204
240
  },
205
241
  "scripts": {
206
- "build": "tsup && node scripts/prune-esm-only.mjs",
242
+ "build": "tsup && node scripts/prune-esm-only.mjs && node scripts/guard-peers.mjs",
207
243
  "typecheck": "tsc --noEmit",
208
244
  "test": "vitest run",
209
245
  "live-check": "node scripts/live-check.mjs",
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/contracts.ts"],"names":[],"mappings":";;;AAwEA,IAAM,yBAAA,GACJ,oYAAA;AAOF,IAAM,wBAAA,GACJ,ufAAA;AASF,IAAM,aAAA,GACJ,+GAAA;AAGF,IAAM,sBAAA,GACJ,2MAAA;AAIF,IAAM,qBAAA,GACJ,oeAAA;AAQF,IAAM,uBAAA,GACJ,yjBAAA;AASF,IAAM,WAAA,GAAc,YAAA;AAGpB,IAAM,wBAAA,GAA2B,YAAA;AAEjC,IAAM,oBACJ,aAAA,GACA,0IAAA;AAGF,IAAM,cAAA,GACJ,iFAAA;AAEF,IAAM,kBAAA,GACJ,saAAA;AAMF,IAAM,kBAAA,G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c,OAAO,CAAA,GAAI,IAAI,CAAA;AACtC;AAGO,SAAS,cACd,OAAA,EAC0B;AAC1B,EAAA,MAAM,QAAA,GAAW,cAAc,OAAO,CAAA;AACtC,EAAA,OAAO,QAAA,GAAW,MAAA,CAAO,MAAA,CAAO,QAAQ,IAAI,EAAC;AAC/C;AAGO,SAAS,WACd,KAAA,EAC2B;AAC3B,EAAA,OAAO,OAAO,MAAA,KAAW,UAAA;AAC3B;AA2BO,SAAS,gBAAA,CAAiB,OAAA,GAAkB,WAAA,CAAY,EAAA,EAA+B;AAC5F,EAAA,MAAM,QAAA,GAAW,cAAc,OAAO,CAAA;AACtC,EAAA,IAAI,CAAC,QAAA,EAAU,OAAO,EAAC;AACvB,EAAA,OAAQ,OAAO,IAAA,CAAK,QAAQ,CAAA,CAAyB,GAAA,CAAI,CAAC,GAAA,KAAwB;AAChF,IAAA,MAAM,CAAA,GAAI,SAAS,GAAG,CAAA;AACtB,IAAA,OAAO,CAAA,CAAE,WAAW,UAAA,GAChB;AAAA,MACE,GAAA;AAAA,MACA,MAAM,CAAA,CAAE,IAAA;AAAA,MACR,MAAA,EAAQ,UAAA;AAAA,MACR,SAAS,CAAA,CAAE,OAAA;AAAA,MACX,GAAI,EAAE,UAAA,GAAa,EAAE,YAAY,CAAA,CAAE,UAAA,KAAe,EAAC;AAAA,MACnD,GAAI,CAAA,CAAE,OAAA,GAAU,EAAE,OAAA,EAAS,IAAA,KAAkB,EAAC;AAAA,MAC9C,IAAA,EAAM,EAAE,KAAA,IAAS;AAAA,KACnB,GACA,EAAE,GAAA,EAAK,IAAA,EAAM,CAAA,CAAE,MAAM,MAAA,EAAQ,SAAA,EAAW,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO;AAAA,EAC7D,CAAC,CAAA;AACH","file":"chunk-FCXSP2YF.js","sourcesContent":["import type { Address } from \"viem\";\n\nimport { pepuMainnet, pepuTestnet } from \"./chains.js\";\n\n/**\n * Canonical keys for contracts tracked by this registry. Adding a new key\n * here (and a corresponding entry per chain below) is not a breaking\n * change for consumers that read the registry through {@link getContract}\n * or {@link listContracts}.\n */\nexport type PepuContractName =\n | \"create2Factory\"\n | \"multicall3\"\n | \"permit2\"\n | \"entryPoint06\"\n | \"entryPoint07\"\n | \"kernelFactory\"\n | \"kernelMetaFactory\"\n | \"ecdsaValidator\"\n | \"paymaster\"\n | \"kernelImplementation\"\n | \"kernelEcdsaSignerModule\"\n | \"kernelCallPolicyV004\"\n | \"kernelTimestampPolicy\"\n | \"tapScore\"\n | \"paymasterV1\"\n | \"paymasterV2\";\n\n/** A contract that is confirmed live on-chain at `address`. */\nexport interface DeployedContract {\n readonly status: \"deployed\";\n /** Human-readable name, for logging/UI. */\n readonly name: string;\n /** Verified contract address. */\n readonly address: Address;\n /** Optional short note, e.g. how the address was verified. */\n readonly notes?: string;\n /**\n * ISO date (YYYY-MM-DD) on which the address was last confirmed to have\n * bytecode via `eth_getCode` against the PEPU mainnet RPC. Re-run\n * `node packages/sdk/scripts/live-check.mjs` to refresh.\n */\n readonly verifiedAt?: string;\n /**\n * True when the contract still has bytecode but must not be used (for example\n * the v1 paymaster, whose EntryPoint deposit was withdrawn). Never route new\n * work to a retired contract.\n */\n readonly retired?: true;\n}\n\n/**\n * A contract that is not yet deployed on this chain. Deliberately has no\n * `address` field — callers must not be able to accidentally read a\n * placeholder value and treat it as real. Use {@link getContract} /\n * {@link isDeployed} to narrow before reading an address.\n */\nexport interface PendingContract {\n readonly status: \"pending\";\n /** Human-readable name, for logging/UI. */\n readonly name: string;\n /** Why this contract has no verified address yet. */\n readonly reason: string;\n}\n\nexport type ContractEntry = DeployedContract | PendingContract;\n\n/** Per-chain contract catalog, keyed by {@link PepuContractName}. */\nexport type PepuContractRegistry = Readonly<\n Record<PepuContractName, ContractEntry>\n>;\n\nconst MULTICALL3_PENDING_REASON =\n \"Canonical Multicall3 (0xcA11bde05977b3631167028862bE2a173976CA11) was \" +\n \"deployed elsewhere via a pre-signed CREATE transaction with a \" +\n \"1,000,000 gas limit. This Arbitrum Nitro chain needs ~14.3M gas to \" +\n \"deploy the same bytecode, so that transaction cannot execute here and \" +\n \"the canonical address is unreachable. A PEPU-specific deployment is \" +\n \"pending; do not substitute the canonical address.\";\n\nconst MULTICALL3_MAINNET_NOTES =\n \"PEPU-specific deployment. NOT at the canonical Multicall3 address, \" +\n \"which is unreachable on this Nitro chain (the canonical pre-signed \" +\n \"CREATE tx carries a 1,000,000 gas limit; this bytecode needs ~14.3M). \" +\n \"Deployed from canonical mds1/multicall3 source (solc 0.8.12, optimizer \" +\n \"10,000,000 runs) via the CREATE2 deterministic deployer with a zero \" +\n \"salt, so the same source reproduces this address on any chain that has \" +\n \"that deployer. Verified on pepuscan. viem/wagmi multicall confirmed \" +\n \"working against it.\";\n\nconst ZERODEV_NOTES =\n \"Deployed by ZeroDev's one-click Conduit Marketplace integration \" +\n \"(mainnet only — not present on testnet).\";\n\nconst PERMIT2_PENDING_REASON =\n \"Not yet deployed on this chain. The CREATE2 deterministic deployer \" +\n \"needed to reproduce Permit2's canonical address is live, so this is \" +\n \"unblocked, but no deployment has happened (and been verified) yet.\";\n\nconst PERMIT2_MAINNET_NOTES =\n \"Deployed at the canonical Permit2 address via the CREATE2 deterministic \" +\n \"deployer, same as on every other chain that has it. Verified live \" +\n \"2026-09-24 via eth_getCode (9,152 bytes, matching Permit2's known \" +\n \"bytecode size) plus a successful DOMAIN_SEPARATOR() eth_call. This is \" +\n \"the canonical Permit2 — do not confuse it with PepuSwap's own separate \" +\n \"Permit2 deployment at pepuSwapContracts.permit2NonCanonical in ./dex.js, \" +\n \"which predates this one and is not interchangeable with it.\";\n\nconst PAYMASTER_MAINNET_NOTES =\n \"Alias of `paymasterV2`: the tiered PepuSponsoredPaymasterV7 canary (0xdb28...C30D), deployed \" +\n \"around block 10537341 and funded in small tranches. Internally reviewed 3x, external audit \" +\n \"pending. Owner 0x5966dFaB11c8AEe767e0739083417D02f4a634A1, manager \" +\n \"0x063Ab6C16c38D19A4bC76E7c39A4A0A73afCaBb0. The free pool was seeded with 300 PEPU; free-tier \" +\n \"destinations are TapScore only for now. It sponsors only through the hosted policy service \" +\n \"(paymaster.pepeunchained.com) with the hosted bundler (bundler.pepeunchained.com). The v1 \" +\n \"paymaster is retired (see `paymasterV1`).\";\n\n/** Date the mainnet addresses below were last checked with eth_getCode. */\nconst VERIFIED_AT = \"2026-10-02\";\n\n/** Date the v2 paymaster canary was verified live (deployment record: deploy-receipt-v2.json). */\nconst PAYMASTER_V2_VERIFIED_AT = \"2026-10-14\";\n\nconst KERNEL_IMPL_NOTES =\n ZERODEV_NOTES +\n \" Kernel v3.1 implementation that kernelFactory.implementation() resolves to; \" +\n \"same address ZeroDev uses on every chain with this version.\";\n\nconst TAPSCORE_NOTES =\n \"TapScore demo contract used by the game-app template. Verified via eth_getCode.\";\n\nconst PAYMASTER_V1_NOTES =\n \"RETIRED. The project's first verifying paymaster (PepuVerifyingPaymasterV7). Its EntryPoint \" +\n \"deposit was withdrawn (deposit is 0), so it cannot sponsor anything. The contract still has \" +\n \"bytecode; do not deposit to it or route new work to it. Superseded by `paymasterV2`. A real \" +\n \"sponsored operation ran through the hosted URLs on v1 before retirement (tx \" +\n \"0x57cf2f5a332248476d775c096b4b8339d81867c14211ed3bc4fcb1895dff0f9f).\";\n\nconst PAYMASTER_V2_NOTES =\n \"PepuSponsoredPaymasterV7 (v2), deployed on PEPU mainnet as a canary around block 10537341: \" +\n \"internally reviewed 3x, external audit pending, funded in small tranches. Owner \" +\n \"0x5966dFaB11c8AEe767e0739083417D02f4a634A1, manager 0x063Ab6C16c38D19A4bC76E7c39A4A0A73afCaBb0. \" +\n \"Free pool seeded with 300 PEPU; free-tier destinations are TapScore only for now. Free tier per \" +\n \"user is 100 PEPU/day and 50 PEPU/hour, enforced by the policy service; beyond that a dApp \" +\n \"deposits into its own project. Record: services/paymaster/contracts/deployed-address-v2.txt.\";\n\nconst PAYMASTER_TESTNET_PENDING_REASON =\n \"No paymaster (or any other ERC-4337 infrastructure) has been deployed to testnet — see \" +\n \"TESTNET_AA_PENDING_REASON. The mainnet paymaster is a project-specific deployment, not \" +\n \"something that would appear on testnet by default even once the rest of the AA stack does.\";\n\nconst TESTNET_AA_PENDING_REASON =\n \"Account-abstraction contracts were deployed on mainnet (97741) only, \" +\n \"via ZeroDev's Conduit Marketplace integration. Nothing has been \" +\n \"deployed to testnet, and testnet is currently out of scope (no faucet \" +\n \"exists, so it cannot be funded without bridging).\";\n\n/**\n * Contract registry, keyed by chain id. Tracked as independent per-chain\n * entries because deployments happen per-chain and have already diverged:\n * mainnet has the CREATE2 deployer, a PEPU-specific Multicall3, the\n * canonical Permit2, the full ZeroDev Kernel v3 AA stack (EntryPoint\n * v0.6/v0.7, Kernel factory/meta-factory, ECDSA validator), and a\n * project-deployed, funded verifying paymaster. Testnet has only the\n * CREATE2 deployer — everything else is `status: \"pending\"` because\n * testnet is out of scope for this package (no faucet exists to fund\n * verification there).\n *\n * Note on the paymaster specifically: `status: \"deployed\"` here means the\n * contract has live bytecode and a real EntryPoint deposit — it does NOT\n * mean gas sponsorship is usable by an application. See\n * `getSponsorshipStatus` in `./aa/status.js`, which is the single source of\n * truth for that separate question.\n */\nexport const pepuContracts: Readonly<\n Record<number, PepuContractRegistry>\n> = {\n [pepuMainnet.id]: {\n create2Factory: {\n status: \"deployed\",\n name: \"CREATE2 Deterministic Deployer\",\n address: \"0x4e59b44847b379578588920cA78FbF26c0B4956C\",\n verifiedAt: VERIFIED_AT,\n notes: \"Standard Nick's-method deterministic deployer.\",\n },\n multicall3: {\n status: \"deployed\",\n name: \"Multicall3\",\n address: \"0x9CE19273Ae9c24437DFF512E8DFCAed4E4B001bd\",\n verifiedAt: VERIFIED_AT,\n notes: MULTICALL3_MAINNET_NOTES,\n },\n permit2: {\n status: \"deployed\",\n name: \"Permit2\",\n address: \"0x000000000022D473030F116dDEE9F6B43aC78BA3\",\n verifiedAt: VERIFIED_AT,\n notes: PERMIT2_MAINNET_NOTES,\n },\n entryPoint06: {\n status: \"deployed\",\n name: \"ERC-4337 EntryPoint v0.6\",\n address: \"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" At the canonical v0.6 address.\",\n },\n entryPoint07: {\n status: \"deployed\",\n name: \"ERC-4337 EntryPoint v0.7\",\n address: \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\",\n verifiedAt: VERIFIED_AT,\n notes:\n ZERODEV_NOTES +\n \" At the canonical v0.7 address; getNonce/balanceOf confirmed live.\",\n },\n kernelFactory: {\n status: \"deployed\",\n name: \"Kernel v3 Account Factory\",\n address: \"0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES,\n },\n kernelMetaFactory: {\n status: \"deployed\",\n name: \"Kernel MetaFactory\",\n address: \"0xd703aaE79538628d27099B8c4f621bE4CCd142d5\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES,\n },\n ecdsaValidator: {\n status: \"deployed\",\n name: \"Kernel ECDSA Validator\",\n address: \"0x845ADb2C711129d4f3966735eD98a9F09fC4cE57\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES,\n },\n paymaster: {\n status: \"deployed\",\n name: \"Sponsored Paymaster v2 (PepuSponsoredPaymasterV7, alias of paymasterV2)\",\n address: \"0xdb28528C9399C33c9A0297E8A62F39145acbC30D\",\n verifiedAt: PAYMASTER_V2_VERIFIED_AT,\n notes: PAYMASTER_MAINNET_NOTES,\n },\n kernelImplementation: {\n status: \"deployed\",\n name: \"Kernel v3.1 Implementation\",\n address: \"0xbAC849bB641841b44E965fb01A4Bf5F074F84B4d\",\n verifiedAt: VERIFIED_AT,\n notes: KERNEL_IMPL_NOTES,\n },\n kernelEcdsaSignerModule: {\n status: \"deployed\",\n name: \"Kernel ECDSA Signer (permission signer module)\",\n address: \"0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" Used as the signer in permission-validator session keys.\",\n },\n kernelCallPolicyV004: {\n status: \"deployed\",\n name: \"ZeroDev Call Policy v0.0.4\",\n address: \"0x9a52283276A0ec8740DF50bF01B28A80D880eaf2\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" Scopes a session key to specific targets and selectors.\",\n },\n kernelTimestampPolicy: {\n status: \"deployed\",\n name: \"ZeroDev Timestamp Policy\",\n address: \"0xB9f8f524bE6EcD8C945b1b87f9ae5C192FdCE20F\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" Bounds a session key to a validity window.\",\n },\n tapScore: {\n status: \"deployed\",\n name: \"TapScore\",\n address: \"0x261eA5971B93237a56990206A46Bc80318e4d078\",\n verifiedAt: VERIFIED_AT,\n notes: TAPSCORE_NOTES,\n },\n paymasterV1: {\n status: \"deployed\",\n name: \"Verifying Paymaster v1 (PepuVerifyingPaymasterV7) - RETIRED\",\n address: \"0x2B6FED323bFA24f0475f4e1Dd3C7F6Cc1f3ae8B0\",\n verifiedAt: VERIFIED_AT,\n retired: true,\n notes: PAYMASTER_V1_NOTES,\n },\n paymasterV2: {\n status: \"deployed\",\n name: \"Sponsored Paymaster v2 (PepuSponsoredPaymasterV7), canary\",\n address: \"0xdb28528C9399C33c9A0297E8A62F39145acbC30D\",\n verifiedAt: PAYMASTER_V2_VERIFIED_AT,\n notes: PAYMASTER_V2_NOTES,\n },\n },\n [pepuTestnet.id]: {\n create2Factory: {\n status: \"deployed\",\n name: \"CREATE2 Deterministic Deployer\",\n address: \"0x4e59b44847b379578588920cA78FbF26c0B4956C\",\n notes: \"Standard Nick's-method deterministic deployer.\",\n },\n multicall3: {\n status: \"pending\",\n name: \"Multicall3\",\n reason: MULTICALL3_PENDING_REASON,\n },\n permit2: {\n status: \"pending\",\n name: \"Permit2\",\n reason: PERMIT2_PENDING_REASON,\n },\n entryPoint06: {\n status: \"pending\",\n name: \"ERC-4337 EntryPoint v0.6\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n entryPoint07: {\n status: \"pending\",\n name: \"ERC-4337 EntryPoint v0.7\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n kernelFactory: {\n status: \"pending\",\n name: \"Kernel v3 Account Factory\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n kernelMetaFactory: {\n status: \"pending\",\n name: \"Kernel MetaFactory\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n ecdsaValidator: {\n status: \"pending\",\n name: \"Kernel ECDSA Validator\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n paymaster: {\n status: \"pending\",\n name: \"Verifying Paymaster (PepuVerifyingPaymasterV7)\",\n reason: PAYMASTER_TESTNET_PENDING_REASON,\n },\n kernelImplementation: { status: \"pending\", name: \"Kernel v3.1 Implementation\", reason: TESTNET_AA_PENDING_REASON },\n kernelEcdsaSignerModule: { status: \"pending\", name: \"Kernel ECDSA Signer (permission signer module)\", reason: TESTNET_AA_PENDING_REASON },\n kernelCallPolicyV004: { status: \"pending\", name: \"ZeroDev Call Policy v0.0.4\", reason: TESTNET_AA_PENDING_REASON },\n kernelTimestampPolicy: { status: \"pending\", name: \"ZeroDev Timestamp Policy\", reason: TESTNET_AA_PENDING_REASON },\n tapScore: { status: \"pending\", name: \"TapScore\", reason: \"Deployed on mainnet only.\" },\n paymasterV1: { status: \"pending\", name: \"Verifying Paymaster v1 (PepuVerifyingPaymasterV7)\", reason: PAYMASTER_TESTNET_PENDING_REASON },\n paymasterV2: { status: \"pending\", name: \"Verifying Paymaster v2\", reason: PAYMASTER_TESTNET_PENDING_REASON },\n },\n};\n\n/** Look up one contract entry for a chain id. Returns `undefined` if the chain isn't in the registry. */\nexport function getContract(\n chainId: number,\n name: PepuContractName,\n): ContractEntry | undefined {\n return pepuContracts[chainId]?.[name];\n}\n\n/** List all tracked contract entries for a chain id, in registry order. */\nexport function listContracts(\n chainId: number,\n): readonly ContractEntry[] {\n const registry = pepuContracts[chainId];\n return registry ? Object.values(registry) : [];\n}\n\n/** Narrow a {@link ContractEntry} to {@link DeployedContract}. */\nexport function isDeployed(\n entry: ContractEntry | undefined,\n): entry is DeployedContract {\n return entry?.status === \"deployed\";\n}\n\n/** One row of the address table returned by {@link getPepuAddresses}. */\nexport interface PepuAddressRow {\n readonly key: PepuContractName;\n readonly name: string;\n readonly status: \"deployed\" | \"pending\";\n /** Present only when `status` is `\"deployed\"`. */\n readonly address?: Address;\n /** ISO date of the last `eth_getCode` check, when known. */\n readonly verifiedAt?: string;\n /** True for a deployed contract that is retired and must not be used (the v1 paymaster). */\n readonly retired?: true;\n /** Notes (deployed) or reason (pending). */\n readonly note: string;\n}\n\n/**\n * The full supporting-contract table for a chain, flattened for docs and\n * MCP rendering. Pending entries carry no `address`.\n *\n * @example\n * ```ts\n * const rows = getPepuAddresses(); // mainnet by default\n * const live = rows.filter((r) => r.status === \"deployed\");\n * ```\n */\nexport function getPepuAddresses(chainId: number = pepuMainnet.id): readonly PepuAddressRow[] {\n const registry = pepuContracts[chainId];\n if (!registry) return [];\n return (Object.keys(registry) as PepuContractName[]).map((key): PepuAddressRow => {\n const e = registry[key];\n return e.status === \"deployed\"\n ? {\n key,\n name: e.name,\n status: \"deployed\",\n address: e.address,\n ...(e.verifiedAt ? { verifiedAt: e.verifiedAt } : {}),\n ...(e.retired ? { retired: true as const } : {}),\n note: e.notes ?? \"\",\n }\n : { key, name: e.name, status: \"pending\", note: e.reason };\n });\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/abi/kernelFactory.ts","../src/abi/entryPointV07.ts","../src/aa/probes.ts","../src/aa/status.ts"],"names":["parseAbi"],"mappings":";;;;;;;AA6BO,IAAM,mBAAmB,QAAA,CAAS;AAAA,EACvC,kDAAA;AAAA,EACA,+EAAA;AAAA,EACA;AACF,CAAC;AAOM,IAAM,kCAAA,GACX;ACdK,IAAM,mBAAmBA,QAAAA,CAAS;AAAA,EACvC,6EAAA;AAA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;AAAA,GACF;AACF","file":"chunk-KIIFL4VM.js","sourcesContent":["import { parseAbi } from \"viem\";\n\n/**\n * ZeroDev Kernel v3 account factory ABI, at\n * `0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419` (deployed on PEPU mainnet\n * only; see `pepuContracts.kernelFactory` in `../contracts.js`).\n *\n * Verified live against mainnet 2026-09-24 via `eth_call`:\n * - `implementation()` returns `0xbAC849bB641841b44E965fb01A4Bf5F074F84B4d` —\n * ZeroDev's Kernel v3.1 singleton implementation address, deployed at the\n * same address on every chain that has it via CREATE2.\n * - `getAddress(bytes,bytes32)`, called with empty `data` and a zero salt,\n * returns a computed address without reverting.\n * - `createAccount(bytes,bytes32)`, simulated (not sent) with the same\n * empty `data` and zero salt via `eth_call`, returns the **same** address\n * `getAddress` computed for those inputs — exactly the counterfactual-\n * address behavior a CREATE2 account factory is supposed to have.\n *\n * What this package does NOT ship: a helper that encodes the `data`\n * argument (Kernel v3.1's `initialize(...)` calldata — root validator,\n * hook, validator data, hook data, init config). No account has ever been\n * created through this factory on PEPU yet (its transaction history is\n * empty as of the verification date above), so there was nothing on-chain\n * to check a hand-rolled encoding against, and guessing one here would be\n * exactly the kind of invented byte layout this package's rules forbid.\n * Use ZeroDev's own `@zerodev/sdk` (or the public Kernel contracts source)\n * to build that payload, then pass the resulting bytes into\n * `getAddress`/`createAccount` from this ABI.\n */\nexport const kernelFactoryAbi = parseAbi([\n \"function implementation() view returns (address)\",\n \"function getAddress(bytes calldata data, bytes32 salt) view returns (address)\",\n \"function createAccount(bytes calldata data, bytes32 salt) payable returns (address)\",\n]);\n\n/**\n * The verified Kernel v3.1 singleton implementation address that\n * `kernelFactoryAbi`'s `implementation()` resolves to on PEPU mainnet. Same\n * address ZeroDev uses across every chain that has this Kernel version.\n */\nexport const KERNEL_V3_1_IMPLEMENTATION_ADDRESS =\n \"0xbAC849bB641841b44E965fb01A4Bf5F074F84B4d\" as const;\n","import { parseAbi } from \"viem\";\n\n/**\n * ERC-4337 EntryPoint v0.7 ABI — the subset a dapp actually needs to manage\n * a smart account's gas deposit and read its nonce, at the canonical address\n * `0x0000000071727De22E5E9d8BAf0edAc6f37da032` (deployed on PEPU mainnet\n * only; see `pepuContracts.entryPoint07` in `../contracts.js`).\n *\n * This is NOT the full `IEntryPoint` interface (no `handleOps`,\n * `simulateValidation`, etc.) — those are normally called by a bundler, and\n * PEPU has no publicly hosted bundler yet (see `getSponsorshipStatus` in\n * `../aa/status.js`). This ABI only covers deposit/nonce management, which works\n * today with a plain viem wallet client and no bundler at all.\n *\n * Verified live against mainnet 2026-09-24 via `eth_call`:\n * - `getNonce(address,uint192)` for the zero address/key returns `0`.\n * - `balanceOf(address)` for the zero address returns `0`.\n * - `getDepositInfo(address)` for the zero address returns a 5-word\n * (all-zero) tuple, matching the v0.7 `DepositInfo` struct shape\n * `(uint256 deposit, bool staked, uint96 stake, uint32 unstakeDelaySec,\n * uint48 withdrawTime)` field-for-field.\n * `depositTo`/`withdrawTo` share the same `IStakeManager` interface as the\n * verified `getDepositInfo`/`balanceOf` pair and are standard across every\n * EntryPoint version; they were not separately simulated (both mutate\n * state, and simulating a withdrawal from an empty deposit would only prove\n * it reverts, not that it works).\n */\nexport const entryPointV07Abi = parseAbi([\n \"function getNonce(address sender, uint192 key) view returns (uint256 nonce)\",\n \"function balanceOf(address account) view returns (uint256)\",\n \"function depositTo(address account) payable\",\n \"function withdrawTo(address payable withdrawAddress, uint256 withdrawAmount)\",\n \"function getDepositInfo(address account) view returns ((uint256 deposit, bool staked, uint96 stake, uint32 unstakeDelaySec, uint48 withdrawTime) info)\",\n \"event Deposited(address indexed account, uint256 totalDeposit)\",\n \"event Withdrawn(address indexed account, address withdrawAddress, uint256 amount)\",\n]);\n","import type { Address, PublicClient } from \"viem\";\n\nimport { entryPointV07Abi } from \"../abi/entryPointV07.js\";\nimport { pepuMainnet } from \"../chains.js\";\nimport { getContract } from \"../contracts.js\";\nimport { PepuBundlerError, PepuConfigError } from \"../errors.js\";\nimport { redactSecrets } from \"./describe.js\";\n\n/** Minimal fetch signature, so tests and non-browser hosts can inject one. */\nexport type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;\n\nexport interface ProbeOptions {\n fetch?: FetchLike;\n /** Per-request timeout. Default 8000. */\n timeoutMs?: number;\n}\n\nexport interface BundlerProbeResult {\n ok: boolean;\n chainId?: number;\n entryPoints?: Address[];\n /** `true` when the method exists (any answer but \"method not found\"). */\n supportedMethods?: Record<string, boolean>;\n latencyMs: number;\n error?: PepuBundlerError;\n}\n\nexport interface PaymasterProbeResult {\n ok: boolean;\n /** `GET <origin>/health` answered `{ status: \"ok\" }`. */\n health?: boolean;\n /** Body of `GET <origin>/v2/free-tier` when the service exposes it. */\n freeTier?: unknown;\n /**\n * The URL answered a `pm_getPaymasterStubData` call with a stub result. A\n * JSON-RPC denial (no credential, unknown sender) is NOT a stub result:\n * the endpoint is alive and speaks ERC-7677, but the probe has no\n * credential, so this stays `false`.\n */\n erc7677StubOk?: boolean;\n latencyMs: number;\n error?: PepuBundlerError;\n}\n\nconst BUNDLER_METHODS = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"pimlico_getUserOperationGasPrice\",\n \"zd_getUserOperationGasPrice\",\n] as const;\n\nconst METHOD_NOT_FOUND = -32601;\n\nfunction hostOf(url: string): string {\n try {\n return new URL(url).host;\n } catch {\n return \"the configured host\";\n }\n}\n\nfunction checkUrl(url: string, label: string): void {\n let u: URL;\n try {\n u = new URL(url);\n } catch {\n throw new PepuConfigError(\"CONFIG_BAD_URL\", `${label} is not a valid URL.`);\n }\n if (u.protocol !== \"http:\" && u.protocol !== \"https:\") {\n throw new PepuConfigError(\"CONFIG_BAD_URL\", `${label} must be an http(s) URL.`);\n }\n}\n\nasync function timedFetch(f: FetchLike, url: string, init: RequestInit, timeoutMs: number): Promise<Response> {\n const ctl = new AbortController();\n const t = setTimeout(() => ctl.abort(), timeoutMs);\n try {\n return await f(url, { ...init, signal: ctl.signal });\n } finally {\n clearTimeout(t);\n }\n}\n\ninterface RpcReply {\n result?: unknown;\n error?: { code?: number; message?: string; data?: unknown };\n}\n\nasync function rpc(f: FetchLike, url: string, method: string, params: unknown[], timeoutMs: number): Promise<RpcReply> {\n const res = await timedFetch(\n f,\n url,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({ jsonrpc: \"2.0\", id: 1, method, params }),\n },\n timeoutMs,\n );\n let body: unknown;\n try {\n body = await res.json();\n } catch {\n throw new Error(`HTTP ${res.status} with a non-JSON body`);\n }\n if (!body || typeof body !== \"object\") throw new Error(`HTTP ${res.status} with an unexpected body`);\n return body as RpcReply;\n}\n\nfunction unreachable(url: string, e: unknown): PepuBundlerError {\n const reason = e instanceof Error && e.name === \"AbortError\" ? \"timed out\" : redactSecrets(e instanceof Error ? e.message : String(e)).replace(/https?:\\/\\/\\S+/g, \"[url]\");\n return new PepuBundlerError(\"BUNDLER_UNREACHABLE\", `Could not reach ${hostOf(url)}: ${reason}`, { cause: e });\n}\n\n/**\n * Probe a bundler URL: `eth_chainId`, `eth_supportedEntryPoints` and a\n * capability check of the methods PEPU apps use (a method answered with\n * anything but \"method not found\" counts as supported; nothing is sent\n * on-chain). Never throws for network trouble; returns `ok: false` with a\n * `BUNDLER_UNREACHABLE` error. Throws `CONFIG_BAD_URL` for a malformed URL.\n *\n * @example\n * const r = await probeBundler(\"https://bundler.example.com\");\n * if (!r.ok) console.log(r.error?.hint);\n */\nexport async function probeBundler(url: string, o: ProbeOptions = {}): Promise<BundlerProbeResult> {\n checkUrl(url, \"Bundler URL\");\n const f: FetchLike = o.fetch ?? ((i, init) => fetch(i, init));\n const timeoutMs = o.timeoutMs ?? 8000;\n const started = Date.now();\n try {\n const chain = await rpc(f, url, \"eth_chainId\", [], timeoutMs);\n const eps = await rpc(f, url, \"eth_supportedEntryPoints\", [], timeoutMs);\n const chainId = typeof chain.result === \"string\" ? Number(BigInt(chain.result)) : undefined;\n const entryPoints = Array.isArray(eps.result) ? (eps.result as Address[]) : undefined;\n const supportedMethods: Record<string, boolean> = {};\n for (const m of BUNDLER_METHODS) {\n try {\n const r = await rpc(f, url, m, [], timeoutMs);\n supportedMethods[m] = r.error?.code !== METHOD_NOT_FOUND;\n } catch {\n supportedMethods[m] = false;\n }\n }\n const ep07 = getContract(pepuMainnet.id, \"entryPoint07\");\n const want = ep07?.status === \"deployed\" ? ep07.address.toLowerCase() : undefined;\n const ok =\n chainId === pepuMainnet.id &&\n (want === undefined || (entryPoints?.some((a) => a.toLowerCase() === want) ?? false));\n const out: BundlerProbeResult = { ok, latencyMs: Date.now() - started, supportedMethods };\n if (chainId !== undefined) out.chainId = chainId;\n if (entryPoints) out.entryPoints = entryPoints;\n if (!ok) {\n out.error = new PepuBundlerError(\n \"BUNDLER_UNREACHABLE\",\n chainId !== undefined && chainId !== pepuMainnet.id\n ? `The bundler serves chain ${chainId}, not ${pepuMainnet.id}.`\n : \"The bundler does not list EntryPoint v0.7.\",\n { hint: \"Point PEPU_BUNDLER_URL at a bundler for chain 97741 that supports EntryPoint v0.7.\" },\n );\n }\n return out;\n } catch (e) {\n return { ok: false, latencyMs: Date.now() - started, error: unreachable(url, e) };\n }\n}\n\nconst STUB_PROBE_OP = {\n sender: \"0x0000000000000000000000000000000000000001\",\n nonce: \"0x0\",\n callData: \"0x\",\n callGasLimit: \"0x0\",\n verificationGasLimit: \"0x0\",\n preVerificationGas: \"0x0\",\n maxFeePerGas: \"0x0\",\n maxPriorityFeePerGas: \"0x0\",\n signature: \"0x\",\n} as const;\n\n/**\n * Probe a paymaster URL: the service base (`https://paymaster.pepeunchained.com`) or the ERC-7677 endpoint\n * (`https://host/v2/paymaster/<token>`).\n * Checks `GET <origin>/health`, `GET <origin>/v2/free-tier`, and whether the URL\n * answers JSON-RPC `pm_getPaymasterStubData`. `ok` means the service is alive:\n * health is ok, or the URL spoke valid JSON-RPC. The URL (which can embed a\n * token) never appears in the returned error.\n *\n * @example\n * const r = await probePaymaster(process.env.PEPU_PAYMASTER_URL!);\n * console.log(r.ok, r.freeTier);\n */\nexport async function probePaymaster(url: string, o: ProbeOptions = {}): Promise<PaymasterProbeResult> {\n checkUrl(url, \"Paymaster URL\");\n const f: FetchLike = o.fetch ?? ((i, init) => fetch(i, init));\n const timeoutMs = o.timeoutMs ?? 8000;\n const started = Date.now();\n const origin = new URL(url).origin;\n const out: PaymasterProbeResult = { ok: false, latencyMs: 0 };\n let reached = false;\n let lastError: unknown;\n\n try {\n const res = await timedFetch(f, `${origin}/health`, { method: \"GET\" }, timeoutMs);\n reached = true;\n const body = (await res.json().catch(() => null)) as { status?: unknown } | null;\n out.health = res.ok && body?.status === \"ok\";\n } catch (e) {\n lastError = e;\n out.health = false;\n }\n\n try {\n const res = await timedFetch(f, `${origin}/v2/free-tier`, { method: \"GET\" }, timeoutMs);\n reached = true;\n if (res.ok) out.freeTier = await res.json().catch(() => undefined);\n } catch (e) {\n lastError = e;\n }\n\n let speaksRpc = false;\n try {\n const ep07 = getContract(pepuMainnet.id, \"entryPoint07\");\n const ep = ep07?.status === \"deployed\" ? ep07.address : \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\";\n const reply = await rpc(\n f,\n url,\n \"pm_getPaymasterStubData\",\n [STUB_PROBE_OP, ep, `0x${pepuMainnet.id.toString(16)}`, {}],\n timeoutMs,\n );\n reached = true;\n speaksRpc = reply.result !== undefined || reply.error !== undefined;\n out.erc7677StubOk = reply.result !== undefined;\n } catch (e) {\n lastError = e;\n out.erc7677StubOk = false;\n }\n\n out.latencyMs = Date.now() - started;\n out.ok = out.health === true || speaksRpc;\n if (!reached) out.error = unreachable(url, lastError);\n else if (!out.ok) {\n out.error = new PepuBundlerError(\"BUNDLER_UNREACHABLE\", `${hostOf(url)} answered but is not a PEPU paymaster service.`, {\n hint: \"Check PEPU_PAYMASTER_URL points at the policy service (https://paymaster.pepeunchained.com), or its /v2/paymaster/<client token> endpoint.\",\n });\n }\n return out;\n}\n\n/**\n * The paymaster's EntryPoint v0.7 deposit in wei. A drop across a UserOperation\n * is the proof that it was sponsored. Defaults to PEPU's deployed paymaster.\n *\n * @example\n * const before = await getPaymasterDeposit(publicClient);\n */\nexport async function getPaymasterDeposit(client: PublicClient, paymaster?: Address): Promise<bigint> {\n const pm = getContract(pepuMainnet.id, \"paymaster\");\n const ep = getContract(pepuMainnet.id, \"entryPoint07\");\n const account = paymaster ?? (pm?.status === \"deployed\" ? pm.address : undefined);\n if (!account || ep?.status !== \"deployed\") {\n throw new PepuConfigError(\"CONFIG_MISSING_ENV\", \"No paymaster address is known; pass one explicitly.\", {\n hint: \"Pass the paymaster address as the second argument.\",\n });\n }\n return client.readContract({\n address: ep.address,\n abi: entryPointV07Abi,\n functionName: \"balanceOf\",\n args: [account],\n });\n}\n","import type { Address, Hex, PublicClient, Transport } from \"viem\";\n\nimport { kernelFactoryAbi } from \"../abi/kernelFactory.js\";\nimport type { PepuChain } from \"../chains.js\";\nimport type { DeployedContract } from \"../contracts.js\";\nimport { getContract } from \"../contracts.js\";\nimport { PEPU_ENV, resolvePepuEndpoints } from \"../endpoints.js\";\nimport { getPaymasterDeposit, probeBundler, probePaymaster } from \"./probes.js\";\nimport type { BundlerProbeResult, FetchLike, PaymasterProbeResult } from \"./probes.js\";\n\n/**\n * The account-abstraction contracts a Kernel v3 smart account needs,\n * narrowed to their {@link DeployedContract} form for a given chain.\n * Returns `undefined` if any one of them isn't deployed on that chain\n * (today: everything except mainnet, `97741`) — this package never fabricates\n * a partial/best-effort bundle.\n */\nexport interface PepuKernelStack {\n readonly entryPoint06: DeployedContract;\n readonly entryPoint07: DeployedContract;\n readonly kernelFactory: DeployedContract;\n readonly kernelMetaFactory: DeployedContract;\n readonly ecdsaValidator: DeployedContract;\n}\n\n/**\n * Look up every AA contract this package knows about for `chainId`, already\n * narrowed to {@link DeployedContract}. Returns `undefined` unless *all* five\n * are deployed on that chain (today, only PEPU mainnet qualifies) — a caller\n * building a Kernel account needs every one of them, so a partial result\n * would just move the \"is this actually usable\" check into every caller.\n *\n * This is a convenience grouping over `getContract` from `./contracts.js`;\n * it doesn't add any address or fact that registry doesn't already have.\n */\nexport function getPepuKernelStack(chainId: number): PepuKernelStack | undefined {\n const entryPoint06 = getContract(chainId, \"entryPoint06\");\n const entryPoint07 = getContract(chainId, \"entryPoint07\");\n const kernelFactory = getContract(chainId, \"kernelFactory\");\n const kernelMetaFactory = getContract(chainId, \"kernelMetaFactory\");\n const ecdsaValidator = getContract(chainId, \"ecdsaValidator\");\n\n if (\n entryPoint06?.status !== \"deployed\" ||\n entryPoint07?.status !== \"deployed\" ||\n kernelFactory?.status !== \"deployed\" ||\n kernelMetaFactory?.status !== \"deployed\" ||\n ecdsaValidator?.status !== \"deployed\"\n ) {\n return undefined;\n }\n\n return { entryPoint06, entryPoint07, kernelFactory, kernelMetaFactory, ecdsaValidator };\n}\n\n/**\n * Legacy static gas-sponsorship status for PEPU. **Always reports\n * unavailable** (it never probes). Sponsorship is PROVEN end to end on PEPU\n * mainnet through the hosted bundler and paymaster service (a zero-balance\n * Kernel smart account transacted, paid for by the paymaster); use\n * `checkSponsorship()` for the live answer. This function\n * exists so nothing downstream (this package, `@pepu-chain/mcp`, an app)\n * has to independently invent an \"is sponsorship on?\" check, and so that\n * check can't silently start lying once this file changes.\n *\n * Do not treat the presence of `kernelFactory`/`ecdsaValidator`/`paymaster`\n * addresses in {@link getPepuKernelStack} / the contract registry as\n * sponsorship support — those let you build and deploy a Kernel account and\n * send its UserOperations through a normal `eth_sendTransaction`-style flow\n * (self-paying its own gas via the EntryPoint deposit), which is a real,\n * working feature; sponsoring that gas needs a funded project or free-tier token.\n */\nexport interface SponsorshipStatus {\n readonly available: false;\n readonly reason: string;\n /**\n * Extension point for a future bundler/paymaster integration. Passing a\n * URL here does **not** make sponsorship available — `available` stays\n * `false` regardless — this field only exists so a caller can start\n * wiring a URL through their own config today and have this function\n * start using it later without an API change.\n */\n readonly bundlerUrl?: string;\n}\n\n/** Options for {@link getSponsorshipStatus}. */\nexport interface GetSponsorshipStatusOptions {\n /** See {@link SponsorshipStatus.bundlerUrl}. Not yet used for anything. */\n readonly bundlerUrl?: string;\n}\n\n/**\n * @deprecated Always reports `available: false`. Use `checkSponsorship()` (live\n * bundler and paymaster probe) from `@pepu-chain/sdk`. Kept for 0.1 callers.\n */\nexport function getSponsorshipStatus(\n options?: GetSponsorshipStatusOptions,\n): SponsorshipStatus {\n const reason =\n \"This deprecated function never probes anything and always reports \" +\n \"unavailable. The hosted bundler (bundler.pepeunchained.com) and \" +\n \"paymaster service (paymaster.pepeunchained.com) are live, and \" +\n \"sponsorship is proven end to end on mainnet through them. Call \" +\n \"checkSponsorship() for the live status. A Kernel v3 smart account \" +\n \"without a funded project or free-tier token must still fund its own \" +\n \"EntryPoint deposit and pay its own gas, like a normal EOA-sent transaction.\";\n return options?.bundlerUrl === undefined\n ? { available: false, reason }\n : { available: false, reason, bundlerUrl: options.bundlerUrl };\n}\n\n/**\n * Compute (or confirm) the counterfactual address of a Kernel v3 smart\n * account via the verified factory's `getAddress(data, salt)` — a thin,\n * typed pass-through, not a re-implementation.\n *\n * Deliberately does **not** build `data` (Kernel v3.1's `initialize(...)`\n * calldata: root validator, hook, validator data, hook data, init config)\n * for you. A hand-rolled encoding here would be a second, unverified copy of\n * the byte layout that ZeroDev's SDK already produces (and that has been\n * exercised against PEPU's factory through the sponsored-transaction run),\n * which is exactly the kind of invented encoding this package's rules\n * forbid for addresses. Build `data` with ZeroDev's\n * `@zerodev/sdk` (or by hand from the public Kernel v3 contracts source),\n * then pass the result here.\n */\nexport async function getKernelAccountAddress(\n client: PublicClient<Transport, PepuChain>,\n factory: Pick<DeployedContract, \"address\">,\n args: { readonly data: Hex; readonly salt: Hex },\n): Promise<Address> {\n return client.readContract({\n address: factory.address,\n abi: kernelFactoryAbi,\n functionName: \"getAddress\",\n args: [args.data, args.salt],\n });\n}\n\n/** Live sponsorship report from {@link checkSponsorship}. */\nexport interface SponsorshipReport {\n /** True only when a bundler and a paymaster are configured and both answer. */\n available: boolean;\n /** `direct` when you bring your own bundler and paymaster URLs; `none` when nothing is configured. */\n transport: \"direct\" | \"none\";\n bundler: { configured: boolean; probe?: BundlerProbeResult };\n paymaster: { configured: boolean; probe?: PaymasterProbeResult; depositWei?: bigint };\n /** One sentence for a human or an agent. */\n reason: string;\n /** Concrete next steps, empty when `available`. */\n fixes: string[];\n}\n\n/** Options for {@link checkSponsorship}. */\nexport interface CheckSponsorshipOptions {\n bundlerUrl?: string;\n paymasterUrl?: string;\n env?: Record<string, string | undefined>;\n fetch?: FetchLike;\n /** When given, also read the paymaster's EntryPoint deposit. */\n publicClient?: PublicClient;\n /** Paymaster contract to read the deposit of. Defaults to PEPU's deployed paymaster. */\n paymasterAddress?: Address;\n timeoutMs?: number;\n}\n\n/**\n * Live gas-sponsorship status. Resolves the bundler and paymaster URLs from\n * options, env, then the hosted defaults (bundler.pepeunchained.com and the paymaster\n * service base; with no token URL the service is probed at its base), probes both,\n * and optionally reads the paymaster deposit. Never throws for an\n * unreachable service; it reports `available: false` with `fixes`.\n * Replaces the hard-coded {@link getSponsorshipStatus}.\n *\n * @example\n * const s = await checkSponsorship({ publicClient });\n * if (!s.available) console.log(s.reason, s.fixes);\n */\nexport async function checkSponsorship(options: CheckSponsorshipOptions = {}): Promise<SponsorshipReport> {\n const { bundlerUrl, paymasterUrl: erc7677Url, paymasterBaseUrl } = resolvePepuEndpoints({\n ...(options.bundlerUrl !== undefined ? { bundlerUrl: options.bundlerUrl } : {}),\n ...(options.paymasterUrl !== undefined ? { paymasterUrl: options.paymasterUrl } : {}),\n ...(options.env ? { env: options.env } : {}),\n });\n // No token means no complete ERC-7677 URL: probe the service base (health + free-tier state) instead.\n const paymasterUrl = erc7677Url ?? paymasterBaseUrl;\n const probeOpts = {\n ...(options.fetch ? { fetch: options.fetch } : {}),\n ...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),\n };\n const fixes: string[] = [];\n if (bundlerUrl === null) fixes.push(`Set ${PEPU_ENV.bundlerUrl} to a bundler for chain 97741 (EntryPoint v0.7).`);\n if (paymasterUrl === null) fixes.push(`Set ${PEPU_ENV.paymasterUrl} to your ERC-7677 paymaster endpoint (https://paymaster.pepeunchained.com/v2/paymaster/<client token>).`);\n\n const [bProbe, pProbe] = await Promise.all([\n bundlerUrl === null ? undefined : probeBundler(bundlerUrl, probeOpts),\n paymasterUrl === null ? undefined : probePaymaster(paymasterUrl, probeOpts),\n ]);\n if (bProbe && !bProbe.ok) fixes.push(bProbe.error?.hint ?? \"The bundler did not answer correctly.\");\n if (pProbe && !pProbe.ok) fixes.push(pProbe.error?.hint ?? \"The paymaster did not answer correctly.\");\n\n let depositWei: bigint | undefined;\n if (options.publicClient) {\n try {\n depositWei = await getPaymasterDeposit(options.publicClient, options.paymasterAddress);\n if (depositWei === 0n) fixes.push(\"The paymaster's EntryPoint deposit is empty. Deposit PEPU to it.\");\n } catch {\n // A failed read must not flip availability; the probes are the source of truth.\n }\n }\n\n const available = !!bProbe?.ok && !!pProbe?.ok && depositWei !== 0n;\n const configured = bundlerUrl !== null || paymasterUrl !== null;\n const reason = available\n ? \"Bundler and paymaster are reachable; sponsored UserOperations can be sent.\"\n : !configured\n ? \"No bundler or paymaster URL is configured. Set PEPU_BUNDLER_URL and PEPU_PAYMASTER_URL, or use the hosted defaults.\"\n : \"A bundler or paymaster is configured but not fully working. See fixes.\";\n return {\n available,\n transport: configured ? \"direct\" : \"none\",\n bundler: { configured: bundlerUrl !== null, ...(bProbe ? { probe: bProbe } : {}) },\n paymaster: {\n configured: paymasterUrl !== null,\n ...(pProbe ? { probe: pProbe } : {}),\n ...(depositWei !== undefined ? { depositWei } : {}),\n },\n reason,\n fixes,\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/abi/kernelFactory.ts","../src/abi/entryPointV07.ts","../src/aa/probes.ts","../src/aa/status.ts"],"names":["parseAbi","PepuConfigError","redactS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AAe,IAAA,EAAM,GAAI,MAAA,GAAS,EAAE,KAAA,EAAO,MAAA,EAAO,GAAI,EAAC,EAAG;AAAA,IACjF,SAAA,EAAW;AAAA,MACT,YAAY,YAAA,KAAiB,IAAA;AAAA,MAC7B,GAAI,MAAA,GAAS,EAAE,KAAA,EAAO,MAAA,KAAW,EAAC;AAAA,MAClC,GAAI,UAAA,KAAe,MAAA,GAAY,EAAE,UAAA,KAAe;AAAC,KACnD;AAAA,IACA,MAAA;AAAA,IACA;AAAA,GACF;AACF","file":"chunk-SLW7FRTL.cjs","sourcesContent":["import { parseAbi } from \"viem\";\n\n/**\n * ZeroDev Kernel v3 account factory ABI, at\n * `0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419` (deployed on PEPU mainnet\n * only; see `pepuContracts.kernelFactory` in `../contracts.js`).\n *\n * Verified live against mainnet 2026-09-24 via `eth_call`:\n * - `implementation()` returns `0xbAC849bB641841b44E965fb01A4Bf5F074F84B4d` —\n * ZeroDev's Kernel v3.1 singleton implementation address, deployed at the\n * same address on every chain that has it via CREATE2.\n * - `getAddress(bytes,bytes32)`, called with empty `data` and a zero salt,\n * returns a computed address without reverting.\n * - `createAccount(bytes,bytes32)`, simulated (not sent) with the same\n * empty `data` and zero salt via `eth_call`, returns the **same** address\n * `getAddress` computed for those inputs — exactly the counterfactual-\n * address behavior a CREATE2 account factory is supposed to have.\n *\n * What this package does NOT ship: a helper that encodes the `data`\n * argument (Kernel v3.1's `initialize(...)` calldata — root validator,\n * hook, validator data, hook data, init config). No account has ever been\n * created through this factory on PEPU yet (its transaction history is\n * empty as of the verification date above), so there was nothing on-chain\n * to check a hand-rolled encoding against, and guessing one here would be\n * exactly the kind of invented byte layout this package's rules forbid.\n * Use ZeroDev's own `@zerodev/sdk` (or the public Kernel contracts source)\n * to build that payload, then pass the resulting bytes into\n * `getAddress`/`createAccount` from this ABI.\n */\nexport const kernelFactoryAbi = parseAbi([\n \"function implementation() view returns (address)\",\n \"function getAddress(bytes calldata data, bytes32 salt) view returns (address)\",\n \"function createAccount(bytes calldata data, bytes32 salt) payable returns (address)\",\n]);\n\n/**\n * The verified Kernel v3.1 singleton implementation address that\n * `kernelFactoryAbi`'s `implementation()` resolves to on PEPU mainnet. Same\n * address ZeroDev uses across every chain that has this Kernel version.\n */\nexport const KERNEL_V3_1_IMPLEMENTATION_ADDRESS =\n \"0xbAC849bB641841b44E965fb01A4Bf5F074F84B4d\" as const;\n","import { parseAbi } from \"viem\";\n\n/**\n * ERC-4337 EntryPoint v0.7 ABI — the subset a dapp actually needs to manage\n * a smart account's gas deposit and read its nonce, at the canonical address\n * `0x0000000071727De22E5E9d8BAf0edAc6f37da032` (deployed on PEPU mainnet\n * only; see `pepuContracts.entryPoint07` in `../contracts.js`).\n *\n * This is NOT the full `IEntryPoint` interface (no `handleOps`,\n * `simulateValidation`, etc.) — those are normally called by a bundler, and\n * PEPU has no publicly hosted bundler yet (see `getSponsorshipStatus` in\n * `../aa/status.js`). This ABI only covers deposit/nonce management, which works\n * today with a plain viem wallet client and no bundler at all.\n *\n * Verified live against mainnet 2026-09-24 via `eth_call`:\n * - `getNonce(address,uint192)` for the zero address/key returns `0`.\n * - `balanceOf(address)` for the zero address returns `0`.\n * - `getDepositInfo(address)` for the zero address returns a 5-word\n * (all-zero) tuple, matching the v0.7 `DepositInfo` struct shape\n * `(uint256 deposit, bool staked, uint96 stake, uint32 unstakeDelaySec,\n * uint48 withdrawTime)` field-for-field.\n * `depositTo`/`withdrawTo` share the same `IStakeManager` interface as the\n * verified `getDepositInfo`/`balanceOf` pair and are standard across every\n * EntryPoint version; they were not separately simulated (both mutate\n * state, and simulating a withdrawal from an empty deposit would only prove\n * it reverts, not that it works).\n */\nexport const entryPointV07Abi = parseAbi([\n \"function getNonce(address sender, uint192 key) view returns (uint256 nonce)\",\n \"function balanceOf(address account) view returns (uint256)\",\n \"function depositTo(address account) payable\",\n \"function withdrawTo(address payable withdrawAddress, uint256 withdrawAmount)\",\n \"function getDepositInfo(address account) view returns ((uint256 deposit, bool staked, uint96 stake, uint32 unstakeDelaySec, uint48 withdrawTime) info)\",\n \"event Deposited(address indexed account, uint256 totalDeposit)\",\n \"event Withdrawn(address indexed account, address withdrawAddress, uint256 amount)\",\n]);\n","import type { Address, PublicClient } from \"viem\";\n\nimport { entryPointV07Abi } from \"../abi/entryPointV07.js\";\nimport { pepuMainnet } from \"../chains.js\";\nimport { getContract } from \"../contracts.js\";\nimport { PepuBundlerError, PepuConfigError } from \"../errors.js\";\nimport { redactSecrets } from \"./describe.js\";\n\n/** Minimal fetch signature, so tests and non-browser hosts can inject one. */\nexport type FetchLike = (input: string, init?: RequestInit) => Promise<Response>;\n\nexport interface ProbeOptions {\n fetch?: FetchLike;\n /** Per-request timeout. Default 8000. */\n timeoutMs?: number;\n}\n\nexport interface BundlerProbeResult {\n ok: boolean;\n chainId?: number;\n entryPoints?: Address[];\n /** `true` when the method exists (any answer but \"method not found\"). */\n supportedMethods?: Record<string, boolean>;\n latencyMs: number;\n error?: PepuBundlerError;\n}\n\nexport interface PaymasterProbeResult {\n ok: boolean;\n /** `GET <origin>/health` answered `{ status: \"ok\" }`. */\n health?: boolean;\n /** Body of `GET <origin>/v2/free-tier` when the service exposes it. */\n freeTier?: unknown;\n /**\n * The URL answered a `pm_getPaymasterStubData` call with a stub result. A\n * JSON-RPC denial (no credential, unknown sender) is NOT a stub result:\n * the endpoint is alive and speaks ERC-7677, but the probe has no\n * credential, so this stays `false`.\n */\n erc7677StubOk?: boolean;\n latencyMs: number;\n error?: PepuBundlerError;\n}\n\nconst BUNDLER_METHODS = [\n \"eth_sendUserOperation\",\n \"eth_estimateUserOperationGas\",\n \"eth_getUserOperationReceipt\",\n \"eth_getUserOperationByHash\",\n \"pimlico_getUserOperationGasPrice\",\n \"zd_getUserOperationGasPrice\",\n] as const;\n\nconst METHOD_NOT_FOUND = -32601;\n\nfunction hostOf(url: string): string {\n try {\n return new URL(url).host;\n } catch {\n return \"the configured host\";\n }\n}\n\nfunction checkUrl(url: string, label: string): void {\n let u: URL;\n try {\n u = new URL(url);\n } catch {\n throw new PepuConfigError(\"CONFIG_BAD_URL\", `${label} is not a valid URL.`);\n }\n if (u.protocol !== \"http:\" && u.protocol !== \"https:\") {\n throw new PepuConfigError(\"CONFIG_BAD_URL\", `${label} must be an http(s) URL.`);\n }\n}\n\nasync function timedFetch(f: FetchLike, url: string, init: RequestInit, timeoutMs: number): Promise<Response> {\n const ctl = new AbortController();\n const t = setTimeout(() => ctl.abort(), timeoutMs);\n try {\n return await f(url, { ...init, signal: ctl.signal });\n } finally {\n clearTimeout(t);\n }\n}\n\ninterface RpcReply {\n result?: unknown;\n error?: { code?: number; message?: string; data?: unknown };\n}\n\nasync function rpc(f: FetchLike, url: string, method: string, params: unknown[], timeoutMs: number): Promise<RpcReply> {\n const res = await timedFetch(\n f,\n url,\n {\n method: \"POST\",\n headers: { \"content-type\": \"application/json\" },\n body: JSON.stringify({ jsonrpc: \"2.0\", id: 1, method, params }),\n },\n timeoutMs,\n );\n let body: unknown;\n try {\n body = await res.json();\n } catch {\n throw new Error(`HTTP ${res.status} with a non-JSON body`);\n }\n if (!body || typeof body !== \"object\") throw new Error(`HTTP ${res.status} with an unexpected body`);\n return body as RpcReply;\n}\n\nfunction unreachable(url: string, e: unknown): PepuBundlerError {\n const reason = e instanceof Error && e.name === \"AbortError\" ? \"timed out\" : redactSecrets(e instanceof Error ? e.message : String(e)).replace(/https?:\\/\\/\\S+/g, \"[url]\");\n return new PepuBundlerError(\"BUNDLER_UNREACHABLE\", `Could not reach ${hostOf(url)}: ${reason}`, { cause: e });\n}\n\n/**\n * Probe a bundler URL: `eth_chainId`, `eth_supportedEntryPoints` and a\n * capability check of the methods PEPU apps use (a method answered with\n * anything but \"method not found\" counts as supported; nothing is sent\n * on-chain). Never throws for network trouble; returns `ok: false` with a\n * `BUNDLER_UNREACHABLE` error. Throws `CONFIG_BAD_URL` for a malformed URL.\n *\n * @example\n * const r = await probeBundler(\"https://bundler.example.com\");\n * if (!r.ok) console.log(r.error?.hint);\n */\nexport async function probeBundler(url: string, o: ProbeOptions = {}): Promise<BundlerProbeResult> {\n checkUrl(url, \"Bundler URL\");\n const f: FetchLike = o.fetch ?? ((i, init) => fetch(i, init));\n const timeoutMs = o.timeoutMs ?? 8000;\n const started = Date.now();\n try {\n const chain = await rpc(f, url, \"eth_chainId\", [], timeoutMs);\n const eps = await rpc(f, url, \"eth_supportedEntryPoints\", [], timeoutMs);\n const chainId = typeof chain.result === \"string\" ? Number(BigInt(chain.result)) : undefined;\n const entryPoints = Array.isArray(eps.result) ? (eps.result as Address[]) : undefined;\n const supportedMethods: Record<string, boolean> = {};\n for (const m of BUNDLER_METHODS) {\n try {\n const r = await rpc(f, url, m, [], timeoutMs);\n supportedMethods[m] = r.error?.code !== METHOD_NOT_FOUND;\n } catch {\n supportedMethods[m] = false;\n }\n }\n const ep07 = getContract(pepuMainnet.id, \"entryPoint07\");\n const want = ep07?.status === \"deployed\" ? ep07.address.toLowerCase() : undefined;\n const ok =\n chainId === pepuMainnet.id &&\n (want === undefined || (entryPoints?.some((a) => a.toLowerCase() === want) ?? false));\n const out: BundlerProbeResult = { ok, latencyMs: Date.now() - started, supportedMethods };\n if (chainId !== undefined) out.chainId = chainId;\n if (entryPoints) out.entryPoints = entryPoints;\n if (!ok) {\n out.error = new PepuBundlerError(\n \"BUNDLER_UNREACHABLE\",\n chainId !== undefined && chainId !== pepuMainnet.id\n ? `The bundler serves chain ${chainId}, not ${pepuMainnet.id}.`\n : \"The bundler does not list EntryPoint v0.7.\",\n { hint: \"Point PEPU_BUNDLER_URL at a bundler for chain 97741 that supports EntryPoint v0.7.\" },\n );\n }\n return out;\n } catch (e) {\n return { ok: false, latencyMs: Date.now() - started, error: unreachable(url, e) };\n }\n}\n\nconst STUB_PROBE_OP = {\n sender: \"0x0000000000000000000000000000000000000001\",\n nonce: \"0x0\",\n callData: \"0x\",\n callGasLimit: \"0x0\",\n verificationGasLimit: \"0x0\",\n preVerificationGas: \"0x0\",\n maxFeePerGas: \"0x0\",\n maxPriorityFeePerGas: \"0x0\",\n signature: \"0x\",\n} as const;\n\n/**\n * Probe a paymaster URL: the service base (`https://paymaster.pepeunchained.com`) or the ERC-7677 endpoint\n * (`https://host/v2/paymaster/<token>`).\n * Checks `GET <origin>/health`, `GET <origin>/v2/free-tier`, and whether the URL\n * answers JSON-RPC `pm_getPaymasterStubData`. `ok` means the service is alive:\n * health is ok, or the URL spoke valid JSON-RPC. The URL (which can embed a\n * token) never appears in the returned error.\n *\n * @example\n * const r = await probePaymaster(process.env.PEPU_PAYMASTER_URL!);\n * console.log(r.ok, r.freeTier);\n */\nexport async function probePaymaster(url: string, o: ProbeOptions = {}): Promise<PaymasterProbeResult> {\n checkUrl(url, \"Paymaster URL\");\n const f: FetchLike = o.fetch ?? ((i, init) => fetch(i, init));\n const timeoutMs = o.timeoutMs ?? 8000;\n const started = Date.now();\n const origin = new URL(url).origin;\n const out: PaymasterProbeResult = { ok: false, latencyMs: 0 };\n let reached = false;\n let lastError: unknown;\n\n try {\n const res = await timedFetch(f, `${origin}/health`, { method: \"GET\" }, timeoutMs);\n reached = true;\n const body = (await res.json().catch(() => null)) as { status?: unknown } | null;\n out.health = res.ok && body?.status === \"ok\";\n } catch (e) {\n lastError = e;\n out.health = false;\n }\n\n try {\n const res = await timedFetch(f, `${origin}/v2/free-tier`, { method: \"GET\" }, timeoutMs);\n reached = true;\n if (res.ok) out.freeTier = await res.json().catch(() => undefined);\n } catch (e) {\n lastError = e;\n }\n\n let speaksRpc = false;\n try {\n const ep07 = getContract(pepuMainnet.id, \"entryPoint07\");\n const ep = ep07?.status === \"deployed\" ? ep07.address : \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\";\n const reply = await rpc(\n f,\n url,\n \"pm_getPaymasterStubData\",\n [STUB_PROBE_OP, ep, `0x${pepuMainnet.id.toString(16)}`, {}],\n timeoutMs,\n );\n reached = true;\n speaksRpc = reply.result !== undefined || reply.error !== undefined;\n out.erc7677StubOk = reply.result !== undefined;\n } catch (e) {\n lastError = e;\n out.erc7677StubOk = false;\n }\n\n out.latencyMs = Date.now() - started;\n out.ok = out.health === true || speaksRpc;\n if (!reached) out.error = unreachable(url, lastError);\n else if (!out.ok) {\n out.error = new PepuBundlerError(\"BUNDLER_UNREACHABLE\", `${hostOf(url)} answered but is not a PEPU paymaster service.`, {\n hint: \"Check PEPU_PAYMASTER_URL points at the policy service (https://paymaster.pepeunchained.com), or its /v2/paymaster/<client token> endpoint.\",\n });\n }\n return out;\n}\n\n/**\n * The paymaster's EntryPoint v0.7 deposit in wei. A drop across a UserOperation\n * is the proof that it was sponsored. Defaults to PEPU's deployed paymaster.\n *\n * @example\n * const before = await getPaymasterDeposit(publicClient);\n */\nexport async function getPaymasterDeposit(client: PublicClient, paymaster?: Address): Promise<bigint> {\n const pm = getContract(pepuMainnet.id, \"paymaster\");\n const ep = getContract(pepuMainnet.id, \"entryPoint07\");\n const account = paymaster ?? (pm?.status === \"deployed\" ? pm.address : undefined);\n if (!account || ep?.status !== \"deployed\") {\n throw new PepuConfigError(\"CONFIG_MISSING_ENV\", \"No paymaster address is known; pass one explicitly.\", {\n hint: \"Pass the paymaster address as the second argument.\",\n });\n }\n return client.readContract({\n address: ep.address,\n abi: entryPointV07Abi,\n functionName: \"balanceOf\",\n args: [account],\n });\n}\n","import type { Address, Hex, PublicClient, Transport } from \"viem\";\n\nimport { kernelFactoryAbi } from \"../abi/kernelFactory.js\";\nimport type { PepuChain } from \"../chains.js\";\nimport type { DeployedContract } from \"../contracts.js\";\nimport { getContract } from \"../contracts.js\";\nimport { PEPU_ENV, resolvePepuEndpoints } from \"../endpoints.js\";\nimport { getPaymasterDeposit, probeBundler, probePaymaster } from \"./probes.js\";\nimport type { BundlerProbeResult, FetchLike, PaymasterProbeResult } from \"./probes.js\";\n\n/**\n * The account-abstraction contracts a Kernel v3 smart account needs,\n * narrowed to their {@link DeployedContract} form for a given chain.\n * Returns `undefined` if any one of them isn't deployed on that chain\n * (today: everything except mainnet, `97741`) — this package never fabricates\n * a partial/best-effort bundle.\n */\nexport interface PepuKernelStack {\n readonly entryPoint06: DeployedContract;\n readonly entryPoint07: DeployedContract;\n readonly kernelFactory: DeployedContract;\n readonly kernelMetaFactory: DeployedContract;\n readonly ecdsaValidator: DeployedContract;\n}\n\n/**\n * Look up every AA contract this package knows about for `chainId`, already\n * narrowed to {@link DeployedContract}. Returns `undefined` unless *all* five\n * are deployed on that chain (today, only PEPU mainnet qualifies) — a caller\n * building a Kernel account needs every one of them, so a partial result\n * would just move the \"is this actually usable\" check into every caller.\n *\n * This is a convenience grouping over `getContract` from `./contracts.js`;\n * it doesn't add any address or fact that registry doesn't already have.\n */\nexport function getPepuKernelStack(chainId: number): PepuKernelStack | undefined {\n const entryPoint06 = getContract(chainId, \"entryPoint06\");\n const entryPoint07 = getContract(chainId, \"entryPoint07\");\n const kernelFactory = getContract(chainId, \"kernelFactory\");\n const kernelMetaFactory = getContract(chainId, \"kernelMetaFactory\");\n const ecdsaValidator = getContract(chainId, \"ecdsaValidator\");\n\n if (\n entryPoint06?.status !== \"deployed\" ||\n entryPoint07?.status !== \"deployed\" ||\n kernelFactory?.status !== \"deployed\" ||\n kernelMetaFactory?.status !== \"deployed\" ||\n ecdsaValidator?.status !== \"deployed\"\n ) {\n return undefined;\n }\n\n return { entryPoint06, entryPoint07, kernelFactory, kernelMetaFactory, ecdsaValidator };\n}\n\n/**\n * Legacy static gas-sponsorship status for PEPU. **Always reports\n * unavailable** (it never probes). Sponsorship is PROVEN end to end on PEPU\n * mainnet through the hosted bundler and paymaster service (a zero-balance\n * Kernel smart account transacted, paid for by the paymaster); use\n * `checkSponsorship()` for the live answer. This function\n * exists so nothing downstream (this package, `@pepu-chain/mcp`, an app)\n * has to independently invent an \"is sponsorship on?\" check, and so that\n * check can't silently start lying once this file changes.\n *\n * Do not treat the presence of `kernelFactory`/`ecdsaValidator`/`paymaster`\n * addresses in {@link getPepuKernelStack} / the contract registry as\n * sponsorship support — those let you build and deploy a Kernel account and\n * send its UserOperations through a normal `eth_sendTransaction`-style flow\n * (self-paying its own gas via the EntryPoint deposit), which is a real,\n * working feature; sponsoring that gas needs a funded project or free-tier token.\n */\nexport interface SponsorshipStatus {\n readonly available: false;\n readonly reason: string;\n /**\n * Extension point for a future bundler/paymaster integration. Passing a\n * URL here does **not** make sponsorship available — `available` stays\n * `false` regardless — this field only exists so a caller can start\n * wiring a URL through their own config today and have this function\n * start using it later without an API change.\n */\n readonly bundlerUrl?: string;\n}\n\n/** Options for {@link getSponsorshipStatus}. */\nexport interface GetSponsorshipStatusOptions {\n /** See {@link SponsorshipStatus.bundlerUrl}. Not yet used for anything. */\n readonly bundlerUrl?: string;\n}\n\n/**\n * @deprecated Always reports `available: false`. Use `checkSponsorship()` (live\n * bundler and paymaster probe) from `@pepu-chain/sdk`. Kept for 0.1 callers.\n */\nexport function getSponsorshipStatus(\n options?: GetSponsorshipStatusOptions,\n): SponsorshipStatus {\n const reason =\n \"This deprecated function never probes anything and always reports \" +\n \"unavailable. The hosted bundler (bundler.pepeunchained.com) and \" +\n \"paymaster service (paymaster.pepeunchained.com) are live, and \" +\n \"sponsorship is proven end to end on mainnet through them. Call \" +\n \"checkSponsorship() for the live status. A Kernel v3 smart account \" +\n \"without a funded project or free-tier token must still fund its own \" +\n \"EntryPoint deposit and pay its own gas, like a normal EOA-sent transaction.\";\n return options?.bundlerUrl === undefined\n ? { available: false, reason }\n : { available: false, reason, bundlerUrl: options.bundlerUrl };\n}\n\n/**\n * Compute (or confirm) the counterfactual address of a Kernel v3 smart\n * account via the verified factory's `getAddress(data, salt)` — a thin,\n * typed pass-through, not a re-implementation.\n *\n * Deliberately does **not** build `data` (Kernel v3.1's `initialize(...)`\n * calldata: root validator, hook, validator data, hook data, init config)\n * for you. A hand-rolled encoding here would be a second, unverified copy of\n * the byte layout that ZeroDev's SDK already produces (and that has been\n * exercised against PEPU's factory through the sponsored-transaction run),\n * which is exactly the kind of invented encoding this package's rules\n * forbid for addresses. Build `data` with ZeroDev's\n * `@zerodev/sdk` (or by hand from the public Kernel v3 contracts source),\n * then pass the result here.\n */\nexport async function getKernelAccountAddress(\n client: PublicClient<Transport, PepuChain>,\n factory: Pick<DeployedContract, \"address\">,\n args: { readonly data: Hex; readonly salt: Hex },\n): Promise<Address> {\n return client.readContract({\n address: factory.address,\n abi: kernelFactoryAbi,\n functionName: \"getAddress\",\n args: [args.data, args.salt],\n });\n}\n\n/** Live sponsorship report from {@link checkSponsorship}. */\nexport interface SponsorshipReport {\n /** True only when a bundler and a paymaster are configured and both answer. */\n available: boolean;\n /** `direct` when you bring your own bundler and paymaster URLs; `none` when nothing is configured. */\n transport: \"direct\" | \"none\";\n bundler: { configured: boolean; probe?: BundlerProbeResult };\n paymaster: { configured: boolean; probe?: PaymasterProbeResult; depositWei?: bigint };\n /** One sentence for a human or an agent. */\n reason: string;\n /** Concrete next steps, empty when `available`. */\n fixes: string[];\n}\n\n/** Options for {@link checkSponsorship}. */\nexport interface CheckSponsorshipOptions {\n bundlerUrl?: string;\n paymasterUrl?: string;\n env?: Record<string, string | undefined>;\n fetch?: FetchLike;\n /** When given, also read the paymaster's EntryPoint deposit. */\n publicClient?: PublicClient;\n /** Paymaster contract to read the deposit of. Defaults to PEPU's deployed paymaster. */\n paymasterAddress?: Address;\n timeoutMs?: number;\n}\n\n/**\n * Live gas-sponsorship status. Resolves the bundler and paymaster URLs from\n * options, env, then the hosted defaults (bundler.pepeunchained.com and the paymaster\n * service base; with no token URL the service is probed at its base), probes both,\n * and optionally reads the paymaster deposit. Never throws for an\n * unreachable service; it reports `available: false` with `fixes`.\n * Replaces the hard-coded {@link getSponsorshipStatus}.\n *\n * @example\n * const s = await checkSponsorship({ publicClient });\n * if (!s.available) console.log(s.reason, s.fixes);\n */\nexport async function checkSponsorship(options: CheckSponsorshipOptions = {}): Promise<SponsorshipReport> {\n const { bundlerUrl, paymasterUrl: erc7677Url, paymasterBaseUrl } = resolvePepuEndpoints({\n ...(options.bundlerUrl !== undefined ? { bundlerUrl: options.bundlerUrl } : {}),\n ...(options.paymasterUrl !== undefined ? { paymasterUrl: options.paymasterUrl } : {}),\n ...(options.env ? { env: options.env } : {}),\n });\n // No token means no complete ERC-7677 URL: probe the service base (health + free-tier state) instead.\n const paymasterUrl = erc7677Url ?? paymasterBaseUrl;\n const probeOpts = {\n ...(options.fetch ? { fetch: options.fetch } : {}),\n ...(options.timeoutMs !== undefined ? { timeoutMs: options.timeoutMs } : {}),\n };\n const fixes: string[] = [];\n if (bundlerUrl === null) fixes.push(`Set ${PEPU_ENV.bundlerUrl} to a bundler for chain 97741 (EntryPoint v0.7).`);\n if (paymasterUrl === null) fixes.push(`Set ${PEPU_ENV.paymasterUrl} to your ERC-7677 paymaster endpoint (https://paymaster.pepeunchained.com/v2/paymaster/<client token>).`);\n\n const [bProbe, pProbe] = await Promise.all([\n bundlerUrl === null ? undefined : probeBundler(bundlerUrl, probeOpts),\n paymasterUrl === null ? undefined : probePaymaster(paymasterUrl, probeOpts),\n ]);\n if (bProbe && !bProbe.ok) fixes.push(bProbe.error?.hint ?? \"The bundler did not answer correctly.\");\n if (pProbe && !pProbe.ok) fixes.push(pProbe.error?.hint ?? \"The paymaster did not answer correctly.\");\n\n let depositWei: bigint | undefined;\n if (options.publicClient) {\n try {\n depositWei = await getPaymasterDeposit(options.publicClient, options.paymasterAddress);\n if (depositWei === 0n) fixes.push(\"The paymaster's EntryPoint deposit is empty. Deposit PEPU to it.\");\n } catch {\n // A failed read must not flip availability; the probes are the source of truth.\n }\n }\n\n const available = !!bProbe?.ok && !!pProbe?.ok && depositWei !== 0n;\n const configured = bundlerUrl !== null || paymasterUrl !== null;\n const reason = available\n ? \"Bundler and paymaster are reachable; sponsored UserOperations can be sent.\"\n : !configured\n ? \"No bundler or paymaster URL is configured. Set PEPU_BUNDLER_URL and PEPU_PAYMASTER_URL, or use the hosted defaults.\"\n : \"A bundler or paymaster is configured but not fully working. See fixes.\";\n return {\n available,\n transport: configured ? \"direct\" : \"none\",\n bundler: { configured: bundlerUrl !== null, ...(bProbe ? { probe: bProbe } : {}) },\n paymaster: {\n configured: paymasterUrl !== null,\n ...(pProbe ? { probe: pProbe } : {}),\n ...(depositWei !== undefined ? { depositWei } : {}),\n },\n reason,\n fixes,\n };\n}\n"]}
@@ -1 +0,0 @@
1
- {"version":3,"sources":["../src/contracts.ts"],"names":["pepuMainnet","pepuTestnet"],"mappings":";;;;;AAwEA,IAAM,yBAAA,GACJ,oYAAA;AAOF,IAAM,wBAAA,GACJ,ufAAA;AASF,IAAM,aAAA,GACJ,+GAAA;AAGF,IAAM,sBAAA,GACJ,2MAAA;AAIF,IAAM,qBAAA,GACJ,oeAAA;AAQF,IAAM,uBAAA,GACJ,yjBAAA;AASF,IAAM,WAAA,GAAc,YAAA;AAGpB,IAAM,wBAAA,GAA2B,YAAA;AAEjC,IAAM,oBACJ,aAAA,GACA,0IAAA;AAGF,IAAM,cAAA,GACJ,iFAAA;AAEF,IAAM,kBAAA,GACJ,saAAA;AAMF,IAAM,kBAAA,GACJ,miBAAA;AAOF,IAAM,gCAAA,GACJ,+QAAA;AAIF,IAAM,yBAAA,GACJ,8PAAA;AAsBK,IAAM,aAAA,GAET;AAAA,EACF,CAACA,6BAAA,CAAY,EAAE,GAAG;AAAA,IAChB,cAAA,EAAgB;AAAA,MACd,MAAA,EAAQ,UAAA;AAAA,MACR,IAAA,EAAM,gCAAA;AAAA,MACN,OAAA,EAAS,4CAAA;AAAA,MACT,UAAA,EAAY,WAAA;AAAA,MACZ,KAAA,EAAO;AAAA,KACT;AAAA,IACA,UAAA,EAAY;AAAA,MACV,MAAA,EAAQ,UAAA;AAAA,MACR,IAAA,EAAM,YAAA;AAAA,MACN,OAAA,EAAS,4CAAA;AAAA,MACT,UAAA,EAAY,WAAA;AAAA,MACZ,KAAA,EAAO;AAAA,KACT;AAAA,IACA,OAAA,EAAS;AAAA,MACP,MAAA,EAAQ,UAAA;AAAA,MACR,IAAA,EAAM,SAAA;AAA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;AACtB,IAAA,OAAO,CAAA,CAAE,WAAW,UAAA,GAChB;AAAA,MACE,GAAA;AAAA,MACA,MAAM,CAAA,CAAE,IAAA;AAAA,MACR,MAAA,EAAQ,UAAA;AAAA,MACR,SAAS,CAAA,CAAE,OAAA;AAAA,MACX,GAAI,EAAE,UAAA,GAAa,EAAE,YAAY,CAAA,CAAE,UAAA,KAAe,EAAC;AAAA,MACnD,GAAI,CAAA,CAAE,OAAA,GAAU,EAAE,OAAA,EAAS,IAAA,KAAkB,EAAC;AAAA,MAC9C,IAAA,EAAM,EAAE,KAAA,IAAS;AAAA,KACnB,GACA,EAAE,GAAA,EAAK,IAAA,EAAM,CAAA,CAAE,MAAM,MAAA,EAAQ,SAAA,EAAW,IAAA,EAAM,CAAA,CAAE,MAAA,EAAO;AAAA,EAC7D,CAAC,CAAA;AACH","file":"chunk-TIEAZYHF.cjs","sourcesContent":["import type { Address } from \"viem\";\n\nimport { pepuMainnet, pepuTestnet } from \"./chains.js\";\n\n/**\n * Canonical keys for contracts tracked by this registry. Adding a new key\n * here (and a corresponding entry per chain below) is not a breaking\n * change for consumers that read the registry through {@link getContract}\n * or {@link listContracts}.\n */\nexport type PepuContractName =\n | \"create2Factory\"\n | \"multicall3\"\n | \"permit2\"\n | \"entryPoint06\"\n | \"entryPoint07\"\n | \"kernelFactory\"\n | \"kernelMetaFactory\"\n | \"ecdsaValidator\"\n | \"paymaster\"\n | \"kernelImplementation\"\n | \"kernelEcdsaSignerModule\"\n | \"kernelCallPolicyV004\"\n | \"kernelTimestampPolicy\"\n | \"tapScore\"\n | \"paymasterV1\"\n | \"paymasterV2\";\n\n/** A contract that is confirmed live on-chain at `address`. */\nexport interface DeployedContract {\n readonly status: \"deployed\";\n /** Human-readable name, for logging/UI. */\n readonly name: string;\n /** Verified contract address. */\n readonly address: Address;\n /** Optional short note, e.g. how the address was verified. */\n readonly notes?: string;\n /**\n * ISO date (YYYY-MM-DD) on which the address was last confirmed to have\n * bytecode via `eth_getCode` against the PEPU mainnet RPC. Re-run\n * `node packages/sdk/scripts/live-check.mjs` to refresh.\n */\n readonly verifiedAt?: string;\n /**\n * True when the contract still has bytecode but must not be used (for example\n * the v1 paymaster, whose EntryPoint deposit was withdrawn). Never route new\n * work to a retired contract.\n */\n readonly retired?: true;\n}\n\n/**\n * A contract that is not yet deployed on this chain. Deliberately has no\n * `address` field — callers must not be able to accidentally read a\n * placeholder value and treat it as real. Use {@link getContract} /\n * {@link isDeployed} to narrow before reading an address.\n */\nexport interface PendingContract {\n readonly status: \"pending\";\n /** Human-readable name, for logging/UI. */\n readonly name: string;\n /** Why this contract has no verified address yet. */\n readonly reason: string;\n}\n\nexport type ContractEntry = DeployedContract | PendingContract;\n\n/** Per-chain contract catalog, keyed by {@link PepuContractName}. */\nexport type PepuContractRegistry = Readonly<\n Record<PepuContractName, ContractEntry>\n>;\n\nconst MULTICALL3_PENDING_REASON =\n \"Canonical Multicall3 (0xcA11bde05977b3631167028862bE2a173976CA11) was \" +\n \"deployed elsewhere via a pre-signed CREATE transaction with a \" +\n \"1,000,000 gas limit. This Arbitrum Nitro chain needs ~14.3M gas to \" +\n \"deploy the same bytecode, so that transaction cannot execute here and \" +\n \"the canonical address is unreachable. A PEPU-specific deployment is \" +\n \"pending; do not substitute the canonical address.\";\n\nconst MULTICALL3_MAINNET_NOTES =\n \"PEPU-specific deployment. NOT at the canonical Multicall3 address, \" +\n \"which is unreachable on this Nitro chain (the canonical pre-signed \" +\n \"CREATE tx carries a 1,000,000 gas limit; this bytecode needs ~14.3M). \" +\n \"Deployed from canonical mds1/multicall3 source (solc 0.8.12, optimizer \" +\n \"10,000,000 runs) via the CREATE2 deterministic deployer with a zero \" +\n \"salt, so the same source reproduces this address on any chain that has \" +\n \"that deployer. Verified on pepuscan. viem/wagmi multicall confirmed \" +\n \"working against it.\";\n\nconst ZERODEV_NOTES =\n \"Deployed by ZeroDev's one-click Conduit Marketplace integration \" +\n \"(mainnet only — not present on testnet).\";\n\nconst PERMIT2_PENDING_REASON =\n \"Not yet deployed on this chain. The CREATE2 deterministic deployer \" +\n \"needed to reproduce Permit2's canonical address is live, so this is \" +\n \"unblocked, but no deployment has happened (and been verified) yet.\";\n\nconst PERMIT2_MAINNET_NOTES =\n \"Deployed at the canonical Permit2 address via the CREATE2 deterministic \" +\n \"deployer, same as on every other chain that has it. Verified live \" +\n \"2026-09-24 via eth_getCode (9,152 bytes, matching Permit2's known \" +\n \"bytecode size) plus a successful DOMAIN_SEPARATOR() eth_call. This is \" +\n \"the canonical Permit2 — do not confuse it with PepuSwap's own separate \" +\n \"Permit2 deployment at pepuSwapContracts.permit2NonCanonical in ./dex.js, \" +\n \"which predates this one and is not interchangeable with it.\";\n\nconst PAYMASTER_MAINNET_NOTES =\n \"Alias of `paymasterV2`: the tiered PepuSponsoredPaymasterV7 canary (0xdb28...C30D), deployed \" +\n \"around block 10537341 and funded in small tranches. Internally reviewed 3x, external audit \" +\n \"pending. Owner 0x5966dFaB11c8AEe767e0739083417D02f4a634A1, manager \" +\n \"0x063Ab6C16c38D19A4bC76E7c39A4A0A73afCaBb0. The free pool was seeded with 300 PEPU; free-tier \" +\n \"destinations are TapScore only for now. It sponsors only through the hosted policy service \" +\n \"(paymaster.pepeunchained.com) with the hosted bundler (bundler.pepeunchained.com). The v1 \" +\n \"paymaster is retired (see `paymasterV1`).\";\n\n/** Date the mainnet addresses below were last checked with eth_getCode. */\nconst VERIFIED_AT = \"2026-10-02\";\n\n/** Date the v2 paymaster canary was verified live (deployment record: deploy-receipt-v2.json). */\nconst PAYMASTER_V2_VERIFIED_AT = \"2026-10-14\";\n\nconst KERNEL_IMPL_NOTES =\n ZERODEV_NOTES +\n \" Kernel v3.1 implementation that kernelFactory.implementation() resolves to; \" +\n \"same address ZeroDev uses on every chain with this version.\";\n\nconst TAPSCORE_NOTES =\n \"TapScore demo contract used by the game-app template. Verified via eth_getCode.\";\n\nconst PAYMASTER_V1_NOTES =\n \"RETIRED. The project's first verifying paymaster (PepuVerifyingPaymasterV7). Its EntryPoint \" +\n \"deposit was withdrawn (deposit is 0), so it cannot sponsor anything. The contract still has \" +\n \"bytecode; do not deposit to it or route new work to it. Superseded by `paymasterV2`. A real \" +\n \"sponsored operation ran through the hosted URLs on v1 before retirement (tx \" +\n \"0x57cf2f5a332248476d775c096b4b8339d81867c14211ed3bc4fcb1895dff0f9f).\";\n\nconst PAYMASTER_V2_NOTES =\n \"PepuSponsoredPaymasterV7 (v2), deployed on PEPU mainnet as a canary around block 10537341: \" +\n \"internally reviewed 3x, external audit pending, funded in small tranches. Owner \" +\n \"0x5966dFaB11c8AEe767e0739083417D02f4a634A1, manager 0x063Ab6C16c38D19A4bC76E7c39A4A0A73afCaBb0. \" +\n \"Free pool seeded with 300 PEPU; free-tier destinations are TapScore only for now. Free tier per \" +\n \"user is 100 PEPU/day and 50 PEPU/hour, enforced by the policy service; beyond that a dApp \" +\n \"deposits into its own project. Record: services/paymaster/contracts/deployed-address-v2.txt.\";\n\nconst PAYMASTER_TESTNET_PENDING_REASON =\n \"No paymaster (or any other ERC-4337 infrastructure) has been deployed to testnet — see \" +\n \"TESTNET_AA_PENDING_REASON. The mainnet paymaster is a project-specific deployment, not \" +\n \"something that would appear on testnet by default even once the rest of the AA stack does.\";\n\nconst TESTNET_AA_PENDING_REASON =\n \"Account-abstraction contracts were deployed on mainnet (97741) only, \" +\n \"via ZeroDev's Conduit Marketplace integration. Nothing has been \" +\n \"deployed to testnet, and testnet is currently out of scope (no faucet \" +\n \"exists, so it cannot be funded without bridging).\";\n\n/**\n * Contract registry, keyed by chain id. Tracked as independent per-chain\n * entries because deployments happen per-chain and have already diverged:\n * mainnet has the CREATE2 deployer, a PEPU-specific Multicall3, the\n * canonical Permit2, the full ZeroDev Kernel v3 AA stack (EntryPoint\n * v0.6/v0.7, Kernel factory/meta-factory, ECDSA validator), and a\n * project-deployed, funded verifying paymaster. Testnet has only the\n * CREATE2 deployer — everything else is `status: \"pending\"` because\n * testnet is out of scope for this package (no faucet exists to fund\n * verification there).\n *\n * Note on the paymaster specifically: `status: \"deployed\"` here means the\n * contract has live bytecode and a real EntryPoint deposit — it does NOT\n * mean gas sponsorship is usable by an application. See\n * `getSponsorshipStatus` in `./aa/status.js`, which is the single source of\n * truth for that separate question.\n */\nexport const pepuContracts: Readonly<\n Record<number, PepuContractRegistry>\n> = {\n [pepuMainnet.id]: {\n create2Factory: {\n status: \"deployed\",\n name: \"CREATE2 Deterministic Deployer\",\n address: \"0x4e59b44847b379578588920cA78FbF26c0B4956C\",\n verifiedAt: VERIFIED_AT,\n notes: \"Standard Nick's-method deterministic deployer.\",\n },\n multicall3: {\n status: \"deployed\",\n name: \"Multicall3\",\n address: \"0x9CE19273Ae9c24437DFF512E8DFCAed4E4B001bd\",\n verifiedAt: VERIFIED_AT,\n notes: MULTICALL3_MAINNET_NOTES,\n },\n permit2: {\n status: \"deployed\",\n name: \"Permit2\",\n address: \"0x000000000022D473030F116dDEE9F6B43aC78BA3\",\n verifiedAt: VERIFIED_AT,\n notes: PERMIT2_MAINNET_NOTES,\n },\n entryPoint06: {\n status: \"deployed\",\n name: \"ERC-4337 EntryPoint v0.6\",\n address: \"0x5FF137D4b0FDCD49DcA30c7CF57E578a026d2789\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" At the canonical v0.6 address.\",\n },\n entryPoint07: {\n status: \"deployed\",\n name: \"ERC-4337 EntryPoint v0.7\",\n address: \"0x0000000071727De22E5E9d8BAf0edAc6f37da032\",\n verifiedAt: VERIFIED_AT,\n notes:\n ZERODEV_NOTES +\n \" At the canonical v0.7 address; getNonce/balanceOf confirmed live.\",\n },\n kernelFactory: {\n status: \"deployed\",\n name: \"Kernel v3 Account Factory\",\n address: \"0xaac5D4240AF87249B3f71BC8E4A2cae074A3E419\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES,\n },\n kernelMetaFactory: {\n status: \"deployed\",\n name: \"Kernel MetaFactory\",\n address: \"0xd703aaE79538628d27099B8c4f621bE4CCd142d5\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES,\n },\n ecdsaValidator: {\n status: \"deployed\",\n name: \"Kernel ECDSA Validator\",\n address: \"0x845ADb2C711129d4f3966735eD98a9F09fC4cE57\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES,\n },\n paymaster: {\n status: \"deployed\",\n name: \"Sponsored Paymaster v2 (PepuSponsoredPaymasterV7, alias of paymasterV2)\",\n address: \"0xdb28528C9399C33c9A0297E8A62F39145acbC30D\",\n verifiedAt: PAYMASTER_V2_VERIFIED_AT,\n notes: PAYMASTER_MAINNET_NOTES,\n },\n kernelImplementation: {\n status: \"deployed\",\n name: \"Kernel v3.1 Implementation\",\n address: \"0xbAC849bB641841b44E965fb01A4Bf5F074F84B4d\",\n verifiedAt: VERIFIED_AT,\n notes: KERNEL_IMPL_NOTES,\n },\n kernelEcdsaSignerModule: {\n status: \"deployed\",\n name: \"Kernel ECDSA Signer (permission signer module)\",\n address: \"0x6A6F069E2a08c2468e7724Ab3250CdBFBA14D4FF\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" Used as the signer in permission-validator session keys.\",\n },\n kernelCallPolicyV004: {\n status: \"deployed\",\n name: \"ZeroDev Call Policy v0.0.4\",\n address: \"0x9a52283276A0ec8740DF50bF01B28A80D880eaf2\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" Scopes a session key to specific targets and selectors.\",\n },\n kernelTimestampPolicy: {\n status: \"deployed\",\n name: \"ZeroDev Timestamp Policy\",\n address: \"0xB9f8f524bE6EcD8C945b1b87f9ae5C192FdCE20F\",\n verifiedAt: VERIFIED_AT,\n notes: ZERODEV_NOTES + \" Bounds a session key to a validity window.\",\n },\n tapScore: {\n status: \"deployed\",\n name: \"TapScore\",\n address: \"0x261eA5971B93237a56990206A46Bc80318e4d078\",\n verifiedAt: VERIFIED_AT,\n notes: TAPSCORE_NOTES,\n },\n paymasterV1: {\n status: \"deployed\",\n name: \"Verifying Paymaster v1 (PepuVerifyingPaymasterV7) - RETIRED\",\n address: \"0x2B6FED323bFA24f0475f4e1Dd3C7F6Cc1f3ae8B0\",\n verifiedAt: VERIFIED_AT,\n retired: true,\n notes: PAYMASTER_V1_NOTES,\n },\n paymasterV2: {\n status: \"deployed\",\n name: \"Sponsored Paymaster v2 (PepuSponsoredPaymasterV7), canary\",\n address: \"0xdb28528C9399C33c9A0297E8A62F39145acbC30D\",\n verifiedAt: PAYMASTER_V2_VERIFIED_AT,\n notes: PAYMASTER_V2_NOTES,\n },\n },\n [pepuTestnet.id]: {\n create2Factory: {\n status: \"deployed\",\n name: \"CREATE2 Deterministic Deployer\",\n address: \"0x4e59b44847b379578588920cA78FbF26c0B4956C\",\n notes: \"Standard Nick's-method deterministic deployer.\",\n },\n multicall3: {\n status: \"pending\",\n name: \"Multicall3\",\n reason: MULTICALL3_PENDING_REASON,\n },\n permit2: {\n status: \"pending\",\n name: \"Permit2\",\n reason: PERMIT2_PENDING_REASON,\n },\n entryPoint06: {\n status: \"pending\",\n name: \"ERC-4337 EntryPoint v0.6\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n entryPoint07: {\n status: \"pending\",\n name: \"ERC-4337 EntryPoint v0.7\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n kernelFactory: {\n status: \"pending\",\n name: \"Kernel v3 Account Factory\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n kernelMetaFactory: {\n status: \"pending\",\n name: \"Kernel MetaFactory\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n ecdsaValidator: {\n status: \"pending\",\n name: \"Kernel ECDSA Validator\",\n reason: TESTNET_AA_PENDING_REASON,\n },\n paymaster: {\n status: \"pending\",\n name: \"Verifying Paymaster (PepuVerifyingPaymasterV7)\",\n reason: PAYMASTER_TESTNET_PENDING_REASON,\n },\n kernelImplementation: { status: \"pending\", name: \"Kernel v3.1 Implementation\", reason: TESTNET_AA_PENDING_REASON },\n kernelEcdsaSignerModule: { status: \"pending\", name: \"Kernel ECDSA Signer (permission signer module)\", reason: TESTNET_AA_PENDING_REASON },\n kernelCallPolicyV004: { status: \"pending\", name: \"ZeroDev Call Policy v0.0.4\", reason: TESTNET_AA_PENDING_REASON },\n kernelTimestampPolicy: { status: \"pending\", name: \"ZeroDev Timestamp Policy\", reason: TESTNET_AA_PENDING_REASON },\n tapScore: { status: \"pending\", name: \"TapScore\", reason: \"Deployed on mainnet only.\" },\n paymasterV1: { status: \"pending\", name: \"Verifying Paymaster v1 (PepuVerifyingPaymasterV7)\", reason: PAYMASTER_TESTNET_PENDING_REASON },\n paymasterV2: { status: \"pending\", name: \"Verifying Paymaster v2\", reason: PAYMASTER_TESTNET_PENDING_REASON },\n },\n};\n\n/** Look up one contract entry for a chain id. Returns `undefined` if the chain isn't in the registry. */\nexport function getContract(\n chainId: number,\n name: PepuContractName,\n): ContractEntry | undefined {\n return pepuContracts[chainId]?.[name];\n}\n\n/** List all tracked contract entries for a chain id, in registry order. */\nexport function listContracts(\n chainId: number,\n): readonly ContractEntry[] {\n const registry = pepuContracts[chainId];\n return registry ? Object.values(registry) : [];\n}\n\n/** Narrow a {@link ContractEntry} to {@link DeployedContract}. */\nexport function isDeployed(\n entry: ContractEntry | undefined,\n): entry is DeployedContract {\n return entry?.status === \"deployed\";\n}\n\n/** One row of the address table returned by {@link getPepuAddresses}. */\nexport interface PepuAddressRow {\n readonly key: PepuContractName;\n readonly name: string;\n readonly status: \"deployed\" | \"pending\";\n /** Present only when `status` is `\"deployed\"`. */\n readonly address?: Address;\n /** ISO date of the last `eth_getCode` check, when known. */\n readonly verifiedAt?: string;\n /** True for a deployed contract that is retired and must not be used (the v1 paymaster). */\n readonly retired?: true;\n /** Notes (deployed) or reason (pending). */\n readonly note: string;\n}\n\n/**\n * The full supporting-contract table for a chain, flattened for docs and\n * MCP rendering. Pending entries carry no `address`.\n *\n * @example\n * ```ts\n * const rows = getPepuAddresses(); // mainnet by default\n * const live = rows.filter((r) => r.status === \"deployed\");\n * ```\n */\nexport function getPepuAddresses(chainId: number = pepuMainnet.id): readonly PepuAddressRow[] {\n const registry = pepuContracts[chainId];\n if (!registry) return [];\n return (Object.keys(registry) as PepuContractName[]).map((key): PepuAddressRow => {\n const e = registry[key];\n return e.status === \"deployed\"\n ? {\n key,\n name: e.name,\n status: \"deployed\",\n address: e.address,\n ...(e.verifiedAt ? { verifiedAt: e.verifiedAt } : {}),\n ...(e.retired ? { retired: true as const } : {}),\n note: e.notes ?? \"\",\n }\n : { key, name: e.name, status: \"pending\", note: e.reason };\n });\n}\n"]}