@pepu-chain/sdk 0.0.0-stage → 0.2.0

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 (232) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +565 -2
  3. package/dist/aa/kernel.cjs +40 -0
  4. package/dist/aa/kernel.cjs.map +1 -0
  5. package/dist/aa/kernel.d.cts +88 -0
  6. package/dist/aa/kernel.d.ts +88 -0
  7. package/dist/aa/kernel.js +11 -0
  8. package/dist/aa/kernel.js.map +1 -0
  9. package/dist/aa/react-direct.cjs +110 -0
  10. package/dist/aa/react-direct.cjs.map +1 -0
  11. package/dist/aa/react-direct.d.cts +42 -0
  12. package/dist/aa/react-direct.d.ts +42 -0
  13. package/dist/aa/react-direct.js +107 -0
  14. package/dist/aa/react-direct.js.map +1 -0
  15. package/dist/aa/react.cjs +151 -0
  16. package/dist/aa/react.cjs.map +1 -0
  17. package/dist/aa/react.d.cts +62 -0
  18. package/dist/aa/react.d.ts +62 -0
  19. package/dist/aa/react.js +147 -0
  20. package/dist/aa/react.js.map +1 -0
  21. package/dist/aa.cjs +84 -0
  22. package/dist/aa.cjs.map +1 -0
  23. package/dist/aa.d.cts +85 -0
  24. package/dist/aa.d.ts +85 -0
  25. package/dist/aa.js +11 -0
  26. package/dist/aa.js.map +1 -0
  27. package/dist/api-Dz4sCHH_.d.cts +654 -0
  28. package/dist/api-Dz4sCHH_.d.ts +654 -0
  29. package/dist/calls-BRPjKgjl.d.cts +70 -0
  30. package/dist/calls-z_EQOtFb.d.ts +70 -0
  31. package/dist/chains-DK13zGIp.d.cts +235 -0
  32. package/dist/chains-DK13zGIp.d.ts +235 -0
  33. package/dist/chunk-3XUGQODR.js +194 -0
  34. package/dist/chunk-3XUGQODR.js.map +1 -0
  35. package/dist/chunk-45KSZH26.cjs +145 -0
  36. package/dist/chunk-45KSZH26.cjs.map +1 -0
  37. package/dist/chunk-4GINFJO6.cjs +44 -0
  38. package/dist/chunk-4GINFJO6.cjs.map +1 -0
  39. package/dist/chunk-62M2LKQW.js +136 -0
  40. package/dist/chunk-62M2LKQW.js.map +1 -0
  41. package/dist/chunk-6DSZ4Z2N.js +498 -0
  42. package/dist/chunk-6DSZ4Z2N.js.map +1 -0
  43. package/dist/chunk-7MNJF2OB.cjs +72 -0
  44. package/dist/chunk-7MNJF2OB.cjs.map +1 -0
  45. package/dist/chunk-A5LP2UCS.cjs +2729 -0
  46. package/dist/chunk-A5LP2UCS.cjs.map +1 -0
  47. package/dist/chunk-AJS4UFQX.cjs +121 -0
  48. package/dist/chunk-AJS4UFQX.cjs.map +1 -0
  49. package/dist/chunk-C2XW44FI.cjs +200 -0
  50. package/dist/chunk-C2XW44FI.cjs.map +1 -0
  51. package/dist/chunk-C7IC36XS.cjs +13 -0
  52. package/dist/chunk-C7IC36XS.cjs.map +1 -0
  53. package/dist/chunk-D52PADVY.js +84 -0
  54. package/dist/chunk-D52PADVY.js.map +1 -0
  55. package/dist/chunk-DH6BFNVJ.cjs +272 -0
  56. package/dist/chunk-DH6BFNVJ.cjs.map +1 -0
  57. package/dist/chunk-DPCZJLB3.cjs +87 -0
  58. package/dist/chunk-DPCZJLB3.cjs.map +1 -0
  59. package/dist/chunk-EHBPIYY4.js +262 -0
  60. package/dist/chunk-EHBPIYY4.js.map +1 -0
  61. package/dist/chunk-ESMNAXUI.js +86 -0
  62. package/dist/chunk-ESMNAXUI.js.map +1 -0
  63. package/dist/chunk-ET3P6TX6.cjs +49 -0
  64. package/dist/chunk-ET3P6TX6.cjs.map +1 -0
  65. package/dist/chunk-FCXSP2YF.js +219 -0
  66. package/dist/chunk-FCXSP2YF.js.map +1 -0
  67. package/dist/chunk-IB2FSPMJ.js +66 -0
  68. package/dist/chunk-IB2FSPMJ.js.map +1 -0
  69. package/dist/chunk-IG7RSL2Y.cjs +178 -0
  70. package/dist/chunk-IG7RSL2Y.cjs.map +1 -0
  71. package/dist/chunk-IY3ALPUJ.js +2716 -0
  72. package/dist/chunk-IY3ALPUJ.js.map +1 -0
  73. package/dist/chunk-J3O2ZGG3.cjs +93 -0
  74. package/dist/chunk-J3O2ZGG3.cjs.map +1 -0
  75. package/dist/chunk-J6UXXHBE.js +37 -0
  76. package/dist/chunk-J6UXXHBE.js.map +1 -0
  77. package/dist/chunk-JLZ4LZ4Z.js +22 -0
  78. package/dist/chunk-JLZ4LZ4Z.js.map +1 -0
  79. package/dist/chunk-KIIFL4VM.js +274 -0
  80. package/dist/chunk-KIIFL4VM.js.map +1 -0
  81. package/dist/chunk-KVG3AYYR.js +99 -0
  82. package/dist/chunk-KVG3AYYR.js.map +1 -0
  83. package/dist/chunk-MBA4CLA5.js +45 -0
  84. package/dist/chunk-MBA4CLA5.js.map +1 -0
  85. package/dist/chunk-NE3QKDOB.cjs +24 -0
  86. package/dist/chunk-NE3QKDOB.cjs.map +1 -0
  87. package/dist/chunk-NVOPDXTA.cjs +95 -0
  88. package/dist/chunk-NVOPDXTA.cjs.map +1 -0
  89. package/dist/chunk-OH3QMAIB.js +11 -0
  90. package/dist/chunk-OH3QMAIB.js.map +1 -0
  91. package/dist/chunk-PHM3ZORG.cjs +110 -0
  92. package/dist/chunk-PHM3ZORG.cjs.map +1 -0
  93. package/dist/chunk-R5PXQNO3.cjs +209 -0
  94. package/dist/chunk-R5PXQNO3.cjs.map +1 -0
  95. package/dist/chunk-SLW7FRTL.cjs +285 -0
  96. package/dist/chunk-SLW7FRTL.cjs.map +1 -0
  97. package/dist/chunk-SVWRRALU.cjs +17 -0
  98. package/dist/chunk-SVWRRALU.cjs.map +1 -0
  99. package/dist/chunk-T43PQXJD.js +202 -0
  100. package/dist/chunk-T43PQXJD.js.map +1 -0
  101. package/dist/chunk-TIEAZYHF.cjs +225 -0
  102. package/dist/chunk-TIEAZYHF.cjs.map +1 -0
  103. package/dist/chunk-VBH3JLQ5.js +116 -0
  104. package/dist/chunk-VBH3JLQ5.js.map +1 -0
  105. package/dist/chunk-VF3D6KLQ.cjs +94 -0
  106. package/dist/chunk-VF3D6KLQ.cjs.map +1 -0
  107. package/dist/chunk-VTQIHMF3.js +82 -0
  108. package/dist/chunk-VTQIHMF3.js.map +1 -0
  109. package/dist/chunk-W3JN3YIW.js +15 -0
  110. package/dist/chunk-W3JN3YIW.js.map +1 -0
  111. package/dist/chunk-WANILJZQ.cjs +87 -0
  112. package/dist/chunk-WANILJZQ.cjs.map +1 -0
  113. package/dist/chunk-XC4IBCI2.js +86 -0
  114. package/dist/chunk-XC4IBCI2.js.map +1 -0
  115. package/dist/chunk-YKEWWQEJ.js +165 -0
  116. package/dist/chunk-YKEWWQEJ.js.map +1 -0
  117. package/dist/chunk-YQL7NISX.cjs +515 -0
  118. package/dist/chunk-YQL7NISX.cjs.map +1 -0
  119. package/dist/chunk-ZB6SVBK4.js +89 -0
  120. package/dist/chunk-ZB6SVBK4.js.map +1 -0
  121. package/dist/combo/react.cjs +235 -0
  122. package/dist/combo/react.cjs.map +1 -0
  123. package/dist/combo/react.d.cts +148 -0
  124. package/dist/combo/react.d.ts +148 -0
  125. package/dist/combo/react.js +230 -0
  126. package/dist/combo/react.js.map +1 -0
  127. package/dist/combo.cjs +262 -0
  128. package/dist/combo.cjs.map +1 -0
  129. package/dist/combo.d.cts +139 -0
  130. package/dist/combo.d.ts +139 -0
  131. package/dist/combo.js +249 -0
  132. package/dist/combo.js.map +1 -0
  133. package/dist/config-CHjz7ZjZ.d.cts +57 -0
  134. package/dist/config-COjhIZTh.d.ts +57 -0
  135. package/dist/doctor.cjs +354 -0
  136. package/dist/doctor.cjs.map +1 -0
  137. package/dist/doctor.d.cts +177 -0
  138. package/dist/doctor.d.ts +177 -0
  139. package/dist/doctor.js +345 -0
  140. package/dist/doctor.js.map +1 -0
  141. package/dist/erc7677-DOW58QBE.d.cts +111 -0
  142. package/dist/erc7677-DOW58QBE.d.ts +111 -0
  143. package/dist/errors-CgX1vNj7.d.cts +100 -0
  144. package/dist/errors-CgX1vNj7.d.ts +100 -0
  145. package/dist/index.cjs +802 -0
  146. package/dist/index.cjs.map +1 -0
  147. package/dist/index.d.cts +2398 -0
  148. package/dist/index.d.ts +2398 -0
  149. package/dist/index.js +559 -0
  150. package/dist/index.js.map +1 -0
  151. package/dist/paymaster/server.cjs +38 -0
  152. package/dist/paymaster/server.cjs.map +1 -0
  153. package/dist/paymaster/server.d.cts +57 -0
  154. package/dist/paymaster/server.d.ts +57 -0
  155. package/dist/paymaster/server.js +36 -0
  156. package/dist/paymaster/server.js.map +1 -0
  157. package/dist/paymaster.cjs +356 -0
  158. package/dist/paymaster.cjs.map +1 -0
  159. package/dist/paymaster.d.cts +1851 -0
  160. package/dist/paymaster.d.ts +1851 -0
  161. package/dist/paymaster.js +289 -0
  162. package/dist/paymaster.js.map +1 -0
  163. package/dist/privy/react.cjs +48 -0
  164. package/dist/privy/react.cjs.map +1 -0
  165. package/dist/privy/react.d.cts +194 -0
  166. package/dist/privy/react.d.ts +194 -0
  167. package/dist/privy/react.js +7 -0
  168. package/dist/privy/react.js.map +1 -0
  169. package/dist/privy/server.cjs +43 -0
  170. package/dist/privy/server.cjs.map +1 -0
  171. package/dist/privy/server.d.cts +192 -0
  172. package/dist/privy/server.d.ts +192 -0
  173. package/dist/privy/server.js +6 -0
  174. package/dist/privy/server.js.map +1 -0
  175. package/dist/privy/wagmi.d.ts +90 -0
  176. package/dist/privy/wagmi.js +55 -0
  177. package/dist/privy/wagmi.js.map +1 -0
  178. package/dist/privy.cjs +34 -0
  179. package/dist/privy.cjs.map +1 -0
  180. package/dist/privy.d.cts +4 -0
  181. package/dist/privy.d.ts +4 -0
  182. package/dist/privy.js +5 -0
  183. package/dist/privy.js.map +1 -0
  184. package/dist/react.cjs +72 -0
  185. package/dist/react.cjs.map +1 -0
  186. package/dist/react.d.cts +66 -0
  187. package/dist/react.d.ts +66 -0
  188. package/dist/react.js +68 -0
  189. package/dist/react.js.map +1 -0
  190. package/dist/requirements-C-QiJkL9.d.cts +134 -0
  191. package/dist/requirements-C-QiJkL9.d.ts +134 -0
  192. package/dist/scope-DBRkN7bR.d.cts +94 -0
  193. package/dist/scope-DBRkN7bR.d.ts +94 -0
  194. package/dist/server.cjs +59 -0
  195. package/dist/server.cjs.map +1 -0
  196. package/dist/server.d.cts +208 -0
  197. package/dist/server.d.ts +208 -0
  198. package/dist/server.js +8 -0
  199. package/dist/server.js.map +1 -0
  200. package/dist/session/kernel.cjs +82 -0
  201. package/dist/session/kernel.cjs.map +1 -0
  202. package/dist/session/kernel.d.cts +131 -0
  203. package/dist/session/kernel.d.ts +131 -0
  204. package/dist/session/kernel.js +13 -0
  205. package/dist/session/kernel.js.map +1 -0
  206. package/dist/session/react.cjs +37 -0
  207. package/dist/session/react.cjs.map +1 -0
  208. package/dist/session/react.d.cts +119 -0
  209. package/dist/session/react.d.ts +119 -0
  210. package/dist/session/react.js +8 -0
  211. package/dist/session/react.js.map +1 -0
  212. package/dist/session/server.cjs +267 -0
  213. package/dist/session/server.cjs.map +1 -0
  214. package/dist/session/server.d.cts +151 -0
  215. package/dist/session/server.d.ts +151 -0
  216. package/dist/session/server.js +252 -0
  217. package/dist/session/server.js.map +1 -0
  218. package/dist/session.cjs +74 -0
  219. package/dist/session.cjs.map +1 -0
  220. package/dist/session.d.cts +3 -0
  221. package/dist/session.d.ts +3 -0
  222. package/dist/session.js +5 -0
  223. package/dist/session.js.map +1 -0
  224. package/dist/status-CmOsyPmO.d.cts +295 -0
  225. package/dist/status-DwkkOrGQ.d.ts +295 -0
  226. package/dist/store-CjmLgp9g.d.cts +64 -0
  227. package/dist/store-CjmLgp9g.d.ts +64 -0
  228. package/dist/types-BEEM7WdG.d.cts +25 -0
  229. package/dist/types-BEEM7WdG.d.ts +25 -0
  230. package/dist/types-BilBTDqK.d.cts +27 -0
  231. package/dist/types-BilBTDqK.d.ts +27 -0
  232. package/package.json +209 -3
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pepe Unchained
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,566 @@
1
- # Temporary Holding Version
1
+ # @pepu-chain/sdk
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Chain definitions, contract/DEX registries, ABIs, gas utilities, explorer
4
+ helpers, an account-abstraction surface, and a canonical token list for
5
+ **Pepe Unchained V2** — an Arbitrum Orbit / Nitro chain (ArbOS 51) hosted by
6
+ Conduit.
7
+
8
+ This package *extends* [viem](https://viem.sh). It does not wrap or
9
+ re-export viem's own API — you still use `viem` directly for clients,
10
+ actions, encoding, etc. `@pepu-chain/sdk` only supplies the PEPU-specific facts
11
+ viem doesn't know: chain IDs, RPC URLs, which contracts actually exist on
12
+ this chain (with on-chain-verified addresses only), ABIs for those
13
+ contracts, a token list, and small helpers layered on top.
14
+
15
+ Everything in this package is independently verified against live PEPU
16
+ mainnet (`eth_getCode` plus a successful read call, at minimum) — see each
17
+ module's source comments for exactly how. Nothing here is a guessed or
18
+ copied-from-elsewhere address.
19
+
20
+ ## Install
21
+
22
+ ```sh
23
+ npm install @pepu-chain/sdk viem
24
+ # or
25
+ pnpm add @pepu-chain/sdk viem
26
+ ```
27
+
28
+ `viem` is a peer dependency (`^2.0.0`) — this package does not bundle it, so
29
+ your app controls its own viem version. `react` is an **optional** peer
30
+ dependency, needed only if you import from `@pepu-chain/sdk/react` (see below);
31
+ the main `@pepu-chain/sdk` entry point never touches React and works in a plain
32
+ Node script.
33
+
34
+ ## Quickstart
35
+
36
+ ```ts
37
+ import { pepuMainnet, getPublicClient, explorerUrl } from "@pepu-chain/sdk";
38
+
39
+ const client = getPublicClient(pepuMainnet);
40
+
41
+ const blockNumber = await client.getBlockNumber();
42
+ console.log(`Latest block: ${blockNumber}`);
43
+
44
+ console.log(explorerUrl(pepuMainnet, "tx", "0x..."));
45
+ // -> https://pepuscan.com/tx/0x...
46
+ ```
47
+
48
+ Using it with wagmi is the same as any other chain:
49
+
50
+ ```ts
51
+ import { createConfig, http } from "wagmi";
52
+ import { pepuMainnet } from "@pepu-chain/sdk";
53
+
54
+ export const config = createConfig({
55
+ chains: [pepuMainnet],
56
+ transports: {
57
+ [pepuMainnet.id]: http(),
58
+ },
59
+ });
60
+ ```
61
+
62
+ ## Chain registry & wallet helpers
63
+
64
+ ```ts
65
+ import {
66
+ pepuMainnet,
67
+ pepuTestnet,
68
+ pepuChains,
69
+ isPepuChain,
70
+ toAddEthereumChainParameter,
71
+ switchOrAddPepuChain,
72
+ } from "@pepu-chain/sdk";
73
+
74
+ isPepuChain(97741); // true
75
+ isPepuChain(1); // false — Ethereum mainnet
76
+
77
+ // Build the `wallet_addEthereumChain` parameter object by hand:
78
+ toAddEthereumChainParameter(pepuMainnet);
79
+ // -> { chainId: "0x17dcd", chainName: "Pepe Unchained V2", ... }
80
+
81
+ // Or let a connected EIP-1193 provider add it if needed, then switch:
82
+ await switchOrAddPepuChain(window.ethereum, pepuMainnet);
83
+ ```
84
+
85
+ ## Contract registry
86
+
87
+ ```ts
88
+ import { getContract, isDeployed, pepuMainnet } from "@pepu-chain/sdk";
89
+
90
+ const permit2 = getContract(pepuMainnet.id, "permit2");
91
+ if (isDeployed(permit2)) {
92
+ console.log(permit2.address);
93
+ // -> 0x000000000022D473030F116dDEE9F6B43aC78BA3 (canonical Permit2)
94
+ }
95
+
96
+ const multicall3 = getContract(pepuMainnet.id, "multicall3");
97
+ // PEPU-specific address, NOT the canonical one — see "Known gaps" below.
98
+ ```
99
+
100
+ `pepuContracts[chainId]` tracks, per chain, whichever of these exist:
101
+ `create2Factory`, `multicall3`, `permit2`, `entryPoint06`, `entryPoint07`,
102
+ `kernelFactory`, `kernelMetaFactory`, `ecdsaValidator`, `paymaster`. Every
103
+ entry is either `{ status: "deployed", address, notes? }` or
104
+ `{ status: "pending", reason }` — there is no field to accidentally read an
105
+ address off a pending entry; TypeScript won't let you.
106
+
107
+ The `paymaster` entry (alias of `paymasterV2`) is the v2 paymaster
108
+ `PepuSponsoredPaymasterV7` at `0xdb28528C9399C33c9A0297E8A62F39145acbC30D`,
109
+ deployed as a canary: internally reviewed 3x, external audit pending, funded in
110
+ small tranches. `paymasterV1` is retired (`retired: true`; its EntryPoint
111
+ deposit was withdrawn, so it cannot sponsor anything, never deposit to it).
112
+ `status: "deployed"` answers "does this contract exist," not "can my app get
113
+ gas sponsored." For that second question call `checkSponsorship()` (a live
114
+ probe of the hosted bundler and paymaster service). The deprecated
115
+ `getSponsorshipStatus()` still always reports unavailable.
116
+
117
+ ## PepuSwap (DEX) registry
118
+
119
+ PepuSwap is PEPU's flagship DEX, a Uniswap V3 fork. Its contracts are
120
+ tracked separately from `pepuContracts` (see `src/dex.ts` for why) because
121
+ they're one application's deployment, not chain infrastructure:
122
+
123
+ ```ts
124
+ import { getPepuSwapContract, isDeployed, pepuMainnet } from "@pepu-chain/sdk";
125
+
126
+ const router = getPepuSwapContract(pepuMainnet.id, "swapRouter02");
127
+ if (isDeployed(router)) {
128
+ console.log(router.address); // 0x150c3F0f16C3D9EB34351d7af9c961FeDc97A0fb
129
+ }
130
+ ```
131
+
132
+ Tracked names: `v3Factory`, `swapRouter02`, `universalRouter`,
133
+ `positionManager`, `quoterV2`, `tickLens`, `v3Migrator`, `v3Staker`,
134
+ `multicallNonCanonical`, `permit2NonCanonical`. The last two are PepuSwap's
135
+ own overrides of otherwise-standard infrastructure — **do not** confuse them
136
+ with `pepuContracts.multicall3` / `pepuContracts.permit2`:
137
+
138
+ - `multicallNonCanonical` (`0x927af2a6B76d2d8206d93004463F8C122701383B`) is
139
+ Uniswap's `UniswapInterfaceMulticall`, not Multicall3. See
140
+ `pepuSwapMulticallAbi`.
141
+ - `permit2NonCanonical` (`0xB461c05f76d7f919FF7A3Df2B0D2593F56538b4B`) is
142
+ PepuSwap's own separate Permit2 deployment, predating (and not
143
+ interoperable with) the canonical Permit2 now also live on PEPU as
144
+ `pepuContracts.permit2`.
145
+
146
+ `v3Migrator` and `v3Staker` are verified (address + a live read) but ship
147
+ without a dedicated ABI in `./abi/` — pair them with Uniswap's public
148
+ `V3Migrator`/`V3Staker` ABIs if you need their full interface.
149
+
150
+ ## ABIs
151
+
152
+ `@pepu-chain/sdk` ships hand-verified ABI subsets — not full contract interfaces,
153
+ just the functions actually confirmed live — for every deployed contract in
154
+ both registries: `wpepuAbi`, `pepuSwapV3FactoryAbi`, `pepuSwapV3PoolAbi`,
155
+ `pepuSwapRouterAbi`, `pepuSwapQuoterAbi`, `pepuSwapPositionManagerAbi`,
156
+ `pepuSwapTickLensAbi`, `pepuSwapUniversalRouterAbi`, `pepuSwapPermit2Abi`,
157
+ `pepuSwapMulticallAbi`, `arbGasInfoAbi` (+ `ARB_GAS_INFO_ADDRESS`),
158
+ `entryPointV07Abi`, `kernelFactoryAbi` (+
159
+ `KERNEL_V3_1_IMPLEMENTATION_ADDRESS`), `kernelEcdsaValidatorAbi` (+
160
+ `ERC7579_MODULE_TYPE`). See each file under `src/abi/` for exactly which
161
+ functions were verified and how.
162
+
163
+ ```ts
164
+ import { createPublicClient, http } from "viem";
165
+ import { pepuMainnet, getPepuSwapContract, isDeployed, pepuSwapV3FactoryAbi } from "@pepu-chain/sdk";
166
+
167
+ const client = createPublicClient({ chain: pepuMainnet, transport: http() });
168
+ const factory = getPepuSwapContract(pepuMainnet.id, "v3Factory");
169
+
170
+ if (isDeployed(factory)) {
171
+ const pool = await client.readContract({
172
+ address: factory.address,
173
+ abi: pepuSwapV3FactoryAbi,
174
+ functionName: "getPool",
175
+ args: [wpepuAddress, usdtAddress, 3000],
176
+ });
177
+ }
178
+ ```
179
+
180
+ ## Gas & fees
181
+
182
+ PEPU's Nitro dual-fee model (L2 execution + L1 data-posting) is not what
183
+ most developers expect, and its ~12,500 gwei base fee looks alarming if you
184
+ only know Ethereum's range — but PEPU is a low-value token, so naive
185
+ formatting misleads in both directions. See `src/gas.ts`.
186
+
187
+ ```ts
188
+ import {
189
+ getNitroFeeBreakdown,
190
+ explainDualFeeModel,
191
+ estimateTransactionCost,
192
+ formatPepu,
193
+ formatPepuGasPrice,
194
+ maxSendableAmount,
195
+ } from "@pepu-chain/sdk";
196
+
197
+ const breakdown = await getNitroFeeBreakdown(client);
198
+ // { l2PricePerGasWei, l1PricePerCalldataUnitWei, l1BaseFeeEstimateWei }
199
+
200
+ console.log(explainDualFeeModel().summary);
201
+
202
+ const estimate = await estimateTransactionCost(client, {
203
+ to: "0x...",
204
+ value: 1000000000000000000n,
205
+ });
206
+ console.log(estimate.costFormatted); // e.g. "0.0000105 PEPU"
207
+
208
+ formatPepu(10_000_000_000n); // "0.00000001 PEPU" — not "0 PEPU"
209
+ formatPepuGasPrice(12_500_000_000_000n);
210
+ // "12500 gwei/gas (PEPU's normal baseline is ~12,500 gwei — this is not a congestion spike; see explainDualFeeModel())"
211
+ ```
212
+
213
+ ### "Send max" — sizing a transfer against the sender's own balance
214
+
215
+ Naive `balance - gasLimit * gasPrice` arithmetic is wrong on an Arbitrum
216
+ Nitro chain in general (see the dual-fee model above), and doubly wrong if
217
+ you plug in a hand-picked `gasLimit` instead of a real `eth_estimateGas`
218
+ result. `maxSendableAmount` does this correctly — and safely — for a
219
+ native-currency "Max" button:
220
+
221
+ ```ts
222
+ import { maxSendableAmount } from "@pepu-chain/sdk";
223
+
224
+ const result = await maxSendableAmount({
225
+ client,
226
+ from: "0xSender...",
227
+ to: "0xRecipient...", // omit while the user hasn't typed one yet
228
+ balanceWei: senderBalance, // e.g. from wagmi's useBalance / viem's getBalance
229
+ });
230
+
231
+ switch (result.status) {
232
+ case "ok":
233
+ // result.amountWei is safe to fill into an amount field.
234
+ // result.estimate / result.marginWei / result.totalReservedWei explain why.
235
+ break;
236
+ case "zero-balance":
237
+ case "insufficient-for-gas":
238
+ // result.reason is a ready-to-render explanation — disable the button, don't guess.
239
+ break;
240
+ }
241
+ ```
242
+
243
+ It never reimplements Nitro's fee math — it estimates the real transfer
244
+ with `estimateTransactionCost` (so the chain's own `eth_estimateGas`
245
+ decides gas usage) and applies a documented safety margin
246
+ (`DEFAULT_MAX_SEND_MARGIN_BPS`, 20% by default) on top, to absorb base-fee
247
+ movement between estimating and submitting. Estimation failures propagate
248
+ as a rejected promise rather than a silent fallback guess — see
249
+ `src/gas.ts`'s doc comment on `maxSendableAmount` for the full reasoning,
250
+ including why it can't just estimate gas using the balance itself as the
251
+ candidate `value` (circular, and most RPCs would reject the simulation for
252
+ insufficient funds).
253
+
254
+ **Not currently used by `templates/consumer-app`.** That template's send
255
+ form removed its "Max" button — not because this helper is wrong, but
256
+ because Privy's transaction confirmation modal performs its own separate,
257
+ over-conservative pre-flight balance check before signing, and on PEPU it
258
+ has been observed to reject transfers this function sizes correctly (e.g.
259
+ refusing a 0.2625 PEPU transfer from a 0.7748 PEPU balance). Since that
260
+ modal has final say, a correct "Max" amount can still bounce there, so the
261
+ button was removed rather than ship a control that sometimes lies. Reach
262
+ for `maxSendableAmount` for any PEPU wallet UI that submits transactions
263
+ itself instead of routing through Privy's modal.
264
+
265
+ ## Explorer helpers & pepuscan client
266
+
267
+ ```ts
268
+ import {
269
+ explorerUrl,
270
+ txUrl,
271
+ addressUrl,
272
+ tokenUrl,
273
+ blockUrl,
274
+ createPepuscanClient,
275
+ } from "@pepu-chain/sdk";
276
+
277
+ txUrl(pepuMainnet, "0x...");
278
+ blockUrl(pepuMainnet, 12345);
279
+
280
+ const pepuscan = createPepuscanClient(pepuMainnet);
281
+ const abi = await pepuscan.getVerifiedAbi("0x..."); // null if unverified
282
+ const meta = await pepuscan.getTokenMetadata("0x..."); // null if not a known token
283
+ ```
284
+
285
+ `createPepuscanClient` is deliberately narrow — verified-ABI and
286
+ token-metadata reads only. It does not re-wrap Blockscout's full API
287
+ (transaction history, logs, NFTs, etc.); use the Blockscout MCP server for
288
+ that.
289
+
290
+ ## Account abstraction and gas sponsorship
291
+
292
+ The full ZeroDev Kernel v3 stack (EntryPoint v0.6/v0.7, Kernel
293
+ factory/meta-factory, ECDSA validator) is deployed and verified on mainnet.
294
+ PEPU hosts the bundler (`https://bundler.pepeunchained.com`, the default for
295
+ `PEPU_BUNDLER_URL`) and the paymaster service
296
+ (`https://paymaster.pepeunchained.com`, exposed as
297
+ `resolvePepuEndpoints().paymasterBaseUrl`). Sponsorship is **proven on
298
+ mainnet** through those URLs: a project-sponsored operation from a fresh
299
+ Kernel account holding 0 PEPU, paid for by the v2 paymaster (a canary:
300
+ internally reviewed 3x, external audit pending, funded in small tranches, so
301
+ deposit in small amounts).
302
+
303
+ The ERC-7677 paymaster URL always embeds a token
304
+ (`https://paymaster.pepeunchained.com/v2/paymaster/<token>`), so there is no
305
+ tokenless default (`PEPU_HOSTED.paymasterUrl` is `null`). An app brings a
306
+ project: claim it, deposit into it, and use its token. Build the URL with
307
+ `hostedErc7677Url(token)` (from `@pepu-chain/sdk/paymaster`) or pass
308
+ `paymasterToken` to `createPepuPaymasterClient` /
309
+ `createPepuSponsoredClient`. A project client token (`ppt_`) works only from
310
+ the project's allowed origins; a server key (`ppk_`) is secret and server
311
+ only. The per-user free tier (100 PEPU/day and 50 PEPU/hour, TapScore only for
312
+ now) needs a verified Privy token from PEPU's own Privy app, so third-party
313
+ apps use a project. See [/paymaster](../../docs/sdk/paymaster.md) and
314
+ [/aa](../../docs/sdk/aa.md). The Google login + Kernel session key +
315
+ sponsorship combination is proven by script; the browser flow has not yet been
316
+ run by a person.
317
+
318
+ ```ts
319
+ import {
320
+ getPepuKernelStack,
321
+ getKernelAccountAddress,
322
+ getSponsorshipStatus,
323
+ pepuMainnet,
324
+ } from "@pepu-chain/sdk";
325
+
326
+ const stack = getPepuKernelStack(pepuMainnet.id); // undefined on testnet
327
+ if (stack) {
328
+ // Build `data` (Kernel v3.1's initialize() calldata) with @zerodev/sdk —
329
+ // this package does not fabricate that encoding. Then:
330
+ const address = await getKernelAccountAddress(client, stack.kernelFactory, {
331
+ data, // from @zerodev/sdk
332
+ salt: "0x0",
333
+ });
334
+ }
335
+
336
+ getSponsorshipStatus();
337
+ // Deprecated and always { available: false }. Use `await checkSponsorship()` for the live answer.
338
+ ```
339
+
340
+ ## Token list
341
+
342
+ ```ts
343
+ import { pepuTokenList } from "@pepu-chain/sdk";
344
+
345
+ console.log(pepuTokenList.tokens.map((t) => t.symbol));
346
+ // -> ["WPEPU", "USDT", "USDC", "WETH"]
347
+ ```
348
+
349
+ `pepuTokenList` conforms to the
350
+ [Uniswap Token List schema](https://github.com/Uniswap/token-lists). Every
351
+ token address is independently on-chain verified (see `src/tokens.ts`) —
352
+ none are copied from a third-party list without cross-checking.
353
+
354
+ ## React hooks (`@pepu-chain/sdk/react`)
355
+
356
+ A separate subpath so the core package never needs React installed.
357
+
358
+ ```ts
359
+ import { usePepuBalance, usePepuChain, useSponsorshipStatus } from "@pepu-chain/sdk/react";
360
+
361
+ function Balance({ client, address }) {
362
+ const { data, isLoading, error, refetch } = usePepuBalance(client, { address });
363
+ // ...
364
+ }
365
+
366
+ function ChainBadge({ chainId }) {
367
+ const { chain, isPepuChain } = usePepuChain(chainId);
368
+ // ...
369
+ }
370
+
371
+ function SponsorshipNotice() {
372
+ const { available, reason } = useSponsorshipStatus();
373
+ // `available` is always false today — see "Account abstraction" above.
374
+ }
375
+ ```
376
+
377
+ Every hook takes its viem client (or nothing extra at all) as a parameter
378
+ rather than reaching for one via a context provider this package would have
379
+ to define — use whatever client your app already has.
380
+
381
+ ## Privy, session-signer and paymaster helpers
382
+
383
+ Three small additions so apps stop re-implementing the same Privy and ERC-7677 plumbing. None of them depends on a Privy package, and none of them implies sponsorship is available to an app.
384
+
385
+ | Import | Export | Description |
386
+ |---|---|---|
387
+ | `@pepu-chain/sdk/privy` (client-safe) | `createPepuPrivyConfig(options?)` | The `config` for `<PrivyProvider>`: `defaultChain` and `supportedChains` set to PEPU mainnet only, `embeddedWallets.ethereum.createOnLogin` (default `"off"`), and Coinbase Wallet pinned to `eoaOnly` |
388
+ | `@pepu-chain/sdk/server` (server-only) | `buildSessionPolicy({ contractAddress, functions, expiresAtUnixSeconds, name? })` | The scoped Privy policy for a session signer: one `ALLOW` rule per function, each pinning contract, function, zero value and expiry, on `eth_signTransaction`. Throws rather than build an unscoped policy |
389
+ | | `PRIVY_POLICY_NAME_MAX_LENGTH` (`49`), `assertWithinPolicyNameLimit(value, field)` | Privy rejects policy and rule names of 50 characters or more; the guard fails loudly at build time |
390
+ | | `signAndBroadcast({ client, from, to, data \| abi + functionName, chainId, sign })` | Resolves nonce, gas (+20%) and gas price against PEPU's RPC, hands the unsigned legacy transaction to your `sign` callback (Privy `eth_signTransaction`), broadcasts, returns the hash |
391
+ | | `broadcastSignedTransaction(client, signed)` | Broadcast a raw signed transaction (hex or `{ signed_transaction }`) and return the hash |
392
+ | `@pepu-chain/sdk` | `buildPaymasterContext(entries?)`, `buildPaymasterStubDataRequest(options)`, `buildPaymasterDataRequest(options)` | ERC-7677 request builders defaulting to chain 97741 and EntryPoint v0.7 |
393
+ | | `Erc7677UserOperation`, `PaymasterStubDataRequest`, `PaymasterDataRequest`, `PaymasterStubDataResult`, `PaymasterDataResult`, `PaymasterRpcResponse`, `PaymasterRpcError`, `PaymasterContext` | ERC-7677 request and response types |
394
+
395
+ ```tsx
396
+ // Client: app/providers.tsx
397
+ import { createPepuPrivyConfig } from "@pepu-chain/sdk/privy";
398
+
399
+ const privyConfig = createPepuPrivyConfig({ loginMethods: ["email", "google", "wallet"] });
400
+ ```
401
+
402
+ ```ts
403
+ // Server: an authenticated route, never client code
404
+ import { buildSessionPolicy, signAndBroadcast } from "@pepu-chain/sdk/server";
405
+
406
+ const policy = buildSessionPolicy({
407
+ contractAddress,
408
+ functions: [tapAbiFragment],
409
+ expiresAtUnixSeconds: Math.floor(Date.now() / 1000) + 15 * 60,
410
+ });
411
+
412
+ const hash = await signAndBroadcast({
413
+ client: publicClient,
414
+ from: wallet.address,
415
+ to: contractAddress,
416
+ data,
417
+ chainId: 97741,
418
+ sign: (transaction) =>
419
+ privy.wallets().ethereum().signTransaction(wallet.id, {
420
+ params: { transaction },
421
+ authorization_context: { authorization_private_keys: [privyAuthorizationKey] },
422
+ }),
423
+ });
424
+ ```
425
+
426
+ The session policy is enforced by Privy's backend engine, not on-chain, and the user still pays gas. See [Session Keys](https://guide.pepeunchained.com/onboarding/session-keys) and [Sign with Privy, Broadcast Yourself](https://guide.pepeunchained.com/recipes/sign-with-privy-broadcast-yourself).
427
+
428
+ ## Additions for app templates
429
+
430
+ All additive; nothing here changes an existing signature.
431
+
432
+ | Import | Export | What it does |
433
+ |---|---|---|
434
+ | `@pepu-chain/sdk` | `formatUnitsCompact(value, decimals, maxFractionDigits = 4)` | Short decimal string for any token's decimals (truncates, trims zeros). `formatPepu` is the 18-decimals PEPU one |
435
+ | `@pepu-chain/sdk` | `erc20Abi`, `erc721Abi` | viem's standard ABIs, re-exported from the abi module so apps import every ABI from one place |
436
+ | `/privy/react` | `<WalletGate loading error stalled>` | Render props for all three states: `loading` (node), `error(e, retry)`, `stalled(address, reload)`. Use it directly with your own markup |
437
+ | `/session/react` | `useSessionStatus().loading` | `true` until the first status response lands, so the consent screen does not flash on reload |
438
+ | `/combo/react` | `useSponsoredSession().statusLoading` | Same for the combo flow. `phase` stays `ready` while it is `true` |
439
+ | `/combo`, `/combo/react` | `SponsoredActResult` (type) | Response body of the combo `act` route. `useSponsoredSession<undefined, SponsoredActResult>()` |
440
+ | `/combo` | `resolveSessionMinutes` | Same session-length rule the routes use (`SESSION_DURATION_MINUTES`, default 15, clamped 1..1440) |
441
+ | `/aa/react` | `usePepuSmartAccount()` | Falls back to `useSmartWallets().getClientForChain({ id: 97741 })` while `client` is unset. Never loads `@zerodev/*`; needs `permissionless` |
442
+ | `/aa/react-direct` | `useDirectSponsoredSend`, `useDirectSmartAccount` | The direct transport (your own bundler and paymaster) split out of `/aa/react` so that entry never references ZeroDev. Needs `@zerodev/sdk` and `@zerodev/ecdsa-validator` |
443
+ | `/session/server`, `/combo` | `createSessionRoutes`, `createSessionActionRoute`, `createSponsoredSessionRoutes` | An empty or undefined contract address (an unset env variable) no longer throws at module load: every route answers `CONFIG_MISSING_ENV` as JSON at request time. Name the variable with `contractAddressEnv` (`targetEnv` in the combo scope). A non-empty malformed address still throws at creation |
444
+ | `/session`, `/session/kernel` | `describeKernelSessionScope`, `isCallInScope`, `parseApproval`, `checkApproval`, scope types | Pure helpers in `session/scope.ts`. Import them from `/session` to avoid the `@zerodev/*` peers; `/session/kernel` re-exports them |
445
+ | `/aa`, `/aa/kernel` | `encodeKernelExecute(calls)` | Pure ERC-7579 `execute` callData for a Kernel v3 UserOperation (single mode for one call, batch for several), no live account needed |
446
+ | `/aa`, `/aa/kernel` | `userOpEventsFromReceipt(receipt)` | Every `UserOperationEvent` in a receipt, without knowing the sender. `userOpEventFromReceipt` finds one sender's |
447
+
448
+ ```tsx
449
+ <WalletGate
450
+ loading={<Spinner />}
451
+ error={(e, retry) => <button onClick={retry}>{e.message}</button>}
452
+ stalled={(address, reload) => <button onClick={reload}>Reload ({address})</button>}
453
+ >
454
+ <App />
455
+ </WalletGate>
456
+ ```
457
+
458
+ ## Public API
459
+
460
+ Named exports only — there is no default export, in either entry point.
461
+
462
+ ### `@pepu-chain/sdk`
463
+
464
+ | Export | Kind | Description |
465
+ | --- | --- | --- |
466
+ | `pepuMainnet` / `pepuTestnet` | value | viem `Chain` objects for `97741` / `97740` |
467
+ | `pepuChains` | value | `[pepuMainnet, pepuTestnet]` |
468
+ | `PepuChain` / `PepuChainId` | type | Chain object / id union |
469
+ | `isPepuChain(chainId)` | function | Type guard: is this one of PEPU's chain ids? |
470
+ | `toAddEthereumChainParameter(chain)` | function | Build a `wallet_addEthereumChain` parameter object |
471
+ | `switchOrAddPepuChain(provider, chain)` | function | Switch an EIP-1193 provider to `chain`, adding it first if needed |
472
+ | `pepuContracts` | value | Chain-infrastructure contract registry, keyed by chain id |
473
+ | `getContract` / `listContracts` / `isDeployed` | function | Registry lookup / list / type-narrow |
474
+ | `PepuContractName` / `ContractEntry` / `DeployedContract` / `PendingContract` / `PepuContractRegistry` | type | Registry shapes |
475
+ | `pepuSwapContracts` | value | PepuSwap (DEX) contract registry, keyed by chain id |
476
+ | `getPepuSwapContract` / `listPepuSwapContracts` | function | PepuSwap registry lookup / list |
477
+ | `PepuSwapContractName` | type | Union of PepuSwap registry keys |
478
+ | `wpepuAbi`, `pepuSwapV3FactoryAbi`, `pepuSwapV3PoolAbi`, `pepuSwapRouterAbi`, `pepuSwapQuoterAbi`, `pepuSwapPositionManagerAbi`, `pepuSwapTickLensAbi`, `pepuSwapUniversalRouterAbi`, `pepuSwapPermit2Abi`, `pepuSwapMulticallAbi` | value | Verified PepuSwap/WPEPU ABI subsets |
479
+ | `arbGasInfoAbi` / `ARB_GAS_INFO_ADDRESS` | value | Arbitrum `ArbGasInfo` precompile ABI/address |
480
+ | `entryPointV07Abi` | value | ERC-4337 EntryPoint v0.7 deposit/nonce ABI subset |
481
+ | `kernelFactoryAbi` / `KERNEL_V3_1_IMPLEMENTATION_ADDRESS` | value | Kernel v3 factory ABI / verified implementation address |
482
+ | `kernelEcdsaValidatorAbi` / `ERC7579_MODULE_TYPE` | value | Kernel ECDSA validator ABI / ERC-7579 module type ids |
483
+ | `pepuTokenList` | value | Uniswap-schema token list |
484
+ | `PepuTokenList` / `PepuTokenInfo` | type | Token list shapes |
485
+ | `getPublicClient(chain, options?)` | function | Configured viem `PublicClient` |
486
+ | `explorerUrl(chain, type, value)` / `txUrl` / `addressUrl` / `tokenUrl` / `blockUrl` | function | Build Blockscout URLs |
487
+ | `ExplorerResourceType` | type | `"tx" \| "address" \| "token" \| "block"` |
488
+ | `createPepuscanClient(chain)` | function | Minimal pepuscan (Blockscout) client — verified-ABI + token-metadata reads |
489
+ | `PepuscanClient` / `PepuscanTokenMetadata` | type | pepuscan client shapes |
490
+ | `getNitroFeeBreakdown(client)` | function | Live L2/L1 fee components from `ArbGasInfo` |
491
+ | `explainDualFeeModel()` | function | Plain-English explanation of Nitro's dual-fee model |
492
+ | `estimateTransactionCost(client, request)` | function | Estimate a transaction's PEPU cost |
493
+ | `formatPepu(wei, options?)` / `formatPepuGasPrice(weiPerGas)` | function | PEPU-appropriate amount/gas-price formatting |
494
+ | `maxSendableAmount(options)` | function | Largest amount sendable from a balance after gas + safety margin |
495
+ | `DEFAULT_MAX_SEND_MARGIN_BPS` | value | Default safety margin `maxSendableAmount` applies (2000 = 20%) |
496
+ | `NitroFeeBreakdown` / `DualFeeModelExplanation` / `TransactionCostEstimate` / `FormatPepuOptions` / `MaxSendableAmountOptions` / `MaxSendableAmountResult` | type | Gas module shapes |
497
+ | `getPepuKernelStack(chainId)` | function | The 5 AA contracts, grouped, `undefined` unless all deployed |
498
+ | `getKernelAccountAddress(client, factory, args)` | function | Thin pass-through to the Kernel factory's `getAddress` |
499
+ | `getSponsorshipStatus(options?)` | function | Always-honest gas-sponsorship availability check |
500
+ | `PepuKernelStack` / `SponsorshipStatus` / `GetSponsorshipStatusOptions` | type | AA module shapes |
501
+ | `buildPaymasterContext(entries?)` / `buildPaymasterStubDataRequest(options)` / `buildPaymasterDataRequest(options)` | function | ERC-7677 context and JSON-RPC request builders (chain 97741, EntryPoint v0.7 by default) |
502
+ | `Erc7677UserOperation` / `PaymasterStubDataRequest` / `PaymasterDataRequest` / `PaymasterStubDataResult` / `PaymasterDataResult` / `PaymasterRpcResponse` / `PaymasterRpcError` / `PaymasterRpcParams` / `PaymasterContext` / `BuildPaymasterRequestOptions` | type | ERC-7677 types |
503
+
504
+ ### `@pepu-chain/sdk/react` (requires `react` installed)
505
+
506
+ | Export | Kind | Description |
507
+ | --- | --- | --- |
508
+ | `usePepuBalance(client, options)` | hook | Read (and optionally poll) a native or ERC-20 balance |
509
+ | `usePepuChain(chainId)` | hook | Resolve a raw chain id to its `PepuChain`, if it's one of PEPU's |
510
+ | `useSponsorshipStatus(options?)` | hook | React wrapper around `getSponsorshipStatus` |
511
+ | `UsePepuBalanceOptions` / `UsePepuBalanceResult` / `UsePepuChainResult` | type | Hook option/result shapes |
512
+
513
+ ### `@pepu-chain/sdk/privy` (client-safe, no Privy dependency)
514
+
515
+ | Export | Kind | Description |
516
+ | --- | --- | --- |
517
+ | `createPepuPrivyConfig(options?)` | function | `<PrivyProvider>` config: PEPU mainnet only, `createOnLogin` (default `"off"`), Coinbase `eoaOnly` |
518
+ | `PepuPrivyClientConfig` / `CreatePepuPrivyConfigOptions` / `PrivyLoginMethod` / `EmbeddedWalletCreateOnLogin` | type | Config shapes |
519
+
520
+ ### `@pepu-chain/sdk/server` (server-only: keep out of client bundles)
521
+
522
+ | Export | Kind | Description |
523
+ | --- | --- | --- |
524
+ | `buildSessionPolicy(params)` | function | Scoped Privy session-signer policy (contract, function(s), zero value, expiry); refuses an unscoped policy |
525
+ | `PRIVY_POLICY_NAME_MAX_LENGTH` / `assertWithinPolicyNameLimit(value, field)` | value / function | Privy name limit (49) and its guard |
526
+ | `signAndBroadcast(params)` | function | Resolve fields, sign via your `sign` callback, broadcast, return the hash |
527
+ | `broadcastSignedTransaction(client, signed)` | function | Broadcast a raw signed transaction, return the hash |
528
+ | `withGasLimitBuffer(gas)` | function | Gas estimate plus 20% |
529
+ | `SessionPolicy` / `SessionPolicyRule` / `SessionPolicyCondition` / `BuildSessionPolicyParams` / `PrivyUnsignedTransaction` / `SignedTransactionLike` / `BroadcastClient` / `SignAndBroadcastClient` / `SignAndBroadcastParams` | type | Server helper shapes |
530
+
531
+ ## Known gaps
532
+
533
+ Deliberate omissions, not oversights — each is tracked so it can be filled
534
+ in later without a breaking change.
535
+
536
+ - **Sponsorship needs a project.** The hosted bundler and paymaster service are
537
+ live and the v2 paymaster is a canary (external audit pending), but every
538
+ ERC-7677 URL embeds a project token and there is no tokenless default.
539
+ `getSponsorshipStatus()` / `useSponsorshipStatus()` are deprecated and
540
+ always report `available: false`; use `checkSponsorship()` /
541
+ `usePepuSponsorship()` for the live answer.
542
+ - **Testnet (97740) is out of scope.** No faucet exists to fund
543
+ verification there, so every `pepuContracts` entry beyond
544
+ `create2Factory` stays `status: "pending"`, there's no PepuSwap
545
+ deployment, no Blockscout explorer, and no verified token addresses.
546
+ Don't "fix" this by copying mainnet's entries onto testnet.
547
+ - **`multicall3` and the DEX's `multicallNonCanonical`/`permit2NonCanonical`
548
+ are deliberately not at their "canonical" addresses.** See the Contract
549
+ registry and PepuSwap sections above — this is a real, verified fact
550
+ about this chain, not a placeholder.
551
+ - **`v3Migrator` and `v3Staker` have verified addresses but no dedicated
552
+ ABI** in `./abi/` — only enough getters were checked to confirm the
553
+ address, not their full interface.
554
+ - **Kernel account creation (`initialize()` calldata encoding) is not
555
+ implemented here.** No account has ever been created through PEPU's
556
+ Kernel factory, so there was nothing on-chain to check a hand-rolled
557
+ encoding against — use `@zerodev/sdk` to build that payload, then pass it
558
+ to `getKernelAccountAddress`.
559
+ - **The token list has four tokens (WPEPU, USDT, USDC and WETH on mainnet).** Every
560
+ entry is independently on-chain verified; no other token address cleared
561
+ that bar at the time this package was written.
562
+
563
+ ## Development
564
+
565
+ See [AGENTS.md](./AGENTS.md) for how to build, test, and extend this
566
+ package.
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ var chunkNVOPDXTA_cjs = require('../chunk-NVOPDXTA.cjs');
4
+ require('../chunk-7MNJF2OB.cjs');
5
+ var chunkAJS4UFQX_cjs = require('../chunk-AJS4UFQX.cjs');
6
+ require('../chunk-A5LP2UCS.cjs');
7
+ require('../chunk-WANILJZQ.cjs');
8
+ require('../chunk-4GINFJO6.cjs');
9
+ require('../chunk-VF3D6KLQ.cjs');
10
+ require('../chunk-DPCZJLB3.cjs');
11
+ require('../chunk-YQL7NISX.cjs');
12
+
13
+
14
+
15
+ Object.defineProperty(exports, "KERNEL_VERSION", {
16
+ enumerable: true,
17
+ get: function () { return chunkNVOPDXTA_cjs.KERNEL_VERSION; }
18
+ });
19
+ Object.defineProperty(exports, "createPepuSponsoredClient", {
20
+ enumerable: true,
21
+ get: function () { return chunkNVOPDXTA_cjs.createPepuSponsoredClient; }
22
+ });
23
+ Object.defineProperty(exports, "getKernelAddress", {
24
+ enumerable: true,
25
+ get: function () { return chunkNVOPDXTA_cjs.getKernelAddress; }
26
+ });
27
+ Object.defineProperty(exports, "sendSponsored", {
28
+ enumerable: true,
29
+ get: function () { return chunkNVOPDXTA_cjs.sendSponsored; }
30
+ });
31
+ Object.defineProperty(exports, "toPepuKernelAccount", {
32
+ enumerable: true,
33
+ get: function () { return chunkNVOPDXTA_cjs.toPepuKernelAccount; }
34
+ });
35
+ Object.defineProperty(exports, "encodeKernelExecute", {
36
+ enumerable: true,
37
+ get: function () { return chunkAJS4UFQX_cjs.encodeKernelExecute; }
38
+ });
39
+ //# sourceMappingURL=kernel.cjs.map
40
+ //# sourceMappingURL=kernel.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"kernel.cjs"}