@pepu-chain/sdk 0.0.0-stage → 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 (244) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +590 -2
  3. package/dist/aa/kernel.cjs +41 -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.guard.js +15 -0
  8. package/dist/aa/kernel.js +11 -0
  9. package/dist/aa/kernel.js.map +1 -0
  10. package/dist/aa/react-direct.cjs +111 -0
  11. package/dist/aa/react-direct.cjs.map +1 -0
  12. package/dist/aa/react-direct.d.cts +42 -0
  13. package/dist/aa/react-direct.d.ts +42 -0
  14. package/dist/aa/react-direct.guard.js +15 -0
  15. package/dist/aa/react-direct.js +107 -0
  16. package/dist/aa/react-direct.js.map +1 -0
  17. package/dist/aa/react.cjs +152 -0
  18. package/dist/aa/react.cjs.map +1 -0
  19. package/dist/aa/react.d.cts +62 -0
  20. package/dist/aa/react.d.ts +62 -0
  21. package/dist/aa/react.guard.js +15 -0
  22. package/dist/aa/react.js +147 -0
  23. package/dist/aa/react.js.map +1 -0
  24. package/dist/aa.cjs +84 -0
  25. package/dist/aa.cjs.map +1 -0
  26. package/dist/aa.d.cts +85 -0
  27. package/dist/aa.d.ts +85 -0
  28. package/dist/aa.js +11 -0
  29. package/dist/aa.js.map +1 -0
  30. package/dist/api-Dz4sCHH_.d.cts +654 -0
  31. package/dist/api-Dz4sCHH_.d.ts +654 -0
  32. package/dist/calls-BRPjKgjl.d.cts +70 -0
  33. package/dist/calls-z_EQOtFb.d.ts +70 -0
  34. package/dist/chains-DK13zGIp.d.cts +235 -0
  35. package/dist/chains-DK13zGIp.d.ts +235 -0
  36. package/dist/chunk-3XUGQODR.js +194 -0
  37. package/dist/chunk-3XUGQODR.js.map +1 -0
  38. package/dist/chunk-45KSZH26.cjs +145 -0
  39. package/dist/chunk-45KSZH26.cjs.map +1 -0
  40. package/dist/chunk-4GINFJO6.cjs +44 -0
  41. package/dist/chunk-4GINFJO6.cjs.map +1 -0
  42. package/dist/chunk-62M2LKQW.js +136 -0
  43. package/dist/chunk-62M2LKQW.js.map +1 -0
  44. package/dist/chunk-6DSZ4Z2N.js +498 -0
  45. package/dist/chunk-6DSZ4Z2N.js.map +1 -0
  46. package/dist/chunk-7MNJF2OB.cjs +72 -0
  47. package/dist/chunk-7MNJF2OB.cjs.map +1 -0
  48. package/dist/chunk-7PVR7QSE.js +45 -0
  49. package/dist/chunk-7PVR7QSE.js.map +1 -0
  50. package/dist/chunk-A5LP2UCS.cjs +2729 -0
  51. package/dist/chunk-A5LP2UCS.cjs.map +1 -0
  52. package/dist/chunk-AJS4UFQX.cjs +121 -0
  53. package/dist/chunk-AJS4UFQX.cjs.map +1 -0
  54. package/dist/chunk-BGALSKAF.cjs +315 -0
  55. package/dist/chunk-BGALSKAF.cjs.map +1 -0
  56. package/dist/chunk-C2XW44FI.cjs +200 -0
  57. package/dist/chunk-C2XW44FI.cjs.map +1 -0
  58. package/dist/chunk-C7IC36XS.cjs +13 -0
  59. package/dist/chunk-C7IC36XS.cjs.map +1 -0
  60. package/dist/chunk-D52PADVY.js +84 -0
  61. package/dist/chunk-D52PADVY.js.map +1 -0
  62. package/dist/chunk-DH6BFNVJ.cjs +272 -0
  63. package/dist/chunk-DH6BFNVJ.cjs.map +1 -0
  64. package/dist/chunk-DPCZJLB3.cjs +87 -0
  65. package/dist/chunk-DPCZJLB3.cjs.map +1 -0
  66. package/dist/chunk-EHBPIYY4.js +262 -0
  67. package/dist/chunk-EHBPIYY4.js.map +1 -0
  68. package/dist/chunk-ESMNAXUI.js +86 -0
  69. package/dist/chunk-ESMNAXUI.js.map +1 -0
  70. package/dist/chunk-F2R473FR.js +304 -0
  71. package/dist/chunk-F2R473FR.js.map +1 -0
  72. package/dist/chunk-IB2FSPMJ.js +66 -0
  73. package/dist/chunk-IB2FSPMJ.js.map +1 -0
  74. package/dist/chunk-IG7RSL2Y.cjs +178 -0
  75. package/dist/chunk-IG7RSL2Y.cjs.map +1 -0
  76. package/dist/chunk-IY3ALPUJ.js +2716 -0
  77. package/dist/chunk-IY3ALPUJ.js.map +1 -0
  78. package/dist/chunk-J3O2ZGG3.cjs +93 -0
  79. package/dist/chunk-J3O2ZGG3.cjs.map +1 -0
  80. package/dist/chunk-J6UXXHBE.js +37 -0
  81. package/dist/chunk-J6UXXHBE.js.map +1 -0
  82. package/dist/chunk-JLZ4LZ4Z.js +22 -0
  83. package/dist/chunk-JLZ4LZ4Z.js.map +1 -0
  84. package/dist/chunk-K7JSQPZO.cjs +231 -0
  85. package/dist/chunk-K7JSQPZO.cjs.map +1 -0
  86. package/dist/chunk-KJYNF5KH.js +224 -0
  87. package/dist/chunk-KJYNF5KH.js.map +1 -0
  88. package/dist/chunk-KVG3AYYR.js +99 -0
  89. package/dist/chunk-KVG3AYYR.js.map +1 -0
  90. package/dist/chunk-NE3QKDOB.cjs +24 -0
  91. package/dist/chunk-NE3QKDOB.cjs.map +1 -0
  92. package/dist/chunk-NVOPDXTA.cjs +95 -0
  93. package/dist/chunk-NVOPDXTA.cjs.map +1 -0
  94. package/dist/chunk-OH3QMAIB.js +11 -0
  95. package/dist/chunk-OH3QMAIB.js.map +1 -0
  96. package/dist/chunk-PHM3ZORG.cjs +110 -0
  97. package/dist/chunk-PHM3ZORG.cjs.map +1 -0
  98. package/dist/chunk-R5PXQNO3.cjs +209 -0
  99. package/dist/chunk-R5PXQNO3.cjs.map +1 -0
  100. package/dist/chunk-RCMKPJZO.cjs +49 -0
  101. package/dist/chunk-RCMKPJZO.cjs.map +1 -0
  102. package/dist/chunk-SVWRRALU.cjs +17 -0
  103. package/dist/chunk-SVWRRALU.cjs.map +1 -0
  104. package/dist/chunk-T43PQXJD.js +202 -0
  105. package/dist/chunk-T43PQXJD.js.map +1 -0
  106. package/dist/chunk-VBH3JLQ5.js +116 -0
  107. package/dist/chunk-VBH3JLQ5.js.map +1 -0
  108. package/dist/chunk-VF3D6KLQ.cjs +94 -0
  109. package/dist/chunk-VF3D6KLQ.cjs.map +1 -0
  110. package/dist/chunk-VTQIHMF3.js +82 -0
  111. package/dist/chunk-VTQIHMF3.js.map +1 -0
  112. package/dist/chunk-W3JN3YIW.js +15 -0
  113. package/dist/chunk-W3JN3YIW.js.map +1 -0
  114. package/dist/chunk-WANILJZQ.cjs +87 -0
  115. package/dist/chunk-WANILJZQ.cjs.map +1 -0
  116. package/dist/chunk-XC4IBCI2.js +86 -0
  117. package/dist/chunk-XC4IBCI2.js.map +1 -0
  118. package/dist/chunk-YKEWWQEJ.js +165 -0
  119. package/dist/chunk-YKEWWQEJ.js.map +1 -0
  120. package/dist/chunk-YQL7NISX.cjs +515 -0
  121. package/dist/chunk-YQL7NISX.cjs.map +1 -0
  122. package/dist/chunk-ZB6SVBK4.js +89 -0
  123. package/dist/chunk-ZB6SVBK4.js.map +1 -0
  124. package/dist/combo/react.cjs +236 -0
  125. package/dist/combo/react.cjs.map +1 -0
  126. package/dist/combo/react.d.cts +148 -0
  127. package/dist/combo/react.d.ts +148 -0
  128. package/dist/combo/react.guard.js +15 -0
  129. package/dist/combo/react.js +230 -0
  130. package/dist/combo/react.js.map +1 -0
  131. package/dist/combo.cjs +263 -0
  132. package/dist/combo.cjs.map +1 -0
  133. package/dist/combo.d.cts +139 -0
  134. package/dist/combo.d.ts +139 -0
  135. package/dist/combo.guard.js +15 -0
  136. package/dist/combo.js +249 -0
  137. package/dist/combo.js.map +1 -0
  138. package/dist/config-CHjz7ZjZ.d.cts +57 -0
  139. package/dist/config-COjhIZTh.d.ts +57 -0
  140. package/dist/doctor.cjs +354 -0
  141. package/dist/doctor.cjs.map +1 -0
  142. package/dist/doctor.d.cts +177 -0
  143. package/dist/doctor.d.ts +177 -0
  144. package/dist/doctor.js +345 -0
  145. package/dist/doctor.js.map +1 -0
  146. package/dist/erc7677-DOW58QBE.d.cts +111 -0
  147. package/dist/erc7677-DOW58QBE.d.ts +111 -0
  148. package/dist/errors-CgX1vNj7.d.cts +100 -0
  149. package/dist/errors-CgX1vNj7.d.ts +100 -0
  150. package/dist/index.cjs +806 -0
  151. package/dist/index.cjs.map +1 -0
  152. package/dist/index.d.cts +2398 -0
  153. package/dist/index.d.ts +2398 -0
  154. package/dist/index.js +559 -0
  155. package/dist/index.js.map +1 -0
  156. package/dist/paymaster/server.cjs +38 -0
  157. package/dist/paymaster/server.cjs.map +1 -0
  158. package/dist/paymaster/server.d.cts +57 -0
  159. package/dist/paymaster/server.d.ts +57 -0
  160. package/dist/paymaster/server.js +36 -0
  161. package/dist/paymaster/server.js.map +1 -0
  162. package/dist/paymaster.cjs +356 -0
  163. package/dist/paymaster.cjs.map +1 -0
  164. package/dist/paymaster.d.cts +1851 -0
  165. package/dist/paymaster.d.ts +1851 -0
  166. package/dist/paymaster.js +289 -0
  167. package/dist/paymaster.js.map +1 -0
  168. package/dist/privy/react.cjs +49 -0
  169. package/dist/privy/react.cjs.map +1 -0
  170. package/dist/privy/react.d.cts +194 -0
  171. package/dist/privy/react.d.ts +194 -0
  172. package/dist/privy/react.guard.js +15 -0
  173. package/dist/privy/react.js +7 -0
  174. package/dist/privy/react.js.map +1 -0
  175. package/dist/privy/server.cjs +44 -0
  176. package/dist/privy/server.cjs.map +1 -0
  177. package/dist/privy/server.d.cts +192 -0
  178. package/dist/privy/server.d.ts +192 -0
  179. package/dist/privy/server.guard.js +15 -0
  180. package/dist/privy/server.js +6 -0
  181. package/dist/privy/server.js.map +1 -0
  182. package/dist/privy/wagmi.d.ts +90 -0
  183. package/dist/privy/wagmi.guard.js +15 -0
  184. package/dist/privy/wagmi.js +55 -0
  185. package/dist/privy/wagmi.js.map +1 -0
  186. package/dist/privy.cjs +34 -0
  187. package/dist/privy.cjs.map +1 -0
  188. package/dist/privy.d.cts +4 -0
  189. package/dist/privy.d.ts +4 -0
  190. package/dist/privy.js +5 -0
  191. package/dist/privy.js.map +1 -0
  192. package/dist/react.cjs +73 -0
  193. package/dist/react.cjs.map +1 -0
  194. package/dist/react.d.cts +66 -0
  195. package/dist/react.d.ts +66 -0
  196. package/dist/react.guard.js +15 -0
  197. package/dist/react.js +68 -0
  198. package/dist/react.js.map +1 -0
  199. package/dist/requirements-C-QiJkL9.d.cts +134 -0
  200. package/dist/requirements-C-QiJkL9.d.ts +134 -0
  201. package/dist/scope-DBRkN7bR.d.cts +94 -0
  202. package/dist/scope-DBRkN7bR.d.ts +94 -0
  203. package/dist/server.cjs +59 -0
  204. package/dist/server.cjs.map +1 -0
  205. package/dist/server.d.cts +208 -0
  206. package/dist/server.d.ts +208 -0
  207. package/dist/server.js +8 -0
  208. package/dist/server.js.map +1 -0
  209. package/dist/session/kernel.cjs +83 -0
  210. package/dist/session/kernel.cjs.map +1 -0
  211. package/dist/session/kernel.d.cts +131 -0
  212. package/dist/session/kernel.d.ts +131 -0
  213. package/dist/session/kernel.guard.js +15 -0
  214. package/dist/session/kernel.js +13 -0
  215. package/dist/session/kernel.js.map +1 -0
  216. package/dist/session/react.cjs +38 -0
  217. package/dist/session/react.cjs.map +1 -0
  218. package/dist/session/react.d.cts +119 -0
  219. package/dist/session/react.d.ts +119 -0
  220. package/dist/session/react.guard.js +15 -0
  221. package/dist/session/react.js +8 -0
  222. package/dist/session/react.js.map +1 -0
  223. package/dist/session/server.cjs +268 -0
  224. package/dist/session/server.cjs.map +1 -0
  225. package/dist/session/server.d.cts +151 -0
  226. package/dist/session/server.d.ts +151 -0
  227. package/dist/session/server.guard.js +15 -0
  228. package/dist/session/server.js +252 -0
  229. package/dist/session/server.js.map +1 -0
  230. package/dist/session.cjs +74 -0
  231. package/dist/session.cjs.map +1 -0
  232. package/dist/session.d.cts +3 -0
  233. package/dist/session.d.ts +3 -0
  234. package/dist/session.js +5 -0
  235. package/dist/session.js.map +1 -0
  236. package/dist/status-Dx9zAFo9.d.ts +327 -0
  237. package/dist/status-wgTM26V7.d.cts +327 -0
  238. package/dist/store-CjmLgp9g.d.cts +64 -0
  239. package/dist/store-CjmLgp9g.d.ts +64 -0
  240. package/dist/types-BEEM7WdG.d.cts +25 -0
  241. package/dist/types-BEEM7WdG.d.ts +25 -0
  242. package/dist/types-BilBTDqK.d.cts +27 -0
  243. package/dist/types-BilBTDqK.d.ts +27 -0
  244. package/package.json +245 -3
package/dist/aa.d.cts ADDED
@@ -0,0 +1,85 @@
1
+ import { PublicClient } from 'viem';
2
+ import { SmartAccount, PaymasterClient, BundlerClient } from 'viem/account-abstraction';
3
+ import { P as PaymasterContext } from './erc7677-DOW58QBE.cjs';
4
+ export { B as BundlerProbeResult, C as CheckSponsorshipOptions, F as FetchLike, G as GetSponsorshipStatusOptions, P as PaymasterProbeResult, a as PepuKernelStack, b as ProbeOptions, S as SponsorshipReport, c as SponsorshipStatus, d as checkSponsorship, g as getKernelAccountAddress, e as getPaymasterDeposit, f as getPepuKernelStack, h as getSponsorshipStatus, p as probeBundler, i as probePaymaster } from './status-wgTM26V7.cjs';
5
+ import { a as PepuBundlerError, b as PepuPaymasterError } from './errors-CgX1vNj7.cjs';
6
+ export { E as EncodedCall, U as UserOpEvent, e as encodeKernelExecute, n as normalizeCalls, u as userOpEventFromReceipt, a as userOpEventsFromReceipt } from './calls-BRPjKgjl.cjs';
7
+ export { C as Call, S as SponsoredResult } from './types-BilBTDqK.cjs';
8
+ import './chains-DK13zGIp.cjs';
9
+
10
+ /** EntryPoint v0.7, the only version PEPU's bundler and paymaster speak. */
11
+ declare const ENTRY_POINT_V07: {
12
+ readonly address: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
13
+ readonly version: "0.7";
14
+ };
15
+ /**
16
+ * The Alto-compatible fee estimator: the chain's own `estimateFeesPerGas`,
17
+ * with `maxFeePerGas` x 1.2. Alto does not implement ZeroDev's
18
+ * `zd_getUserOperationGasPrice`, so the default estimator would fail.
19
+ * Ported from `templates/sponsored-session-app/lib/kernel.ts`.
20
+ *
21
+ * @example
22
+ * const fees = await estimatePepuUserOpFees(publicClient);
23
+ */
24
+ declare function estimatePepuUserOpFees(publicClient: Pick<PublicClient, "estimateFeesPerGas">): Promise<{
25
+ maxFeePerGas: bigint;
26
+ maxPriorityFeePerGas: bigint;
27
+ }>;
28
+ /**
29
+ * An ERC-7677 paymaster client for PEPU (viem `createPaymasterClient`), using
30
+ * the endpoints registry for the URL. A `context` (for example
31
+ * `buildPaymasterContext({ privyAccessToken })`) is injected into every
32
+ * `pm_getPaymasterStubData` and `pm_getPaymasterData` call unless the caller
33
+ * passes one.
34
+ *
35
+ * @example
36
+ * const paymaster = createPepuPaymasterClient({
37
+ * context: buildPaymasterContext({ privyAccessToken }),
38
+ * });
39
+ */
40
+ declare function createPepuPaymasterClient(o?: {
41
+ paymasterUrl?: string;
42
+ paymasterToken?: string;
43
+ context?: PaymasterContext;
44
+ }): PaymasterClient;
45
+ /**
46
+ * A viem bundler client for PEPU's bundler, with the fee estimator
47
+ * pre-wired ({@link estimatePepuUserOpFees}).
48
+ *
49
+ * @example
50
+ * const bundler = createPepuBundlerClient({ account, paymaster: createPepuPaymasterClient() });
51
+ * const hash = await bundler.sendUserOperation({ calls: [{ to, data }] });
52
+ */
53
+ declare function createPepuBundlerClient(o: {
54
+ bundlerUrl?: string;
55
+ account: SmartAccount;
56
+ paymaster?: PaymasterClient;
57
+ paymasterContext?: PaymasterContext;
58
+ publicClient?: PublicClient;
59
+ }): BundlerClient;
60
+
61
+ /**
62
+ * Remove anything credential-shaped from text that may reach a message:
63
+ * `/paymaster/<token>` URL paths, bearer tokens, API keys, JWTs and URL
64
+ * credentials.
65
+ *
66
+ * @example
67
+ * redactSecrets("POST https://pm.example/paymaster/sk_live_123 failed");
68
+ * // "POST https://pm.example/paymaster/[redacted] failed"
69
+ */
70
+ declare function redactSecrets(text: string): string;
71
+ /**
72
+ * Turn anything thrown by the bundler, paymaster or viem/Privy stack into a
73
+ * typed PepuError. Walks the `cause` chain (viem's `details` is where the
74
+ * paymaster's real denial reason lives; Privy's own log prints
75
+ * `[object Error]`), maps `AA10`..`AA9x` to a fix, maps paymaster reason codes
76
+ * through the error catalog, and redacts tokens and URL credentials.
77
+ * Port of `templates/sponsored-demo/lib/describe-error.ts`.
78
+ *
79
+ * @example
80
+ * try { await sendSponsored({ client, calls }); }
81
+ * catch (e) { const err = describeUserOpFailure(e); console.log(err.code, err.hint); }
82
+ */
83
+ declare function describeUserOpFailure(e: unknown): PepuBundlerError | PepuPaymasterError;
84
+
85
+ export { ENTRY_POINT_V07, createPepuBundlerClient, createPepuPaymasterClient, describeUserOpFailure, estimatePepuUserOpFees, redactSecrets };
package/dist/aa.d.ts ADDED
@@ -0,0 +1,85 @@
1
+ import { PublicClient } from 'viem';
2
+ import { SmartAccount, PaymasterClient, BundlerClient } from 'viem/account-abstraction';
3
+ import { P as PaymasterContext } from './erc7677-DOW58QBE.js';
4
+ export { B as BundlerProbeResult, C as CheckSponsorshipOptions, F as FetchLike, G as GetSponsorshipStatusOptions, P as PaymasterProbeResult, a as PepuKernelStack, b as ProbeOptions, S as SponsorshipReport, c as SponsorshipStatus, d as checkSponsorship, g as getKernelAccountAddress, e as getPaymasterDeposit, f as getPepuKernelStack, h as getSponsorshipStatus, p as probeBundler, i as probePaymaster } from './status-Dx9zAFo9.js';
5
+ import { a as PepuBundlerError, b as PepuPaymasterError } from './errors-CgX1vNj7.js';
6
+ export { E as EncodedCall, U as UserOpEvent, e as encodeKernelExecute, n as normalizeCalls, u as userOpEventFromReceipt, a as userOpEventsFromReceipt } from './calls-z_EQOtFb.js';
7
+ export { C as Call, S as SponsoredResult } from './types-BilBTDqK.js';
8
+ import './chains-DK13zGIp.js';
9
+
10
+ /** EntryPoint v0.7, the only version PEPU's bundler and paymaster speak. */
11
+ declare const ENTRY_POINT_V07: {
12
+ readonly address: "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
13
+ readonly version: "0.7";
14
+ };
15
+ /**
16
+ * The Alto-compatible fee estimator: the chain's own `estimateFeesPerGas`,
17
+ * with `maxFeePerGas` x 1.2. Alto does not implement ZeroDev's
18
+ * `zd_getUserOperationGasPrice`, so the default estimator would fail.
19
+ * Ported from `templates/sponsored-session-app/lib/kernel.ts`.
20
+ *
21
+ * @example
22
+ * const fees = await estimatePepuUserOpFees(publicClient);
23
+ */
24
+ declare function estimatePepuUserOpFees(publicClient: Pick<PublicClient, "estimateFeesPerGas">): Promise<{
25
+ maxFeePerGas: bigint;
26
+ maxPriorityFeePerGas: bigint;
27
+ }>;
28
+ /**
29
+ * An ERC-7677 paymaster client for PEPU (viem `createPaymasterClient`), using
30
+ * the endpoints registry for the URL. A `context` (for example
31
+ * `buildPaymasterContext({ privyAccessToken })`) is injected into every
32
+ * `pm_getPaymasterStubData` and `pm_getPaymasterData` call unless the caller
33
+ * passes one.
34
+ *
35
+ * @example
36
+ * const paymaster = createPepuPaymasterClient({
37
+ * context: buildPaymasterContext({ privyAccessToken }),
38
+ * });
39
+ */
40
+ declare function createPepuPaymasterClient(o?: {
41
+ paymasterUrl?: string;
42
+ paymasterToken?: string;
43
+ context?: PaymasterContext;
44
+ }): PaymasterClient;
45
+ /**
46
+ * A viem bundler client for PEPU's bundler, with the fee estimator
47
+ * pre-wired ({@link estimatePepuUserOpFees}).
48
+ *
49
+ * @example
50
+ * const bundler = createPepuBundlerClient({ account, paymaster: createPepuPaymasterClient() });
51
+ * const hash = await bundler.sendUserOperation({ calls: [{ to, data }] });
52
+ */
53
+ declare function createPepuBundlerClient(o: {
54
+ bundlerUrl?: string;
55
+ account: SmartAccount;
56
+ paymaster?: PaymasterClient;
57
+ paymasterContext?: PaymasterContext;
58
+ publicClient?: PublicClient;
59
+ }): BundlerClient;
60
+
61
+ /**
62
+ * Remove anything credential-shaped from text that may reach a message:
63
+ * `/paymaster/<token>` URL paths, bearer tokens, API keys, JWTs and URL
64
+ * credentials.
65
+ *
66
+ * @example
67
+ * redactSecrets("POST https://pm.example/paymaster/sk_live_123 failed");
68
+ * // "POST https://pm.example/paymaster/[redacted] failed"
69
+ */
70
+ declare function redactSecrets(text: string): string;
71
+ /**
72
+ * Turn anything thrown by the bundler, paymaster or viem/Privy stack into a
73
+ * typed PepuError. Walks the `cause` chain (viem's `details` is where the
74
+ * paymaster's real denial reason lives; Privy's own log prints
75
+ * `[object Error]`), maps `AA10`..`AA9x` to a fix, maps paymaster reason codes
76
+ * through the error catalog, and redacts tokens and URL credentials.
77
+ * Port of `templates/sponsored-demo/lib/describe-error.ts`.
78
+ *
79
+ * @example
80
+ * try { await sendSponsored({ client, calls }); }
81
+ * catch (e) { const err = describeUserOpFailure(e); console.log(err.code, err.hint); }
82
+ */
83
+ declare function describeUserOpFailure(e: unknown): PepuBundlerError | PepuPaymasterError;
84
+
85
+ export { ENTRY_POINT_V07, createPepuBundlerClient, createPepuPaymasterClient, describeUserOpFailure, estimatePepuUserOpFees, redactSecrets };
package/dist/aa.js ADDED
@@ -0,0 +1,11 @@
1
+ export { ENTRY_POINT_V07, createPepuBundlerClient, createPepuPaymasterClient, estimatePepuUserOpFees } from './chunk-IB2FSPMJ.js';
2
+ export { encodeKernelExecute, normalizeCalls, userOpEventFromReceipt, userOpEventsFromReceipt } from './chunk-VBH3JLQ5.js';
3
+ import './chunk-IY3ALPUJ.js';
4
+ export { checkSponsorship, getKernelAccountAddress, getPaymasterDeposit, getPepuKernelStack, getSponsorshipStatus, probeBundler, probePaymaster } from './chunk-F2R473FR.js';
5
+ export { describeUserOpFailure, redactSecrets } from './chunk-D52PADVY.js';
6
+ import './chunk-KJYNF5KH.js';
7
+ import './chunk-XC4IBCI2.js';
8
+ import './chunk-VTQIHMF3.js';
9
+ import './chunk-6DSZ4Z2N.js';
10
+ //# sourceMappingURL=aa.js.map
11
+ //# sourceMappingURL=aa.js.map
package/dist/aa.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"names":[],"mappings":"","file":"aa.js"}