@aastar/sdk 0.20.8 → 0.21.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 (144) hide show
  1. package/dist/BaseClient-CkBhQ1ou.d.cts +88 -0
  2. package/dist/UserClient-BDGP37PK.js +6 -0
  3. package/dist/{UserClient-AIIHB54I.js.map → UserClient-BDGP37PK.js.map} +1 -1
  4. package/dist/UserClient-FOAOBLGK.cjs +15 -0
  5. package/dist/UserClient-FOAOBLGK.cjs.map +1 -0
  6. package/dist/account.cjs +31 -0
  7. package/dist/account.cjs.map +1 -0
  8. package/dist/account.d.cts +48 -0
  9. package/dist/account.js +3 -3
  10. package/dist/admin.cjs +15 -0
  11. package/dist/admin.cjs.map +1 -0
  12. package/dist/admin.d.cts +62 -0
  13. package/dist/admin.js +3 -3
  14. package/dist/airaccount.cjs +452 -0
  15. package/dist/airaccount.cjs.map +1 -0
  16. package/dist/airaccount.d.cts +4 -0
  17. package/dist/airaccount.js +3 -3
  18. package/dist/channel-CkRRbzT8.d.cts +77 -0
  19. package/dist/channel.cjs +27 -0
  20. package/dist/channel.cjs.map +1 -0
  21. package/dist/channel.d.cts +64 -0
  22. package/dist/channel.js +3 -3
  23. package/dist/chunk-3HZEIFBW.cjs +118 -0
  24. package/dist/chunk-3HZEIFBW.cjs.map +1 -0
  25. package/dist/{chunk-7ARJ3OSU.js → chunk-57XLR2NT.js} +3 -3
  26. package/dist/{chunk-7ARJ3OSU.js.map → chunk-57XLR2NT.js.map} +1 -1
  27. package/dist/chunk-5JFYTJOE.cjs +448 -0
  28. package/dist/chunk-5JFYTJOE.cjs.map +1 -0
  29. package/dist/{chunk-KDH3UPKD.js → chunk-5NKU5NT5.js} +8 -8
  30. package/dist/{chunk-KDH3UPKD.js.map → chunk-5NKU5NT5.js.map} +1 -1
  31. package/dist/chunk-63JM67L7.cjs +435 -0
  32. package/dist/chunk-63JM67L7.cjs.map +1 -0
  33. package/dist/{chunk-IC3G6YM2.js → chunk-6OWZOTE7.js} +113 -9
  34. package/dist/chunk-6OWZOTE7.js.map +1 -0
  35. package/dist/chunk-CIEYY3A6.cjs +43259 -0
  36. package/dist/chunk-CIEYY3A6.cjs.map +1 -0
  37. package/dist/chunk-DEUBKZH5.cjs +421 -0
  38. package/dist/chunk-DEUBKZH5.cjs.map +1 -0
  39. package/dist/{chunk-TENYCMJ3.js → chunk-DF4WVR2H.js} +9 -9
  40. package/dist/{chunk-TENYCMJ3.js.map → chunk-DF4WVR2H.js.map} +1 -1
  41. package/dist/{chunk-BN5WY5GM.js → chunk-DQBKE4ND.js} +4 -4
  42. package/dist/{chunk-BN5WY5GM.js.map → chunk-DQBKE4ND.js.map} +1 -1
  43. package/dist/{chunk-4EZD7LPE.js → chunk-E4CQFW75.js} +3 -3
  44. package/dist/{chunk-4EZD7LPE.js.map → chunk-E4CQFW75.js.map} +1 -1
  45. package/dist/{chunk-LXWIPTPX.js → chunk-ENSMYCU6.js} +3 -3
  46. package/dist/{chunk-LXWIPTPX.js.map → chunk-ENSMYCU6.js.map} +1 -1
  47. package/dist/{chunk-FJ7XECC5.js → chunk-EY2AJTGV.js} +3 -3
  48. package/dist/{chunk-FJ7XECC5.js.map → chunk-EY2AJTGV.js.map} +1 -1
  49. package/dist/chunk-GAMSWXWI.cjs +1168 -0
  50. package/dist/chunk-GAMSWXWI.cjs.map +1 -0
  51. package/dist/chunk-IJN776TA.cjs +585 -0
  52. package/dist/chunk-IJN776TA.cjs.map +1 -0
  53. package/dist/{chunk-PKCHRXFR.js → chunk-KZERVPUR.js} +3 -3
  54. package/dist/{chunk-PKCHRXFR.js.map → chunk-KZERVPUR.js.map} +1 -1
  55. package/dist/{chunk-6QYXGMCR.js → chunk-M5WFKETT.js} +833 -47
  56. package/dist/chunk-M5WFKETT.js.map +1 -0
  57. package/dist/chunk-M7HXR7G5.cjs +128 -0
  58. package/dist/chunk-M7HXR7G5.cjs.map +1 -0
  59. package/dist/{chunk-PAABYXS6.js → chunk-MCALA6WM.js} +6 -6
  60. package/dist/{chunk-PAABYXS6.js.map → chunk-MCALA6WM.js.map} +1 -1
  61. package/dist/chunk-MXJEULSE.cjs +396 -0
  62. package/dist/chunk-MXJEULSE.cjs.map +1 -0
  63. package/dist/chunk-OVNOSAL3.cjs +4797 -0
  64. package/dist/chunk-OVNOSAL3.cjs.map +1 -0
  65. package/dist/chunk-Q7SFCCGT.cjs +11 -0
  66. package/dist/chunk-Q7SFCCGT.cjs.map +1 -0
  67. package/dist/{chunk-MVEWJIPY.js → chunk-RXPSL33E.js} +3 -3
  68. package/dist/{chunk-MVEWJIPY.js.map → chunk-RXPSL33E.js.map} +1 -1
  69. package/dist/{chunk-G3UJC4EL.js → chunk-UCLK6LTB.js} +39 -36
  70. package/dist/chunk-UCLK6LTB.js.map +1 -0
  71. package/dist/chunk-WR4OZUXR.cjs +115 -0
  72. package/dist/chunk-WR4OZUXR.cjs.map +1 -0
  73. package/dist/chunk-XQROKLZI.cjs +4521 -0
  74. package/dist/chunk-XQROKLZI.cjs.map +1 -0
  75. package/dist/chunk-Y4EJX7UA.cjs +228 -0
  76. package/dist/chunk-Y4EJX7UA.cjs.map +1 -0
  77. package/dist/chunk-Z4GZ6DQA.cjs +108 -0
  78. package/dist/chunk-Z4GZ6DQA.cjs.map +1 -0
  79. package/dist/contract-addresses-RABD77VP.cjs +49 -0
  80. package/dist/contract-addresses-RABD77VP.cjs.map +1 -0
  81. package/dist/{contract-addresses-N3TOL2WL.js → contract-addresses-TVXSRQ7I.js} +3 -3
  82. package/dist/{contract-addresses-N3TOL2WL.js.map → contract-addresses-TVXSRQ7I.js.map} +1 -1
  83. package/dist/core.cjs +898 -0
  84. package/dist/core.cjs.map +1 -0
  85. package/dist/core.d.cts +7048 -0
  86. package/dist/core.d.ts +130 -12
  87. package/dist/core.js +2 -2
  88. package/dist/dapp.cjs +289 -0
  89. package/dist/dapp.cjs.map +1 -0
  90. package/dist/dapp.d.cts +127 -0
  91. package/dist/dapp.js +3 -3
  92. package/dist/doc-types-471vSmPO.d.cts +16 -0
  93. package/dist/enduser.cjs +24 -0
  94. package/dist/enduser.cjs.map +1 -0
  95. package/dist/enduser.d.cts +261 -0
  96. package/dist/enduser.js +4 -4
  97. package/dist/identity.cjs +23 -0
  98. package/dist/identity.cjs.map +1 -0
  99. package/dist/identity.d.cts +81 -0
  100. package/dist/identity.js +3 -3
  101. package/dist/index-B6SfEQxo.d.cts +47 -0
  102. package/dist/index.cjs +2818 -0
  103. package/dist/index.cjs.map +1 -0
  104. package/dist/index.d.cts +656 -0
  105. package/dist/index.d.ts +1 -1
  106. package/dist/index.js +17 -17
  107. package/dist/kms.cjs +452 -0
  108. package/dist/kms.cjs.map +1 -0
  109. package/dist/kms.d.cts +3104 -0
  110. package/dist/kms.d.ts +62 -12
  111. package/dist/kms.js +3 -3
  112. package/dist/lib-FE4GR7TO.cjs +1865 -0
  113. package/dist/lib-FE4GR7TO.cjs.map +1 -0
  114. package/dist/operator.cjs +27 -0
  115. package/dist/operator.cjs.map +1 -0
  116. package/dist/operator.d.cts +164 -0
  117. package/dist/operator.js +3 -3
  118. package/dist/paymaster.cjs +63 -0
  119. package/dist/paymaster.cjs.map +1 -0
  120. package/dist/paymaster.d.cts +312 -0
  121. package/dist/paymaster.js +3 -3
  122. package/dist/src-CUHI6G6W.cjs +898 -0
  123. package/dist/src-CUHI6G6W.cjs.map +1 -0
  124. package/dist/src-KHCWIS4Q.cjs +63 -0
  125. package/dist/src-KHCWIS4Q.cjs.map +1 -0
  126. package/dist/{src-X5MIV3EB.js → src-RSN4U2T2.js} +5 -5
  127. package/dist/src-RSN4U2T2.js.map +1 -0
  128. package/dist/{src-L5SI5WNB.js → src-XCV6BTSV.js} +4 -4
  129. package/dist/{src-X5MIV3EB.js.map → src-XCV6BTSV.js.map} +1 -1
  130. package/dist/tier-router-DeeVg69O.d.cts +370 -0
  131. package/dist/tokens.cjs +15 -0
  132. package/dist/tokens.cjs.map +1 -0
  133. package/dist/tokens.d.cts +64 -0
  134. package/dist/tokens.js +3 -3
  135. package/dist/x402.cjs +103 -0
  136. package/dist/x402.cjs.map +1 -0
  137. package/dist/x402.d.cts +373 -0
  138. package/dist/x402.js +3 -3
  139. package/package.json +116 -32
  140. package/dist/UserClient-AIIHB54I.js +0 -6
  141. package/dist/chunk-6QYXGMCR.js.map +0 -1
  142. package/dist/chunk-G3UJC4EL.js.map +0 -1
  143. package/dist/chunk-IC3G6YM2.js.map +0 -1
  144. package/dist/src-L5SI5WNB.js.map +0 -1
package/dist/index.cjs ADDED
@@ -0,0 +1,2818 @@
1
+ 'use strict';
2
+
3
+ var chunk3HZEIFBW_cjs = require('./chunk-3HZEIFBW.cjs');
4
+ var chunk63JM67L7_cjs = require('./chunk-63JM67L7.cjs');
5
+ var chunkDEUBKZH5_cjs = require('./chunk-DEUBKZH5.cjs');
6
+ var chunkIJN776TA_cjs = require('./chunk-IJN776TA.cjs');
7
+ var chunkZ4GZ6DQA_cjs = require('./chunk-Z4GZ6DQA.cjs');
8
+ var chunkXQROKLZI_cjs = require('./chunk-XQROKLZI.cjs');
9
+ var chunkM7HXR7G5_cjs = require('./chunk-M7HXR7G5.cjs');
10
+ var chunkWR4OZUXR_cjs = require('./chunk-WR4OZUXR.cjs');
11
+ var chunkY4EJX7UA_cjs = require('./chunk-Y4EJX7UA.cjs');
12
+ var chunkGAMSWXWI_cjs = require('./chunk-GAMSWXWI.cjs');
13
+ var chunk5JFYTJOE_cjs = require('./chunk-5JFYTJOE.cjs');
14
+ var chunkCIEYY3A6_cjs = require('./chunk-CIEYY3A6.cjs');
15
+ var chunkMXJEULSE_cjs = require('./chunk-MXJEULSE.cjs');
16
+ require('./chunk-Q7SFCCGT.cjs');
17
+ var viem = require('viem');
18
+ var accounts = require('viem/accounts');
19
+ var fs = require('fs');
20
+
21
+ function _interopNamespace(e) {
22
+ if (e && e.__esModule) return e;
23
+ var n = Object.create(null);
24
+ if (e) {
25
+ Object.keys(e).forEach(function (k) {
26
+ if (k !== 'default') {
27
+ var d = Object.getOwnPropertyDescriptor(e, k);
28
+ Object.defineProperty(n, k, d.get ? d : {
29
+ enumerable: true,
30
+ get: function () { return e[k]; }
31
+ });
32
+ }
33
+ });
34
+ }
35
+ n.default = e;
36
+ return Object.freeze(n);
37
+ }
38
+
39
+ var fs__namespace = /*#__PURE__*/_interopNamespace(fs);
40
+
41
+ function createEndUserClient({
42
+ chain,
43
+ transport,
44
+ account,
45
+ addresses
46
+ }) {
47
+ const client = viem.createClient({
48
+ chain,
49
+ transport,
50
+ account
51
+ }).extend(viem.publicActions).extend(viem.walletActions);
52
+ const chainDefaults = chunkMXJEULSE_cjs.getCanonicalAddresses(chain.id);
53
+ if (!chainDefaults && !addresses) {
54
+ throw new Error(
55
+ `[createEndUserClient] No canonical addresses for chainId ${chain.id}. Pass \`addresses\` explicitly, or use a supported chain: ${chunkMXJEULSE_cjs.describeSupportedChains()}.`
56
+ );
57
+ }
58
+ const usedAddresses = { ...chunkMXJEULSE_cjs.CORE_ADDRESSES, ...chunkMXJEULSE_cjs.TOKEN_ADDRESSES, ...chunkMXJEULSE_cjs.TEST_ACCOUNT_ADDRESSES, ...chainDefaults, ...addresses };
59
+ const actions = {
60
+ ...chunkCIEYY3A6_cjs.registryActions(usedAddresses.registry)(client),
61
+ ...chunkCIEYY3A6_cjs.sbtActions(usedAddresses.mySBT)(client),
62
+ ...chunkCIEYY3A6_cjs.superPaymasterActions(usedAddresses.superPaymaster)(client),
63
+ ...chunkCIEYY3A6_cjs.paymasterActions(usedAddresses.paymasterV4)(client)
64
+ };
65
+ return Object.assign(client, actions, {
66
+ async onboard({ community, roleId, roleData }) {
67
+ console.log("\u{1F464} Onboarding user to community...");
68
+ const result = await this.joinAndActivate({ community, roleId, roleData });
69
+ console.log(`\u2705 User onboarded! SBT ID: ${result.sbtId}`);
70
+ return { tx: result.tx, sbtId: result.sbtId };
71
+ },
72
+ async joinAndActivate({ community, roleId, roleData }) {
73
+ const accountToUse = account;
74
+ if (!accountToUse) throw new Error("Account required for joinAndActivate");
75
+ console.log(` SDK: Joining community ${community}...`);
76
+ let finalData;
77
+ if (roleData) {
78
+ finalData = roleData;
79
+ } else {
80
+ const { encodeAbiParameters: encodeAbiParameters3 } = await import('viem');
81
+ finalData = encodeAbiParameters3(
82
+ [
83
+ { name: "account", type: "address" },
84
+ { name: "community", type: "address" },
85
+ { name: "avatarURI", type: "string" },
86
+ { name: "ensName", type: "string" },
87
+ { name: "stakeAmount", type: "uint256" }
88
+ ],
89
+ [accountToUse.address, community, "", "", 0n]
90
+ // Use minimum stake (Registry will use roleConfig.minStake)
91
+ );
92
+ }
93
+ const regTx = await client.writeContract({
94
+ address: usedAddresses.registry,
95
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
96
+ functionName: "registerRoleSelf",
97
+ args: [roleId, finalData],
98
+ account: accountToUse,
99
+ chain
100
+ });
101
+ await client.waitForTransactionReceipt({ hash: regTx });
102
+ const sbtId = await actions.getUserSBT({ user: accountToUse.address });
103
+ console.log(` SDK: User joined. SBT ID: ${sbtId}`);
104
+ let credit = 0n;
105
+ try {
106
+ const factoryAbi = viem.parseAbi(["function communityToToken(address) view returns (address)"]);
107
+ const tokenAddress = await client.readContract({
108
+ address: usedAddresses.xPNTsFactory,
109
+ abi: factoryAbi,
110
+ functionName: "communityToToken",
111
+ args: [community]
112
+ });
113
+ credit = await actions.getAvailableCredit({
114
+ user: client.aaAddress || accountToUse.address,
115
+ token: tokenAddress
116
+ });
117
+ console.log(` SDK: Activation complete. Current Credit: ${credit} points.`);
118
+ } catch (error) {
119
+ console.log(` SDK: Credit system not available (${error.message.split("\n")[0]}). Continuing...`);
120
+ }
121
+ return {
122
+ tx: regTx,
123
+ sbtId,
124
+ initialCredit: credit
125
+ };
126
+ },
127
+ async executeGasless({ target, data, value = 0n, operator }) {
128
+ const accountToUse = account;
129
+ if (!accountToUse) throw new Error("Wallet account required for gasless execution");
130
+ const { accountAddress } = await this.createSmartAccount({ owner: accountToUse.address });
131
+ console.log(` SDK: Executing gasless via AA ${accountAddress} Sponsored by ${operator}`);
132
+ let nonce = 0n;
133
+ try {
134
+ nonce = await client.readContract({
135
+ address: usedAddresses.entryPoint,
136
+ abi: [{
137
+ type: "function",
138
+ name: "getNonce",
139
+ inputs: [{ type: "address", name: "sender" }, { type: "uint192", name: "key" }],
140
+ outputs: [{ type: "uint256" }],
141
+ stateMutability: "view"
142
+ }],
143
+ functionName: "getNonce",
144
+ args: [accountAddress, 0n]
145
+ // 0 = default nonce key
146
+ });
147
+ } catch (e) {
148
+ console.warn(` \u26A0\uFE0F Failed to fetch nonce from EntryPoint, using default 0:`, e.message);
149
+ nonce = 0n;
150
+ }
151
+ const { encodeFunctionData: encodeFunctionData2, concat: concat2, pad: pad2, keccak256: keccak2565 } = await import('viem');
152
+ const executeData = encodeFunctionData2({
153
+ abi: [{ type: "function", name: "execute", inputs: [{ type: "address" }, { type: "uint256" }, { type: "bytes" }] }],
154
+ functionName: "execute",
155
+ args: [target, value, data]
156
+ });
157
+ const accountGasLimits = concat2([
158
+ pad2(`0x${1e5.toString(16)}`, { dir: "left", size: 16 }),
159
+ // verification
160
+ pad2(`0x${1e5.toString(16)}`, { dir: "left", size: 16 })
161
+ // call
162
+ ]);
163
+ const gasFees = concat2([
164
+ pad2(`0x${2e9.toString(16)}`, { dir: "left", size: 16 }),
165
+ // 2 gwei
166
+ pad2(`0x${2e9.toString(16)}`, { dir: "left", size: 16 })
167
+ // 2 gwei
168
+ ]);
169
+ const paymasterVerificationGas = 250000n;
170
+ const paymasterPostOpGas = 50000n;
171
+ const paymasterAndData = concat2([
172
+ usedAddresses.superPaymaster,
173
+ pad2(`0x${paymasterVerificationGas.toString(16)}`, { dir: "left", size: 16 }),
174
+ pad2(`0x${paymasterPostOpGas.toString(16)}`, { dir: "left", size: 16 }),
175
+ operator
176
+ ]);
177
+ const userOp = {
178
+ sender: accountAddress,
179
+ nonce,
180
+ initCode: "0x",
181
+ callData: executeData,
182
+ accountGasLimits,
183
+ preVerificationGas: 50000n,
184
+ gasFees,
185
+ paymasterAndData,
186
+ signature: "0x"
187
+ };
188
+ const entryPointAddress = usedAddresses.entryPoint || "0x0000000071727De22E5E9d8BAf0edAc6f37da032";
189
+ const userOpHash = await client.readContract({
190
+ address: entryPointAddress,
191
+ abi: [{
192
+ type: "function",
193
+ name: "getUserOpHash",
194
+ inputs: [{
195
+ type: "tuple",
196
+ components: [
197
+ { name: "sender", type: "address" },
198
+ { name: "nonce", type: "uint256" },
199
+ { name: "initCode", type: "bytes" },
200
+ { name: "callData", type: "bytes" },
201
+ { name: "accountGasLimits", type: "bytes32" },
202
+ { name: "preVerificationGas", type: "uint256" },
203
+ { name: "gasFees", type: "bytes32" },
204
+ { name: "paymasterAndData", type: "bytes" },
205
+ { name: "signature", type: "bytes" }
206
+ ]
207
+ }],
208
+ outputs: [{ type: "bytes32" }],
209
+ stateMutability: "view"
210
+ }],
211
+ functionName: "getUserOpHash",
212
+ args: [userOp]
213
+ });
214
+ const signature = await accountToUse.signMessage({
215
+ message: { raw: userOpHash }
216
+ });
217
+ userOp.signature = signature;
218
+ console.log(` SDK: Submitting UserOp ${userOpHash}...`);
219
+ const tx = await client.writeContract({
220
+ address: entryPointAddress,
221
+ abi: [{
222
+ type: "function",
223
+ name: "handleOps",
224
+ inputs: [
225
+ {
226
+ type: "tuple[]",
227
+ components: [
228
+ { name: "sender", type: "address" },
229
+ { name: "nonce", type: "uint256" },
230
+ { name: "initCode", type: "bytes" },
231
+ { name: "callData", type: "bytes" },
232
+ { name: "accountGasLimits", type: "bytes32" },
233
+ { name: "preVerificationGas", type: "uint256" },
234
+ { name: "gasFees", type: "bytes32" },
235
+ { name: "paymasterAndData", type: "bytes" },
236
+ { name: "signature", type: "bytes" }
237
+ ]
238
+ },
239
+ { name: "beneficiary", type: "address" }
240
+ ],
241
+ outputs: [],
242
+ stateMutability: "nonpayable"
243
+ }],
244
+ functionName: "handleOps",
245
+ args: [[userOp], accountToUse.address],
246
+ account,
247
+ chain
248
+ });
249
+ await client.waitForTransactionReceipt({ hash: tx });
250
+ return tx;
251
+ },
252
+ async checkJoinRequirements(address) {
253
+ const accountToUse = address || account?.address;
254
+ if (!accountToUse) throw new Error("Account address required for requirement check");
255
+ const { RequirementChecker: RequirementChecker2 } = await import('./src-CUHI6G6W.cjs');
256
+ const checker = new RequirementChecker2(client, usedAddresses);
257
+ return await checker.checkRequirements({
258
+ address: accountToUse,
259
+ requiredGToken: 440000000000000000n,
260
+ // 0.44 GT (stake + burn)
261
+ requireSBT: false
262
+ });
263
+ },
264
+ async createSmartAccount({ owner, salt = 0n }) {
265
+ const { SimpleAccountFactoryABI: SimpleAccountFactoryABI2 } = await import('./src-CUHI6G6W.cjs');
266
+ const { encodeFunctionData: encodeFunctionData2, concat: concat2 } = await import('viem');
267
+ let factoryAddress = usedAddresses.simpleAccountFactory;
268
+ console.log(` SDK: Using SimpleAccountFactory: ${factoryAddress} (Owner: ${owner}, Salt: ${salt})`);
269
+ if (!factoryAddress || factoryAddress === "0x0000000000000000000000000000000000000000") {
270
+ console.warn(" \u26A0\uFE0F SimpleAccountFactory not found in configuration. Using default fallback.");
271
+ factoryAddress = "0x9406Cc6185a346906296840746125a0E44976454";
272
+ }
273
+ const accountAddress = await client.readContract({
274
+ address: factoryAddress,
275
+ abi: SimpleAccountFactoryABI2,
276
+ functionName: "getAddress",
277
+ args: [owner, salt]
278
+ });
279
+ const createAccountData = encodeFunctionData2({
280
+ abi: SimpleAccountFactoryABI2,
281
+ functionName: "createAccount",
282
+ args: [owner, salt]
283
+ });
284
+ const initCode = concat2([factoryAddress, createAccountData]);
285
+ const byteCode = await client.getBytecode({ address: accountAddress });
286
+ const isDeployed = byteCode !== void 0 && byteCode !== "0x";
287
+ return { accountAddress, initCode, isDeployed };
288
+ },
289
+ async deploySmartAccount({ owner, salt = 0n, fundWithETH = 0n }) {
290
+ const { accountAddress, isDeployed } = await this.createSmartAccount({ owner, salt });
291
+ const { formatEther: formatEther2 } = await import('viem');
292
+ let deployHash = "0x0";
293
+ if (isDeployed) {
294
+ console.log(` \u2139\uFE0F Account ${accountAddress} already deployed.`);
295
+ } else {
296
+ const { SimpleAccountFactoryABI: SimpleAccountFactoryABI2 } = await import('./src-CUHI6G6W.cjs');
297
+ let factoryAddress = usedAddresses.simpleAccountFactory;
298
+ if (!factoryAddress || factoryAddress === "0x0000000000000000000000000000000000000000") {
299
+ factoryAddress = "0x9406Cc6185a346906296840746125a0E44976454";
300
+ }
301
+ console.log(` \u{1F3ED} Deploying Smart Account for ${owner}...`);
302
+ deployHash = await client.writeContract({
303
+ address: factoryAddress,
304
+ abi: SimpleAccountFactoryABI2,
305
+ functionName: "createAccount",
306
+ args: [owner, salt],
307
+ account,
308
+ chain
309
+ });
310
+ await client.waitForTransactionReceipt({ hash: deployHash });
311
+ console.log(` \u2705 Deployed at ${accountAddress}`);
312
+ }
313
+ if (fundWithETH > 0n) {
314
+ console.log(` \u26FD Funding account with ${formatEther2(fundWithETH)} ETH...`);
315
+ const tx = await client.sendTransaction({
316
+ to: accountAddress,
317
+ value: fundWithETH,
318
+ account,
319
+ chain
320
+ });
321
+ await client.waitForTransactionReceipt({ hash: tx });
322
+ }
323
+ return { accountAddress, deployTxHash: deployHash, isDeployed: true };
324
+ }
325
+ });
326
+ }
327
+ var RoleIds = {
328
+ PAYMASTER_SUPER: viem.keccak256(viem.stringToBytes("PAYMASTER_SUPER")),
329
+ DVT: viem.keccak256(viem.stringToBytes("DVT")),
330
+ // Replaced PAYMASTER
331
+ PAYMASTER_AOA: viem.keccak256(viem.stringToBytes("PAYMASTER_AOA")),
332
+ KMS: viem.keccak256(viem.stringToBytes("KMS")),
333
+ COMMUNITY: viem.keccak256(viem.stringToBytes("COMMUNITY")),
334
+ ENDUSER: viem.keccak256(viem.stringToBytes("ENDUSER")),
335
+ ANODE: viem.keccak256(viem.stringToBytes("ANODE"))
336
+ };
337
+ var RoleDataFactory = {
338
+ /**
339
+ * Data for SuperPaymaster Operator (Empty)
340
+ */
341
+ paymasterSuper: () => "0x",
342
+ /**
343
+ * Data for Generic DVT Role (Empty)
344
+ */
345
+ dvt: () => "0x",
346
+ /**
347
+ * Data for Community Registration (matches Registry.sol CommunityRoleData)
348
+ * NOTE: Solidity's abi.encode(struct) adds a 32-byte offset prefix (0x20)
349
+ * which is required for abi.decode(struct) to work correctly.
350
+ *
351
+ * @param params.name Community Name (defaults to 'TestCommunity')
352
+ * @param params.ensName ENS name (optional)
353
+ * @param params.website Website URL (optional)
354
+ * @param params.description Community description (optional)
355
+ * @param params.logoURI Logo URI string (optional)
356
+ * @param params.stakeAmount Stake amount (defaults to 0)
357
+ */
358
+ community: (params) => {
359
+ return viem.encodeAbiParameters(
360
+ [{
361
+ type: "tuple",
362
+ components: [
363
+ { name: "name", type: "string" },
364
+ { name: "ensName", type: "string" },
365
+ { name: "website", type: "string" },
366
+ { name: "description", type: "string" },
367
+ { name: "logoURI", type: "string" },
368
+ { name: "stakeAmount", type: "uint256" }
369
+ ]
370
+ }],
371
+ [[
372
+ params?.name || "TestCommunity",
373
+ params?.ensName || "",
374
+ params?.website || "",
375
+ params?.description || "",
376
+ params?.logoURI || "",
377
+ params?.stakeAmount || 0n
378
+ ]]
379
+ );
380
+ },
381
+ /**
382
+ * Data for EndUser (matches Registry.sol EndUserRoleData)
383
+ */
384
+ endUser: (params) => {
385
+ return viem.encodeAbiParameters(
386
+ [{
387
+ type: "tuple",
388
+ components: [
389
+ { name: "account", type: "address" },
390
+ { name: "community", type: "address" },
391
+ { name: "avatarURI", type: "string" },
392
+ { name: "ensName", type: "string" },
393
+ { name: "stakeAmount", type: "uint256" }
394
+ ]
395
+ }],
396
+ [[
397
+ params?.account || viem.zeroAddress,
398
+ params?.community || viem.zeroAddress,
399
+ params?.avatarURI || "",
400
+ params?.ensName || "",
401
+ params?.stakeAmount || 0n
402
+ ]]
403
+ );
404
+ },
405
+ decodeCommunity: (data) => {
406
+ const decoded = viem.decodeAbiParameters(
407
+ [{
408
+ type: "tuple",
409
+ components: [
410
+ { name: "name", type: "string" },
411
+ { name: "ensName", type: "string" },
412
+ { name: "website", type: "string" },
413
+ { name: "description", type: "string" },
414
+ { name: "logoURI", type: "string" },
415
+ { name: "stakeAmount", type: "uint256" }
416
+ ]
417
+ }],
418
+ data
419
+ );
420
+ const result = decoded[0];
421
+ if (Array.isArray(result)) {
422
+ const [n, e, w, d, l, s] = result;
423
+ return { name: n, ensName: e, website: w, description: d, logoURI: l, stakeAmount: s };
424
+ } else {
425
+ return {
426
+ name: result.name,
427
+ ensName: result.ensName,
428
+ website: result.website,
429
+ description: result.description,
430
+ logoURI: result.logoURI,
431
+ stakeAmount: result.stakeAmount
432
+ };
433
+ }
434
+ },
435
+ decodeEndUser: (data) => {
436
+ const decoded = viem.decodeAbiParameters(
437
+ [{
438
+ type: "tuple",
439
+ components: [
440
+ { name: "account", type: "address" },
441
+ { name: "community", type: "address" },
442
+ { name: "avatarURI", type: "string" },
443
+ { name: "ensName", type: "string" },
444
+ { name: "stakeAmount", type: "uint256" }
445
+ ]
446
+ }],
447
+ data
448
+ );
449
+ const result = decoded[0];
450
+ if (Array.isArray(result)) {
451
+ const [a, c, av, en, s] = result;
452
+ return { account: a, community: c, avatarURI: av, ensName: en, stakeAmount: s };
453
+ } else {
454
+ return {
455
+ account: result.account,
456
+ community: result.community,
457
+ avatarURI: result.avatarURI,
458
+ ensName: result.ensName,
459
+ stakeAmount: result.stakeAmount
460
+ };
461
+ }
462
+ }
463
+ };
464
+ var CustomErrors = {
465
+ RoleNotConfigured: "RoleNotConfigured(bytes32,bool)",
466
+ RoleAlreadyGranted: "RoleAlreadyGranted(bytes32,address)",
467
+ InsufficientStake: "InsufficientStake(uint256,uint256)"
468
+ };
469
+ function decodeContractError(error) {
470
+ if (!error || typeof error !== "object") return null;
471
+ if (error.name === "ContractFunctionExecutionError" || error.walk) {
472
+ const internalError = error.walk ? error.walk((e) => e.data) : error;
473
+ const data = internalError?.data;
474
+ if (data) {
475
+ try {
476
+ const decoded = viem.decodeErrorResult({
477
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
478
+ data
479
+ });
480
+ if (decoded.errorName === "RoleNotConfigured") {
481
+ const [roleId, isActive] = decoded.args;
482
+ return `RoleNotConfigured: Role ${roleId} is ${isActive ? "ACTIVE" : "INACTIVE"} in Registry.`;
483
+ }
484
+ if (decoded.errorName === "RoleAlreadyGranted") {
485
+ const [roleId, user] = decoded.args;
486
+ return `RoleAlreadyGranted: User ${user} already has role ${roleId}.`;
487
+ }
488
+ if (decoded.errorName === "InsufficientStake") {
489
+ const [stake, minStake] = decoded.args;
490
+ return `InsufficientStake: Provided ${stake}, Required ${minStake}.`;
491
+ }
492
+ return `${decoded.errorName}: ${decoded.args}`;
493
+ } catch (e) {
494
+ return null;
495
+ }
496
+ }
497
+ }
498
+ return null;
499
+ }
500
+
501
+ // src/clients/operator.ts
502
+ function createOperatorClient({
503
+ chain,
504
+ transport,
505
+ account,
506
+ addresses
507
+ }) {
508
+ const client = viem.createClient({
509
+ chain,
510
+ transport,
511
+ account
512
+ }).extend(viem.publicActions).extend(viem.walletActions);
513
+ const chainDefaults = chunkMXJEULSE_cjs.getCanonicalAddresses(chain.id);
514
+ if (!chainDefaults && !addresses) {
515
+ throw new Error(
516
+ `[createOperatorClient] No canonical addresses for chainId ${chain.id}. Pass \`addresses\` explicitly, or use a supported chain: ${chunkMXJEULSE_cjs.describeSupportedChains()}.`
517
+ );
518
+ }
519
+ const usedAddresses = { ...chunkMXJEULSE_cjs.CORE_ADDRESSES, ...chunkMXJEULSE_cjs.TEST_TOKEN_ADDRESSES, ...chunkMXJEULSE_cjs.TEST_ACCOUNT_ADDRESSES, ...chainDefaults, ...addresses };
520
+ const spActions = chunkCIEYY3A6_cjs.superPaymasterActions(usedAddresses.superPaymaster)(client);
521
+ const regActions = chunkCIEYY3A6_cjs.registryActions(usedAddresses.registry)(client);
522
+ const stkActions = chunkCIEYY3A6_cjs.stakingActions(usedAddresses.gTokenStaking)(client);
523
+ const pmV4Actions = chunkCIEYY3A6_cjs.paymasterActions(usedAddresses.paymasterV4)(client);
524
+ const actions = {
525
+ ...stkActions,
526
+ ...spActions,
527
+ ...pmV4Actions,
528
+ ...regActions,
529
+ async setup(args) {
530
+ console.log("\u2699\uFE0F Setting up operator...");
531
+ const txs = await this._onboardOperator(args);
532
+ console.log(`\u2705 Operator setup complete! Transactions: ${txs.length}`);
533
+ return { txs };
534
+ },
535
+ async onboardOperator(args) {
536
+ return this.onboardFully(args);
537
+ },
538
+ async onboardFully(args) {
539
+ return this._onboardOperator(args);
540
+ },
541
+ async deployPaymasterV4({ version = "v4.1", initData = "0x" } = {}) {
542
+ console.log(` SDK: Deploying Paymaster V4 (${version})...`);
543
+ const tx = await client.writeContract({
544
+ address: usedAddresses.paymasterFactory,
545
+ abi: chunkCIEYY3A6_cjs.PaymasterFactoryABI,
546
+ functionName: "deployPaymaster",
547
+ args: [version, initData],
548
+ account,
549
+ chain
550
+ });
551
+ await client.waitForTransactionReceipt({ hash: tx });
552
+ return tx;
553
+ },
554
+ async _onboardOperator({ stakeAmount, depositAmount, roleId, roleData }) {
555
+ const txs = [];
556
+ const accountToUse = account;
557
+ if (!accountToUse) throw new Error("Account required for onboarding");
558
+ try {
559
+ console.log(" SDK: Fetching role config for entry burn...");
560
+ const roleConfig = await client.readContract({
561
+ address: usedAddresses.registry,
562
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
563
+ functionName: "roleConfigs",
564
+ args: [roleId]
565
+ });
566
+ const entryBurn = roleConfig[1];
567
+ const totalStakeNeeded = stakeAmount + entryBurn;
568
+ console.log(` SDK: Approving GToken (Stake: ${stakeAmount}, Burn: ${entryBurn})...`);
569
+ const approveGToken = await client.writeContract({
570
+ address: usedAddresses.gToken,
571
+ abi: viem.erc20Abi,
572
+ functionName: "approve",
573
+ args: [usedAddresses.gTokenStaking, totalStakeNeeded],
574
+ account: accountToUse,
575
+ chain
576
+ });
577
+ await client.waitForTransactionReceipt({ hash: approveGToken });
578
+ txs.push(approveGToken);
579
+ let data;
580
+ if (roleData && roleData !== "0x") {
581
+ data = roleData;
582
+ } else {
583
+ console.log(` SDK: Auto-generating roleData for roleId ${roleId}...`);
584
+ if (roleId === viem.keccak256(viem.stringToBytes("COMMUNITY"))) {
585
+ data = RoleDataFactory.community();
586
+ } else if (roleId === viem.keccak256(viem.stringToBytes("ENDUSER"))) {
587
+ data = RoleDataFactory.endUser();
588
+ } else if (roleId === viem.keccak256(viem.stringToBytes("PAYMASTER_SUPER"))) {
589
+ data = RoleDataFactory.paymasterSuper();
590
+ } else {
591
+ data = RoleDataFactory.paymasterSuper();
592
+ }
593
+ }
594
+ console.log(` SDK: Checking if role already granted...`);
595
+ const hasRoleResult = await client.readContract({
596
+ address: usedAddresses.registry,
597
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
598
+ functionName: "hasRole",
599
+ args: [roleId, accountToUse.address]
600
+ });
601
+ if (hasRoleResult) {
602
+ console.log(` \u2139\uFE0F Role already granted, skipping registration`);
603
+ } else {
604
+ console.log(` SDK: Registering role ${roleId}...`);
605
+ const registerTx = await actions.registerRoleSelf({
606
+ roleId,
607
+ data,
608
+ account: accountToUse
609
+ });
610
+ await client.waitForTransactionReceipt({ hash: registerTx });
611
+ txs.push(registerTx);
612
+ }
613
+ if (depositAmount > 0n) {
614
+ console.log(" SDK: Depositing aPNTs via depositFor...");
615
+ const depositTx = await client.writeContract({
616
+ address: usedAddresses.superPaymaster,
617
+ abi: chunkCIEYY3A6_cjs.SuperPaymasterABI,
618
+ functionName: "depositFor",
619
+ args: [accountToUse.address, depositAmount],
620
+ account: accountToUse,
621
+ chain
622
+ });
623
+ await client.waitForTransactionReceipt({ hash: depositTx });
624
+ txs.push(depositTx);
625
+ }
626
+ return txs;
627
+ } catch (error) {
628
+ const decodedMsg = decodeContractError(error);
629
+ throw decodedMsg ? new Error(`Onboarding Failed: ${decodedMsg}`) : error;
630
+ }
631
+ },
632
+ async onboardToSuperPaymaster(args) {
633
+ return this.onboardOperator(args);
634
+ },
635
+ async configureOperator({ xPNTsToken, treasury, account: accountOverride }) {
636
+ const tx = await spActions.configureOperator({
637
+ xPNTsToken,
638
+ opTreasury: treasury,
639
+ account: accountOverride || account
640
+ });
641
+ await client.waitForTransactionReceipt({ hash: tx });
642
+ return tx;
643
+ },
644
+ async getOperatorStatus(accountAddress) {
645
+ try {
646
+ const hasRole = await client.readContract({
647
+ address: usedAddresses.registry,
648
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
649
+ functionName: "hasRole",
650
+ args: [viem.keccak256(viem.stringToBytes("PAYMASTER_SUPER")), accountAddress]
651
+ });
652
+ let operatorType = null;
653
+ let superPaymasterInfo = null;
654
+ let paymasterV4Info = null;
655
+ if (hasRole && usedAddresses.superPaymaster) {
656
+ const operatorData = await client.readContract({
657
+ address: usedAddresses.superPaymaster,
658
+ abi: chunkCIEYY3A6_cjs.SuperPaymasterABI,
659
+ functionName: "operators",
660
+ args: [accountAddress]
661
+ });
662
+ if (operatorData && operatorData[1]) {
663
+ operatorType = "super";
664
+ const xPNTsTokenAddr = operatorData[3];
665
+ let exchangeRate = 0n;
666
+ if (xPNTsTokenAddr && xPNTsTokenAddr !== viem.zeroAddress) {
667
+ try {
668
+ exchangeRate = await client.readContract({
669
+ address: xPNTsTokenAddr,
670
+ abi: chunkCIEYY3A6_cjs.xPNTsTokenABI,
671
+ functionName: "exchangeRate"
672
+ });
673
+ } catch (rateErr) {
674
+ const msg = rateErr instanceof Error ? rateErr.message : String(rateErr);
675
+ if (!msg.includes("ContractFunctionExecutionError") && !msg.includes("code: -32")) {
676
+ console.warn(` \u26A0\uFE0F Unexpected error reading exchangeRate from ${xPNTsTokenAddr}:`, msg);
677
+ }
678
+ }
679
+ }
680
+ superPaymasterInfo = {
681
+ hasRole: true,
682
+ isConfigured: true,
683
+ balance: operatorData[0],
684
+ exchangeRate,
685
+ treasury: operatorData[6]
686
+ };
687
+ }
688
+ }
689
+ if (usedAddresses.paymasterFactory && usedAddresses.paymasterFactory !== viem.zeroAddress) {
690
+ try {
691
+ const pmAddr = await client.readContract({
692
+ address: usedAddresses.paymasterFactory,
693
+ abi: chunkCIEYY3A6_cjs.PaymasterFactoryABI,
694
+ functionName: "getPaymasterByOperator",
695
+ args: [accountAddress]
696
+ });
697
+ if (pmAddr !== viem.zeroAddress) {
698
+ operatorType = operatorType || "v4";
699
+ paymasterV4Info = {
700
+ address: pmAddr,
701
+ balance: await client.getBalance({ address: pmAddr })
702
+ };
703
+ }
704
+ } catch (e) {
705
+ console.warn(` \u26A0\uFE0F Failed to fetch V4 info from factory ${usedAddresses.paymasterFactory}:`, e);
706
+ }
707
+ }
708
+ return { type: operatorType, superPaymaster: superPaymasterInfo, paymasterV4: paymasterV4Info };
709
+ } catch (error) {
710
+ console.error("Error in getOperatorStatus:", error);
711
+ return { type: null, superPaymaster: null, paymasterV4: null };
712
+ }
713
+ }
714
+ };
715
+ return Object.assign(client, actions);
716
+ }
717
+ function createCommunityClient({
718
+ chain,
719
+ transport,
720
+ account,
721
+ addresses
722
+ }) {
723
+ const client = viem.createClient({
724
+ chain,
725
+ transport,
726
+ account
727
+ }).extend(viem.publicActions).extend(viem.walletActions);
728
+ const chainDefaults = chunkMXJEULSE_cjs.getCanonicalAddresses(chain.id);
729
+ if (!chainDefaults && !addresses) {
730
+ throw new Error(
731
+ `[createCommunityClient] No canonical addresses for chainId ${chain.id}. Pass \`addresses\` explicitly, or use a supported chain: ${chunkMXJEULSE_cjs.describeSupportedChains()}.`
732
+ );
733
+ }
734
+ const usedAddresses = { ...chunkMXJEULSE_cjs.CORE_ADDRESSES, ...chunkMXJEULSE_cjs.TEST_TOKEN_ADDRESSES, ...chainDefaults, ...addresses };
735
+ const registryActionsObj = chunkCIEYY3A6_cjs.registryActions(usedAddresses.registry)(client);
736
+ const sbtActionsObj = chunkCIEYY3A6_cjs.sbtActions(usedAddresses.mySBT)(client);
737
+ const launch = async (args) => {
738
+ try {
739
+ console.log(`\u{1F680} Launching community: ${args.name}`);
740
+ if (!account) {
741
+ throw new Error("Account is required for launch()");
742
+ }
743
+ const uniqueName = `${args.name}_${Date.now()}`;
744
+ console.log(` \u{1F4DD} Unique name: ${uniqueName}`);
745
+ const roleData = RoleDataFactory.community({
746
+ name: uniqueName,
747
+ ensName: "",
748
+ website: args.website || "",
749
+ description: args.description || "",
750
+ logoURI: args.logoURI || "",
751
+ stakeAmount: 0n
752
+ });
753
+ console.log(` \u2705 RoleData generated:`, roleData);
754
+ console.log(` \u{1F4CA} RoleData type:`, typeof roleData);
755
+ console.log(` \u{1F4CF} RoleData length:`, roleData?.length);
756
+ const hasRole = await client.readContract({
757
+ address: usedAddresses.registry,
758
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
759
+ functionName: "hasRole",
760
+ args: [RoleIds.COMMUNITY, account.address]
761
+ });
762
+ let registerTx;
763
+ if (hasRole) {
764
+ console.log(` \u2139\uFE0F Account already has COMMUNITY role. Skipping registration.`);
765
+ } else {
766
+ if (usedAddresses.gToken && usedAddresses.gTokenStaking) {
767
+ console.log(` \u{1F4B0} Checking GToken allowance...`);
768
+ const balance = await client.readContract({
769
+ address: usedAddresses.gToken,
770
+ abi: viem.erc20Abi,
771
+ functionName: "balanceOf",
772
+ args: [account.address]
773
+ });
774
+ if (balance < 50000000000000000000n) {
775
+ console.warn(` \u26A0\uFE0F Warning: Low GToken balance (${balance}). Registration may fail if minStake > balance.`);
776
+ }
777
+ const allowance = await client.readContract({
778
+ address: usedAddresses.gToken,
779
+ abi: viem.erc20Abi,
780
+ functionName: "allowance",
781
+ args: [account.address, usedAddresses.gTokenStaking]
782
+ });
783
+ if (allowance < 50000000000000000000n) {
784
+ console.log(` \u{1F513} Approving GToken for Staking...`);
785
+ const approveTx = await client.writeContract({
786
+ address: usedAddresses.gToken,
787
+ abi: viem.erc20Abi,
788
+ functionName: "approve",
789
+ args: [usedAddresses.gTokenStaking, 115792089237316195423570985008687907853269984665640564039457584007913129639935n],
790
+ // MaxUint256
791
+ account
792
+ });
793
+ console.log(` \u2705 Approved: ${approveTx}`);
794
+ await client.waitForTransactionReceipt({ hash: approveTx });
795
+ }
796
+ }
797
+ console.log(` \u{1F4E4} Registering community role...`);
798
+ try {
799
+ registerTx = await registryActionsObj.registerRole({
800
+ roleId: RoleIds.COMMUNITY,
801
+ user: account.address,
802
+ data: roleData,
803
+ account
804
+ });
805
+ console.log(` \u2705 Community registered: ${registerTx}`);
806
+ } catch (e) {
807
+ const isRoleError = e.message?.includes("RoleAlreadyGranted") || e.cause?.data?.errorName === "RoleAlreadyGranted" || e.name === "RoleAlreadyGranted" || e.name === "RoleAlreadyGranted";
808
+ if (isRoleError) {
809
+ console.log(` \u2139\uFE0F Role already granted (caught in tx). Skipping.`);
810
+ } else {
811
+ throw e;
812
+ }
813
+ }
814
+ }
815
+ let tokenAddress = "0x0000000000000000000000000000000000000000";
816
+ const txs = [];
817
+ if (registerTx) txs.push(registerTx);
818
+ if (usedAddresses.xPNTsFactory) {
819
+ if (!client.account) {
820
+ throw new Error("Client account is required for token deployment");
821
+ }
822
+ const factoryAbi = [
823
+ {
824
+ type: "function",
825
+ name: "deployxPNTsToken",
826
+ inputs: [
827
+ { name: "name", type: "string" },
828
+ { name: "symbol", type: "string" },
829
+ { name: "communityName", type: "string" },
830
+ { name: "communityENS", type: "string" },
831
+ { name: "exchangeRate", type: "uint256" },
832
+ { name: "paymasterAOA", type: "address" }
833
+ ],
834
+ outputs: [{ name: "token", type: "address" }],
835
+ stateMutability: "nonpayable"
836
+ },
837
+ {
838
+ type: "function",
839
+ name: "getTokenAddress",
840
+ inputs: [{ name: "community", type: "address" }],
841
+ outputs: [{ name: "token", type: "address" }],
842
+ stateMutability: "view"
843
+ }
844
+ ];
845
+ try {
846
+ const existingToken = await client.readContract({
847
+ address: usedAddresses.xPNTsFactory,
848
+ abi: factoryAbi,
849
+ functionName: "getTokenAddress",
850
+ args: [account.address]
851
+ });
852
+ if (existingToken && existingToken !== "0x0000000000000000000000000000000000000000") {
853
+ console.log(` \u2139\uFE0F Found existing token at ${existingToken}`);
854
+ tokenAddress = existingToken;
855
+ return { tokenAddress, txs };
856
+ }
857
+ } catch (e) {
858
+ console.warn(` \u26A0\uFE0F Failed to check for existing token:`, e);
859
+ }
860
+ console.log(` \u{1F3ED} Deploying Token via Factory: ${usedAddresses.xPNTsFactory}`);
861
+ try {
862
+ const { request } = await client.simulateContract({
863
+ address: usedAddresses.xPNTsFactory,
864
+ abi: factoryAbi,
865
+ functionName: "deployxPNTsToken",
866
+ args: [
867
+ args.tokenName,
868
+ args.tokenSymbol,
869
+ args.name,
870
+ // communityName
871
+ args.website || "",
872
+ // communityENS (mapping website to ENS param for now)
873
+ 1000000000000000000n,
874
+ // exchangeRate 1e18 (1:1)
875
+ "0x0000000000000000000000000000000000000000"
876
+ // paymasterAOA (optional)
877
+ ],
878
+ account: client.account
879
+ });
880
+ const deployTx = await client.writeContract(request);
881
+ console.log(` \u{1F4E4} Deploy Token Tx: ${deployTx}`);
882
+ txs.push(deployTx);
883
+ const receipt = await client.waitForTransactionReceipt({ hash: deployTx });
884
+ const newTokenAddress = await client.readContract({
885
+ address: usedAddresses.xPNTsFactory,
886
+ abi: factoryAbi,
887
+ functionName: "getTokenAddress",
888
+ args: [account.address]
889
+ });
890
+ if (newTokenAddress) {
891
+ tokenAddress = newTokenAddress;
892
+ console.log(` \u{1FA99} Token Deployed: ${tokenAddress}`);
893
+ }
894
+ } catch (deployError) {
895
+ console.warn(" \u26A0\uFE0F Failed to deploy token, but community registered:", deployError);
896
+ }
897
+ }
898
+ return { tokenAddress, txs };
899
+ } catch (error) {
900
+ console.error("\u274C Error in launch():", error);
901
+ const errorMessage = error.message || "";
902
+ const errorData = error.data?.errorName || "";
903
+ const errorString = JSON.stringify(error);
904
+ if (errorMessage.includes("RoleAlreadyGranted") || errorData === "RoleAlreadyGranted" || errorString.includes("RoleAlreadyGranted")) {
905
+ throw new Error(`Account ${account?.address || "unknown"} already has COMMUNITY role. Please use a different account or exit the role first.`);
906
+ }
907
+ if (errorMessage.includes("InsufficientStake")) {
908
+ throw new Error("Insufficient stake. Please ensure you have enough GToken staked.");
909
+ }
910
+ if (errorMessage.includes("RoleNotConfigured")) {
911
+ throw new Error("COMMUNITY role is not configured in the Registry contract.");
912
+ }
913
+ throw error;
914
+ }
915
+ };
916
+ const getCommunityInfo = async (accountAddress) => {
917
+ try {
918
+ const hasRole = await client.readContract({
919
+ address: usedAddresses.registry,
920
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
921
+ functionName: "hasRole",
922
+ args: [RoleIds.COMMUNITY, accountAddress]
923
+ });
924
+ if (!hasRole) {
925
+ return {
926
+ hasRole: false,
927
+ tokenAddress: null,
928
+ communityData: null
929
+ };
930
+ }
931
+ const factoryAbi = [
932
+ {
933
+ inputs: [{ name: "community", type: "address" }],
934
+ name: "getTokenAddress",
935
+ outputs: [{ name: "", type: "address" }],
936
+ stateMutability: "view",
937
+ type: "function"
938
+ }
939
+ ];
940
+ const tokenAddress = await client.readContract({
941
+ address: usedAddresses.xPNTsFactory,
942
+ abi: factoryAbi,
943
+ functionName: "getTokenAddress",
944
+ args: [accountAddress]
945
+ });
946
+ const metadata = await client.readContract({
947
+ address: usedAddresses.registry,
948
+ abi: chunkCIEYY3A6_cjs.RegistryABI,
949
+ functionName: "roleMetadata",
950
+ args: [RoleIds.COMMUNITY, accountAddress]
951
+ });
952
+ let communityData = {
953
+ name: "Community",
954
+ ensName: "",
955
+ website: "",
956
+ description: "",
957
+ logoURI: ""
958
+ };
959
+ if (metadata && metadata !== "0x") {
960
+ try {
961
+ const decoded = RoleDataFactory.decodeCommunity(metadata);
962
+ communityData = {
963
+ name: decoded.name || "Community",
964
+ ensName: decoded.ensName || "",
965
+ website: decoded.website || "",
966
+ description: decoded.description || "",
967
+ logoURI: decoded.logoURI || ""
968
+ };
969
+ } catch (e) {
970
+ console.warn(" \u26A0\uFE0F Failed to decode community metadata:", e);
971
+ }
972
+ }
973
+ return {
974
+ hasRole: true,
975
+ tokenAddress: tokenAddress && tokenAddress !== "0x0000000000000000000000000000000000000000" ? tokenAddress : null,
976
+ communityData: metadata && metadata !== "0x" ? communityData : null
977
+ };
978
+ } catch (error) {
979
+ console.error("Error fetching community info:", error);
980
+ return {
981
+ hasRole: false,
982
+ tokenAddress: null,
983
+ communityData: null
984
+ };
985
+ }
986
+ };
987
+ return Object.assign(client, registryActionsObj, sbtActionsObj, {
988
+ launch,
989
+ getCommunityInfo
990
+ });
991
+ }
992
+ var ADDRESS_PLACEHOLDER = "0x0000000000000000000000000000000000000000";
993
+ function createAdminClient({
994
+ chain,
995
+ transport,
996
+ account,
997
+ addresses
998
+ }) {
999
+ const baseClient = viem.createClient({ chain, transport, account }).extend(viem.publicActions).extend(viem.walletActions);
1000
+ const chainDefaults = chunkMXJEULSE_cjs.getCanonicalAddresses(chain.id);
1001
+ if (!chainDefaults && !addresses) {
1002
+ throw new Error(
1003
+ `[createAdminClient] No canonical addresses for chainId ${chain.id}. Pass \`addresses\` explicitly, or use a supported chain: ${chunkMXJEULSE_cjs.describeSupportedChains()}.`
1004
+ );
1005
+ }
1006
+ const usedAddresses = { ...chunkMXJEULSE_cjs.CORE_ADDRESSES, ...chunkMXJEULSE_cjs.TOKEN_ADDRESSES, ...chainDefaults, ...addresses };
1007
+ const actions = {
1008
+ ...chunkCIEYY3A6_cjs.registryActions(usedAddresses.registry)(baseClient),
1009
+ ...chunkCIEYY3A6_cjs.superPaymasterActions(usedAddresses.superPaymaster)(baseClient),
1010
+ ...chunkCIEYY3A6_cjs.paymasterActions(usedAddresses.paymasterV4)(baseClient),
1011
+ ...chunkCIEYY3A6_cjs.stakingActions(usedAddresses.gTokenStaking)(baseClient),
1012
+ ...chunkCIEYY3A6_cjs.sbtActions(usedAddresses.mySBT)(baseClient),
1013
+ ...chunkCIEYY3A6_cjs.dvtActions(ADDRESS_PLACEHOLDER)(baseClient),
1014
+ ...chunkCIEYY3A6_cjs.xPNTsFactoryActions(usedAddresses.xPNTsFactory || "0x")(baseClient),
1015
+ ...chunkCIEYY3A6_cjs.aggregatorActions(ADDRESS_PLACEHOLDER)(baseClient)
1016
+ };
1017
+ return Object.assign(baseClient, actions);
1018
+ }
1019
+ var ExperimentClient = class {
1020
+ records = [];
1021
+ scenarioId;
1022
+ group;
1023
+ constructor(scenarioId, group) {
1024
+ this.scenarioId = scenarioId;
1025
+ this.group = group;
1026
+ }
1027
+ /**
1028
+ * Record a transaction result
1029
+ */
1030
+ recordTx(txHash, receipt, status, meta) {
1031
+ const gasUsed = BigInt(receipt.gasUsed || 0);
1032
+ const gasPrice = BigInt(receipt.effectiveGasPrice || 0);
1033
+ const costBN = gasUsed * gasPrice;
1034
+ const record = {
1035
+ id: `${Date.now()}-${Math.floor(Math.random() * 1e3)}`,
1036
+ scenario: this.scenarioId,
1037
+ group: this.group,
1038
+ txHash,
1039
+ gasUsed,
1040
+ gasPrice,
1041
+ costETH: viem.formatEther(costBN),
1042
+ status,
1043
+ timestamp: Date.now(),
1044
+ meta
1045
+ };
1046
+ this.records.push(record);
1047
+ return record;
1048
+ }
1049
+ /**
1050
+ * Measure an async task (transaction) automatically
1051
+ */
1052
+ async measureTx(taskName, txPromise, publicClient) {
1053
+ console.log(`[Experiment: ${this.group}] Executing: ${taskName}...`);
1054
+ const start = Date.now();
1055
+ try {
1056
+ const hash = await txPromise;
1057
+ const receipt = await publicClient.waitForTransactionReceipt({ hash });
1058
+ this.recordTx(hash, receipt, "Success", { latency: Date.now() - start });
1059
+ const gasUsed = BigInt(receipt.gasUsed || 0);
1060
+ const gasPrice = BigInt(receipt.effectiveGasPrice || 0);
1061
+ console.log(` \u2705 Success! Gas: ${gasUsed} | Cost: ${viem.formatEther(gasUsed * gasPrice)} ETH`);
1062
+ return hash;
1063
+ } catch (e) {
1064
+ console.error(` \u274C Failed: ${taskName}`, e);
1065
+ throw e;
1066
+ }
1067
+ }
1068
+ getRecords() {
1069
+ return this.records;
1070
+ }
1071
+ };
1072
+ var KeyManager = class {
1073
+ /**
1074
+ * 生成单个密钥对
1075
+ * @param name - 密钥名称(如 'Jason', 'Anni')
1076
+ */
1077
+ static generateKeyPair(name) {
1078
+ const privateKey = accounts.generatePrivateKey();
1079
+ const account = accounts.privateKeyToAccount(privateKey);
1080
+ return {
1081
+ name,
1082
+ privateKey,
1083
+ address: account.address
1084
+ };
1085
+ }
1086
+ /**
1087
+ * 批量生成密钥对
1088
+ * @param names - 密钥名称数组
1089
+ */
1090
+ static generateKeyPairs(names) {
1091
+ return names.map((name) => this.generateKeyPair(name));
1092
+ }
1093
+ /**
1094
+ * 生成指定数量的密钥对(自动命名为 Operator_1, Operator_2, ...)
1095
+ * @param count - 数量
1096
+ * @param prefix - 名称前缀(默认 'Operator')
1097
+ */
1098
+ static generateMultiple(count, prefix = "Operator") {
1099
+ const names = Array.from({ length: count }, (_, i) => `${prefix}_${i + 1}`);
1100
+ return this.generateKeyPairs(names);
1101
+ }
1102
+ /**
1103
+ * 保存密钥到 .env 文件
1104
+ * @param filePath - 文件路径(绝对路径)
1105
+ * @param keys - 密钥对数组
1106
+ * @param overwrite - 是否覆盖已存在的文件(默认 false)
1107
+ */
1108
+ static saveToEnvFile(filePath, keys, overwrite = false) {
1109
+ if (fs__namespace.existsSync(filePath) && !overwrite) {
1110
+ throw new Error(`File already exists: ${filePath}. Set overwrite=true to replace.`);
1111
+ }
1112
+ const content = keys.map(
1113
+ (k) => `${k.name.toUpperCase().replace(/\s+/g, "_")}_PRIVATE_KEY=${k.privateKey}`
1114
+ ).join("\n") + "\n";
1115
+ fs__namespace.writeFileSync(filePath, content, { mode: 384 });
1116
+ console.log(`\u2705 Keys saved to ${filePath} (${keys.length} keys)`);
1117
+ }
1118
+ /**
1119
+ * 从 .env 文件加载密钥
1120
+ * @param filePath - 文件路径(绝对路径)
1121
+ * @returns 密钥对数组
1122
+ */
1123
+ static loadFromEnvFile(filePath) {
1124
+ if (!fs__namespace.existsSync(filePath)) {
1125
+ throw new Error(`File not found: ${filePath}`);
1126
+ }
1127
+ const content = fs__namespace.readFileSync(filePath, "utf-8");
1128
+ const lines = content.split("\n").filter((line) => line.trim() && !line.startsWith("#"));
1129
+ return lines.map((line) => {
1130
+ const [key, value] = line.split("=");
1131
+ const name = key.replace(/_PRIVATE_KEY$/, "").toLowerCase().replace(/_/g, " ");
1132
+ const privateKey = value.trim();
1133
+ const account = accounts.privateKeyToAccount(privateKey);
1134
+ return {
1135
+ name,
1136
+ privateKey,
1137
+ address: account.address
1138
+ };
1139
+ });
1140
+ }
1141
+ /**
1142
+ * 保存密钥到 JSON 文件(包含地址信息)
1143
+ * @param filePath - 文件路径(绝对路径)
1144
+ * @param keys - 密钥对数组
1145
+ * @param overwrite - 是否覆盖已存在的文件(默认 false)
1146
+ */
1147
+ static saveToJsonFile(filePath, keys, overwrite = false) {
1148
+ if (fs__namespace.existsSync(filePath) && !overwrite) {
1149
+ throw new Error(`File already exists: ${filePath}. Set overwrite=true to replace.`);
1150
+ }
1151
+ const data = {
1152
+ generated: (/* @__PURE__ */ new Date()).toISOString(),
1153
+ keys: keys.map((k) => ({
1154
+ name: k.name,
1155
+ privateKey: k.privateKey,
1156
+ address: k.address
1157
+ }))
1158
+ };
1159
+ fs__namespace.writeFileSync(filePath, JSON.stringify(data, null, 2), { mode: 384 });
1160
+ console.log(`\u2705 Keys saved to ${filePath} (${keys.length} keys)`);
1161
+ }
1162
+ /**
1163
+ * 从 JSON 文件加载密钥
1164
+ * @param filePath - 文件路径(绝对路径)
1165
+ */
1166
+ static loadFromJsonFile(filePath) {
1167
+ if (!fs__namespace.existsSync(filePath)) {
1168
+ throw new Error(`File not found: ${filePath}`);
1169
+ }
1170
+ const content = fs__namespace.readFileSync(filePath, "utf-8");
1171
+ const data = JSON.parse(content);
1172
+ return data.keys.map((k) => ({
1173
+ name: k.name,
1174
+ privateKey: k.privateKey,
1175
+ address: k.address
1176
+ }));
1177
+ }
1178
+ /**
1179
+ * 打印密钥信息(隐藏私钥)
1180
+ * @param keys - 密钥对数组
1181
+ */
1182
+ static printKeys(keys, showPrivateKey = false) {
1183
+ console.log("\n\u{1F511} Generated Keys:");
1184
+ console.log("\u2500".repeat(80));
1185
+ keys.forEach((k, i) => {
1186
+ console.log(`${i + 1}. ${k.name}`);
1187
+ console.log(` Address: ${k.address}`);
1188
+ if (showPrivateKey) {
1189
+ console.log(` Private Key: ${k.privateKey}`);
1190
+ } else {
1191
+ console.log(` Private Key: ${k.privateKey.slice(0, 10)}...${k.privateKey.slice(-8)}`);
1192
+ }
1193
+ });
1194
+ console.log("\u2500".repeat(80));
1195
+ }
1196
+ };
1197
+ var FundingManager = class {
1198
+ /**
1199
+ * 创建 PublicClient 和 WalletClient
1200
+ */
1201
+ static createClients(params) {
1202
+ const account = accounts.privateKeyToAccount(params.supplierKey);
1203
+ const transport = viem.http(params.rpcUrl);
1204
+ const publicClient = viem.createPublicClient({
1205
+ chain: params.chain,
1206
+ transport
1207
+ });
1208
+ const walletClient = viem.createWalletClient({
1209
+ account,
1210
+ chain: params.chain,
1211
+ transport
1212
+ });
1213
+ return { publicClient, walletClient, account };
1214
+ }
1215
+ /**
1216
+ * 充值 ETH 到目标地址
1217
+ * @param params - 充值参数
1218
+ * @returns 充值结果
1219
+ */
1220
+ static async fundWithETH(params) {
1221
+ try {
1222
+ const { publicClient, walletClient } = this.createClients(params);
1223
+ const amount = viem.parseEther(params.amount);
1224
+ console.log(`\u{1F4B8} Funding ${params.targetAddress} with ${params.amount} ETH...`);
1225
+ const hash = await walletClient.sendTransaction({
1226
+ account: walletClient.account,
1227
+ chain: params.chain,
1228
+ to: params.targetAddress,
1229
+ value: amount
1230
+ });
1231
+ console.log(` Transaction Sent: ${hash}`);
1232
+ await publicClient.waitForTransactionReceipt({ hash });
1233
+ console.log(` \u2705 ETH Funded.`);
1234
+ return { success: true, txHash: hash };
1235
+ } catch (error) {
1236
+ console.error(` \u274C ETH Funding Failed:`, error);
1237
+ return { success: false, error: error.message };
1238
+ }
1239
+ }
1240
+ /**
1241
+ * 充值 ERC20 Token 到目标地址
1242
+ * @param params - 充值参数
1243
+ * @returns 充值结果
1244
+ */
1245
+ static async fundWithToken(params) {
1246
+ try {
1247
+ const { publicClient, walletClient, account } = this.createClients(params);
1248
+ const amount = viem.parseEther(params.amount);
1249
+ console.log(`\u{1F4B8} Funding ${params.targetAddress} with ${params.amount} tokens...`);
1250
+ const { request } = await publicClient.simulateContract({
1251
+ account,
1252
+ address: params.tokenAddress,
1253
+ abi: viem.erc20Abi,
1254
+ functionName: "transfer",
1255
+ args: [params.targetAddress, amount]
1256
+ });
1257
+ const hash = await walletClient.writeContract(request);
1258
+ console.log(` Transaction Sent: ${hash}`);
1259
+ await publicClient.waitForTransactionReceipt({ hash });
1260
+ console.log(` \u2705 Token Funded.`);
1261
+ return { success: true, txHash: hash };
1262
+ } catch (error) {
1263
+ console.error(` \u274C Token Funding Failed:`, error);
1264
+ return { success: false, error: error.message };
1265
+ }
1266
+ }
1267
+ /**
1268
+ * 检查 ETH 余额
1269
+ * @param params - 基础参数
1270
+ * @returns ETH 余额(wei)
1271
+ */
1272
+ static async getETHBalance(params) {
1273
+ const { publicClient } = this.createClients(params);
1274
+ return await publicClient.getBalance({ address: params.targetAddress });
1275
+ }
1276
+ /**
1277
+ * 检查 ERC20 Token 余额
1278
+ * @param params - 基础参数
1279
+ * @param tokenAddress - Token 合约地址
1280
+ * @returns Token 余额
1281
+ */
1282
+ static async getTokenBalance(params, tokenAddress) {
1283
+ const { publicClient } = this.createClients(params);
1284
+ return await publicClient.readContract({
1285
+ address: tokenAddress,
1286
+ abi: viem.erc20Abi,
1287
+ functionName: "balanceOf",
1288
+ args: [params.targetAddress]
1289
+ });
1290
+ }
1291
+ /**
1292
+ * 智能充值:检查余额,不足时自动充值
1293
+ * @param params - 充值参数
1294
+ * @returns 充值结果数组
1295
+ */
1296
+ static async ensureFunding(params) {
1297
+ const results = [];
1298
+ const { publicClient } = this.createClients(params);
1299
+ if (params.minETH && params.targetETH) {
1300
+ const ethBalance = await publicClient.getBalance({ address: params.targetAddress });
1301
+ const minETH = viem.parseEther(params.minETH);
1302
+ viem.parseEther(params.targetETH);
1303
+ if (ethBalance < minETH) {
1304
+ console.log(`\u26A0\uFE0F ETH balance (${Number(ethBalance) / 1e18}) below threshold (${params.minETH})`);
1305
+ const result = await this.fundWithETH({
1306
+ ...params,
1307
+ amount: params.targetETH
1308
+ });
1309
+ results.push(result);
1310
+ } else {
1311
+ console.log(`\u2705 Sufficient ETH: ${Number(ethBalance) / 1e18} ETH`);
1312
+ results.push({ success: true });
1313
+ }
1314
+ }
1315
+ if (params.token) {
1316
+ const tokenBalance = await this.getTokenBalance(params, params.token.address);
1317
+ const minToken = params.token.minBalance ? viem.parseEther(params.token.minBalance) : 0n;
1318
+ const targetToken = params.token.targetAmount ? viem.parseEther(params.token.targetAmount) : 0n;
1319
+ if (tokenBalance < minToken && targetToken > 0n) {
1320
+ console.log(`\u26A0\uFE0F Token balance (${Number(tokenBalance) / 1e18}) below threshold (${params.token.minBalance})`);
1321
+ const result = await this.fundWithToken({
1322
+ ...params,
1323
+ tokenAddress: params.token.address,
1324
+ amount: params.token.targetAmount
1325
+ });
1326
+ results.push(result);
1327
+ } else {
1328
+ console.log(`\u2705 Sufficient Token: ${Number(tokenBalance) / 1e18}`);
1329
+ results.push({ success: true });
1330
+ }
1331
+ }
1332
+ return results;
1333
+ }
1334
+ /**
1335
+ * 批量充值 ETH
1336
+ * @param params - 基础参数
1337
+ * @param targets - 目标地址和金额数组
1338
+ * @returns 充值结果数组
1339
+ */
1340
+ static async batchFundETH(params, targets) {
1341
+ const results = [];
1342
+ for (const target of targets) {
1343
+ const result = await this.fundWithETH({
1344
+ ...params,
1345
+ targetAddress: target.address,
1346
+ amount: target.amount
1347
+ });
1348
+ results.push(result);
1349
+ }
1350
+ return results;
1351
+ }
1352
+ /**
1353
+ * 批量充值 Token
1354
+ * @param params - 基础参数
1355
+ * @param tokenAddress - Token 合约地址
1356
+ * @param targets - 目标地址和金额数组
1357
+ * @returns 充值结果数组
1358
+ */
1359
+ static async batchFundToken(params, tokenAddress, targets) {
1360
+ const results = [];
1361
+ for (const target of targets) {
1362
+ const result = await this.fundWithToken({
1363
+ ...params,
1364
+ targetAddress: target.address,
1365
+ tokenAddress,
1366
+ amount: target.amount
1367
+ });
1368
+ results.push(result);
1369
+ }
1370
+ return results;
1371
+ }
1372
+ };
1373
+ var UserOperationBuilder = class {
1374
+ /**
1375
+ * Packs verificationGasLimit and callGasLimit into a bytes32 Hex string.
1376
+ */
1377
+ static packAccountGasLimits(verificationGasLimit, callGasLimit) {
1378
+ return viem.concat([
1379
+ viem.pad(`0x${verificationGasLimit.toString(16)}`, { dir: "left", size: 16 }),
1380
+ viem.pad(`0x${callGasLimit.toString(16)}`, { dir: "left", size: 16 })
1381
+ ]);
1382
+ }
1383
+ /**
1384
+ * Packs maxPriorityFeePerGas and maxFeePerGas into a bytes32 Hex string.
1385
+ */
1386
+ static packGasFees(maxPriorityFeePerGas, maxFeePerGas) {
1387
+ return viem.concat([
1388
+ viem.pad(`0x${maxPriorityFeePerGas.toString(16)}`, { dir: "left", size: 16 }),
1389
+ viem.pad(`0x${maxFeePerGas.toString(16)}`, { dir: "left", size: 16 })
1390
+ ]);
1391
+ }
1392
+ static estimatePreVerificationGasV07(userOp) {
1393
+ const nonce = typeof userOp.nonce === "bigint" ? userOp.nonce : typeof userOp.nonce === "number" ? BigInt(userOp.nonce) : BigInt(userOp.nonce);
1394
+ const preVerificationGas = typeof userOp.preVerificationGas === "bigint" ? userOp.preVerificationGas : typeof userOp.preVerificationGas === "number" ? BigInt(userOp.preVerificationGas) : BigInt(userOp.preVerificationGas);
1395
+ const encoded = viem.encodeAbiParameters(
1396
+ viem.parseAbiParameters("(address,uint256,bytes,bytes,bytes32,uint256,bytes32,bytes,bytes)"),
1397
+ [
1398
+ [
1399
+ userOp.sender,
1400
+ nonce,
1401
+ userOp.initCode,
1402
+ userOp.callData,
1403
+ userOp.accountGasLimits,
1404
+ preVerificationGas,
1405
+ userOp.gasFees,
1406
+ userOp.paymasterAndData,
1407
+ userOp.signature
1408
+ ]
1409
+ ]
1410
+ );
1411
+ const bytes = viem.toBytes(encoded);
1412
+ let calldataCost = 0n;
1413
+ for (const b of bytes) calldataCost += b === 0 ? 4n : 16n;
1414
+ return calldataCost + 26000n;
1415
+ }
1416
+ /**
1417
+ * Packs Paymaster parameters into the v0.7 paymasterAndData format.
1418
+ */
1419
+ static packPaymasterAndData(paymaster, paymasterGasLimit, paymasterPostOpGasLimit, paymasterData = "0x") {
1420
+ return viem.concat([
1421
+ paymaster,
1422
+ viem.pad(`0x${paymasterGasLimit.toString(16)}`, { dir: "left", size: 16 }),
1423
+ viem.pad(`0x${paymasterPostOpGasLimit.toString(16)}`, { dir: "left", size: 16 }),
1424
+ paymasterData
1425
+ ]);
1426
+ }
1427
+ /**
1428
+ * Pack PaymasterV4 Deposit-Only paymasterAndData
1429
+ *
1430
+ * v0.7 EntryPoint packs: [paymaster(20)][verificationGas(16)][postOpGas(16)][paymasterData]
1431
+ * Contract extracts token at offset 52 = paymasterData[0:20]
1432
+ *
1433
+ * So paymasterData format must be: [token(20)][validUntil(6)][validAfter(6)]
1434
+ *
1435
+ * @param paymaster - Paymaster address (20 bytes)
1436
+ * @param paymentToken - ERC20 token address (20 bytes, FIRST in paymasterData!)
1437
+ * @param validUntil - Validity end timestamp (6 bytes)
1438
+ * @param validAfter - Validity start timestamp (6 bytes)
1439
+ */
1440
+ static packPaymasterV4DepositData(paymaster, paymasterVerificationGasLimit, paymasterPostOpGasLimit, paymentToken, validUntil, validAfter) {
1441
+ return viem.concat([
1442
+ paymaster,
1443
+ viem.pad(`0x${paymasterVerificationGasLimit.toString(16)}`, { dir: "left", size: 16 }),
1444
+ viem.pad(`0x${paymasterPostOpGasLimit.toString(16)}`, { dir: "left", size: 16 }),
1445
+ paymentToken,
1446
+ viem.pad(`0x${validUntil.toString(16)}`, { dir: "left", size: 6 }),
1447
+ viem.pad(`0x${validAfter.toString(16)}`, { dir: "left", size: 6 })
1448
+ ]);
1449
+ }
1450
+ /**
1451
+ * Computes the UserOperation hash for signing.
1452
+ */
1453
+ static async getUserOpHash({
1454
+ userOp,
1455
+ entryPoint,
1456
+ chainId,
1457
+ publicClient
1458
+ }) {
1459
+ return await publicClient.readContract({
1460
+ address: entryPoint,
1461
+ abi: [{
1462
+ type: "function",
1463
+ name: "getUserOpHash",
1464
+ inputs: [{
1465
+ type: "tuple",
1466
+ components: [
1467
+ { name: "sender", type: "address" },
1468
+ { name: "nonce", type: "uint256" },
1469
+ { name: "initCode", type: "bytes" },
1470
+ { name: "callData", type: "bytes" },
1471
+ { name: "accountGasLimits", type: "bytes32" },
1472
+ { name: "preVerificationGas", type: "uint256" },
1473
+ { name: "gasFees", type: "bytes32" },
1474
+ { name: "paymasterAndData", type: "bytes" },
1475
+ { name: "signature", type: "bytes" }
1476
+ ]
1477
+ }],
1478
+ outputs: [{ type: "bytes32" }],
1479
+ stateMutability: "view"
1480
+ }],
1481
+ functionName: "getUserOpHash",
1482
+ args: [userOp]
1483
+ });
1484
+ }
1485
+ /**
1486
+ * Formats a PackedUserOperation into a JSON-RPC compatible object with hex-encoded strings.
1487
+ */
1488
+ static jsonifyUserOp(userOp) {
1489
+ const result = {
1490
+ sender: userOp.sender,
1491
+ nonce: userOp.nonce,
1492
+ initCode: userOp.initCode,
1493
+ callData: userOp.callData,
1494
+ accountGasLimits: userOp.accountGasLimits,
1495
+ preVerificationGas: userOp.preVerificationGas,
1496
+ gasFees: userOp.gasFees,
1497
+ paymasterAndData: userOp.paymasterAndData,
1498
+ signature: userOp.signature
1499
+ };
1500
+ const toCompactHex = (val) => {
1501
+ if (typeof val === "bigint") return `0x${val.toString(16)}`;
1502
+ if (typeof val === "number") return `0x${val.toString(16)}`;
1503
+ if (typeof val === "string") {
1504
+ if (val === "0x") return "0x0";
1505
+ if (val === "0x0") return "0x0";
1506
+ return val.replace(/^0x0+(?!$)/, "0x");
1507
+ }
1508
+ return val;
1509
+ };
1510
+ result.nonce = toCompactHex(result.nonce);
1511
+ result.preVerificationGas = toCompactHex(result.preVerificationGas);
1512
+ return result;
1513
+ }
1514
+ /**
1515
+ * Converts a PackedUserOperation to the Alchemy-specific v0.7 JSON format.
1516
+ * @param userOp - The packed UserOperation
1517
+ * @param options - Optional configuration
1518
+ * @param options.paymasterVerificationGasLimit - Gas limit for paymaster verification (default: 200000)
1519
+ * @param options.paymasterPostOpGasLimit - Gas limit for paymaster postOp (default: 200000)
1520
+ */
1521
+ static toAlchemyUserOperation(userOp, options) {
1522
+ const toHexStr = (val) => {
1523
+ if (val === void 0 || val === null) return void 0;
1524
+ if (typeof val === "bigint") return `0x${val.toString(16)}`;
1525
+ if (typeof val === "number") return `0x${val.toString(16)}`;
1526
+ if (typeof val === "string" && !val.startsWith("0x")) return `0x${val}`;
1527
+ return val;
1528
+ };
1529
+ const result = {
1530
+ sender: userOp.sender,
1531
+ nonce: toHexStr(userOp.nonce),
1532
+ callData: userOp.callData,
1533
+ signature: userOp.signature
1534
+ };
1535
+ if (userOp.accountGasLimits && userOp.accountGasLimits !== "0x") {
1536
+ const val = userOp.accountGasLimits.toString().startsWith("0x") ? userOp.accountGasLimits.slice(2) : userOp.accountGasLimits;
1537
+ const padded = val.padStart(64, "0");
1538
+ const verificationGasLimit = BigInt("0x" + padded.slice(0, 32));
1539
+ const callGasLimit = BigInt("0x" + padded.slice(32, 64));
1540
+ result.verificationGasLimit = `0x${verificationGasLimit.toString(16)}`;
1541
+ result.callGasLimit = `0x${callGasLimit.toString(16)}`;
1542
+ }
1543
+ if (userOp.gasFees && userOp.gasFees !== "0x") {
1544
+ const val = userOp.gasFees.toString().startsWith("0x") ? userOp.gasFees.slice(2) : userOp.gasFees;
1545
+ const padded = val.padStart(64, "0");
1546
+ const maxPriorityFeePerGas = BigInt("0x" + padded.slice(0, 32));
1547
+ const maxFeePerGas = BigInt("0x" + padded.slice(32, 64));
1548
+ result.maxPriorityFeePerGas = `0x${maxPriorityFeePerGas.toString(16)}`;
1549
+ result.maxFeePerGas = `0x${maxFeePerGas.toString(16)}`;
1550
+ }
1551
+ if (userOp.preVerificationGas) {
1552
+ result.preVerificationGas = `0x${BigInt(userOp.preVerificationGas).toString(16)}`;
1553
+ }
1554
+ if (userOp.initCode && userOp.initCode !== "0x") {
1555
+ const initCode = userOp.initCode.toString();
1556
+ result.factory = initCode.slice(0, 42);
1557
+ result.factoryData = "0x" + initCode.slice(42);
1558
+ }
1559
+ if (userOp.paymasterAndData && userOp.paymasterAndData !== "0x") {
1560
+ const pmd = userOp.paymasterAndData.toString().startsWith("0x") ? userOp.paymasterAndData.slice(2) : userOp.paymasterAndData;
1561
+ if (pmd.length >= 104) {
1562
+ result.paymaster = "0x" + pmd.slice(0, 40);
1563
+ const vGas = BigInt("0x" + pmd.slice(40, 72));
1564
+ const pGas = BigInt("0x" + pmd.slice(72, 104));
1565
+ result.paymasterVerificationGasLimit = `0x${vGas.toString(16)}`;
1566
+ result.paymasterPostOpGasLimit = `0x${pGas.toString(16)}`;
1567
+ result.paymasterData = "0x" + pmd.slice(104);
1568
+ } else if (pmd.length >= 40) {
1569
+ result.paymaster = "0x" + pmd.slice(0, 40);
1570
+ result.paymasterData = "0x" + pmd.slice(40);
1571
+ const defaultGasLimit = 200000n;
1572
+ result.paymasterVerificationGasLimit = `0x${(options?.paymasterVerificationGasLimit || defaultGasLimit).toString(16)}`;
1573
+ result.paymasterPostOpGasLimit = `0x${(options?.paymasterPostOpGasLimit || defaultGasLimit).toString(16)}`;
1574
+ }
1575
+ }
1576
+ return result;
1577
+ }
1578
+ };
1579
+ var UserOpScenarioType = /* @__PURE__ */ ((UserOpScenarioType2) => {
1580
+ UserOpScenarioType2["NATIVE"] = "NATIVE";
1581
+ UserOpScenarioType2["GASLESS_V4"] = "GASLESS_V4";
1582
+ UserOpScenarioType2["SUPER_BPNT"] = "SUPER_BPNT";
1583
+ UserOpScenarioType2["SUPER_CPNT"] = "SUPER_CPNT";
1584
+ UserOpScenarioType2["SUPER_CUSTOM"] = "SUPER_CUSTOM";
1585
+ return UserOpScenarioType2;
1586
+ })(UserOpScenarioType || {});
1587
+ var UserOpScenarioBuilder = class {
1588
+ /**
1589
+ * Builds a signed PackedUserOperation for a token transfer based on the specified scenario.
1590
+ */
1591
+ static async buildTransferScenario(type, params) {
1592
+ const {
1593
+ sender,
1594
+ ownerAccount,
1595
+ recipient,
1596
+ tokenAddress,
1597
+ amount,
1598
+ entryPoint,
1599
+ chainId,
1600
+ publicClient,
1601
+ paymaster,
1602
+ operator,
1603
+ paymasterGasLimit = 100000n,
1604
+ paymasterPostOpGasLimit = 40000n,
1605
+ nonceKey = 0n,
1606
+ gasToken
1607
+ } = params;
1608
+ const transferData = viem.encodeFunctionData({
1609
+ abi: [{ name: "transfer", type: "function", inputs: [{ type: "address", name: "to" }, { type: "uint256", name: "amount" }], outputs: [{ type: "bool" }] }],
1610
+ functionName: "transfer",
1611
+ args: [recipient, amount]
1612
+ });
1613
+ const callData = viem.encodeFunctionData({
1614
+ abi: [{ name: "execute", type: "function", inputs: [{ type: "address" }, { type: "uint256" }, { type: "bytes" }] }],
1615
+ functionName: "execute",
1616
+ args: [tokenAddress, 0n, transferData]
1617
+ });
1618
+ const userOp = {
1619
+ sender,
1620
+ nonce: await publicClient.readContract({
1621
+ address: entryPoint,
1622
+ abi: [{ name: "getNonce", type: "function", inputs: [{ type: "address" }, { type: "uint192" }], outputs: [{ type: "uint256" }] }],
1623
+ functionName: "getNonce",
1624
+ args: [sender, nonceKey]
1625
+ }),
1626
+ initCode: "0x",
1627
+ callData,
1628
+ accountGasLimits: UserOperationBuilder.packAccountGasLimits(type === "NATIVE" /* NATIVE */ ? 75000n : 250000n, 150000n),
1629
+ preVerificationGas: 80000n,
1630
+ gasFees: UserOperationBuilder.packGasFees(2000000000n, 2000000000n),
1631
+ // 2 Gwei
1632
+ paymasterAndData: "0x",
1633
+ signature: "0x"
1634
+ };
1635
+ if (type === "NATIVE" /* NATIVE */) {
1636
+ userOp.paymasterAndData = "0x";
1637
+ } else if (type === "GASLESS_V4" /* GASLESS_V4 */) {
1638
+ const pm = paymaster;
1639
+ const token = gasToken || tokenAddress;
1640
+ const validUntil = BigInt(Math.floor(Date.now() / 1e3) + 3600);
1641
+ const validAfter = BigInt(Math.floor(Date.now() / 1e3) - 100);
1642
+ if (!pm) throw new Error("paymaster address required for GASLESS_V4");
1643
+ if (!token) throw new Error("gasToken or tokenAddress required for GASLESS_V4");
1644
+ userOp.paymasterAndData = UserOperationBuilder.packPaymasterV4DepositData(
1645
+ pm,
1646
+ paymasterGasLimit,
1647
+ // paymasterVerificationGasLimit
1648
+ paymasterPostOpGasLimit,
1649
+ // paymasterPostOpGasLimit
1650
+ token,
1651
+ // Payment token
1652
+ validUntil,
1653
+ validAfter
1654
+ );
1655
+ } else if (type.startsWith("SUPER_")) {
1656
+ if (!paymaster || !operator) throw new Error("Paymaster and Operator required for SuperPM scenarios");
1657
+ userOp.paymasterAndData = UserOperationBuilder.packPaymasterAndData(
1658
+ paymaster,
1659
+ paymasterGasLimit,
1660
+ paymasterPostOpGasLimit,
1661
+ operator
1662
+ );
1663
+ }
1664
+ const opHash = await UserOperationBuilder.getUserOpHash({
1665
+ userOp,
1666
+ entryPoint,
1667
+ chainId,
1668
+ publicClient
1669
+ });
1670
+ const signature = await ownerAccount.signMessage({
1671
+ message: { raw: opHash }
1672
+ });
1673
+ userOp.signature = signature;
1674
+ const jsonUserOp = UserOperationBuilder.jsonifyUserOp(userOp);
1675
+ return { userOp: jsonUserOp, opHash };
1676
+ }
1677
+ };
1678
+
1679
+ Object.defineProperty(exports, "ChannelClient", {
1680
+ enumerable: true,
1681
+ get: function () { return chunk3HZEIFBW_cjs.ChannelClient; }
1682
+ });
1683
+ Object.defineProperty(exports, "VOUCHER_TYPES", {
1684
+ enumerable: true,
1685
+ get: function () { return chunk3HZEIFBW_cjs.VOUCHER_TYPES; }
1686
+ });
1687
+ Object.defineProperty(exports, "getVoucherDomain", {
1688
+ enumerable: true,
1689
+ get: function () { return chunk3HZEIFBW_cjs.getVoucherDomain; }
1690
+ });
1691
+ Object.defineProperty(exports, "signVoucher", {
1692
+ enumerable: true,
1693
+ get: function () { return chunk3HZEIFBW_cjs.signVoucher; }
1694
+ });
1695
+ Object.defineProperty(exports, "CommunityClient", {
1696
+ enumerable: true,
1697
+ get: function () { return chunk63JM67L7_cjs.CommunityClient; }
1698
+ });
1699
+ Object.defineProperty(exports, "UserLifecycle", {
1700
+ enumerable: true,
1701
+ get: function () { return chunk63JM67L7_cjs.UserLifecycle; }
1702
+ });
1703
+ Object.defineProperty(exports, "UserClient", {
1704
+ enumerable: true,
1705
+ get: function () { return chunkDEUBKZH5_cjs.UserClient; }
1706
+ });
1707
+ Object.defineProperty(exports, "OperatorLifecycle", {
1708
+ enumerable: true,
1709
+ get: function () { return chunkIJN776TA_cjs.OperatorLifecycle; }
1710
+ });
1711
+ Object.defineProperty(exports, "PaymasterOperatorClient", {
1712
+ enumerable: true,
1713
+ get: function () { return chunkIJN776TA_cjs.PaymasterOperatorClient; }
1714
+ });
1715
+ Object.defineProperty(exports, "ProposalState", {
1716
+ enumerable: true,
1717
+ get: function () { return chunkIJN776TA_cjs.ProposalState; }
1718
+ });
1719
+ Object.defineProperty(exports, "ProtocolClient", {
1720
+ enumerable: true,
1721
+ get: function () { return chunkIJN776TA_cjs.ProtocolClient; }
1722
+ });
1723
+ Object.defineProperty(exports, "ProtocolGovernance", {
1724
+ enumerable: true,
1725
+ get: function () { return chunkZ4GZ6DQA_cjs.ProtocolGovernance; }
1726
+ });
1727
+ Object.defineProperty(exports, "AirAccount", {
1728
+ enumerable: true,
1729
+ get: function () { return chunkXQROKLZI_cjs.src_exports; }
1730
+ });
1731
+ Object.defineProperty(exports, "KMS", {
1732
+ enumerable: true,
1733
+ get: function () { return chunkXQROKLZI_cjs.src_exports; }
1734
+ });
1735
+ Object.defineProperty(exports, "UserOpClient", {
1736
+ enumerable: true,
1737
+ get: function () { return chunkM7HXR7G5_cjs.UserOpClient; }
1738
+ });
1739
+ Object.defineProperty(exports, "createEOAWalletClient", {
1740
+ enumerable: true,
1741
+ get: function () { return chunkM7HXR7G5_cjs.createEOAWalletClient; }
1742
+ });
1743
+ Object.defineProperty(exports, "getUserOpHash", {
1744
+ enumerable: true,
1745
+ get: function () { return chunkM7HXR7G5_cjs.getUserOpHash; }
1746
+ });
1747
+ Object.defineProperty(exports, "packUserOpLimits", {
1748
+ enumerable: true,
1749
+ get: function () { return chunkM7HXR7G5_cjs.packUserOpLimits; }
1750
+ });
1751
+ Object.defineProperty(exports, "toSimpleSmartAccount", {
1752
+ enumerable: true,
1753
+ get: function () { return chunkM7HXR7G5_cjs.toSimpleSmartAccount; }
1754
+ });
1755
+ Object.defineProperty(exports, "ReputationClient", {
1756
+ enumerable: true,
1757
+ get: function () { return chunkWR4OZUXR_cjs.ReputationClient; }
1758
+ });
1759
+ Object.defineProperty(exports, "checkMySBT", {
1760
+ enumerable: true,
1761
+ get: function () { return chunkWR4OZUXR_cjs.checkMySBT; }
1762
+ });
1763
+ Object.defineProperty(exports, "getMySBTId", {
1764
+ enumerable: true,
1765
+ get: function () { return chunkWR4OZUXR_cjs.getMySBTId; }
1766
+ });
1767
+ Object.defineProperty(exports, "FinanceClient", {
1768
+ enumerable: true,
1769
+ get: function () { return chunkY4EJX7UA_cjs.FinanceClient; }
1770
+ });
1771
+ Object.defineProperty(exports, "PaymasterClient", {
1772
+ enumerable: true,
1773
+ get: function () { return chunkGAMSWXWI_cjs.PaymasterClient; }
1774
+ });
1775
+ Object.defineProperty(exports, "PaymasterManager", {
1776
+ enumerable: true,
1777
+ get: function () { return chunkGAMSWXWI_cjs.PaymasterManager; }
1778
+ });
1779
+ Object.defineProperty(exports, "PaymasterOperator", {
1780
+ enumerable: true,
1781
+ get: function () { return chunkGAMSWXWI_cjs.PaymasterOperator; }
1782
+ });
1783
+ Object.defineProperty(exports, "SuperPaymasterAdminClient", {
1784
+ enumerable: true,
1785
+ get: function () { return chunkGAMSWXWI_cjs.SuperPaymasterAdminClient; }
1786
+ });
1787
+ Object.defineProperty(exports, "SuperPaymasterClient", {
1788
+ enumerable: true,
1789
+ get: function () { return chunkGAMSWXWI_cjs.SuperPaymasterClient; }
1790
+ });
1791
+ Object.defineProperty(exports, "buildPaymasterData", {
1792
+ enumerable: true,
1793
+ get: function () { return chunkGAMSWXWI_cjs.buildPaymasterData; }
1794
+ });
1795
+ Object.defineProperty(exports, "buildSuperPaymasterData", {
1796
+ enumerable: true,
1797
+ get: function () { return chunkGAMSWXWI_cjs.buildSuperPaymasterData; }
1798
+ });
1799
+ Object.defineProperty(exports, "checkEligibility", {
1800
+ enumerable: true,
1801
+ get: function () { return chunkGAMSWXWI_cjs.checkEligibility; }
1802
+ });
1803
+ Object.defineProperty(exports, "formatUserOpV07", {
1804
+ enumerable: true,
1805
+ get: function () { return chunkGAMSWXWI_cjs.formatUserOpV07; }
1806
+ });
1807
+ Object.defineProperty(exports, "getPaymasterV4Middleware", {
1808
+ enumerable: true,
1809
+ get: function () { return chunkGAMSWXWI_cjs.getPaymasterV4Middleware; }
1810
+ });
1811
+ Object.defineProperty(exports, "getSuperPaymasterMiddleware", {
1812
+ enumerable: true,
1813
+ get: function () { return chunkGAMSWXWI_cjs.getSuperPaymasterMiddleware; }
1814
+ });
1815
+ Object.defineProperty(exports, "getUserOpHashV07", {
1816
+ enumerable: true,
1817
+ get: function () { return chunkGAMSWXWI_cjs.getUserOpHashV07; }
1818
+ });
1819
+ Object.defineProperty(exports, "tuneGasLimit", {
1820
+ enumerable: true,
1821
+ get: function () { return chunkGAMSWXWI_cjs.tuneGasLimit; }
1822
+ });
1823
+ Object.defineProperty(exports, "EIP3009_TYPES", {
1824
+ enumerable: true,
1825
+ get: function () { return chunk5JFYTJOE_cjs.EIP3009_TYPES; }
1826
+ });
1827
+ Object.defineProperty(exports, "FacilitatorClient", {
1828
+ enumerable: true,
1829
+ get: function () { return chunk5JFYTJOE_cjs.FacilitatorClient; }
1830
+ });
1831
+ Object.defineProperty(exports, "GTOKEN_EIP712_DOMAIN", {
1832
+ enumerable: true,
1833
+ get: function () { return chunk5JFYTJOE_cjs.GTOKEN_EIP712_DOMAIN; }
1834
+ });
1835
+ Object.defineProperty(exports, "HEADER_PAYMENT_REQUIRED", {
1836
+ enumerable: true,
1837
+ get: function () { return chunk5JFYTJOE_cjs.HEADER_PAYMENT_REQUIRED; }
1838
+ });
1839
+ Object.defineProperty(exports, "HEADER_PAYMENT_RESPONSE", {
1840
+ enumerable: true,
1841
+ get: function () { return chunk5JFYTJOE_cjs.HEADER_PAYMENT_RESPONSE; }
1842
+ });
1843
+ Object.defineProperty(exports, "HEADER_PAYMENT_SIGNATURE", {
1844
+ enumerable: true,
1845
+ get: function () { return chunk5JFYTJOE_cjs.HEADER_PAYMENT_SIGNATURE; }
1846
+ });
1847
+ Object.defineProperty(exports, "HEADER_V1_PAYMENT", {
1848
+ enumerable: true,
1849
+ get: function () { return chunk5JFYTJOE_cjs.HEADER_V1_PAYMENT; }
1850
+ });
1851
+ Object.defineProperty(exports, "HEADER_V1_PAYMENT_RESPONSE", {
1852
+ enumerable: true,
1853
+ get: function () { return chunk5JFYTJOE_cjs.HEADER_V1_PAYMENT_RESPONSE; }
1854
+ });
1855
+ Object.defineProperty(exports, "X402Client", {
1856
+ enumerable: true,
1857
+ get: function () { return chunk5JFYTJOE_cjs.X402Client; }
1858
+ });
1859
+ Object.defineProperty(exports, "decodePaymentPayload", {
1860
+ enumerable: true,
1861
+ get: function () { return chunk5JFYTJOE_cjs.decodePaymentPayload; }
1862
+ });
1863
+ Object.defineProperty(exports, "decodePaymentRequired", {
1864
+ enumerable: true,
1865
+ get: function () { return chunk5JFYTJOE_cjs.decodePaymentRequired; }
1866
+ });
1867
+ Object.defineProperty(exports, "decodeSettleResponse", {
1868
+ enumerable: true,
1869
+ get: function () { return chunk5JFYTJOE_cjs.decodeSettleResponse; }
1870
+ });
1871
+ Object.defineProperty(exports, "encodePaymentPayload", {
1872
+ enumerable: true,
1873
+ get: function () { return chunk5JFYTJOE_cjs.encodePaymentPayload; }
1874
+ });
1875
+ Object.defineProperty(exports, "encodePaymentRequired", {
1876
+ enumerable: true,
1877
+ get: function () { return chunk5JFYTJOE_cjs.encodePaymentRequired; }
1878
+ });
1879
+ Object.defineProperty(exports, "encodeSettleResponse", {
1880
+ enumerable: true,
1881
+ get: function () { return chunk5JFYTJOE_cjs.encodeSettleResponse; }
1882
+ });
1883
+ Object.defineProperty(exports, "extractPaymentRequired", {
1884
+ enumerable: true,
1885
+ get: function () { return chunk5JFYTJOE_cjs.extractPaymentRequired; }
1886
+ });
1887
+ Object.defineProperty(exports, "extractSettleResponse", {
1888
+ enumerable: true,
1889
+ get: function () { return chunk5JFYTJOE_cjs.extractSettleResponse; }
1890
+ });
1891
+ Object.defineProperty(exports, "generateNonce", {
1892
+ enumerable: true,
1893
+ get: function () { return chunk5JFYTJOE_cjs.generateNonce; }
1894
+ });
1895
+ Object.defineProperty(exports, "getEIP3009Domain", {
1896
+ enumerable: true,
1897
+ get: function () { return chunk5JFYTJOE_cjs.getEIP3009Domain; }
1898
+ });
1899
+ Object.defineProperty(exports, "signCancelAuthorization", {
1900
+ enumerable: true,
1901
+ get: function () { return chunk5JFYTJOE_cjs.signCancelAuthorization; }
1902
+ });
1903
+ Object.defineProperty(exports, "signGTokenTransferWithAuthorization", {
1904
+ enumerable: true,
1905
+ get: function () { return chunk5JFYTJOE_cjs.signGTokenTransferWithAuthorization; }
1906
+ });
1907
+ Object.defineProperty(exports, "signReceiveWithAuthorization", {
1908
+ enumerable: true,
1909
+ get: function () { return chunk5JFYTJOE_cjs.signReceiveWithAuthorization; }
1910
+ });
1911
+ Object.defineProperty(exports, "signTransferWithAuthorization", {
1912
+ enumerable: true,
1913
+ get: function () { return chunk5JFYTJOE_cjs.signTransferWithAuthorization; }
1914
+ });
1915
+ Object.defineProperty(exports, "AASTAR_COMMUNITY", {
1916
+ enumerable: true,
1917
+ get: function () { return chunkCIEYY3A6_cjs.AASTAR_COMMUNITY; }
1918
+ });
1919
+ Object.defineProperty(exports, "AAStarAirAccountFactoryV7ABI", {
1920
+ enumerable: true,
1921
+ get: function () { return chunkCIEYY3A6_cjs.AAStarAirAccountFactoryV7ABI; }
1922
+ });
1923
+ Object.defineProperty(exports, "AAStarAirAccountFactoryV7Artifact", {
1924
+ enumerable: true,
1925
+ get: function () { return chunkCIEYY3A6_cjs.AAStarAirAccountFactoryV7Artifact; }
1926
+ });
1927
+ Object.defineProperty(exports, "AAStarAirAccountV7ABI", {
1928
+ enumerable: true,
1929
+ get: function () { return chunkCIEYY3A6_cjs.AAStarAirAccountV7ABI; }
1930
+ });
1931
+ Object.defineProperty(exports, "AAStarAirAccountV7Artifact", {
1932
+ enumerable: true,
1933
+ get: function () { return chunkCIEYY3A6_cjs.AAStarAirAccountV7Artifact; }
1934
+ });
1935
+ Object.defineProperty(exports, "AAStarBLSAggregatorABI", {
1936
+ enumerable: true,
1937
+ get: function () { return chunkCIEYY3A6_cjs.AAStarBLSAggregatorABI; }
1938
+ });
1939
+ Object.defineProperty(exports, "AAStarBLSAggregatorArtifact", {
1940
+ enumerable: true,
1941
+ get: function () { return chunkCIEYY3A6_cjs.AAStarBLSAggregatorArtifact; }
1942
+ });
1943
+ Object.defineProperty(exports, "AAStarBLSAlgorithmABI", {
1944
+ enumerable: true,
1945
+ get: function () { return chunkCIEYY3A6_cjs.AAStarBLSAlgorithmABI; }
1946
+ });
1947
+ Object.defineProperty(exports, "AAStarBLSAlgorithmArtifact", {
1948
+ enumerable: true,
1949
+ get: function () { return chunkCIEYY3A6_cjs.AAStarBLSAlgorithmArtifact; }
1950
+ });
1951
+ Object.defineProperty(exports, "AAStarValidatorABI", {
1952
+ enumerable: true,
1953
+ get: function () { return chunkCIEYY3A6_cjs.AAStarValidatorABI; }
1954
+ });
1955
+ Object.defineProperty(exports, "AAStarValidatorArtifact", {
1956
+ enumerable: true,
1957
+ get: function () { return chunkCIEYY3A6_cjs.AAStarValidatorArtifact; }
1958
+ });
1959
+ Object.defineProperty(exports, "ALL_ROLES", {
1960
+ enumerable: true,
1961
+ get: function () { return chunkCIEYY3A6_cjs.ALL_ROLES; }
1962
+ });
1963
+ Object.defineProperty(exports, "AgentRegistryABI", {
1964
+ enumerable: true,
1965
+ get: function () { return chunkCIEYY3A6_cjs.AgentRegistryABI; }
1966
+ });
1967
+ Object.defineProperty(exports, "AgentRegistryArtifact", {
1968
+ enumerable: true,
1969
+ get: function () { return chunkCIEYY3A6_cjs.AgentRegistryArtifact; }
1970
+ });
1971
+ Object.defineProperty(exports, "AirAccountDelegateABI", {
1972
+ enumerable: true,
1973
+ get: function () { return chunkCIEYY3A6_cjs.AirAccountDelegateABI; }
1974
+ });
1975
+ Object.defineProperty(exports, "AirAccountDelegateArtifact", {
1976
+ enumerable: true,
1977
+ get: function () { return chunkCIEYY3A6_cjs.AirAccountDelegateArtifact; }
1978
+ });
1979
+ Object.defineProperty(exports, "AirAccountExtensionABI", {
1980
+ enumerable: true,
1981
+ get: function () { return chunkCIEYY3A6_cjs.AirAccountExtensionABI; }
1982
+ });
1983
+ Object.defineProperty(exports, "AirAccountExtensionArtifact", {
1984
+ enumerable: true,
1985
+ get: function () { return chunkCIEYY3A6_cjs.AirAccountExtensionArtifact; }
1986
+ });
1987
+ Object.defineProperty(exports, "AuthorizationState", {
1988
+ enumerable: true,
1989
+ get: function () { return chunkCIEYY3A6_cjs.AuthorizationState; }
1990
+ });
1991
+ Object.defineProperty(exports, "BLSAggregatorABI", {
1992
+ enumerable: true,
1993
+ get: function () { return chunkCIEYY3A6_cjs.BLSAggregatorABI; }
1994
+ });
1995
+ Object.defineProperty(exports, "BLSAggregatorArtifact", {
1996
+ enumerable: true,
1997
+ get: function () { return chunkCIEYY3A6_cjs.BLSAggregatorArtifact; }
1998
+ });
1999
+ Object.defineProperty(exports, "BLSHelpers", {
2000
+ enumerable: true,
2001
+ get: function () { return chunkCIEYY3A6_cjs.BLSHelpers; }
2002
+ });
2003
+ Object.defineProperty(exports, "BLSSigner", {
2004
+ enumerable: true,
2005
+ get: function () { return chunkCIEYY3A6_cjs.BLSSigner; }
2006
+ });
2007
+ Object.defineProperty(exports, "BLSValidatorABI", {
2008
+ enumerable: true,
2009
+ get: function () { return chunkCIEYY3A6_cjs.BLSValidatorABI; }
2010
+ });
2011
+ Object.defineProperty(exports, "BLSValidatorArtifact", {
2012
+ enumerable: true,
2013
+ get: function () { return chunkCIEYY3A6_cjs.BLSValidatorArtifact; }
2014
+ });
2015
+ Object.defineProperty(exports, "BLS_POP_DST", {
2016
+ enumerable: true,
2017
+ get: function () { return chunkCIEYY3A6_cjs.BLS_POP_DST; }
2018
+ });
2019
+ Object.defineProperty(exports, "BRANDING", {
2020
+ enumerable: true,
2021
+ get: function () { return chunkCIEYY3A6_cjs.BRANDING; }
2022
+ });
2023
+ Object.defineProperty(exports, "BREAD_COMMUNITY", {
2024
+ enumerable: true,
2025
+ get: function () { return chunkCIEYY3A6_cjs.BREAD_COMMUNITY; }
2026
+ });
2027
+ Object.defineProperty(exports, "BaseClient", {
2028
+ enumerable: true,
2029
+ get: function () { return chunkCIEYY3A6_cjs.BaseClient; }
2030
+ });
2031
+ Object.defineProperty(exports, "BundlerClient", {
2032
+ enumerable: true,
2033
+ get: function () { return chunkCIEYY3A6_cjs.BundlerClient; }
2034
+ });
2035
+ Object.defineProperty(exports, "COMMUNITIES", {
2036
+ enumerable: true,
2037
+ get: function () { return chunkCIEYY3A6_cjs.COMMUNITIES; }
2038
+ });
2039
+ Object.defineProperty(exports, "CONTRACTS", {
2040
+ enumerable: true,
2041
+ get: function () { return chunkCIEYY3A6_cjs.CONTRACTS; }
2042
+ });
2043
+ Object.defineProperty(exports, "CONTRACT_METADATA", {
2044
+ enumerable: true,
2045
+ get: function () { return chunkCIEYY3A6_cjs.CONTRACT_METADATA; }
2046
+ });
2047
+ Object.defineProperty(exports, "CalldataParserRegistryABI", {
2048
+ enumerable: true,
2049
+ get: function () { return chunkCIEYY3A6_cjs.CalldataParserRegistryABI; }
2050
+ });
2051
+ Object.defineProperty(exports, "CalldataParserRegistryArtifact", {
2052
+ enumerable: true,
2053
+ get: function () { return chunkCIEYY3A6_cjs.CalldataParserRegistryArtifact; }
2054
+ });
2055
+ Object.defineProperty(exports, "ContractConfigManager", {
2056
+ enumerable: true,
2057
+ get: function () { return chunkCIEYY3A6_cjs.ContractConfigManager; }
2058
+ });
2059
+ Object.defineProperty(exports, "DEFAULT_ADMIN_ROLE", {
2060
+ enumerable: true,
2061
+ get: function () { return chunkCIEYY3A6_cjs.DEFAULT_ADMIN_ROLE; }
2062
+ });
2063
+ Object.defineProperty(exports, "DVTValidatorABI", {
2064
+ enumerable: true,
2065
+ get: function () { return chunkCIEYY3A6_cjs.DVTValidatorABI; }
2066
+ });
2067
+ Object.defineProperty(exports, "DVTValidatorArtifact", {
2068
+ enumerable: true,
2069
+ get: function () { return chunkCIEYY3A6_cjs.DVTValidatorArtifact; }
2070
+ });
2071
+ Object.defineProperty(exports, "DVT_TIER_T2", {
2072
+ enumerable: true,
2073
+ get: function () { return chunkCIEYY3A6_cjs.DVT_TIER_T2; }
2074
+ });
2075
+ Object.defineProperty(exports, "DVT_TIER_T3", {
2076
+ enumerable: true,
2077
+ get: function () { return chunkCIEYY3A6_cjs.DVT_TIER_T3; }
2078
+ });
2079
+ Object.defineProperty(exports, "EntryPointABI", {
2080
+ enumerable: true,
2081
+ get: function () { return chunkCIEYY3A6_cjs.EntryPointABI; }
2082
+ });
2083
+ Object.defineProperty(exports, "EntryPointArtifact", {
2084
+ enumerable: true,
2085
+ get: function () { return chunkCIEYY3A6_cjs.EntryPointArtifact; }
2086
+ });
2087
+ Object.defineProperty(exports, "EntryPointVersion", {
2088
+ enumerable: true,
2089
+ get: function () { return chunkCIEYY3A6_cjs.EntryPointVersion; }
2090
+ });
2091
+ Object.defineProperty(exports, "ForceExitModuleABI", {
2092
+ enumerable: true,
2093
+ get: function () { return chunkCIEYY3A6_cjs.ForceExitModuleABI; }
2094
+ });
2095
+ Object.defineProperty(exports, "ForceExitModuleArtifact", {
2096
+ enumerable: true,
2097
+ get: function () { return chunkCIEYY3A6_cjs.ForceExitModuleArtifact; }
2098
+ });
2099
+ Object.defineProperty(exports, "GTokenABI", {
2100
+ enumerable: true,
2101
+ get: function () { return chunkCIEYY3A6_cjs.GTokenABI; }
2102
+ });
2103
+ Object.defineProperty(exports, "GTokenArtifact", {
2104
+ enumerable: true,
2105
+ get: function () { return chunkCIEYY3A6_cjs.GTokenArtifact; }
2106
+ });
2107
+ Object.defineProperty(exports, "GTokenAuthorizationABI", {
2108
+ enumerable: true,
2109
+ get: function () { return chunkCIEYY3A6_cjs.GTokenAuthorizationABI; }
2110
+ });
2111
+ Object.defineProperty(exports, "GTokenAuthorizationArtifact", {
2112
+ enumerable: true,
2113
+ get: function () { return chunkCIEYY3A6_cjs.GTokenAuthorizationArtifact; }
2114
+ });
2115
+ Object.defineProperty(exports, "GTokenStakingABI", {
2116
+ enumerable: true,
2117
+ get: function () { return chunkCIEYY3A6_cjs.GTokenStakingABI; }
2118
+ });
2119
+ Object.defineProperty(exports, "GTokenStakingArtifact", {
2120
+ enumerable: true,
2121
+ get: function () { return chunkCIEYY3A6_cjs.GTokenStakingArtifact; }
2122
+ });
2123
+ Object.defineProperty(exports, "INITIAL_ROLE_STAKES", {
2124
+ enumerable: true,
2125
+ get: function () { return chunkCIEYY3A6_cjs.INITIAL_ROLE_STAKES; }
2126
+ });
2127
+ Object.defineProperty(exports, "LINKS", {
2128
+ enumerable: true,
2129
+ get: function () { return chunkCIEYY3A6_cjs.LINKS; }
2130
+ });
2131
+ Object.defineProperty(exports, "MicroPaymentChannelABI", {
2132
+ enumerable: true,
2133
+ get: function () { return chunkCIEYY3A6_cjs.MicroPaymentChannelABI; }
2134
+ });
2135
+ Object.defineProperty(exports, "MicroPaymentChannelArtifact", {
2136
+ enumerable: true,
2137
+ get: function () { return chunkCIEYY3A6_cjs.MicroPaymentChannelArtifact; }
2138
+ });
2139
+ Object.defineProperty(exports, "MySBTABI", {
2140
+ enumerable: true,
2141
+ get: function () { return chunkCIEYY3A6_cjs.MySBTABI; }
2142
+ });
2143
+ Object.defineProperty(exports, "MySBTArtifact", {
2144
+ enumerable: true,
2145
+ get: function () { return chunkCIEYY3A6_cjs.MySBTArtifact; }
2146
+ });
2147
+ Object.defineProperty(exports, "NETWORKS", {
2148
+ enumerable: true,
2149
+ get: function () { return chunkCIEYY3A6_cjs.NETWORKS; }
2150
+ });
2151
+ Object.defineProperty(exports, "NodeType", {
2152
+ enumerable: true,
2153
+ get: function () { return chunkCIEYY3A6_cjs.NodeType; }
2154
+ });
2155
+ Object.defineProperty(exports, "PaymasterABI", {
2156
+ enumerable: true,
2157
+ get: function () { return chunkCIEYY3A6_cjs.PaymasterABI; }
2158
+ });
2159
+ Object.defineProperty(exports, "PaymasterArtifact", {
2160
+ enumerable: true,
2161
+ get: function () { return chunkCIEYY3A6_cjs.PaymasterArtifact; }
2162
+ });
2163
+ Object.defineProperty(exports, "PaymasterFactoryABI", {
2164
+ enumerable: true,
2165
+ get: function () { return chunkCIEYY3A6_cjs.PaymasterFactoryABI; }
2166
+ });
2167
+ Object.defineProperty(exports, "PaymasterFactoryArtifact", {
2168
+ enumerable: true,
2169
+ get: function () { return chunkCIEYY3A6_cjs.PaymasterFactoryArtifact; }
2170
+ });
2171
+ Object.defineProperty(exports, "PolicyDecision", {
2172
+ enumerable: true,
2173
+ get: function () { return chunkCIEYY3A6_cjs.PolicyDecision; }
2174
+ });
2175
+ Object.defineProperty(exports, "PolicyRegistryABI", {
2176
+ enumerable: true,
2177
+ get: function () { return chunkCIEYY3A6_cjs.PolicyRegistryABI; }
2178
+ });
2179
+ Object.defineProperty(exports, "PolicyRegistryArtifact", {
2180
+ enumerable: true,
2181
+ get: function () { return chunkCIEYY3A6_cjs.PolicyRegistryArtifact; }
2182
+ });
2183
+ Object.defineProperty(exports, "ROLE_ANODE", {
2184
+ enumerable: true,
2185
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_ANODE; }
2186
+ });
2187
+ Object.defineProperty(exports, "ROLE_COMMUNITY", {
2188
+ enumerable: true,
2189
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_COMMUNITY; }
2190
+ });
2191
+ Object.defineProperty(exports, "ROLE_DVT", {
2192
+ enumerable: true,
2193
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_DVT; }
2194
+ });
2195
+ Object.defineProperty(exports, "ROLE_ENDUSER", {
2196
+ enumerable: true,
2197
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_ENDUSER; }
2198
+ });
2199
+ Object.defineProperty(exports, "ROLE_KMS", {
2200
+ enumerable: true,
2201
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_KMS; }
2202
+ });
2203
+ Object.defineProperty(exports, "ROLE_NAMES", {
2204
+ enumerable: true,
2205
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_NAMES; }
2206
+ });
2207
+ Object.defineProperty(exports, "ROLE_PAYMASTER_AOA", {
2208
+ enumerable: true,
2209
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_PAYMASTER_AOA; }
2210
+ });
2211
+ Object.defineProperty(exports, "ROLE_PAYMASTER_SUPER", {
2212
+ enumerable: true,
2213
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_PAYMASTER_SUPER; }
2214
+ });
2215
+ Object.defineProperty(exports, "ROLE_PERMISSION_LEVELS", {
2216
+ enumerable: true,
2217
+ get: function () { return chunkCIEYY3A6_cjs.ROLE_PERMISSION_LEVELS; }
2218
+ });
2219
+ Object.defineProperty(exports, "RegistryABI", {
2220
+ enumerable: true,
2221
+ get: function () { return chunkCIEYY3A6_cjs.RegistryABI; }
2222
+ });
2223
+ Object.defineProperty(exports, "RegistryArtifact", {
2224
+ enumerable: true,
2225
+ get: function () { return chunkCIEYY3A6_cjs.RegistryArtifact; }
2226
+ });
2227
+ Object.defineProperty(exports, "ReputationSystemABI", {
2228
+ enumerable: true,
2229
+ get: function () { return chunkCIEYY3A6_cjs.ReputationSystemABI; }
2230
+ });
2231
+ Object.defineProperty(exports, "ReputationSystemArtifact", {
2232
+ enumerable: true,
2233
+ get: function () { return chunkCIEYY3A6_cjs.ReputationSystemArtifact; }
2234
+ });
2235
+ Object.defineProperty(exports, "RequirementChecker", {
2236
+ enumerable: true,
2237
+ get: function () { return chunkCIEYY3A6_cjs.RequirementChecker; }
2238
+ });
2239
+ Object.defineProperty(exports, "RolePermissionLevel", {
2240
+ enumerable: true,
2241
+ get: function () { return chunkCIEYY3A6_cjs.RolePermissionLevel; }
2242
+ });
2243
+ Object.defineProperty(exports, "SEPOLIA_CONTRACTS", {
2244
+ enumerable: true,
2245
+ get: function () { return chunkCIEYY3A6_cjs.SEPOLIA_CONTRACTS; }
2246
+ });
2247
+ Object.defineProperty(exports, "SEPOLIA_V2_VERSIONS", {
2248
+ enumerable: true,
2249
+ get: function () { return chunkCIEYY3A6_cjs.SEPOLIA_V2_VERSIONS; }
2250
+ });
2251
+ Object.defineProperty(exports, "SepoliaFaucetAPI", {
2252
+ enumerable: true,
2253
+ get: function () { return chunkCIEYY3A6_cjs.SepoliaFaucetAPI; }
2254
+ });
2255
+ Object.defineProperty(exports, "SessionKeyValidatorABI", {
2256
+ enumerable: true,
2257
+ get: function () { return chunkCIEYY3A6_cjs.SessionKeyValidatorABI; }
2258
+ });
2259
+ Object.defineProperty(exports, "SessionKeyValidatorArtifact", {
2260
+ enumerable: true,
2261
+ get: function () { return chunkCIEYY3A6_cjs.SessionKeyValidatorArtifact; }
2262
+ });
2263
+ Object.defineProperty(exports, "SimpleAccountABI", {
2264
+ enumerable: true,
2265
+ get: function () { return chunkCIEYY3A6_cjs.SimpleAccountABI; }
2266
+ });
2267
+ Object.defineProperty(exports, "SimpleAccountArtifact", {
2268
+ enumerable: true,
2269
+ get: function () { return chunkCIEYY3A6_cjs.SimpleAccountArtifact; }
2270
+ });
2271
+ Object.defineProperty(exports, "SimpleAccountFactoryABI", {
2272
+ enumerable: true,
2273
+ get: function () { return chunkCIEYY3A6_cjs.SimpleAccountFactoryABI; }
2274
+ });
2275
+ Object.defineProperty(exports, "SimpleAccountFactoryArtifact", {
2276
+ enumerable: true,
2277
+ get: function () { return chunkCIEYY3A6_cjs.SimpleAccountFactoryArtifact; }
2278
+ });
2279
+ Object.defineProperty(exports, "StateValidator", {
2280
+ enumerable: true,
2281
+ get: function () { return chunkCIEYY3A6_cjs.StateValidator; }
2282
+ });
2283
+ Object.defineProperty(exports, "SuperPaymasterABI", {
2284
+ enumerable: true,
2285
+ get: function () { return chunkCIEYY3A6_cjs.SuperPaymasterABI; }
2286
+ });
2287
+ Object.defineProperty(exports, "SuperPaymasterArtifact", {
2288
+ enumerable: true,
2289
+ get: function () { return chunkCIEYY3A6_cjs.SuperPaymasterArtifact; }
2290
+ });
2291
+ Object.defineProperty(exports, "V2_SUMMARY", {
2292
+ enumerable: true,
2293
+ get: function () { return chunkCIEYY3A6_cjs.V2_SUMMARY; }
2294
+ });
2295
+ Object.defineProperty(exports, "X402FacilitatorABI", {
2296
+ enumerable: true,
2297
+ get: function () { return chunkCIEYY3A6_cjs.X402FacilitatorABI; }
2298
+ });
2299
+ Object.defineProperty(exports, "X402FacilitatorArtifact", {
2300
+ enumerable: true,
2301
+ get: function () { return chunkCIEYY3A6_cjs.X402FacilitatorArtifact; }
2302
+ });
2303
+ Object.defineProperty(exports, "accountActions", {
2304
+ enumerable: true,
2305
+ get: function () { return chunkCIEYY3A6_cjs.accountActions; }
2306
+ });
2307
+ Object.defineProperty(exports, "accountFactoryActions", {
2308
+ enumerable: true,
2309
+ get: function () { return chunkCIEYY3A6_cjs.accountFactoryActions; }
2310
+ });
2311
+ Object.defineProperty(exports, "agentActions", {
2312
+ enumerable: true,
2313
+ get: function () { return chunkCIEYY3A6_cjs.agentActions; }
2314
+ });
2315
+ Object.defineProperty(exports, "agentRegistryActions", {
2316
+ enumerable: true,
2317
+ get: function () { return chunkCIEYY3A6_cjs.agentRegistryActions; }
2318
+ });
2319
+ Object.defineProperty(exports, "aggregatorActions", {
2320
+ enumerable: true,
2321
+ get: function () { return chunkCIEYY3A6_cjs.aggregatorActions; }
2322
+ });
2323
+ Object.defineProperty(exports, "airAccountActions", {
2324
+ enumerable: true,
2325
+ get: function () { return chunkCIEYY3A6_cjs.airAccountActions; }
2326
+ });
2327
+ Object.defineProperty(exports, "airAccountExtensionActions", {
2328
+ enumerable: true,
2329
+ get: function () { return chunkCIEYY3A6_cjs.airAccountExtensionActions; }
2330
+ });
2331
+ Object.defineProperty(exports, "airAccountFactoryActions", {
2332
+ enumerable: true,
2333
+ get: function () { return chunkCIEYY3A6_cjs.airAccountFactoryActions; }
2334
+ });
2335
+ Object.defineProperty(exports, "blsAlgorithmActions", {
2336
+ enumerable: true,
2337
+ get: function () { return chunkCIEYY3A6_cjs.blsAlgorithmActions; }
2338
+ });
2339
+ Object.defineProperty(exports, "channelActions", {
2340
+ enumerable: true,
2341
+ get: function () { return chunkCIEYY3A6_cjs.channelActions; }
2342
+ });
2343
+ Object.defineProperty(exports, "createAAStarPublicClient", {
2344
+ enumerable: true,
2345
+ get: function () { return chunkCIEYY3A6_cjs.createAAStarPublicClient; }
2346
+ });
2347
+ Object.defineProperty(exports, "createHeliosTransport", {
2348
+ enumerable: true,
2349
+ get: function () { return chunkCIEYY3A6_cjs.createHeliosTransport; }
2350
+ });
2351
+ Object.defineProperty(exports, "dvtActions", {
2352
+ enumerable: true,
2353
+ get: function () { return chunkCIEYY3A6_cjs.dvtActions; }
2354
+ });
2355
+ Object.defineProperty(exports, "encodeDVTAccountSignature", {
2356
+ enumerable: true,
2357
+ get: function () { return chunkCIEYY3A6_cjs.encodeDVTAccountSignature; }
2358
+ });
2359
+ Object.defineProperty(exports, "encodeDVTVerifierProof", {
2360
+ enumerable: true,
2361
+ get: function () { return chunkCIEYY3A6_cjs.encodeDVTVerifierProof; }
2362
+ });
2363
+ Object.defineProperty(exports, "encodeG2Point", {
2364
+ enumerable: true,
2365
+ get: function () { return chunkCIEYY3A6_cjs.encodeG2Point; }
2366
+ });
2367
+ Object.defineProperty(exports, "entryPointActions", {
2368
+ enumerable: true,
2369
+ get: function () { return chunkCIEYY3A6_cjs.entryPointActions; }
2370
+ });
2371
+ Object.defineProperty(exports, "forceExitActions", {
2372
+ enumerable: true,
2373
+ get: function () { return chunkCIEYY3A6_cjs.forceExitActions; }
2374
+ });
2375
+ Object.defineProperty(exports, "gTokenActions", {
2376
+ enumerable: true,
2377
+ get: function () { return chunkCIEYY3A6_cjs.gTokenActions; }
2378
+ });
2379
+ Object.defineProperty(exports, "gTokenAuthorizationActions", {
2380
+ enumerable: true,
2381
+ get: function () { return chunkCIEYY3A6_cjs.gTokenAuthorizationActions; }
2382
+ });
2383
+ Object.defineProperty(exports, "getAddressUrl", {
2384
+ enumerable: true,
2385
+ get: function () { return chunkCIEYY3A6_cjs.getAddressUrl; }
2386
+ });
2387
+ Object.defineProperty(exports, "getAllCommunityConfigs", {
2388
+ enumerable: true,
2389
+ get: function () { return chunkCIEYY3A6_cjs.getAllCommunityConfigs; }
2390
+ });
2391
+ Object.defineProperty(exports, "getAllV2Contracts", {
2392
+ enumerable: true,
2393
+ get: function () { return chunkCIEYY3A6_cjs.getAllV2Contracts; }
2394
+ });
2395
+ Object.defineProperty(exports, "getBlockExplorer", {
2396
+ enumerable: true,
2397
+ get: function () { return chunkCIEYY3A6_cjs.getBlockExplorer; }
2398
+ });
2399
+ Object.defineProperty(exports, "getChainId", {
2400
+ enumerable: true,
2401
+ get: function () { return chunkCIEYY3A6_cjs.getChainId; }
2402
+ });
2403
+ Object.defineProperty(exports, "getCommunities", {
2404
+ enumerable: true,
2405
+ get: function () { return chunkCIEYY3A6_cjs.getCommunities; }
2406
+ });
2407
+ Object.defineProperty(exports, "getCommunity", {
2408
+ enumerable: true,
2409
+ get: function () { return chunkCIEYY3A6_cjs.getCommunity; }
2410
+ });
2411
+ Object.defineProperty(exports, "getCommunityConfig", {
2412
+ enumerable: true,
2413
+ get: function () { return chunkCIEYY3A6_cjs.getCommunityConfig; }
2414
+ });
2415
+ Object.defineProperty(exports, "getContract", {
2416
+ enumerable: true,
2417
+ get: function () { return chunkCIEYY3A6_cjs.getContract; }
2418
+ });
2419
+ Object.defineProperty(exports, "getContractNetworks", {
2420
+ enumerable: true,
2421
+ get: function () { return chunkCIEYY3A6_cjs.getContractNetworks; }
2422
+ });
2423
+ Object.defineProperty(exports, "getContracts", {
2424
+ enumerable: true,
2425
+ get: function () { return chunkCIEYY3A6_cjs.getContracts; }
2426
+ });
2427
+ Object.defineProperty(exports, "getCoreContracts", {
2428
+ enumerable: true,
2429
+ get: function () { return chunkCIEYY3A6_cjs.getCoreContracts; }
2430
+ });
2431
+ Object.defineProperty(exports, "getDeploymentDate", {
2432
+ enumerable: true,
2433
+ get: function () { return chunkCIEYY3A6_cjs.getDeploymentDate; }
2434
+ });
2435
+ Object.defineProperty(exports, "getEntryPoint", {
2436
+ enumerable: true,
2437
+ get: function () { return chunkCIEYY3A6_cjs.getEntryPoint; }
2438
+ });
2439
+ Object.defineProperty(exports, "getNetwork", {
2440
+ enumerable: true,
2441
+ get: function () { return chunkCIEYY3A6_cjs.getNetwork; }
2442
+ });
2443
+ Object.defineProperty(exports, "getPaymasterV4_1", {
2444
+ enumerable: true,
2445
+ get: function () { return chunkCIEYY3A6_cjs.getPaymasterV4_1; }
2446
+ });
2447
+ Object.defineProperty(exports, "getRoleName", {
2448
+ enumerable: true,
2449
+ get: function () { return chunkCIEYY3A6_cjs.getRoleName; }
2450
+ });
2451
+ Object.defineProperty(exports, "getRpcUrl", {
2452
+ enumerable: true,
2453
+ get: function () { return chunkCIEYY3A6_cjs.getRpcUrl; }
2454
+ });
2455
+ Object.defineProperty(exports, "getSimpleAccountFactory", {
2456
+ enumerable: true,
2457
+ get: function () { return chunkCIEYY3A6_cjs.getSimpleAccountFactory; }
2458
+ });
2459
+ Object.defineProperty(exports, "getSuperPaymasterV2", {
2460
+ enumerable: true,
2461
+ get: function () { return chunkCIEYY3A6_cjs.getSuperPaymasterV2; }
2462
+ });
2463
+ Object.defineProperty(exports, "getTestAccounts", {
2464
+ enumerable: true,
2465
+ get: function () { return chunkCIEYY3A6_cjs.getTestAccounts; }
2466
+ });
2467
+ Object.defineProperty(exports, "getTestTokenContracts", {
2468
+ enumerable: true,
2469
+ get: function () { return chunkCIEYY3A6_cjs.getTestTokenContracts; }
2470
+ });
2471
+ Object.defineProperty(exports, "getTokenContracts", {
2472
+ enumerable: true,
2473
+ get: function () { return chunkCIEYY3A6_cjs.getTokenContracts; }
2474
+ });
2475
+ Object.defineProperty(exports, "getTxUrl", {
2476
+ enumerable: true,
2477
+ get: function () { return chunkCIEYY3A6_cjs.getTxUrl; }
2478
+ });
2479
+ Object.defineProperty(exports, "getV2ContractByAddress", {
2480
+ enumerable: true,
2481
+ get: function () { return chunkCIEYY3A6_cjs.getV2ContractByAddress; }
2482
+ });
2483
+ Object.defineProperty(exports, "getV2ContractByName", {
2484
+ enumerable: true,
2485
+ get: function () { return chunkCIEYY3A6_cjs.getV2ContractByName; }
2486
+ });
2487
+ Object.defineProperty(exports, "getV2ContractsByDate", {
2488
+ enumerable: true,
2489
+ get: function () { return chunkCIEYY3A6_cjs.getV2ContractsByDate; }
2490
+ });
2491
+ Object.defineProperty(exports, "hashToFieldU0U1", {
2492
+ enumerable: true,
2493
+ get: function () { return chunkCIEYY3A6_cjs.hashToFieldU0U1; }
2494
+ });
2495
+ Object.defineProperty(exports, "isContractNetworkSupported", {
2496
+ enumerable: true,
2497
+ get: function () { return chunkCIEYY3A6_cjs.isContractNetworkSupported; }
2498
+ });
2499
+ Object.defineProperty(exports, "isRegisteredCommunity", {
2500
+ enumerable: true,
2501
+ get: function () { return chunkCIEYY3A6_cjs.isRegisteredCommunity; }
2502
+ });
2503
+ Object.defineProperty(exports, "isV2Contract", {
2504
+ enumerable: true,
2505
+ get: function () { return chunkCIEYY3A6_cjs.isV2Contract; }
2506
+ });
2507
+ Object.defineProperty(exports, "lookupAddress", {
2508
+ enumerable: true,
2509
+ get: function () { return chunkCIEYY3A6_cjs.lookupAddress; }
2510
+ });
2511
+ Object.defineProperty(exports, "paymasterActions", {
2512
+ enumerable: true,
2513
+ get: function () { return chunkCIEYY3A6_cjs.paymasterActions; }
2514
+ });
2515
+ Object.defineProperty(exports, "paymasterFactoryActions", {
2516
+ enumerable: true,
2517
+ get: function () { return chunkCIEYY3A6_cjs.paymasterFactoryActions; }
2518
+ });
2519
+ Object.defineProperty(exports, "policyRegistryActions", {
2520
+ enumerable: true,
2521
+ get: function () { return chunkCIEYY3A6_cjs.policyRegistryActions; }
2522
+ });
2523
+ Object.defineProperty(exports, "registryActions", {
2524
+ enumerable: true,
2525
+ get: function () { return chunkCIEYY3A6_cjs.registryActions; }
2526
+ });
2527
+ Object.defineProperty(exports, "reputationActions", {
2528
+ enumerable: true,
2529
+ get: function () { return chunkCIEYY3A6_cjs.reputationActions; }
2530
+ });
2531
+ Object.defineProperty(exports, "resolveEns", {
2532
+ enumerable: true,
2533
+ get: function () { return chunkCIEYY3A6_cjs.resolveEns; }
2534
+ });
2535
+ Object.defineProperty(exports, "resolveEnsVerified", {
2536
+ enumerable: true,
2537
+ get: function () { return chunkCIEYY3A6_cjs.resolveEnsVerified; }
2538
+ });
2539
+ Object.defineProperty(exports, "sbtActions", {
2540
+ enumerable: true,
2541
+ get: function () { return chunkCIEYY3A6_cjs.sbtActions; }
2542
+ });
2543
+ Object.defineProperty(exports, "sessionKeyValidatorActions", {
2544
+ enumerable: true,
2545
+ get: function () { return chunkCIEYY3A6_cjs.sessionKeyValidatorActions; }
2546
+ });
2547
+ Object.defineProperty(exports, "stakingActions", {
2548
+ enumerable: true,
2549
+ get: function () { return chunkCIEYY3A6_cjs.stakingActions; }
2550
+ });
2551
+ Object.defineProperty(exports, "superPaymasterActions", {
2552
+ enumerable: true,
2553
+ get: function () { return chunkCIEYY3A6_cjs.superPaymasterActions; }
2554
+ });
2555
+ Object.defineProperty(exports, "tokenActions", {
2556
+ enumerable: true,
2557
+ get: function () { return chunkCIEYY3A6_cjs.tokenActions; }
2558
+ });
2559
+ Object.defineProperty(exports, "x402Actions", {
2560
+ enumerable: true,
2561
+ get: function () { return chunkCIEYY3A6_cjs.x402Actions; }
2562
+ });
2563
+ Object.defineProperty(exports, "x402IsNonceUsed", {
2564
+ enumerable: true,
2565
+ get: function () { return chunkCIEYY3A6_cjs.x402IsNonceUsed; }
2566
+ });
2567
+ Object.defineProperty(exports, "x402NonceKey", {
2568
+ enumerable: true,
2569
+ get: function () { return chunkCIEYY3A6_cjs.x402NonceKey; }
2570
+ });
2571
+ Object.defineProperty(exports, "xPNTsFactoryABI", {
2572
+ enumerable: true,
2573
+ get: function () { return chunkCIEYY3A6_cjs.xPNTsFactoryABI; }
2574
+ });
2575
+ Object.defineProperty(exports, "xPNTsFactoryActions", {
2576
+ enumerable: true,
2577
+ get: function () { return chunkCIEYY3A6_cjs.xPNTsFactoryActions; }
2578
+ });
2579
+ Object.defineProperty(exports, "xPNTsFactoryArtifact", {
2580
+ enumerable: true,
2581
+ get: function () { return chunkCIEYY3A6_cjs.xPNTsFactoryArtifact; }
2582
+ });
2583
+ Object.defineProperty(exports, "xPNTsTokenABI", {
2584
+ enumerable: true,
2585
+ get: function () { return chunkCIEYY3A6_cjs.xPNTsTokenABI; }
2586
+ });
2587
+ Object.defineProperty(exports, "xPNTsTokenActions", {
2588
+ enumerable: true,
2589
+ get: function () { return chunkCIEYY3A6_cjs.xPNTsTokenActions; }
2590
+ });
2591
+ Object.defineProperty(exports, "xPNTsTokenArtifact", {
2592
+ enumerable: true,
2593
+ get: function () { return chunkCIEYY3A6_cjs.xPNTsTokenArtifact; }
2594
+ });
2595
+ Object.defineProperty(exports, "AGENT_IDENTITY_REGISTRY_ADDRESS", {
2596
+ enumerable: true,
2597
+ get: function () { return chunkMXJEULSE_cjs.AGENT_IDENTITY_REGISTRY_ADDRESS; }
2598
+ });
2599
+ Object.defineProperty(exports, "AGENT_REPUTATION_REGISTRY_ADDRESS", {
2600
+ enumerable: true,
2601
+ get: function () { return chunkMXJEULSE_cjs.AGENT_REPUTATION_REGISTRY_ADDRESS; }
2602
+ });
2603
+ Object.defineProperty(exports, "ALL_ADDRESSES", {
2604
+ enumerable: true,
2605
+ get: function () { return chunkMXJEULSE_cjs.ALL_ADDRESSES; }
2606
+ });
2607
+ Object.defineProperty(exports, "APNTS_ADDRESS", {
2608
+ enumerable: true,
2609
+ get: function () { return chunkMXJEULSE_cjs.APNTS_ADDRESS; }
2610
+ });
2611
+ Object.defineProperty(exports, "BLS_AGGREGATOR_ADDRESS", {
2612
+ enumerable: true,
2613
+ get: function () { return chunkMXJEULSE_cjs.BLS_AGGREGATOR_ADDRESS; }
2614
+ });
2615
+ Object.defineProperty(exports, "BLS_VALIDATOR_ADDRESS", {
2616
+ enumerable: true,
2617
+ get: function () { return chunkMXJEULSE_cjs.BLS_VALIDATOR_ADDRESS; }
2618
+ });
2619
+ Object.defineProperty(exports, "BPS_DENOMINATOR", {
2620
+ enumerable: true,
2621
+ get: function () { return chunkMXJEULSE_cjs.BPS_DENOMINATOR; }
2622
+ });
2623
+ Object.defineProperty(exports, "CANONICAL_ADDRESSES", {
2624
+ enumerable: true,
2625
+ get: function () { return chunkMXJEULSE_cjs.CANONICAL_ADDRESSES; }
2626
+ });
2627
+ Object.defineProperty(exports, "CHAIN_MAINNET", {
2628
+ enumerable: true,
2629
+ get: function () { return chunkMXJEULSE_cjs.CHAIN_MAINNET; }
2630
+ });
2631
+ Object.defineProperty(exports, "CHAIN_SEPOLIA", {
2632
+ enumerable: true,
2633
+ get: function () { return chunkMXJEULSE_cjs.CHAIN_SEPOLIA; }
2634
+ });
2635
+ Object.defineProperty(exports, "COMMUNITY_OWNERS", {
2636
+ enumerable: true,
2637
+ get: function () { return chunkMXJEULSE_cjs.COMMUNITY_OWNERS; }
2638
+ });
2639
+ Object.defineProperty(exports, "CONTRACT_SRC_HASH", {
2640
+ enumerable: true,
2641
+ get: function () { return chunkMXJEULSE_cjs.CONTRACT_SRC_HASH; }
2642
+ });
2643
+ Object.defineProperty(exports, "CORE_ADDRESSES", {
2644
+ enumerable: true,
2645
+ get: function () { return chunkMXJEULSE_cjs.CORE_ADDRESSES; }
2646
+ });
2647
+ Object.defineProperty(exports, "DEFAULT_APNTS_PRICE_USD", {
2648
+ enumerable: true,
2649
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_APNTS_PRICE_USD; }
2650
+ });
2651
+ Object.defineProperty(exports, "DEFAULT_CALL_GAS_LIMIT", {
2652
+ enumerable: true,
2653
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_CALL_GAS_LIMIT; }
2654
+ });
2655
+ Object.defineProperty(exports, "DEFAULT_GAS_TOKEN_MINT_AMOUNT", {
2656
+ enumerable: true,
2657
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_GAS_TOKEN_MINT_AMOUNT; }
2658
+ });
2659
+ Object.defineProperty(exports, "DEFAULT_PRE_VERIFICATION_GAS", {
2660
+ enumerable: true,
2661
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_PRE_VERIFICATION_GAS; }
2662
+ });
2663
+ Object.defineProperty(exports, "DEFAULT_TIMEOUT_MS", {
2664
+ enumerable: true,
2665
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_TIMEOUT_MS; }
2666
+ });
2667
+ Object.defineProperty(exports, "DEFAULT_TOKEN_NAME", {
2668
+ enumerable: true,
2669
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_TOKEN_NAME; }
2670
+ });
2671
+ Object.defineProperty(exports, "DEFAULT_TOKEN_SYMBOL", {
2672
+ enumerable: true,
2673
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_TOKEN_SYMBOL; }
2674
+ });
2675
+ Object.defineProperty(exports, "DEFAULT_USDT_MINT_AMOUNT", {
2676
+ enumerable: true,
2677
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_USDT_MINT_AMOUNT; }
2678
+ });
2679
+ Object.defineProperty(exports, "DEFAULT_VERIFICATION_GAS_LIMIT", {
2680
+ enumerable: true,
2681
+ get: function () { return chunkMXJEULSE_cjs.DEFAULT_VERIFICATION_GAS_LIMIT; }
2682
+ });
2683
+ Object.defineProperty(exports, "DVT_VALIDATOR_ADDRESS", {
2684
+ enumerable: true,
2685
+ get: function () { return chunkMXJEULSE_cjs.DVT_VALIDATOR_ADDRESS; }
2686
+ });
2687
+ Object.defineProperty(exports, "ENTRY_POINT_ADDRESS", {
2688
+ enumerable: true,
2689
+ get: function () { return chunkMXJEULSE_cjs.ENTRY_POINT_ADDRESS; }
2690
+ });
2691
+ Object.defineProperty(exports, "FAUCET_API_URL", {
2692
+ enumerable: true,
2693
+ get: function () { return chunkMXJEULSE_cjs.FAUCET_API_URL; }
2694
+ });
2695
+ Object.defineProperty(exports, "GTOKEN_ADDRESS", {
2696
+ enumerable: true,
2697
+ get: function () { return chunkMXJEULSE_cjs.GTOKEN_ADDRESS; }
2698
+ });
2699
+ Object.defineProperty(exports, "GTOKEN_STAKING_ADDRESS", {
2700
+ enumerable: true,
2701
+ get: function () { return chunkMXJEULSE_cjs.GTOKEN_STAKING_ADDRESS; }
2702
+ });
2703
+ Object.defineProperty(exports, "MAX_SERVICE_FEE", {
2704
+ enumerable: true,
2705
+ get: function () { return chunkMXJEULSE_cjs.MAX_SERVICE_FEE; }
2706
+ });
2707
+ Object.defineProperty(exports, "MICRO_PAYMENT_CHANNEL_ADDRESS", {
2708
+ enumerable: true,
2709
+ get: function () { return chunkMXJEULSE_cjs.MICRO_PAYMENT_CHANNEL_ADDRESS; }
2710
+ });
2711
+ Object.defineProperty(exports, "MONITORING_ADDRESSES", {
2712
+ enumerable: true,
2713
+ get: function () { return chunkMXJEULSE_cjs.MONITORING_ADDRESSES; }
2714
+ });
2715
+ Object.defineProperty(exports, "NODE_STAKE_AMOUNTS", {
2716
+ enumerable: true,
2717
+ get: function () { return chunkMXJEULSE_cjs.NODE_STAKE_AMOUNTS; }
2718
+ });
2719
+ Object.defineProperty(exports, "OFFICIAL_ADDRESSES", {
2720
+ enumerable: true,
2721
+ get: function () { return chunkMXJEULSE_cjs.OFFICIAL_ADDRESSES; }
2722
+ });
2723
+ Object.defineProperty(exports, "PAYMASTER_ADDRESSES", {
2724
+ enumerable: true,
2725
+ get: function () { return chunkMXJEULSE_cjs.PAYMASTER_ADDRESSES; }
2726
+ });
2727
+ Object.defineProperty(exports, "PAYMASTER_FACTORY_ADDRESS", {
2728
+ enumerable: true,
2729
+ get: function () { return chunkMXJEULSE_cjs.PAYMASTER_FACTORY_ADDRESS; }
2730
+ });
2731
+ Object.defineProperty(exports, "PAYMASTER_V4_ADDRESS", {
2732
+ enumerable: true,
2733
+ get: function () { return chunkMXJEULSE_cjs.PAYMASTER_V4_ADDRESS; }
2734
+ });
2735
+ Object.defineProperty(exports, "PAYMASTER_V4_IMPL_ADDRESS", {
2736
+ enumerable: true,
2737
+ get: function () { return chunkMXJEULSE_cjs.PAYMASTER_V4_IMPL_ADDRESS; }
2738
+ });
2739
+ Object.defineProperty(exports, "REGISTRY_ADDRESS", {
2740
+ enumerable: true,
2741
+ get: function () { return chunkMXJEULSE_cjs.REGISTRY_ADDRESS; }
2742
+ });
2743
+ Object.defineProperty(exports, "REPUTATION_SYSTEM_ADDRESS", {
2744
+ enumerable: true,
2745
+ get: function () { return chunkMXJEULSE_cjs.REPUTATION_SYSTEM_ADDRESS; }
2746
+ });
2747
+ Object.defineProperty(exports, "SBT_ADDRESS", {
2748
+ enumerable: true,
2749
+ get: function () { return chunkMXJEULSE_cjs.SBT_ADDRESS; }
2750
+ });
2751
+ Object.defineProperty(exports, "SERVICE_FEE_RATE", {
2752
+ enumerable: true,
2753
+ get: function () { return chunkMXJEULSE_cjs.SERVICE_FEE_RATE; }
2754
+ });
2755
+ Object.defineProperty(exports, "SUPER_PAYMASTER_ADDRESS", {
2756
+ enumerable: true,
2757
+ get: function () { return chunkMXJEULSE_cjs.SUPER_PAYMASTER_ADDRESS; }
2758
+ });
2759
+ Object.defineProperty(exports, "TEST_ACCOUNT_ADDRESSES", {
2760
+ enumerable: true,
2761
+ get: function () { return chunkMXJEULSE_cjs.TEST_ACCOUNT_ADDRESSES; }
2762
+ });
2763
+ Object.defineProperty(exports, "TEST_ACCOUNT_POOL_SIZE", {
2764
+ enumerable: true,
2765
+ get: function () { return chunkMXJEULSE_cjs.TEST_ACCOUNT_POOL_SIZE; }
2766
+ });
2767
+ Object.defineProperty(exports, "TEST_COMMUNITIES", {
2768
+ enumerable: true,
2769
+ get: function () { return chunkMXJEULSE_cjs.TEST_COMMUNITIES; }
2770
+ });
2771
+ Object.defineProperty(exports, "TEST_TOKEN_ADDRESSES", {
2772
+ enumerable: true,
2773
+ get: function () { return chunkMXJEULSE_cjs.TEST_TOKEN_ADDRESSES; }
2774
+ });
2775
+ Object.defineProperty(exports, "TOKEN_ADDRESSES", {
2776
+ enumerable: true,
2777
+ get: function () { return chunkMXJEULSE_cjs.TOKEN_ADDRESSES; }
2778
+ });
2779
+ Object.defineProperty(exports, "XPNTS_FACTORY_ADDRESS", {
2780
+ enumerable: true,
2781
+ get: function () { return chunkMXJEULSE_cjs.XPNTS_FACTORY_ADDRESS; }
2782
+ });
2783
+ Object.defineProperty(exports, "applyConfig", {
2784
+ enumerable: true,
2785
+ get: function () { return chunkMXJEULSE_cjs.applyConfig; }
2786
+ });
2787
+ Object.defineProperty(exports, "describeSupportedChains", {
2788
+ enumerable: true,
2789
+ get: function () { return chunkMXJEULSE_cjs.describeSupportedChains; }
2790
+ });
2791
+ Object.defineProperty(exports, "getCanonicalAddresses", {
2792
+ enumerable: true,
2793
+ get: function () { return chunkMXJEULSE_cjs.getCanonicalAddresses; }
2794
+ });
2795
+ Object.defineProperty(exports, "isSupportedChainId", {
2796
+ enumerable: true,
2797
+ get: function () { return chunkMXJEULSE_cjs.isSupportedChainId; }
2798
+ });
2799
+ Object.defineProperty(exports, "listSupportedChainIds", {
2800
+ enumerable: true,
2801
+ get: function () { return chunkMXJEULSE_cjs.listSupportedChainIds; }
2802
+ });
2803
+ exports.CustomErrors = CustomErrors;
2804
+ exports.ExperimentClient = ExperimentClient;
2805
+ exports.FundingManager = FundingManager;
2806
+ exports.KeyManager = KeyManager;
2807
+ exports.RoleDataFactory = RoleDataFactory;
2808
+ exports.RoleIds = RoleIds;
2809
+ exports.UserOpScenarioBuilder = UserOpScenarioBuilder;
2810
+ exports.UserOpScenarioType = UserOpScenarioType;
2811
+ exports.UserOperationBuilder = UserOperationBuilder;
2812
+ exports.createAdminClient = createAdminClient;
2813
+ exports.createCommunityClient = createCommunityClient;
2814
+ exports.createEndUserClient = createEndUserClient;
2815
+ exports.createOperatorClient = createOperatorClient;
2816
+ exports.decodeContractError = decodeContractError;
2817
+ //# sourceMappingURL=index.cjs.map
2818
+ //# sourceMappingURL=index.cjs.map