@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.
- package/LICENSE +21 -0
- package/README.md +590 -2
- package/dist/aa/kernel.cjs +41 -0
- package/dist/aa/kernel.cjs.map +1 -0
- package/dist/aa/kernel.d.cts +88 -0
- package/dist/aa/kernel.d.ts +88 -0
- package/dist/aa/kernel.guard.js +15 -0
- package/dist/aa/kernel.js +11 -0
- package/dist/aa/kernel.js.map +1 -0
- package/dist/aa/react-direct.cjs +111 -0
- package/dist/aa/react-direct.cjs.map +1 -0
- package/dist/aa/react-direct.d.cts +42 -0
- package/dist/aa/react-direct.d.ts +42 -0
- package/dist/aa/react-direct.guard.js +15 -0
- package/dist/aa/react-direct.js +107 -0
- package/dist/aa/react-direct.js.map +1 -0
- package/dist/aa/react.cjs +152 -0
- package/dist/aa/react.cjs.map +1 -0
- package/dist/aa/react.d.cts +62 -0
- package/dist/aa/react.d.ts +62 -0
- package/dist/aa/react.guard.js +15 -0
- package/dist/aa/react.js +147 -0
- package/dist/aa/react.js.map +1 -0
- package/dist/aa.cjs +84 -0
- package/dist/aa.cjs.map +1 -0
- package/dist/aa.d.cts +85 -0
- package/dist/aa.d.ts +85 -0
- package/dist/aa.js +11 -0
- package/dist/aa.js.map +1 -0
- package/dist/api-Dz4sCHH_.d.cts +654 -0
- package/dist/api-Dz4sCHH_.d.ts +654 -0
- package/dist/calls-BRPjKgjl.d.cts +70 -0
- package/dist/calls-z_EQOtFb.d.ts +70 -0
- package/dist/chains-DK13zGIp.d.cts +235 -0
- package/dist/chains-DK13zGIp.d.ts +235 -0
- package/dist/chunk-3XUGQODR.js +194 -0
- package/dist/chunk-3XUGQODR.js.map +1 -0
- package/dist/chunk-45KSZH26.cjs +145 -0
- package/dist/chunk-45KSZH26.cjs.map +1 -0
- package/dist/chunk-4GINFJO6.cjs +44 -0
- package/dist/chunk-4GINFJO6.cjs.map +1 -0
- package/dist/chunk-62M2LKQW.js +136 -0
- package/dist/chunk-62M2LKQW.js.map +1 -0
- package/dist/chunk-6DSZ4Z2N.js +498 -0
- package/dist/chunk-6DSZ4Z2N.js.map +1 -0
- package/dist/chunk-7MNJF2OB.cjs +72 -0
- package/dist/chunk-7MNJF2OB.cjs.map +1 -0
- package/dist/chunk-7PVR7QSE.js +45 -0
- package/dist/chunk-7PVR7QSE.js.map +1 -0
- package/dist/chunk-A5LP2UCS.cjs +2729 -0
- package/dist/chunk-A5LP2UCS.cjs.map +1 -0
- package/dist/chunk-AJS4UFQX.cjs +121 -0
- package/dist/chunk-AJS4UFQX.cjs.map +1 -0
- package/dist/chunk-BGALSKAF.cjs +315 -0
- package/dist/chunk-BGALSKAF.cjs.map +1 -0
- package/dist/chunk-C2XW44FI.cjs +200 -0
- package/dist/chunk-C2XW44FI.cjs.map +1 -0
- package/dist/chunk-C7IC36XS.cjs +13 -0
- package/dist/chunk-C7IC36XS.cjs.map +1 -0
- package/dist/chunk-D52PADVY.js +84 -0
- package/dist/chunk-D52PADVY.js.map +1 -0
- package/dist/chunk-DH6BFNVJ.cjs +272 -0
- package/dist/chunk-DH6BFNVJ.cjs.map +1 -0
- package/dist/chunk-DPCZJLB3.cjs +87 -0
- package/dist/chunk-DPCZJLB3.cjs.map +1 -0
- package/dist/chunk-EHBPIYY4.js +262 -0
- package/dist/chunk-EHBPIYY4.js.map +1 -0
- package/dist/chunk-ESMNAXUI.js +86 -0
- package/dist/chunk-ESMNAXUI.js.map +1 -0
- package/dist/chunk-F2R473FR.js +304 -0
- package/dist/chunk-F2R473FR.js.map +1 -0
- package/dist/chunk-IB2FSPMJ.js +66 -0
- package/dist/chunk-IB2FSPMJ.js.map +1 -0
- package/dist/chunk-IG7RSL2Y.cjs +178 -0
- package/dist/chunk-IG7RSL2Y.cjs.map +1 -0
- package/dist/chunk-IY3ALPUJ.js +2716 -0
- package/dist/chunk-IY3ALPUJ.js.map +1 -0
- package/dist/chunk-J3O2ZGG3.cjs +93 -0
- package/dist/chunk-J3O2ZGG3.cjs.map +1 -0
- package/dist/chunk-J6UXXHBE.js +37 -0
- package/dist/chunk-J6UXXHBE.js.map +1 -0
- package/dist/chunk-JLZ4LZ4Z.js +22 -0
- package/dist/chunk-JLZ4LZ4Z.js.map +1 -0
- package/dist/chunk-K7JSQPZO.cjs +231 -0
- package/dist/chunk-K7JSQPZO.cjs.map +1 -0
- package/dist/chunk-KJYNF5KH.js +224 -0
- package/dist/chunk-KJYNF5KH.js.map +1 -0
- package/dist/chunk-KVG3AYYR.js +99 -0
- package/dist/chunk-KVG3AYYR.js.map +1 -0
- package/dist/chunk-NE3QKDOB.cjs +24 -0
- package/dist/chunk-NE3QKDOB.cjs.map +1 -0
- package/dist/chunk-NVOPDXTA.cjs +95 -0
- package/dist/chunk-NVOPDXTA.cjs.map +1 -0
- package/dist/chunk-OH3QMAIB.js +11 -0
- package/dist/chunk-OH3QMAIB.js.map +1 -0
- package/dist/chunk-PHM3ZORG.cjs +110 -0
- package/dist/chunk-PHM3ZORG.cjs.map +1 -0
- package/dist/chunk-R5PXQNO3.cjs +209 -0
- package/dist/chunk-R5PXQNO3.cjs.map +1 -0
- package/dist/chunk-RCMKPJZO.cjs +49 -0
- package/dist/chunk-RCMKPJZO.cjs.map +1 -0
- package/dist/chunk-SVWRRALU.cjs +17 -0
- package/dist/chunk-SVWRRALU.cjs.map +1 -0
- package/dist/chunk-T43PQXJD.js +202 -0
- package/dist/chunk-T43PQXJD.js.map +1 -0
- package/dist/chunk-VBH3JLQ5.js +116 -0
- package/dist/chunk-VBH3JLQ5.js.map +1 -0
- package/dist/chunk-VF3D6KLQ.cjs +94 -0
- package/dist/chunk-VF3D6KLQ.cjs.map +1 -0
- package/dist/chunk-VTQIHMF3.js +82 -0
- package/dist/chunk-VTQIHMF3.js.map +1 -0
- package/dist/chunk-W3JN3YIW.js +15 -0
- package/dist/chunk-W3JN3YIW.js.map +1 -0
- package/dist/chunk-WANILJZQ.cjs +87 -0
- package/dist/chunk-WANILJZQ.cjs.map +1 -0
- package/dist/chunk-XC4IBCI2.js +86 -0
- package/dist/chunk-XC4IBCI2.js.map +1 -0
- package/dist/chunk-YKEWWQEJ.js +165 -0
- package/dist/chunk-YKEWWQEJ.js.map +1 -0
- package/dist/chunk-YQL7NISX.cjs +515 -0
- package/dist/chunk-YQL7NISX.cjs.map +1 -0
- package/dist/chunk-ZB6SVBK4.js +89 -0
- package/dist/chunk-ZB6SVBK4.js.map +1 -0
- package/dist/combo/react.cjs +236 -0
- package/dist/combo/react.cjs.map +1 -0
- package/dist/combo/react.d.cts +148 -0
- package/dist/combo/react.d.ts +148 -0
- package/dist/combo/react.guard.js +15 -0
- package/dist/combo/react.js +230 -0
- package/dist/combo/react.js.map +1 -0
- package/dist/combo.cjs +263 -0
- package/dist/combo.cjs.map +1 -0
- package/dist/combo.d.cts +139 -0
- package/dist/combo.d.ts +139 -0
- package/dist/combo.guard.js +15 -0
- package/dist/combo.js +249 -0
- package/dist/combo.js.map +1 -0
- package/dist/config-CHjz7ZjZ.d.cts +57 -0
- package/dist/config-COjhIZTh.d.ts +57 -0
- package/dist/doctor.cjs +354 -0
- package/dist/doctor.cjs.map +1 -0
- package/dist/doctor.d.cts +177 -0
- package/dist/doctor.d.ts +177 -0
- package/dist/doctor.js +345 -0
- package/dist/doctor.js.map +1 -0
- package/dist/erc7677-DOW58QBE.d.cts +111 -0
- package/dist/erc7677-DOW58QBE.d.ts +111 -0
- package/dist/errors-CgX1vNj7.d.cts +100 -0
- package/dist/errors-CgX1vNj7.d.ts +100 -0
- package/dist/index.cjs +806 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +2398 -0
- package/dist/index.d.ts +2398 -0
- package/dist/index.js +559 -0
- package/dist/index.js.map +1 -0
- package/dist/paymaster/server.cjs +38 -0
- package/dist/paymaster/server.cjs.map +1 -0
- package/dist/paymaster/server.d.cts +57 -0
- package/dist/paymaster/server.d.ts +57 -0
- package/dist/paymaster/server.js +36 -0
- package/dist/paymaster/server.js.map +1 -0
- package/dist/paymaster.cjs +356 -0
- package/dist/paymaster.cjs.map +1 -0
- package/dist/paymaster.d.cts +1851 -0
- package/dist/paymaster.d.ts +1851 -0
- package/dist/paymaster.js +289 -0
- package/dist/paymaster.js.map +1 -0
- package/dist/privy/react.cjs +49 -0
- package/dist/privy/react.cjs.map +1 -0
- package/dist/privy/react.d.cts +194 -0
- package/dist/privy/react.d.ts +194 -0
- package/dist/privy/react.guard.js +15 -0
- package/dist/privy/react.js +7 -0
- package/dist/privy/react.js.map +1 -0
- package/dist/privy/server.cjs +44 -0
- package/dist/privy/server.cjs.map +1 -0
- package/dist/privy/server.d.cts +192 -0
- package/dist/privy/server.d.ts +192 -0
- package/dist/privy/server.guard.js +15 -0
- package/dist/privy/server.js +6 -0
- package/dist/privy/server.js.map +1 -0
- package/dist/privy/wagmi.d.ts +90 -0
- package/dist/privy/wagmi.guard.js +15 -0
- package/dist/privy/wagmi.js +55 -0
- package/dist/privy/wagmi.js.map +1 -0
- package/dist/privy.cjs +34 -0
- package/dist/privy.cjs.map +1 -0
- package/dist/privy.d.cts +4 -0
- package/dist/privy.d.ts +4 -0
- package/dist/privy.js +5 -0
- package/dist/privy.js.map +1 -0
- package/dist/react.cjs +73 -0
- package/dist/react.cjs.map +1 -0
- package/dist/react.d.cts +66 -0
- package/dist/react.d.ts +66 -0
- package/dist/react.guard.js +15 -0
- package/dist/react.js +68 -0
- package/dist/react.js.map +1 -0
- package/dist/requirements-C-QiJkL9.d.cts +134 -0
- package/dist/requirements-C-QiJkL9.d.ts +134 -0
- package/dist/scope-DBRkN7bR.d.cts +94 -0
- package/dist/scope-DBRkN7bR.d.ts +94 -0
- package/dist/server.cjs +59 -0
- package/dist/server.cjs.map +1 -0
- package/dist/server.d.cts +208 -0
- package/dist/server.d.ts +208 -0
- package/dist/server.js +8 -0
- package/dist/server.js.map +1 -0
- package/dist/session/kernel.cjs +83 -0
- package/dist/session/kernel.cjs.map +1 -0
- package/dist/session/kernel.d.cts +131 -0
- package/dist/session/kernel.d.ts +131 -0
- package/dist/session/kernel.guard.js +15 -0
- package/dist/session/kernel.js +13 -0
- package/dist/session/kernel.js.map +1 -0
- package/dist/session/react.cjs +38 -0
- package/dist/session/react.cjs.map +1 -0
- package/dist/session/react.d.cts +119 -0
- package/dist/session/react.d.ts +119 -0
- package/dist/session/react.guard.js +15 -0
- package/dist/session/react.js +8 -0
- package/dist/session/react.js.map +1 -0
- package/dist/session/server.cjs +268 -0
- package/dist/session/server.cjs.map +1 -0
- package/dist/session/server.d.cts +151 -0
- package/dist/session/server.d.ts +151 -0
- package/dist/session/server.guard.js +15 -0
- package/dist/session/server.js +252 -0
- package/dist/session/server.js.map +1 -0
- package/dist/session.cjs +74 -0
- package/dist/session.cjs.map +1 -0
- package/dist/session.d.cts +3 -0
- package/dist/session.d.ts +3 -0
- package/dist/session.js +5 -0
- package/dist/session.js.map +1 -0
- package/dist/status-Dx9zAFo9.d.ts +327 -0
- package/dist/status-wgTM26V7.d.cts +327 -0
- package/dist/store-CjmLgp9g.d.cts +64 -0
- package/dist/store-CjmLgp9g.d.ts +64 -0
- package/dist/types-BEEM7WdG.d.cts +25 -0
- package/dist/types-BEEM7WdG.d.ts +25 -0
- package/dist/types-BilBTDqK.d.cts +27 -0
- package/dist/types-BilBTDqK.d.ts +27 -0
- 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"}
|