@aastar/sdk 0.14.0 → 0.16.6

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 (656) hide show
  1. package/.eslintrc.cjs +30 -0
  2. package/.gitmodules +9 -0
  3. package/README.md +299 -0
  4. package/aastar-sdk.code-workspace +14 -0
  5. package/abis/BLSAggregator.json +572 -0
  6. package/abis/BLSValidator.json +39 -0
  7. package/abis/DVTValidator.json +383 -0
  8. package/abis/Eip7702Support.json +24 -0
  9. package/abis/EntryPoint.json +1379 -0
  10. package/abis/GToken.json +510 -0
  11. package/abis/GTokenStaking.json +918 -0
  12. package/abis/LegacyAccount.json +625 -0
  13. package/abis/MySBT.json +1547 -0
  14. package/abis/Paymaster.json +1192 -0
  15. package/abis/PaymasterFactory.json +637 -0
  16. package/abis/PaymasterV4_2.json +1193 -0
  17. package/abis/Registry.json +1677 -0
  18. package/abis/ReputationSystem.json +659 -0
  19. package/abis/SenderCreator.json +99 -0
  20. package/abis/Simple7702Account.json +395 -0
  21. package/abis/SimpleAccount.json +625 -0
  22. package/abis/SimpleAccountFactory.json +108 -0
  23. package/abis/SimpleAccountFactoryV08.json +87 -0
  24. package/abis/SimpleAccountV08.json +557 -0
  25. package/abis/SuperPaymaster.json +1568 -0
  26. package/abis/UserOperationLib.json +57 -0
  27. package/abis/aPNTs.json +1160 -0
  28. package/abis/xPNTsFactory.json +715 -0
  29. package/abis/xPNTsToken.json +1160 -0
  30. package/config/networks/README.md +54 -0
  31. package/config/networks/mainnet.env.example +39 -0
  32. package/config/networks/optimism-sepolia.env.example +35 -0
  33. package/config/networks/optimism.env.example +36 -0
  34. package/config/networks/sepolia.env.example +36 -0
  35. package/config.anvil.json +1 -0
  36. package/config.sepolia.json +1 -0
  37. package/config.test.json +27 -0
  38. package/data/experiment_data.csv +36 -0
  39. package/data/industry_baseline_2025-12-23.json +154 -0
  40. package/data/industry_baseline_latest.json +154 -0
  41. package/docs/ABI_Change_Tracking_Workflow.md +41 -0
  42. package/docs/ABI_MAINTENANCE_PLAN.md +132 -0
  43. package/docs/API_REFERENCE.md +956 -0
  44. package/docs/Configuration_Sync.md +47 -0
  45. package/docs/DAO_Mining_Distribution_Plan.md +522 -0
  46. package/docs/DEMO_REFACTOR_PLAN.md +289 -0
  47. package/docs/DOCUMENTATION_PLAN.md +455 -0
  48. package/docs/ENV_SEPOLIA_UPDATE.md +68 -0
  49. package/docs/Faucet_Gasless_Plan.md +56 -0
  50. package/docs/L2_BUSINESS_CLIENTS_PLAN.md +394 -0
  51. package/docs/L4_Manual_Test_CheatSheet.md +215 -0
  52. package/docs/Plan.md +266 -0
  53. package/docs/Regression_Testing_Guide.md +70 -0
  54. package/docs/SDK_ABI_COVERAGE.md +839 -0
  55. package/docs/SDK_COVERAGE_STRATEGY.md +397 -0
  56. package/docs/SDK_Optimization_Evaluation_Plan.md +51 -0
  57. package/docs/SDK_REGRESSION_AND_API_PLAN.md +98 -0
  58. package/docs/SDK_STAGE3_PLAN.md +151 -0
  59. package/docs/SEPOLIA_ENV_REFERENCE.md +51 -0
  60. package/docs/STAGE3.md +191 -0
  61. package/docs/Script_Comparison_Report.md +91 -0
  62. package/docs/Sepolia_Latest_Deployment.md +117 -0
  63. package/docs/TESTER_GUIDE_GASLESS.md +663 -0
  64. package/docs/TEST_COVERAGE_MATRIX.md +72 -0
  65. package/docs/TODO_SDK_COVERAGE.md +55 -0
  66. package/docs/USER_CASE_DESIGN.md +110 -0
  67. package/docs/Verifier_L4_Gasless_Plan.md +454 -0
  68. package/docs/api/@aastar/account.md +235 -0
  69. package/docs/api/@aastar/analytics.md +219 -0
  70. package/docs/api/@aastar/core.md +26830 -0
  71. package/docs/api/@aastar/dapp.md +130 -0
  72. package/docs/api/@aastar/identity.md +482 -0
  73. package/docs/api/@aastar/paymaster.md +1387 -0
  74. package/docs/api/@aastar/sdk/README.md +155 -0
  75. package/docs/api/@aastar/sdk/node.md +4044 -0
  76. package/docs/api/@aastar/tokens.md +1971 -0
  77. package/docs/api/README.md +10 -0
  78. package/docs/changelog.md +99 -0
  79. package/docs/examples/README.md +18 -0
  80. package/docs/examples/community-flow.md +28 -0
  81. package/docs/examples/enduser-flow.md +24 -0
  82. package/docs/examples/index.md +18 -0
  83. package/docs/examples/multi-chain.md +31 -0
  84. package/docs/examples/operator-flow.md +28 -0
  85. package/docs/guide/CLI_GUIDE.md +65 -0
  86. package/docs/guide/DOCUMENTATION_PLAN.md +455 -0
  87. package/docs/guide/Security-solution.md +106 -0
  88. package/docs/guide/TEST_COMMANDS.md +320 -0
  89. package/docs/guide/concepts/account-abstraction.md +95 -0
  90. package/docs/guide/concepts/rainbow-bridge.md +68 -0
  91. package/docs/guide/concepts/reputation.md +95 -0
  92. package/docs/guide/concepts/superpaymaster.md +141 -0
  93. package/docs/guide/getting-started.md +133 -0
  94. package/docs/guide/installation.md +40 -0
  95. package/docs/guide/paper-data-collection.md +69 -0
  96. package/docs/guide/quick-start.md +52 -0
  97. package/docs/guide/task_breakdown.md +121 -0
  98. package/docs/guide/use-cases/community-management.md +141 -0
  99. package/docs/guide/use-cases/gasless-transactions.md +71 -0
  100. package/docs/guide/use-cases/operator-staking.md +84 -0
  101. package/docs/guide/use-cases/yop.md +72 -0
  102. package/docs/old-solution.md +1078 -0
  103. package/docs/paper-data-collection.md +69 -0
  104. package/docs/refactor/2026-01-13-221242-trae-refactor.md +224 -0
  105. package/docs/refactor/2026-01-13-audit-analysis.md +96 -0
  106. package/docs/refactor/2026-01-13-audit-report-v0.16.2.md +76 -0
  107. package/docs/refactor/2026-01-13-audit-report-v0.17.0.md +74 -0
  108. package/docs/refactor/2026-01-13-cursor-refactor.md +511 -0
  109. package/docs/refactor/2026-01-13-refactor-plan.md +88 -0
  110. package/docs/refactor/2026-01-13-refactor-response-plan.md +77 -0
  111. package/docs/refactor/2026-01-13-refactor-review.md +39 -0
  112. package/docs/refactor/2026-01-13-sdk-enhancement-plan.md +120 -0
  113. package/docs/refactor/2026-01-14-audit-response.md +242 -0
  114. package/docs/refactor/2026-01-14-audit-summary.md +133 -0
  115. package/docs/refactor/cursor-2026-01-13-14-00-audit-report.md +267 -0
  116. package/docs/technical_plan.md +510 -0
  117. package/docs/zh/examples/community-flow.md +38 -0
  118. package/docs/zh/examples/complete-workflow.md +10 -0
  119. package/docs/zh/examples/enduser-flow.md +33 -0
  120. package/docs/zh/examples/index.md +18 -0
  121. package/docs/zh/examples/multi-chain.md +46 -0
  122. package/docs/zh/examples/operator-flow.md +37 -0
  123. package/docs/zh/guide/CLI_GUIDE.md +48 -0
  124. package/docs/zh/guide/DOCUMENTATION_PLAN.md +455 -0
  125. package/docs/zh/guide/Plan.md +266 -0
  126. package/docs/zh/guide/SDK_Optimization_Evaluation_Plan.md +51 -0
  127. package/docs/zh/guide/Security-solution.md +106 -0
  128. package/docs/zh/guide/TEST_COMMANDS.md +125 -0
  129. package/docs/zh/guide/TEST_COVERAGE_MATRIX.md +72 -0
  130. package/docs/zh/guide/concepts/account-abstraction.md +95 -0
  131. package/docs/zh/guide/concepts/rainbow-bridge.md +68 -0
  132. package/docs/zh/guide/concepts/reputation.md +95 -0
  133. package/docs/zh/guide/concepts/superpaymaster.md +141 -0
  134. package/docs/zh/guide/getting-started.md +133 -0
  135. package/docs/zh/guide/installation.md +107 -0
  136. package/docs/zh/guide/old-solution.md +1078 -0
  137. package/docs/zh/guide/paper-data-collection.md +69 -0
  138. package/docs/zh/guide/quick-start.md +134 -0
  139. package/docs/zh/guide/sdk-readme.md +253 -0
  140. package/docs/zh/guide/task_breakdown.md +76 -0
  141. package/docs/zh/guide/technical_plan.md +510 -0
  142. package/docs/zh/guide/use-cases/community-management.md +141 -0
  143. package/docs/zh/guide/use-cases/gasless-transactions.md +71 -0
  144. package/docs/zh/guide/use-cases/operator-staking.md +84 -0
  145. package/docs/zh/guide/use-cases/yop.md +72 -0
  146. package/env.template +32 -0
  147. package/examples/l1-api-demo.ts +184 -0
  148. package/examples/l2-clients-demo.ts +138 -0
  149. package/examples/l3-user-onboarding.ts +74 -0
  150. package/examples/prepare-gasless.ts +89 -0
  151. package/examples/sdk-demo/DEVELOPER_GUIDE.md +159 -0
  152. package/examples/sdk-demo/README.md +30 -0
  153. package/examples/sdk-demo/usage.ts +137 -0
  154. package/examples/simple-gasless-demo.ts +80 -0
  155. package/examples/simple-superpaymaster-demo.ts +96 -0
  156. package/ext/aastar-shared-config/.env.example +6 -0
  157. package/ext/aastar-shared-config/.github/workflows/check-secrets.yml +257 -0
  158. package/ext/aastar-shared-config/AGENTS.md +21 -0
  159. package/ext/aastar-shared-config/CHANGELOG.md +99 -0
  160. package/ext/aastar-shared-config/LICENSE +21 -0
  161. package/ext/aastar-shared-config/QUICK_START.md +215 -0
  162. package/ext/aastar-shared-config/README.md +412 -0
  163. package/ext/aastar-shared-config/SHARED_CONFIG_SUMMARY.md +273 -0
  164. package/ext/aastar-shared-config/check-locker-status.mjs +7 -0
  165. package/ext/aastar-shared-config/favicon.ico +0 -0
  166. package/ext/aastar-shared-config/generate-comparison-table.sh +67 -0
  167. package/ext/aastar-shared-config/package.json +46 -0
  168. package/ext/aastar-shared-config/pnpm-lock.yaml +1182 -0
  169. package/ext/aastar-shared-config/src/abis/BLSAggregator.json +1 -0
  170. package/ext/aastar-shared-config/src/abis/DVTValidator.json +1 -0
  171. package/ext/aastar-shared-config/src/abis/GToken.json +1 -0
  172. package/ext/aastar-shared-config/src/abis/GTokenStaking.json +1 -0
  173. package/ext/aastar-shared-config/src/abis/MySBT.json +1 -0
  174. package/ext/aastar-shared-config/src/abis/PaymasterFactory.json +1 -0
  175. package/ext/aastar-shared-config/src/abis/PaymasterV4.json +1098 -0
  176. package/ext/aastar-shared-config/src/abis/Registry.json +1 -0
  177. package/ext/aastar-shared-config/src/abis/SimpleAccount.json +557 -0
  178. package/ext/aastar-shared-config/src/abis/SimpleAccountFactory.json +87 -0
  179. package/ext/aastar-shared-config/src/abis/SuperPaymasterV2.json +1 -0
  180. package/ext/aastar-shared-config/src/abis/index.ts +45 -0
  181. package/ext/aastar-shared-config/src/abis/xPNTsFactory.json +1 -0
  182. package/ext/aastar-shared-config/src/abis/xPNTsToken.json +1 -0
  183. package/ext/aastar-shared-config/src/branding.ts +32 -0
  184. package/ext/aastar-shared-config/src/communities.ts +93 -0
  185. package/ext/aastar-shared-config/src/constants.ts +67 -0
  186. package/ext/aastar-shared-config/src/contract-addresses.ts +95 -0
  187. package/ext/aastar-shared-config/src/contract-versions.ts +374 -0
  188. package/ext/aastar-shared-config/src/contracts.ts +414 -0
  189. package/ext/aastar-shared-config/src/index.ts +14 -0
  190. package/ext/aastar-shared-config/src/networks.ts +117 -0
  191. package/ext/aastar-shared-config/sync-abis.sh +92 -0
  192. package/ext/aastar-shared-config/sync-versions.mjs +150 -0
  193. package/ext/aastar-shared-config/tsconfig.json +18 -0
  194. package/ext/aastar-shared-config/tsup.config.ts +10 -0
  195. package/ext/aastar-shared-config/verify-all.sh +207 -0
  196. package/ext/aastar-shared-config/verify-contracts.sh +85 -0
  197. package/ext/aastar-shared-config/verify-mysbt-v243.mjs +27 -0
  198. package/ext/aastar-shared-config/verify-onchain-versions.mjs +93 -0
  199. package/l4-setup.sh +11 -0
  200. package/lib/SHARED_CONFIG_REFERENCE.md +133 -0
  201. package/lib/shared-config/.env.example +6 -0
  202. package/lib/shared-config/.github/workflows/check-secrets.yml +257 -0
  203. package/lib/shared-config/AGENTS.md +21 -0
  204. package/lib/shared-config/CHANGELOG.md +99 -0
  205. package/lib/shared-config/LICENSE +21 -0
  206. package/lib/shared-config/QUICK_START.md +215 -0
  207. package/lib/shared-config/README.md +412 -0
  208. package/lib/shared-config/SHARED_CONFIG_SUMMARY.md +273 -0
  209. package/lib/shared-config/check-locker-status.mjs +7 -0
  210. package/lib/shared-config/favicon.ico +0 -0
  211. package/lib/shared-config/generate-comparison-table.sh +67 -0
  212. package/lib/shared-config/package.json +46 -0
  213. package/lib/shared-config/pnpm-lock.yaml +1182 -0
  214. package/lib/shared-config/src/abis/BLSAggregator.json +1 -0
  215. package/lib/shared-config/src/abis/DVTValidator.json +1 -0
  216. package/lib/shared-config/src/abis/GToken.json +1 -0
  217. package/lib/shared-config/src/abis/GTokenStaking.json +1 -0
  218. package/lib/shared-config/src/abis/MySBT.json +1 -0
  219. package/lib/shared-config/src/abis/PaymasterFactory.json +1 -0
  220. package/lib/shared-config/src/abis/PaymasterV4.json +1098 -0
  221. package/lib/shared-config/src/abis/Registry.json +1 -0
  222. package/lib/shared-config/src/abis/SimpleAccount.json +557 -0
  223. package/lib/shared-config/src/abis/SimpleAccountFactory.json +87 -0
  224. package/lib/shared-config/src/abis/SuperPaymasterV2.json +1 -0
  225. package/lib/shared-config/src/abis/index.ts +45 -0
  226. package/lib/shared-config/src/abis/xPNTsFactory.json +1 -0
  227. package/lib/shared-config/src/abis/xPNTsToken.json +1 -0
  228. package/lib/shared-config/src/branding.ts +32 -0
  229. package/lib/shared-config/src/communities.ts +93 -0
  230. package/lib/shared-config/src/constants.ts +67 -0
  231. package/lib/shared-config/src/contract-addresses.ts +95 -0
  232. package/lib/shared-config/src/contract-versions.ts +374 -0
  233. package/lib/shared-config/src/contracts.ts +414 -0
  234. package/lib/shared-config/src/index.ts +14 -0
  235. package/lib/shared-config/src/networks.ts +117 -0
  236. package/lib/shared-config/sync-abis.sh +92 -0
  237. package/lib/shared-config/sync-versions.mjs +150 -0
  238. package/lib/shared-config/tsconfig.json +18 -0
  239. package/lib/shared-config/tsup.config.ts +10 -0
  240. package/lib/shared-config/verify-all.sh +207 -0
  241. package/lib/shared-config/verify-contracts.sh +85 -0
  242. package/lib/shared-config/verify-mysbt-v243.mjs +27 -0
  243. package/lib/shared-config/verify-onchain-versions.mjs +93 -0
  244. package/package.json +58 -22
  245. package/packages/account/package.json +23 -0
  246. package/packages/account/src/accounts/simple.test.ts +93 -0
  247. package/packages/account/src/accounts/simple.ts +84 -0
  248. package/packages/account/src/eoa.test.ts +37 -0
  249. package/packages/account/src/eoa.ts +33 -0
  250. package/packages/account/src/index.test.ts +34 -0
  251. package/packages/account/src/index.ts +61 -0
  252. package/packages/account/tsconfig.json +11 -0
  253. package/packages/analytics/package.json +28 -0
  254. package/packages/analytics/src/index.ts +145 -0
  255. package/packages/analytics/tsconfig.json +11 -0
  256. package/packages/core/package.json +32 -0
  257. package/packages/core/scripts/audit-abi-coverage.ts +165 -0
  258. package/packages/core/scripts/debug-regex.ts +36 -0
  259. package/packages/core/src/abis/.abi-hashes.json +26 -0
  260. package/packages/core/src/abis/BLSAggregator.json +686 -0
  261. package/packages/core/src/abis/BLSValidator.json +42 -0
  262. package/packages/core/src/abis/DVTValidator.json +368 -0
  263. package/packages/core/src/abis/Eip7702Support.json +24 -0
  264. package/packages/core/src/abis/EntryPoint.json +1382 -0
  265. package/packages/core/src/abis/GToken.json +513 -0
  266. package/packages/core/src/abis/GTokenStaking.json +949 -0
  267. package/packages/core/src/abis/LegacyAccount.json +625 -0
  268. package/packages/core/src/abis/MySBT.json +1518 -0
  269. package/packages/core/src/abis/Paymaster.json +1143 -0
  270. package/packages/core/src/abis/PaymasterFactory.json +640 -0
  271. package/packages/core/src/abis/Registry.json +1942 -0
  272. package/packages/core/src/abis/ReputationSystem.json +699 -0
  273. package/packages/core/src/abis/SenderCreator.json +99 -0
  274. package/packages/core/src/abis/Simple7702Account.json +395 -0
  275. package/packages/core/src/abis/SimpleAccount.json +560 -0
  276. package/packages/core/src/abis/SimpleAccountFactory.json +111 -0
  277. package/packages/core/src/abis/SimpleAccountFactoryV08.json +87 -0
  278. package/packages/core/src/abis/SimpleAccountV08.json +557 -0
  279. package/packages/core/src/abis/SuperPaymaster.json +1781 -0
  280. package/packages/core/src/abis/UserOperationLib.json +57 -0
  281. package/packages/core/src/abis/abi.config.json +24 -0
  282. package/packages/core/src/abis/index.ts +104 -0
  283. package/packages/core/src/abis/xPNTsFactory.json +718 -0
  284. package/packages/core/src/abis/xPNTsToken.json +1280 -0
  285. package/packages/core/src/actions/StateValidator.test.ts +175 -0
  286. package/packages/core/src/actions/StateValidator.ts +253 -0
  287. package/packages/core/src/actions/account.test.ts +155 -0
  288. package/packages/core/src/actions/account.ts +179 -0
  289. package/packages/core/src/actions/aggregator.test.ts +88 -0
  290. package/packages/core/src/actions/aggregator.ts +41 -0
  291. package/packages/core/src/actions/dvt.test.ts +124 -0
  292. package/packages/core/src/actions/dvt.ts +53 -0
  293. package/packages/core/src/actions/entryPoint.test.ts +176 -0
  294. package/packages/core/src/actions/entryPoint.ts +266 -0
  295. package/packages/core/src/actions/factory.test.ts +250 -0
  296. package/packages/core/src/actions/factory.ts +613 -0
  297. package/packages/core/src/actions/faucet.test.ts +202 -0
  298. package/packages/core/src/actions/faucet.ts +421 -0
  299. package/packages/core/src/actions/gtokenExtended.test.ts +162 -0
  300. package/packages/core/src/actions/gtokenExtended.ts +153 -0
  301. package/packages/core/src/actions/index.ts +18 -0
  302. package/packages/core/src/actions/paymasterV4.test.ts +209 -0
  303. package/packages/core/src/actions/paymasterV4.ts +455 -0
  304. package/packages/core/src/actions/registry.test.ts +443 -0
  305. package/packages/core/src/actions/registry.ts +860 -0
  306. package/packages/core/src/actions/reputation.test.ts +225 -0
  307. package/packages/core/src/actions/reputation.ts +378 -0
  308. package/packages/core/src/actions/sbt.test.ts +322 -0
  309. package/packages/core/src/actions/sbt.ts +681 -0
  310. package/packages/core/src/actions/staking.test.ts +273 -0
  311. package/packages/core/src/actions/staking.ts +421 -0
  312. package/packages/core/src/actions/superPaymaster.test.ts +356 -0
  313. package/packages/core/src/actions/superPaymaster.ts +828 -0
  314. package/packages/core/src/actions/tokens.test.ts +60 -0
  315. package/packages/core/src/actions/tokens.ts +527 -0
  316. package/packages/core/src/actions/validators.test.ts +239 -0
  317. package/packages/core/src/actions/validators.ts +590 -0
  318. package/packages/core/src/branding.ts +32 -0
  319. package/packages/core/src/clients/BaseClient.ts +78 -0
  320. package/packages/core/src/clients/types.ts +69 -0
  321. package/packages/core/src/clients.ts +13 -0
  322. package/packages/core/src/communities.ts +93 -0
  323. package/packages/core/src/config/ContractConfigManager.ts +63 -0
  324. package/packages/core/src/constants.ts +145 -0
  325. package/packages/core/src/contract-addresses.ts +125 -0
  326. package/packages/core/src/contracts.test.ts +58 -0
  327. package/packages/core/src/contracts.ts +414 -0
  328. package/packages/core/src/crypto/blsSigner.ts +124 -0
  329. package/packages/core/src/crypto/index.ts +1 -0
  330. package/packages/core/src/index.ts +22 -0
  331. package/packages/core/src/networks.ts +127 -0
  332. package/packages/core/src/requirementChecker.test.ts +71 -0
  333. package/packages/core/src/requirementChecker.ts +187 -0
  334. package/packages/core/src/roles.test.ts +34 -0
  335. package/packages/core/src/roles.ts +255 -0
  336. package/packages/core/src/utils/validation.test.ts +50 -0
  337. package/packages/core/src/utils/validation.ts +66 -0
  338. package/packages/core/src/utils.ts +23 -0
  339. package/packages/core/tsconfig.json +12 -0
  340. package/packages/core/vitest.config.ts +14 -0
  341. package/packages/dapp/package.json +30 -0
  342. package/packages/dapp/src/index.ts +4 -0
  343. package/packages/dapp/src/ui/components/EvaluationPanel.tsx +40 -0
  344. package/packages/dapp/src/ui/hooks/useCreditScore.ts +44 -0
  345. package/packages/dapp/src/ui/hooks/useSuperPaymaster.ts +31 -0
  346. package/packages/dapp/src/ui/index.ts +22 -0
  347. package/packages/dapp/tsconfig.json +12 -0
  348. package/packages/identity/package.json +25 -0
  349. package/packages/identity/src/index.ts +114 -0
  350. package/packages/identity/src/mysbt.ts +48 -0
  351. package/packages/identity/tsconfig.json +11 -0
  352. package/packages/paymaster/package.json +25 -0
  353. package/packages/paymaster/src/SuperPaymaster/index.ts +168 -0
  354. package/packages/paymaster/src/V4/PaymasterClient.test.ts +114 -0
  355. package/packages/paymaster/src/V4/PaymasterClient.ts +385 -0
  356. package/packages/paymaster/src/V4/PaymasterOperator.test.ts +80 -0
  357. package/packages/paymaster/src/V4/PaymasterOperator.ts +282 -0
  358. package/packages/paymaster/src/V4/PaymasterUtils.test.ts +54 -0
  359. package/packages/paymaster/src/V4/PaymasterUtils.ts +185 -0
  360. package/packages/paymaster/src/V4/SuperPaymasterClient.test.ts +79 -0
  361. package/packages/paymaster/src/V4/SuperPaymasterClient.ts +123 -0
  362. package/packages/paymaster/src/V4/index.ts +4 -0
  363. package/packages/paymaster/src/index.ts +5 -0
  364. package/packages/paymaster/tsconfig.json +11 -0
  365. package/packages/sdk/README.md +150 -0
  366. package/packages/sdk/aastar/package.json +21 -0
  367. package/packages/sdk/aastar/src/index.ts +3 -0
  368. package/packages/sdk/aastar/tsconfig.json +7 -0
  369. package/packages/sdk/coverage_output.txt +393 -0
  370. package/packages/sdk/coverage_output_final.txt +739 -0
  371. package/packages/sdk/coverage_output_final_v2.txt +722 -0
  372. package/packages/sdk/coverage_output_final_v3.txt +722 -0
  373. package/packages/sdk/examples/config.json +1 -0
  374. package/packages/sdk/examples/regression_test.ts +106 -0
  375. package/packages/sdk/package.json +44 -0
  376. package/packages/sdk/src/clients/ExperimentClient.test.ts +65 -0
  377. package/packages/sdk/src/clients/ExperimentClient.ts +80 -0
  378. package/packages/sdk/src/clients/admin.test.ts +98 -0
  379. package/packages/sdk/src/clients/admin.ts +154 -0
  380. package/packages/sdk/src/clients/clients.test.ts +104 -0
  381. package/packages/sdk/src/clients/community.test.ts +118 -0
  382. package/packages/sdk/src/clients/community.ts +337 -0
  383. package/packages/sdk/src/clients/endUser.test.ts +221 -0
  384. package/packages/sdk/src/clients/endUser.ts +551 -0
  385. package/packages/sdk/src/clients/operator.test.ts +162 -0
  386. package/packages/sdk/src/clients/operator.ts +355 -0
  387. package/packages/sdk/src/errors/AAStarError.test.ts +92 -0
  388. package/packages/sdk/src/errors/AAStarError.ts +70 -0
  389. package/packages/sdk/src/errors/decoder.test.ts +107 -0
  390. package/packages/sdk/src/errors/decoder.ts +91 -0
  391. package/packages/sdk/src/index.ts +23 -0
  392. package/packages/sdk/src/node/index.ts +8 -0
  393. package/packages/sdk/src/types/result.ts +29 -0
  394. package/packages/sdk/src/utils/errorHandler.test.ts +102 -0
  395. package/packages/sdk/src/utils/errorHandler.ts +167 -0
  396. package/packages/sdk/src/utils/eventDecoder.test.ts +56 -0
  397. package/packages/sdk/src/utils/eventDecoder.ts +66 -0
  398. package/packages/sdk/src/utils/funding.test.ts +117 -0
  399. package/packages/sdk/src/utils/funding.ts +280 -0
  400. package/packages/sdk/src/utils/keys.test.ts +105 -0
  401. package/packages/sdk/src/utils/keys.ts +174 -0
  402. package/packages/sdk/src/utils/roleData.test.ts +85 -0
  403. package/packages/sdk/src/utils/roleData.ts +140 -0
  404. package/packages/sdk/src/utils/testScenarios.test.ts +79 -0
  405. package/packages/sdk/src/utils/testScenarios.ts +128 -0
  406. package/packages/sdk/src/utils/userOp.test.ts +190 -0
  407. package/packages/sdk/src/utils/userOp.ts +265 -0
  408. package/packages/sdk/tests/scenarios/01_onboard_community.ts +62 -0
  409. package/packages/sdk/tests/scenarios/02_onboard_operator.ts +109 -0
  410. package/packages/sdk/tests/scenarios/03_onboard_user.ts +53 -0
  411. package/packages/sdk/tests/scenarios/04_gasless_tx_flow.ts +68 -0
  412. package/packages/sdk/tests/scenarios/check_entrypoint.ts +19 -0
  413. package/packages/sdk/tests/scenarios/check_initialization.ts +65 -0
  414. package/packages/sdk/tests/scenarios/debug_addresses.ts +26 -0
  415. package/packages/sdk/tests/scenarios/diagnose_scenario4.ts +55 -0
  416. package/packages/sdk/tests/scenarios/setup.ts +33 -0
  417. package/packages/sdk/tests/scenarios/test_entrypoint_nonce.ts +46 -0
  418. package/packages/sdk/tsconfig.json +11 -0
  419. package/packages/tokens/package.json +25 -0
  420. package/packages/tokens/src/index.ts +273 -0
  421. package/packages/tokens/tsconfig.json +11 -0
  422. package/pnpm-workspace.yaml +2 -0
  423. package/run_l4_gasless_regression.sh +79 -0
  424. package/run_sdk_regression.sh +238 -0
  425. package/scripts/00_utils.ts +59 -0
  426. package/scripts/00_verify_phase1.ts +130 -0
  427. package/scripts/01_1_prep_gtoken.ts +81 -0
  428. package/scripts/01_2_register_sbt.ts +88 -0
  429. package/scripts/01_3_prep_tokens_paymaster.ts +102 -0
  430. package/scripts/01_prepare_all.ts +222 -0
  431. package/scripts/02_test_eoa.ts +53 -0
  432. package/scripts/03_test_standard_aa.ts +68 -0
  433. package/scripts/04_0_check_deploy.ts +24 -0
  434. package/scripts/04_1_check_allowance.ts +44 -0
  435. package/scripts/04_2_construct_verify.ts +96 -0
  436. package/scripts/04_3_verify_estimate.ts +66 -0
  437. package/scripts/04_4_verify_pack.ts +74 -0
  438. package/scripts/04_test_paymaster_v4.ts +60 -0
  439. package/scripts/05_1_deposit.ts +48 -0
  440. package/scripts/05_test_superpaymaster.ts +58 -0
  441. package/scripts/06_local_test_v3_admin.ts +163 -0
  442. package/scripts/06_local_test_v3_execution.ts +132 -0
  443. package/scripts/06_local_test_v3_full.ts +490 -0
  444. package/scripts/06_local_test_v3_funding.ts +124 -0
  445. package/scripts/06_local_test_v3_reputation.ts +234 -0
  446. package/scripts/07_local_test_v3_audit.ts +181 -0
  447. package/scripts/08_local_test_registry_lifecycle.ts +382 -0
  448. package/scripts/09_local_test_community_lifecycle.ts +385 -0
  449. package/scripts/09_local_test_community_simple.ts +108 -0
  450. package/scripts/09_scenario_bread_independent.ts +247 -0
  451. package/scripts/10_scenario_super_shared.ts +196 -0
  452. package/scripts/10_test_protocol_admin_full.ts +173 -0
  453. package/scripts/11_scenario_hacker_defense.ts +104 -0
  454. package/scripts/11_test_core_flows_full.ts +157 -0
  455. package/scripts/12_test_slash_mechanism.ts +205 -0
  456. package/scripts/12_test_slash_queries.ts +83 -0
  457. package/scripts/12_test_staking_exit.ts +152 -0
  458. package/scripts/12_test_staking_slash.ts +301 -0
  459. package/scripts/12_test_tier2_slash.ts +139 -0
  460. package/scripts/13_test_sbt_burn_linkage.ts +266 -0
  461. package/scripts/14_test_credit_redesign.ts +266 -0
  462. package/scripts/15_test_bls_full.ts +148 -0
  463. package/scripts/15_test_dvt_bls_full.ts +140 -0
  464. package/scripts/17_test_cross_role_collaboration.ts +95 -0
  465. package/scripts/18_sdk_e2e_verification.ts +67 -0
  466. package/scripts/18_test_dvt_sdk_flow.ts +138 -0
  467. package/scripts/18_test_lifecycle_completion.ts +144 -0
  468. package/scripts/19_sdk_experiment_runner.ts +114 -0
  469. package/scripts/19_sdk_experiment_runner.ts.backup +391 -0
  470. package/scripts/20_sdk_full_capability.ts +93 -0
  471. package/scripts/20_test_superpaymaster_new_apis.ts +193 -0
  472. package/scripts/21_test_paymasterv4_complete.ts +341 -0
  473. package/scripts/22_test_bls_signing.ts +260 -0
  474. package/scripts/23_test_middleware.ts +197 -0
  475. package/scripts/98_edge_reentrancy.ts +85 -0
  476. package/scripts/99_bug_hunting_fast.ts +99 -0
  477. package/scripts/analyze_abi_coverage.ts +169 -0
  478. package/scripts/check-admin.ts +95 -0
  479. package/scripts/check-jason-status.ts +184 -0
  480. package/scripts/check-roles.ts +36 -0
  481. package/scripts/clear-nonce.ts +47 -0
  482. package/scripts/collect_industry_baseline.ts +236 -0
  483. package/scripts/complete-jack-superpaymaster.ts +171 -0
  484. package/scripts/complete_env_config.ts +97 -0
  485. package/scripts/debug-addr.ts +43 -0
  486. package/scripts/debug-community-registration.ts +92 -0
  487. package/scripts/debug-deploy-v4.ts +116 -0
  488. package/scripts/debug-paymaster.ts +127 -0
  489. package/scripts/debug-register-role.ts +101 -0
  490. package/scripts/debug-version.ts +71 -0
  491. package/scripts/debug_account_c.ts +43 -0
  492. package/scripts/debug_bls.ts +58 -0
  493. package/scripts/debug_config_v036.ts +13 -0
  494. package/scripts/debug_contracts.ts +2 -0
  495. package/scripts/debug_env.ts +69 -0
  496. package/scripts/debug_find_paymaster.ts +98 -0
  497. package/scripts/debug_isolated_registration.ts +256 -0
  498. package/scripts/debug_paymaster_config.ts +19 -0
  499. package/scripts/debug_pim_addr.ts +23 -0
  500. package/scripts/debug_pm_status.ts +51 -0
  501. package/scripts/debug_registry.ts +39 -0
  502. package/scripts/debug_registry_setup.ts +129 -0
  503. package/scripts/debug_sanity.ts +32 -0
  504. package/scripts/debug_shared_config.ts +10 -0
  505. package/scripts/debug_token_compat.ts +51 -0
  506. package/scripts/debug_tokens.ts +41 -0
  507. package/scripts/debug_vcheck.ts +33 -0
  508. package/scripts/deploy-sync.ts +104 -0
  509. package/scripts/deploy_and_init_v3.sh +134 -0
  510. package/scripts/deploy_anvil_accounts.ts +144 -0
  511. package/scripts/deploy_paymaster_v4.ts +139 -0
  512. package/scripts/deploy_test_accounts.ts +401 -0
  513. package/scripts/deprecated/check_aa_entrypoint.ts +29 -0
  514. package/scripts/deprecated/check_paymaster_deposits.ts +45 -0
  515. package/scripts/deprecated/debug_aoa_function.ts +28 -0
  516. package/scripts/deprecated/debug_aoa_issue.ts +16 -0
  517. package/scripts/deprecated/debug_pimlico_aa23.ts +40 -0
  518. package/scripts/deprecated/debug_summary.ts +34 -0
  519. package/scripts/deprecated/deploy_v07_aa.ts +99 -0
  520. package/scripts/deprecated/fix_all_issues.ts +61 -0
  521. package/scripts/deprecated/fund_bpnts.ts +52 -0
  522. package/scripts/deprecated/get_factory_addresses.ts +28 -0
  523. package/scripts/deprecated/recheck_pim.ts +34 -0
  524. package/scripts/dev_tools/extract_abis.sh +151 -0
  525. package/scripts/dev_tools/extract_addresses_to_env.sh +67 -0
  526. package/scripts/dev_tools/final_safe_harmonize.py +77 -0
  527. package/scripts/dev_tools/safe_harmonize.py +107 -0
  528. package/scripts/dev_tools/surgical_harmonize.py +83 -0
  529. package/scripts/experiment/stage3/SETUP_GUIDE.md +258 -0
  530. package/scripts/experiment/stage3/archived_scripts/00_token_distribution.ts +78 -0
  531. package/scripts/experiment/stage3/archived_scripts/01_dao_launch.ts +96 -0
  532. package/scripts/experiment/stage3/archived_scripts/01b_bread_launch.ts +112 -0
  533. package/scripts/experiment/stage3/archived_scripts/02_operator_setup.ts +84 -0
  534. package/scripts/experiment/stage3/archived_scripts/02b_operator_b_setup.ts +104 -0
  535. package/scripts/experiment/stage3/archived_scripts/02c_finalize_operators.ts +86 -0
  536. package/scripts/experiment/stage3/archived_scripts/02d_operator_collateral.ts +89 -0
  537. package/scripts/experiment/stage3/archived_scripts/03_user_onboarding.ts +83 -0
  538. package/scripts/experiment/stage3/archived_scripts/03b_deploy_aa_account.ts +61 -0
  539. package/scripts/experiment/stage3/archived_scripts/03c_aa_onboarding.ts +104 -0
  540. package/scripts/experiment/stage3/archived_scripts/03d_mint_points.ts +60 -0
  541. package/scripts/experiment/stage3/archived_scripts/04_benchmarking.ts +100 -0
  542. package/scripts/experiment/stage3/archived_scripts/05_multi_op_setup.ts +149 -0
  543. package/scripts/experiment/stage3/archived_scripts/README.md +58 -0
  544. package/scripts/experiment/stage3/archived_scripts/check_roles.ts +29 -0
  545. package/scripts/experiment/stage3/archived_scripts/decode_error.ts +23 -0
  546. package/scripts/experiment/stage3/archived_scripts/fund_user.ts +51 -0
  547. package/scripts/experiment/stage3/archived_scripts/gen_b_key.ts +3 -0
  548. package/scripts/experiment/stage3/archived_scripts/gen_keys.ts +4 -0
  549. package/scripts/experiment/stage3/archived_scripts/setup.ts +105 -0
  550. package/scripts/experiment/stage3/archived_scripts/test_key.ts +4 -0
  551. package/scripts/experiment/stage3/archived_scripts/verify_state.ts +59 -0
  552. package/scripts/experiment/stage3/refactored/00_token_distribution.ts +46 -0
  553. package/scripts/experiment/stage3/refactored/02_operator_setup.ts +65 -0
  554. package/scripts/experiment/stage3/refactored/03_user_onboarding.ts +68 -0
  555. package/scripts/experiment/stage3/refactored/05_multi_op_setup.ts +63 -0
  556. package/scripts/experiment/stage3/refactored/README.md +71 -0
  557. package/scripts/extract-docs.sh +141 -0
  558. package/scripts/fund-jack.ts +38 -0
  559. package/scripts/generate_env_from_deployment.ts +109 -0
  560. package/scripts/inspect-anni-token.ts +116 -0
  561. package/scripts/inspect-factory.ts +83 -0
  562. package/scripts/l4-paymasterv4-transfer-test.ts +228 -0
  563. package/scripts/l4-setup.ts +453 -0
  564. package/scripts/l4-state.json +80 -0
  565. package/scripts/phase1_verify_contracts.ts +207 -0
  566. package/scripts/pre_test_sync.ts +83 -0
  567. package/scripts/prepare_sepolia_resources.ts +154 -0
  568. package/scripts/publish_all.sh +39 -0
  569. package/scripts/query-jack-token.ts +22 -0
  570. package/scripts/quick_setup.ts +124 -0
  571. package/scripts/quick_setup_account.ts +80 -0
  572. package/scripts/run_automated_experiment.sh +121 -0
  573. package/scripts/run_daily_experiment.ts +70 -0
  574. package/scripts/run_l4_gasless_regression.sh +32 -0
  575. package/scripts/run_sdk_experiment.sh +13 -0
  576. package/scripts/run_sdk_regression-v2.sh +38 -0
  577. package/scripts/sdk_regression_v2.ts +162 -0
  578. package/scripts/security_audit.sh +172 -0
  579. package/scripts/setup-bbq-community.ts +187 -0
  580. package/scripts/setup-dancing-community.ts +223 -0
  581. package/scripts/setup_test_accounts.ts +88 -0
  582. package/scripts/setup_test_environment.ts +147 -0
  583. package/scripts/sync_anvil_config.cjs +44 -0
  584. package/scripts/sync_config_to_env.ts +88 -0
  585. package/scripts/sync_contract_addresses.ts +186 -0
  586. package/scripts/sync_sepolia_config.cjs +90 -0
  587. package/scripts/sync_sepolia_config.mjs +74 -0
  588. package/scripts/test-brown-v4-deploy.ts +90 -0
  589. package/scripts/test-faucet-and-gasless.ts +170 -0
  590. package/scripts/test-jack-gasless.ts +119 -0
  591. package/scripts/test-jack-registration.ts +133 -0
  592. package/scripts/test-jack-superpaymaster-api.ts +112 -0
  593. package/scripts/test-kms-gasless.ts +138 -0
  594. package/scripts/test_groups.ts +138 -0
  595. package/scripts/test_multi_community_anvil.ts +276 -0
  596. package/scripts/test_new_sdk_apis_sepolia.ts +193 -0
  597. package/scripts/test_sdk_join_idempotent.ts +233 -0
  598. package/scripts/test_simple_sepolia.ts +44 -0
  599. package/scripts/update_env_from_config.ts +83 -0
  600. package/scripts/v2_regression/00_validate_env.ts +101 -0
  601. package/scripts/v2_regression/01_setup_and_fund.ts +132 -0
  602. package/scripts/v2_regression/02_operator_onboarding.ts +174 -0
  603. package/scripts/v2_regression/03_community_registry.ts +139 -0
  604. package/scripts/v2_regression/04_enduser_flow.ts +141 -0
  605. package/scripts/v2_regression/05_admin_audit.ts +157 -0
  606. package/scripts/v2_regression/README.md +161 -0
  607. package/scripts/validate_env.ts +112 -0
  608. package/scripts/verify-tx-status.ts +81 -0
  609. package/scripts/verify_onchain_milestone.ts +114 -0
  610. package/scripts/verify_phase1.ts +66 -0
  611. package/scripts/verify_phase2.ts +66 -0
  612. package/sdk_experiment_data.csv +4 -0
  613. package/simple-test-paymaster.sh +2 -0
  614. package/simple-test-superpaymaster.sh +1 -0
  615. package/tests/l1-regression.test.ts +458 -0
  616. package/tests/l4-test-anni-gasless.ts +105 -0
  617. package/tests/l4-test-jason1-gasless.ts +150 -0
  618. package/tests/l4-test-jason2-gasless.ts +174 -0
  619. package/tests/l4-test-pmv4-deposit.ts +111 -0
  620. package/tests/l4-test-pmv4-gasless.ts +166 -0
  621. package/tests/l4-test-pmv4-submit.ts +223 -0
  622. package/tests/regression/README.md +168 -0
  623. package/tests/regression/config.ts +215 -0
  624. package/tests/regression/display-versions.ts +85 -0
  625. package/tests/regression/index.ts +67 -0
  626. package/tests/regression/l1-tests.ts +267 -0
  627. package/tests/regression/l2-tests.ts +171 -0
  628. package/tests/regression/l3-tests.ts +125 -0
  629. package/tests/regression/l4-gasless.ts +897 -0
  630. package/tests/regression/l4-runner.ts +52 -0
  631. package/tests/reports/phase1_contract_verification.md +45 -0
  632. package/tests/utils/contractVerifier.ts +237 -0
  633. package/tests/utils/userOpHelper.ts +194 -0
  634. package/tsconfig.json +41 -0
  635. package/typedoc.json +59 -0
  636. package/vitest.config.ts +16 -0
  637. package/dist/clients/admin.d.ts +0 -12
  638. package/dist/clients/admin.d.ts.map +0 -1
  639. package/dist/clients/admin.js +0 -20
  640. package/dist/clients/admin.js.map +0 -1
  641. package/dist/clients/community.d.ts +0 -12
  642. package/dist/clients/community.d.ts.map +0 -1
  643. package/dist/clients/community.js +0 -18
  644. package/dist/clients/community.js.map +0 -1
  645. package/dist/clients/endUser.d.ts +0 -12
  646. package/dist/clients/endUser.d.ts.map +0 -1
  647. package/dist/clients/endUser.js +0 -20
  648. package/dist/clients/endUser.js.map +0 -1
  649. package/dist/clients/operator.d.ts +0 -18
  650. package/dist/clients/operator.d.ts.map +0 -1
  651. package/dist/clients/operator.js +0 -65
  652. package/dist/clients/operator.js.map +0 -1
  653. package/dist/index.d.ts +0 -11
  654. package/dist/index.d.ts.map +0 -1
  655. package/dist/index.js +0 -12
  656. package/dist/index.js.map +0 -1
@@ -0,0 +1,1387 @@
1
+ ## Classes
2
+
3
+ ### PaymasterClient
4
+
5
+ Defined in: [V4/PaymasterClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L8)
6
+
7
+ PaymasterClient
8
+ Focus: Integration, Funding, Interaction.
9
+
10
+ #### Constructors
11
+
12
+ ##### Constructor
13
+
14
+ ```ts
15
+ new PaymasterClient(): PaymasterClient;
16
+ ```
17
+
18
+ ###### Returns
19
+
20
+ [`PaymasterClient`](#paymasterclient)
21
+
22
+ #### Methods
23
+
24
+ ##### approveGasToken()
25
+
26
+ ```ts
27
+ static approveGasToken(
28
+ wallet,
29
+ token,
30
+ spender,
31
+ amount): Promise<any>;
32
+ ```
33
+
34
+ Defined in: [V4/PaymasterClient.ts:47](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L47)
35
+
36
+ Approve the Paymaster (or any spender) to spend gas tokens.
37
+
38
+ ###### Parameters
39
+
40
+ | Parameter | Type |
41
+ | ------ | ------ |
42
+ | `wallet` | `any` |
43
+ | `token` | `` `0x${string}` `` |
44
+ | `spender` | `` `0x${string}` `` |
45
+ | `amount` | `bigint` |
46
+
47
+ ###### Returns
48
+
49
+ `Promise`\<`any`\>
50
+
51
+ ##### depositFor()
52
+
53
+ ```ts
54
+ static depositFor(
55
+ wallet,
56
+ address,
57
+ user,
58
+ token,
59
+ amount): Promise<any>;
60
+ ```
61
+
62
+ Defined in: [V4/PaymasterClient.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L34)
63
+
64
+ Deposit tokens to Paymaster for a user (enables gasless transactions).
65
+
66
+ ###### Parameters
67
+
68
+ | Parameter | Type |
69
+ | ------ | ------ |
70
+ | `wallet` | `any` |
71
+ | `address` | `` `0x${string}` `` |
72
+ | `user` | `` `0x${string}` `` |
73
+ | `token` | `` `0x${string}` `` |
74
+ | `amount` | `bigint` |
75
+
76
+ ###### Returns
77
+
78
+ `Promise`\<`any`\>
79
+
80
+ ##### encodeExecution()
81
+
82
+ ```ts
83
+ static encodeExecution(
84
+ target,
85
+ value,
86
+ data): `0x${string}`;
87
+ ```
88
+
89
+ Defined in: [V4/PaymasterClient.ts:378](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L378)
90
+
91
+ Helper: Encode a SimpleAccount execution.
92
+ Wraps the inner call into: `execute(target, value, data)`
93
+ This is the payload signed by the user.
94
+
95
+ ###### Parameters
96
+
97
+ | Parameter | Type |
98
+ | ------ | ------ |
99
+ | `target` | `` `0x${string}` `` |
100
+ | `value` | `bigint` |
101
+ | `data` | `` `0x${string}` `` |
102
+
103
+ ###### Returns
104
+
105
+ `` `0x${string}` ``
106
+
107
+ ##### encodeTokenTransfer()
108
+
109
+ ```ts
110
+ static encodeTokenTransfer(recipient, amount): `0x${string}`;
111
+ ```
112
+
113
+ Defined in: [V4/PaymasterClient.ts:365](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L365)
114
+
115
+ Helper: Encode a standardized ERC-20 Transfer.
116
+ Returns the raw function data: `transfer(to, amount)`
117
+
118
+ ###### Parameters
119
+
120
+ | Parameter | Type |
121
+ | ------ | ------ |
122
+ | `recipient` | `` `0x${string}` `` |
123
+ | `amount` | `bigint` |
124
+
125
+ ###### Returns
126
+
127
+ `` `0x${string}` ``
128
+
129
+ ##### estimateUserOperationGas()
130
+
131
+ ```ts
132
+ static estimateUserOperationGas(
133
+ client,
134
+ wallet,
135
+ aaAddress,
136
+ entryPoint,
137
+ paymasterAddress,
138
+ token,
139
+ bundlerUrl,
140
+ callData,
141
+ options?): Promise<{
142
+ callGasLimit: bigint;
143
+ paymasterPostOpGasLimit: bigint;
144
+ paymasterVerificationGasLimit: bigint | undefined;
145
+ preVerificationGas: bigint;
146
+ verificationGasLimit: bigint;
147
+ }>;
148
+ ```
149
+
150
+ Defined in: [V4/PaymasterClient.ts:60](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L60)
151
+
152
+ Estimate Gas for a UserOperation.
153
+
154
+ ###### Parameters
155
+
156
+ | Parameter | Type |
157
+ | ------ | ------ |
158
+ | `client` | `any` |
159
+ | `wallet` | `any` |
160
+ | `aaAddress` | `` `0x${string}` `` |
161
+ | `entryPoint` | `` `0x${string}` `` |
162
+ | `paymasterAddress` | `` `0x${string}` `` |
163
+ | `token` | `` `0x${string}` `` |
164
+ | `bundlerUrl` | `string` |
165
+ | `callData` | `` `0x${string}` `` |
166
+ | `options?` | \{ `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `operator?`: `` `0x${string}` ``; `validityWindow?`: `number`; \} |
167
+ | `options.factory?` | `` `0x${string}` `` |
168
+ | `options.factoryData?` | `` `0x${string}` `` |
169
+ | `options.operator?` | `` `0x${string}` `` |
170
+ | `options.validityWindow?` | `number` |
171
+
172
+ ###### Returns
173
+
174
+ `Promise`\<\{
175
+ `callGasLimit`: `bigint`;
176
+ `paymasterPostOpGasLimit`: `bigint`;
177
+ `paymasterVerificationGasLimit`: `bigint` \| `undefined`;
178
+ `preVerificationGas`: `bigint`;
179
+ `verificationGasLimit`: `bigint`;
180
+ \}\>
181
+
182
+ ##### getDepositedBalance()
183
+
184
+ ```ts
185
+ static getDepositedBalance(
186
+ publicClient,
187
+ address,
188
+ user,
189
+ token): Promise<bigint>;
190
+ ```
191
+
192
+ Defined in: [V4/PaymasterClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L13)
193
+
194
+ Get user's deposited balance on the Paymaster.
195
+
196
+ ###### Parameters
197
+
198
+ | Parameter | Type |
199
+ | ------ | ------ |
200
+ | `publicClient` | `any` |
201
+ | `address` | `` `0x${string}` `` |
202
+ | `user` | `` `0x${string}` `` |
203
+ | `token` | `` `0x${string}` `` |
204
+
205
+ ###### Returns
206
+
207
+ `Promise`\<`bigint`\>
208
+
209
+ ##### getFeeFromReceipt()
210
+
211
+ ```ts
212
+ static getFeeFromReceipt(receipt, paymasterAddress):
213
+ | {
214
+ actualGasCostWei: bigint;
215
+ tokenCost: bigint;
216
+ }
217
+ | null;
218
+ ```
219
+
220
+ Defined in: [V4/PaymasterClient.ts:325](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L325)
221
+
222
+ Helper to extract the actual Gas Token fee from a UserOperation receipt.
223
+ Looks for the 'PostOpProcessed' event emitted by the Paymaster.
224
+
225
+ ###### Parameters
226
+
227
+ | Parameter | Type |
228
+ | ------ | ------ |
229
+ | `receipt` | `any` |
230
+ | `paymasterAddress` | `` `0x${string}` `` |
231
+
232
+ ###### Returns
233
+
234
+ \| \{
235
+ `actualGasCostWei`: `bigint`;
236
+ `tokenCost`: `bigint`;
237
+ \}
238
+ \| `null`
239
+
240
+ ##### getTransactionFee()
241
+
242
+ ```ts
243
+ static getTransactionFee(
244
+ publicClient,
245
+ txHash,
246
+ paymasterAddress): Promise<
247
+ | {
248
+ actualGasCostWei: bigint;
249
+ tokenCost: bigint;
250
+ }
251
+ | null>;
252
+ ```
253
+
254
+ Defined in: [V4/PaymasterClient.ts:352](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L352)
255
+
256
+ Get the fee for a specific transaction hash.
257
+ Fetches the receipt (no scanning required) and decodes the log.
258
+
259
+ ###### Parameters
260
+
261
+ | Parameter | Type |
262
+ | ------ | ------ |
263
+ | `publicClient` | `any` |
264
+ | `txHash` | `` `0x${string}` `` |
265
+ | `paymasterAddress` | `` `0x${string}` `` |
266
+
267
+ ###### Returns
268
+
269
+ `Promise`\<
270
+ \| \{
271
+ `actualGasCostWei`: `bigint`;
272
+ `tokenCost`: `bigint`;
273
+ \}
274
+ \| `null`\>
275
+
276
+ ##### submitGaslessUserOperation()
277
+
278
+ ```ts
279
+ static submitGaslessUserOperation(
280
+ client,
281
+ wallet,
282
+ aaAddress,
283
+ entryPoint,
284
+ paymasterAddress,
285
+ token,
286
+ bundlerUrl,
287
+ callData,
288
+ options?): Promise<`0x${string}`>;
289
+ ```
290
+
291
+ Defined in: [V4/PaymasterClient.ts:165](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterClient.ts#L165)
292
+
293
+ High-level API to submit a gasless UserOperation.
294
+ Automatically handles nonce fetching, gas estimation (if not provided), signing, and submission.
295
+
296
+ ###### Parameters
297
+
298
+ | Parameter | Type |
299
+ | ------ | ------ |
300
+ | `client` | `any` |
301
+ | `wallet` | `any` |
302
+ | `aaAddress` | `` `0x${string}` `` |
303
+ | `entryPoint` | `` `0x${string}` `` |
304
+ | `paymasterAddress` | `` `0x${string}` `` |
305
+ | `token` | `` `0x${string}` `` |
306
+ | `bundlerUrl` | `string` |
307
+ | `callData` | `` `0x${string}` `` |
308
+ | `options?` | \{ `autoEstimate?`: `boolean`; `callGasLimit?`: `bigint`; `factory?`: `` `0x${string}` ``; `factoryData?`: `` `0x${string}` ``; `maxFeePerGas?`: `bigint`; `maxPriorityFeePerGas?`: `bigint`; `operator?`: `` `0x${string}` ``; `paymasterPostOpGasLimit?`: `bigint`; `paymasterVerificationGasLimit?`: `bigint`; `preVerificationGas?`: `bigint`; `validityWindow?`: `number`; `verificationGasLimit?`: `bigint`; \} |
309
+ | `options.autoEstimate?` | `boolean` |
310
+ | `options.callGasLimit?` | `bigint` |
311
+ | `options.factory?` | `` `0x${string}` `` |
312
+ | `options.factoryData?` | `` `0x${string}` `` |
313
+ | `options.maxFeePerGas?` | `bigint` |
314
+ | `options.maxPriorityFeePerGas?` | `bigint` |
315
+ | `options.operator?` | `` `0x${string}` `` |
316
+ | `options.paymasterPostOpGasLimit?` | `bigint` |
317
+ | `options.paymasterVerificationGasLimit?` | `bigint` |
318
+ | `options.preVerificationGas?` | `bigint` |
319
+ | `options.validityWindow?` | `number` |
320
+ | `options.verificationGasLimit?` | `bigint` |
321
+
322
+ ###### Returns
323
+
324
+ `Promise`\<`` `0x${string}` ``\>
325
+
326
+ ***
327
+
328
+ ### PaymasterOperator
329
+
330
+ Defined in: [V4/PaymasterOperator.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L8)
331
+
332
+ PaymasterOperator
333
+ Focus: Deployment, Configuration, Maintenance, Keeper Bots.
334
+
335
+ #### Constructors
336
+
337
+ ##### Constructor
338
+
339
+ ```ts
340
+ new PaymasterOperator(): PaymasterOperator;
341
+ ```
342
+
343
+ ###### Returns
344
+
345
+ [`PaymasterOperator`](#paymasteroperator)
346
+
347
+ #### Methods
348
+
349
+ ##### addDeposit()
350
+
351
+ ```ts
352
+ static addDeposit(
353
+ wallet,
354
+ address,
355
+ amount): Promise<any>;
356
+ ```
357
+
358
+ Defined in: [V4/PaymasterOperator.ts:107](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L107)
359
+
360
+ ###### Parameters
361
+
362
+ | Parameter | Type |
363
+ | ------ | ------ |
364
+ | `wallet` | `any` |
365
+ | `address` | `` `0x${string}` `` |
366
+ | `amount` | `bigint` |
367
+
368
+ ###### Returns
369
+
370
+ `Promise`\<`any`\>
371
+
372
+ ##### addGasToken()
373
+
374
+ ```ts
375
+ static addGasToken(
376
+ wallet,
377
+ address,
378
+ token): Promise<any>;
379
+ ```
380
+
381
+ Defined in: [V4/PaymasterOperator.ts:117](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L117)
382
+
383
+ ###### Parameters
384
+
385
+ | Parameter | Type |
386
+ | ------ | ------ |
387
+ | `wallet` | `any` |
388
+ | `address` | `` `0x${string}` `` |
389
+ | `token` | `` `0x${string}` `` |
390
+
391
+ ###### Returns
392
+
393
+ `Promise`\<`any`\>
394
+
395
+ ##### addStake()
396
+
397
+ ```ts
398
+ static addStake(
399
+ wallet,
400
+ address,
401
+ amount,
402
+ unstakeDelaySec): Promise<any>;
403
+ ```
404
+
405
+ Defined in: [V4/PaymasterOperator.ts:96](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L96)
406
+
407
+ ###### Parameters
408
+
409
+ | Parameter | Type |
410
+ | ------ | ------ |
411
+ | `wallet` | `any` |
412
+ | `address` | `` `0x${string}` `` |
413
+ | `amount` | `bigint` |
414
+ | `unstakeDelaySec` | `number` |
415
+
416
+ ###### Returns
417
+
418
+ `Promise`\<`any`\>
419
+
420
+ ##### checkGaslessReadiness()
421
+
422
+ ```ts
423
+ static checkGaslessReadiness(
424
+ publicClient,
425
+ entryPoint,
426
+ paymasterAddress,
427
+ user,
428
+ token): Promise<GaslessReadinessReport>;
429
+ ```
430
+
431
+ Defined in: [V4/PaymasterOperator.ts:169](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L169)
432
+
433
+ ###### Parameters
434
+
435
+ | Parameter | Type |
436
+ | ------ | ------ |
437
+ | `publicClient` | `any` |
438
+ | `entryPoint` | `` `0x${string}` `` |
439
+ | `paymasterAddress` | `` `0x${string}` `` |
440
+ | `user` | `` `0x${string}` `` |
441
+ | `token` | `` `0x${string}` `` |
442
+
443
+ ###### Returns
444
+
445
+ `Promise`\<[`GaslessReadinessReport`](#gaslessreadinessreport)\>
446
+
447
+ ##### ensurePriceInitialized()
448
+
449
+ ```ts
450
+ static ensurePriceInitialized(
451
+ wallet,
452
+ publicClient,
453
+ address): Promise<boolean>;
454
+ ```
455
+
456
+ Defined in: [V4/PaymasterOperator.ts:87](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L87)
457
+
458
+ ###### Parameters
459
+
460
+ | Parameter | Type |
461
+ | ------ | ------ |
462
+ | `wallet` | `any` |
463
+ | `publicClient` | `any` |
464
+ | `address` | `` `0x${string}` `` |
465
+
466
+ ###### Returns
467
+
468
+ `Promise`\<`boolean`\>
469
+
470
+ ##### getCachedPrice()
471
+
472
+ ```ts
473
+ static getCachedPrice(publicClient, address): Promise<{
474
+ price: bigint;
475
+ updatedAt: bigint;
476
+ }>;
477
+ ```
478
+
479
+ Defined in: [V4/PaymasterOperator.ts:36](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L36)
480
+
481
+ ###### Parameters
482
+
483
+ | Parameter | Type |
484
+ | ------ | ------ |
485
+ | `publicClient` | `any` |
486
+ | `address` | `` `0x${string}` `` |
487
+
488
+ ###### Returns
489
+
490
+ `Promise`\<\{
491
+ `price`: `bigint`;
492
+ `updatedAt`: `bigint`;
493
+ \}\>
494
+
495
+ ##### getDepositedBalance()
496
+
497
+ ```ts
498
+ static getDepositedBalance(
499
+ publicClient,
500
+ address,
501
+ user,
502
+ token): Promise<bigint>;
503
+ ```
504
+
505
+ Defined in: [V4/PaymasterOperator.ts:69](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L69)
506
+
507
+ ###### Parameters
508
+
509
+ | Parameter | Type |
510
+ | ------ | ------ |
511
+ | `publicClient` | `any` |
512
+ | `address` | `` `0x${string}` `` |
513
+ | `user` | `` `0x${string}` `` |
514
+ | `token` | `` `0x${string}` `` |
515
+
516
+ ###### Returns
517
+
518
+ `Promise`\<`bigint`\>
519
+
520
+ ##### getTokenPrice()
521
+
522
+ ```ts
523
+ static getTokenPrice(
524
+ publicClient,
525
+ address,
526
+ token): Promise<bigint>;
527
+ ```
528
+
529
+ Defined in: [V4/PaymasterOperator.ts:54](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L54)
530
+
531
+ ###### Parameters
532
+
533
+ | Parameter | Type |
534
+ | ------ | ------ |
535
+ | `publicClient` | `any` |
536
+ | `address` | `` `0x${string}` `` |
537
+ | `token` | `` `0x${string}` `` |
538
+
539
+ ###### Returns
540
+
541
+ `Promise`\<`bigint`\>
542
+
543
+ ##### prepareGaslessEnvironment()
544
+
545
+ ```ts
546
+ static prepareGaslessEnvironment(
547
+ operatorWallet,
548
+ publicClient,
549
+ entryPoint,
550
+ paymasterAddress,
551
+ token,
552
+ options): Promise<object[]>;
553
+ ```
554
+
555
+ Defined in: [V4/PaymasterOperator.ts:229](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L229)
556
+
557
+ ###### Parameters
558
+
559
+ | Parameter | Type |
560
+ | ------ | ------ |
561
+ | `operatorWallet` | `any` |
562
+ | `publicClient` | `any` |
563
+ | `entryPoint` | `` `0x${string}` `` |
564
+ | `paymasterAddress` | `` `0x${string}` `` |
565
+ | `token` | `` `0x${string}` `` |
566
+ | `options` | \{ `minDeposit?`: `bigint`; `minStake?`: `bigint`; `tokenPriceUSD?`: `bigint`; \} |
567
+ | `options.minDeposit?` | `bigint` |
568
+ | `options.minStake?` | `bigint` |
569
+ | `options.tokenPriceUSD?` | `bigint` |
570
+
571
+ ###### Returns
572
+
573
+ `Promise`\<`object`[]\>
574
+
575
+ ##### removeGasToken()
576
+
577
+ ```ts
578
+ static removeGasToken(
579
+ wallet,
580
+ address,
581
+ token): Promise<any>;
582
+ ```
583
+
584
+ Defined in: [V4/PaymasterOperator.ts:127](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L127)
585
+
586
+ ###### Parameters
587
+
588
+ | Parameter | Type |
589
+ | ------ | ------ |
590
+ | `wallet` | `any` |
591
+ | `address` | `` `0x${string}` `` |
592
+ | `token` | `` `0x${string}` `` |
593
+
594
+ ###### Returns
595
+
596
+ `Promise`\<`any`\>
597
+
598
+ ##### setMaxGasCostCap()
599
+
600
+ ```ts
601
+ static setMaxGasCostCap(
602
+ wallet,
603
+ address,
604
+ cap): Promise<any>;
605
+ ```
606
+
607
+ Defined in: [V4/PaymasterOperator.ts:147](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L147)
608
+
609
+ ###### Parameters
610
+
611
+ | Parameter | Type |
612
+ | ------ | ------ |
613
+ | `wallet` | `any` |
614
+ | `address` | `` `0x${string}` `` |
615
+ | `cap` | `bigint` |
616
+
617
+ ###### Returns
618
+
619
+ `Promise`\<`any`\>
620
+
621
+ ##### setServiceFeeRate()
622
+
623
+ ```ts
624
+ static setServiceFeeRate(
625
+ wallet,
626
+ address,
627
+ rate): Promise<any>;
628
+ ```
629
+
630
+ Defined in: [V4/PaymasterOperator.ts:137](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L137)
631
+
632
+ ###### Parameters
633
+
634
+ | Parameter | Type |
635
+ | ------ | ------ |
636
+ | `wallet` | `any` |
637
+ | `address` | `` `0x${string}` `` |
638
+ | `rate` | `bigint` |
639
+
640
+ ###### Returns
641
+
642
+ `Promise`\<`any`\>
643
+
644
+ ##### setTokenPrice()
645
+
646
+ ```ts
647
+ static setTokenPrice(
648
+ wallet,
649
+ address,
650
+ token,
651
+ priceUSD): Promise<any>;
652
+ ```
653
+
654
+ Defined in: [V4/PaymasterOperator.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L26)
655
+
656
+ Set the token price (in 8 decimals, e.g., 1e8 = $1 USD).
657
+
658
+ ###### Parameters
659
+
660
+ | Parameter | Type |
661
+ | ------ | ------ |
662
+ | `wallet` | `any` |
663
+ | `address` | `` `0x${string}` `` |
664
+ | `token` | `` `0x${string}` `` |
665
+ | `priceUSD` | `bigint` |
666
+
667
+ ###### Returns
668
+
669
+ `Promise`\<`any`\>
670
+
671
+ ##### updatePrice()
672
+
673
+ ```ts
674
+ static updatePrice(wallet, address): Promise<any>;
675
+ ```
676
+
677
+ Defined in: [V4/PaymasterOperator.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L14)
678
+
679
+ Update the cached ETH/USD price from Chainlink Oracle.
680
+ Must be called if cachedPrice is 0 (uninitialized).
681
+
682
+ ###### Parameters
683
+
684
+ | Parameter | Type |
685
+ | ------ | ------ |
686
+ | `wallet` | `any` |
687
+ | `address` | `` `0x${string}` `` |
688
+
689
+ ###### Returns
690
+
691
+ `Promise`\<`any`\>
692
+
693
+ ##### withdrawPNT()
694
+
695
+ ```ts
696
+ static withdrawPNT(
697
+ wallet,
698
+ address,
699
+ to,
700
+ token,
701
+ amount): Promise<any>;
702
+ ```
703
+
704
+ Defined in: [V4/PaymasterOperator.ts:157](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterOperator.ts#L157)
705
+
706
+ ###### Parameters
707
+
708
+ | Parameter | Type |
709
+ | ------ | ------ |
710
+ | `wallet` | `any` |
711
+ | `address` | `` `0x${string}` `` |
712
+ | `to` | `` `0x${string}` `` |
713
+ | `token` | `` `0x${string}` `` |
714
+ | `amount` | `bigint` |
715
+
716
+ ###### Returns
717
+
718
+ `Promise`\<`any`\>
719
+
720
+ ***
721
+
722
+ ### SuperPaymasterAdminClient
723
+
724
+ Defined in: [SuperPaymaster/index.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L95)
725
+
726
+ Admin Client for SuperPaymaster V3
727
+
728
+ #### Constructors
729
+
730
+ ##### Constructor
731
+
732
+ ```ts
733
+ new SuperPaymasterAdminClient(client, paymasterAddress): SuperPaymasterAdminClient;
734
+ ```
735
+
736
+ Defined in: [SuperPaymaster/index.ts:99](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L99)
737
+
738
+ ###### Parameters
739
+
740
+ | Parameter | Type |
741
+ | ------ | ------ |
742
+ | `client` | `any` |
743
+ | `paymasterAddress` | `` `0x${string}` `` |
744
+
745
+ ###### Returns
746
+
747
+ [`SuperPaymasterAdminClient`](#superpaymasteradminclient)
748
+
749
+ #### Methods
750
+
751
+ ##### getOperator()
752
+
753
+ ```ts
754
+ getOperator(operator): Promise<any>;
755
+ ```
756
+
757
+ Defined in: [SuperPaymaster/index.ts:104](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L104)
758
+
759
+ ###### Parameters
760
+
761
+ | Parameter | Type |
762
+ | ------ | ------ |
763
+ | `operator` | `` `0x${string}` `` |
764
+
765
+ ###### Returns
766
+
767
+ `Promise`\<`any`\>
768
+
769
+ ##### configureOperator()
770
+
771
+ ```ts
772
+ static configureOperator(
773
+ wallet,
774
+ paymaster,
775
+ token,
776
+ treasury,
777
+ exchangeRate): Promise<any>;
778
+ ```
779
+
780
+ Defined in: [SuperPaymaster/index.ts:113](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L113)
781
+
782
+ ###### Parameters
783
+
784
+ | Parameter | Type |
785
+ | ------ | ------ |
786
+ | `wallet` | `any` |
787
+ | `paymaster` | `` `0x${string}` `` |
788
+ | `token` | `` `0x${string}` `` |
789
+ | `treasury` | `` `0x${string}` `` |
790
+ | `exchangeRate` | `bigint` |
791
+
792
+ ###### Returns
793
+
794
+ `Promise`\<`any`\>
795
+
796
+ ##### setAPNTsToken()
797
+
798
+ ```ts
799
+ static setAPNTsToken(
800
+ wallet,
801
+ paymaster,
802
+ token): Promise<any>;
803
+ ```
804
+
805
+ Defined in: [SuperPaymaster/index.ts:149](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L149)
806
+
807
+ ###### Parameters
808
+
809
+ | Parameter | Type |
810
+ | ------ | ------ |
811
+ | `wallet` | `any` |
812
+ | `paymaster` | `` `0x${string}` `` |
813
+ | `token` | `` `0x${string}` `` |
814
+
815
+ ###### Returns
816
+
817
+ `Promise`\<`any`\>
818
+
819
+ ##### setOperatorPaused()
820
+
821
+ ```ts
822
+ static setOperatorPaused(
823
+ wallet,
824
+ paymaster,
825
+ operator,
826
+ paused): Promise<any>;
827
+ ```
828
+
829
+ Defined in: [SuperPaymaster/index.ts:129](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L129)
830
+
831
+ ###### Parameters
832
+
833
+ | Parameter | Type |
834
+ | ------ | ------ |
835
+ | `wallet` | `any` |
836
+ | `paymaster` | `` `0x${string}` `` |
837
+ | `operator` | `` `0x${string}` `` |
838
+ | `paused` | `boolean` |
839
+
840
+ ###### Returns
841
+
842
+ `Promise`\<`any`\>
843
+
844
+ ##### setXPNTsFactory()
845
+
846
+ ```ts
847
+ static setXPNTsFactory(
848
+ wallet,
849
+ paymaster,
850
+ factory): Promise<any>;
851
+ ```
852
+
853
+ Defined in: [SuperPaymaster/index.ts:159](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L159)
854
+
855
+ ###### Parameters
856
+
857
+ | Parameter | Type |
858
+ | ------ | ------ |
859
+ | `wallet` | `any` |
860
+ | `paymaster` | `` `0x${string}` `` |
861
+ | `factory` | `` `0x${string}` `` |
862
+
863
+ ###### Returns
864
+
865
+ `Promise`\<`any`\>
866
+
867
+ ##### updateReputation()
868
+
869
+ ```ts
870
+ static updateReputation(
871
+ wallet,
872
+ paymaster,
873
+ operator,
874
+ score): Promise<any>;
875
+ ```
876
+
877
+ Defined in: [SuperPaymaster/index.ts:139](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L139)
878
+
879
+ ###### Parameters
880
+
881
+ | Parameter | Type |
882
+ | ------ | ------ |
883
+ | `wallet` | `any` |
884
+ | `paymaster` | `` `0x${string}` `` |
885
+ | `operator` | `` `0x${string}` `` |
886
+ | `score` | `bigint` |
887
+
888
+ ###### Returns
889
+
890
+ `Promise`\<`any`\>
891
+
892
+ ***
893
+
894
+ ### SuperPaymasterClient
895
+
896
+ Defined in: [V4/SuperPaymasterClient.ts:20](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L20)
897
+
898
+ SuperPaymasterClient
899
+ High-level API for SuperPaymaster operations, including dynamic gas estimation.
900
+
901
+ #### Constructors
902
+
903
+ ##### Constructor
904
+
905
+ ```ts
906
+ new SuperPaymasterClient(): SuperPaymasterClient;
907
+ ```
908
+
909
+ ###### Returns
910
+
911
+ [`SuperPaymasterClient`](#superpaymasterclient)
912
+
913
+ #### Methods
914
+
915
+ ##### submitGaslessTransaction()
916
+
917
+ ```ts
918
+ static submitGaslessTransaction(
919
+ client,
920
+ wallet,
921
+ aaAddress,
922
+ entryPoint,
923
+ bundlerUrl,
924
+ config): Promise<`0x${string}`>;
925
+ ```
926
+
927
+ Defined in: [V4/SuperPaymasterClient.ts:26](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L26)
928
+
929
+ Submit a gasless transaction using SuperPaymaster.
930
+ Automatically handles gas estimation with a smart efficiency buffer.
931
+
932
+ ###### Parameters
933
+
934
+ | Parameter | Type |
935
+ | ------ | ------ |
936
+ | `client` | `any` |
937
+ | `wallet` | `any` |
938
+ | `aaAddress` | `` `0x${string}` `` |
939
+ | `entryPoint` | `` `0x${string}` `` |
940
+ | `bundlerUrl` | `string` |
941
+ | `config` | [`GaslessTransactionConfig`](#gaslesstransactionconfig) |
942
+
943
+ ###### Returns
944
+
945
+ `Promise`\<`` `0x${string}` ``\>
946
+
947
+ ## Type Aliases
948
+
949
+ ### GaslessReadinessReport
950
+
951
+ ```ts
952
+ type GaslessReadinessReport = object;
953
+ ```
954
+
955
+ Defined in: [V4/PaymasterUtils.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L11)
956
+
957
+ #### Properties
958
+
959
+ ##### details
960
+
961
+ ```ts
962
+ details: object;
963
+ ```
964
+
965
+ Defined in: [V4/PaymasterUtils.ts:14](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L14)
966
+
967
+ ###### ethUsdPrice
968
+
969
+ ```ts
970
+ ethUsdPrice: bigint;
971
+ ```
972
+
973
+ ###### paymasterDeposit
974
+
975
+ ```ts
976
+ paymasterDeposit: bigint;
977
+ ```
978
+
979
+ ###### paymasterStake
980
+
981
+ ```ts
982
+ paymasterStake: bigint;
983
+ ```
984
+
985
+ ###### tokenPrice
986
+
987
+ ```ts
988
+ tokenPrice: bigint;
989
+ ```
990
+
991
+ ###### tokenSupported
992
+
993
+ ```ts
994
+ tokenSupported: boolean;
995
+ ```
996
+
997
+ ###### userPaymasterDeposit
998
+
999
+ ```ts
1000
+ userPaymasterDeposit: bigint;
1001
+ ```
1002
+
1003
+ ###### userTokenBalance
1004
+
1005
+ ```ts
1006
+ userTokenBalance: bigint;
1007
+ ```
1008
+
1009
+ ##### isReady
1010
+
1011
+ ```ts
1012
+ isReady: boolean;
1013
+ ```
1014
+
1015
+ Defined in: [V4/PaymasterUtils.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L12)
1016
+
1017
+ ##### issues
1018
+
1019
+ ```ts
1020
+ issues: string[];
1021
+ ```
1022
+
1023
+ Defined in: [V4/PaymasterUtils.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L13)
1024
+
1025
+ ***
1026
+
1027
+ ### GaslessTransactionConfig
1028
+
1029
+ ```ts
1030
+ type GaslessTransactionConfig = object;
1031
+ ```
1032
+
1033
+ Defined in: [V4/SuperPaymasterClient.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L6)
1034
+
1035
+ #### Properties
1036
+
1037
+ ##### amount
1038
+
1039
+ ```ts
1040
+ amount: bigint;
1041
+ ```
1042
+
1043
+ Defined in: [V4/SuperPaymasterClient.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L9)
1044
+
1045
+ ##### factory?
1046
+
1047
+ ```ts
1048
+ optional factory: Address;
1049
+ ```
1050
+
1051
+ Defined in: [V4/SuperPaymasterClient.ts:12](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L12)
1052
+
1053
+ ##### factoryData?
1054
+
1055
+ ```ts
1056
+ optional factoryData: Hex;
1057
+ ```
1058
+
1059
+ Defined in: [V4/SuperPaymasterClient.ts:13](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L13)
1060
+
1061
+ ##### operator
1062
+
1063
+ ```ts
1064
+ operator: Address;
1065
+ ```
1066
+
1067
+ Defined in: [V4/SuperPaymasterClient.ts:10](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L10)
1068
+
1069
+ ##### paymasterAddress
1070
+
1071
+ ```ts
1072
+ paymasterAddress: Address;
1073
+ ```
1074
+
1075
+ Defined in: [V4/SuperPaymasterClient.ts:11](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L11)
1076
+
1077
+ ##### recipient
1078
+
1079
+ ```ts
1080
+ recipient: Address;
1081
+ ```
1082
+
1083
+ Defined in: [V4/SuperPaymasterClient.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L8)
1084
+
1085
+ ##### token
1086
+
1087
+ ```ts
1088
+ token: Address;
1089
+ ```
1090
+
1091
+ Defined in: [V4/SuperPaymasterClient.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/SuperPaymasterClient.ts#L7)
1092
+
1093
+ ***
1094
+
1095
+ ### PaymasterConfig
1096
+
1097
+ ```ts
1098
+ type PaymasterConfig = object;
1099
+ ```
1100
+
1101
+ Defined in: [SuperPaymaster/index.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L4)
1102
+
1103
+ #### Properties
1104
+
1105
+ ##### maxRate?
1106
+
1107
+ ```ts
1108
+ optional maxRate: bigint;
1109
+ ```
1110
+
1111
+ Defined in: [SuperPaymaster/index.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L7)
1112
+
1113
+ ##### operator
1114
+
1115
+ ```ts
1116
+ operator: Address;
1117
+ ```
1118
+
1119
+ Defined in: [SuperPaymaster/index.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L6)
1120
+
1121
+ ##### paymasterAddress
1122
+
1123
+ ```ts
1124
+ paymasterAddress: Address;
1125
+ ```
1126
+
1127
+ Defined in: [SuperPaymaster/index.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L5)
1128
+
1129
+ ##### postOpGasLimit?
1130
+
1131
+ ```ts
1132
+ optional postOpGasLimit: bigint;
1133
+ ```
1134
+
1135
+ Defined in: [SuperPaymaster/index.ts:9](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L9)
1136
+
1137
+ ##### verificationGasLimit?
1138
+
1139
+ ```ts
1140
+ optional verificationGasLimit: bigint;
1141
+ ```
1142
+
1143
+ Defined in: [SuperPaymaster/index.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L8)
1144
+
1145
+ ***
1146
+
1147
+ ### PaymasterV4MiddlewareConfig
1148
+
1149
+ ```ts
1150
+ type PaymasterV4MiddlewareConfig = object;
1151
+ ```
1152
+
1153
+ Defined in: [V4/PaymasterUtils.ts:4](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L4)
1154
+
1155
+ #### Properties
1156
+
1157
+ ##### gasToken
1158
+
1159
+ ```ts
1160
+ gasToken: Address;
1161
+ ```
1162
+
1163
+ Defined in: [V4/PaymasterUtils.ts:6](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L6)
1164
+
1165
+ ##### paymasterAddress
1166
+
1167
+ ```ts
1168
+ paymasterAddress: Address;
1169
+ ```
1170
+
1171
+ Defined in: [V4/PaymasterUtils.ts:5](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L5)
1172
+
1173
+ ##### postOpGasLimit?
1174
+
1175
+ ```ts
1176
+ optional postOpGasLimit: bigint;
1177
+ ```
1178
+
1179
+ Defined in: [V4/PaymasterUtils.ts:8](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L8)
1180
+
1181
+ ##### verificationGasLimit?
1182
+
1183
+ ```ts
1184
+ optional verificationGasLimit: bigint;
1185
+ ```
1186
+
1187
+ Defined in: [V4/PaymasterUtils.ts:7](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L7)
1188
+
1189
+ ## Functions
1190
+
1191
+ ### buildPaymasterData()
1192
+
1193
+ ```ts
1194
+ function buildPaymasterData(
1195
+ paymasterAddress,
1196
+ token,
1197
+ options?): `0x${string}`;
1198
+ ```
1199
+
1200
+ Defined in: [V4/PaymasterUtils.ts:59](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L59)
1201
+
1202
+ Build paymasterAndData for gasless UserOperation.
1203
+ Layout: [Paymaster(20)] [VerificationGasLimit(16)] [PostOpGasLimit(16)] [Token(20)] [ValidUntil(6)] [ValidAfter(6)]
1204
+
1205
+ #### Parameters
1206
+
1207
+ | Parameter | Type |
1208
+ | ------ | ------ |
1209
+ | `paymasterAddress` | `` `0x${string}` `` |
1210
+ | `token` | `` `0x${string}` `` |
1211
+ | `options?` | \{ `postOpGasLimit?`: `bigint`; `validityWindow?`: `number`; `verificationGasLimit?`: `bigint`; \} |
1212
+ | `options.postOpGasLimit?` | `bigint` |
1213
+ | `options.validityWindow?` | `number` |
1214
+ | `options.verificationGasLimit?` | `bigint` |
1215
+
1216
+ #### Returns
1217
+
1218
+ `` `0x${string}` ``
1219
+
1220
+ ***
1221
+
1222
+ ### buildSuperPaymasterData()
1223
+
1224
+ ```ts
1225
+ function buildSuperPaymasterData(
1226
+ paymasterAddress,
1227
+ operator,
1228
+ options?): `0x${string}`;
1229
+ ```
1230
+
1231
+ Defined in: [V4/PaymasterUtils.ts:95](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L95)
1232
+
1233
+ Build paymasterAndData for SuperPaymaster V3.
1234
+ Layout: [Paymaster(20)] [verGas(16)] [postGas(16)] [operator(20)] [maxRate(32)]
1235
+
1236
+ #### Parameters
1237
+
1238
+ | Parameter | Type |
1239
+ | ------ | ------ |
1240
+ | `paymasterAddress` | `` `0x${string}` `` |
1241
+ | `operator` | `` `0x${string}` `` |
1242
+ | `options?` | \{ `postOpGasLimit?`: `bigint`; `verificationGasLimit?`: `bigint`; \} |
1243
+ | `options.postOpGasLimit?` | `bigint` |
1244
+ | `options.verificationGasLimit?` | `bigint` |
1245
+
1246
+ #### Returns
1247
+
1248
+ `` `0x${string}` ``
1249
+
1250
+ ***
1251
+
1252
+ ### checkEligibility()
1253
+
1254
+ ```ts
1255
+ function checkEligibility(
1256
+ client,
1257
+ paymaster,
1258
+ user,
1259
+ operator): Promise<{
1260
+ credit?: bigint;
1261
+ eligible: boolean;
1262
+ token?: `0x${string}`;
1263
+ }>;
1264
+ ```
1265
+
1266
+ Defined in: [SuperPaymaster/index.ts:49](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L49)
1267
+
1268
+ Enhanced eligibility check for SuperPaymaster V3.
1269
+ Validates that user has sufficient credit with the given operator.
1270
+
1271
+ #### Parameters
1272
+
1273
+ | Parameter | Type |
1274
+ | ------ | ------ |
1275
+ | `client` | `any` |
1276
+ | `paymaster` | `` `0x${string}` `` |
1277
+ | `user` | `` `0x${string}` `` |
1278
+ | `operator` | `` `0x${string}` `` |
1279
+
1280
+ #### Returns
1281
+
1282
+ `Promise`\<\{
1283
+ `credit?`: `bigint`;
1284
+ `eligible`: `boolean`;
1285
+ `token?`: `` `0x${string}` ``;
1286
+ \}\>
1287
+
1288
+ ***
1289
+
1290
+ ### formatUserOpV07()
1291
+
1292
+ ```ts
1293
+ function formatUserOpV07(userOp): any;
1294
+ ```
1295
+
1296
+ Defined in: [V4/PaymasterUtils.ts:123](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L123)
1297
+
1298
+ Helper to format UserOp for Alchemy/Standard Bundlers (v0.7 Decomposed)
1299
+
1300
+ #### Parameters
1301
+
1302
+ | Parameter | Type |
1303
+ | ------ | ------ |
1304
+ | `userOp` | `any` |
1305
+
1306
+ #### Returns
1307
+
1308
+ `any`
1309
+
1310
+ ***
1311
+
1312
+ ### getPaymasterV4Middleware()
1313
+
1314
+ ```ts
1315
+ function getPaymasterV4Middleware(config): object;
1316
+ ```
1317
+
1318
+ Defined in: [V4/PaymasterUtils.ts:32](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L32)
1319
+
1320
+ Constructs the middleware for Paymaster V4.
1321
+ Returns the `paymasterAndData` hex string.
1322
+
1323
+ #### Parameters
1324
+
1325
+ | Parameter | Type |
1326
+ | ------ | ------ |
1327
+ | `config` | [`PaymasterV4MiddlewareConfig`](#paymasterv4middlewareconfig) |
1328
+
1329
+ #### Returns
1330
+
1331
+ `object`
1332
+
1333
+ | Name | Type | Defined in |
1334
+ | ------ | ------ | ------ |
1335
+ | `sponsorUserOperation()` | (`args`) => `Promise`\<\{ `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `any`; `verificationGasLimit`: `bigint`; \}\> | [V4/PaymasterUtils.ts:34](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L34) |
1336
+
1337
+ ***
1338
+
1339
+ ### getSuperPaymasterMiddleware()
1340
+
1341
+ ```ts
1342
+ function getSuperPaymasterMiddleware(config): object;
1343
+ ```
1344
+
1345
+ Defined in: [SuperPaymaster/index.ts:19](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L19)
1346
+
1347
+ Constructs the middleware for SuperPaymaster.
1348
+ Returns the `paymasterAndData` hex string.
1349
+
1350
+ #### Parameters
1351
+
1352
+ | Parameter | Type |
1353
+ | ------ | ------ |
1354
+ | `config` | [`PaymasterConfig`](#paymasterconfig) |
1355
+
1356
+ #### Returns
1357
+
1358
+ `object`
1359
+
1360
+ | Name | Type | Defined in |
1361
+ | ------ | ------ | ------ |
1362
+ | `sponsorUserOperation()` | (`args`) => `Promise`\<\{ `paymasterAndData`: `` `0x${string}` ``; `preVerificationGas`: `any`; `verificationGasLimit`: `bigint`; \}\> | [SuperPaymaster/index.ts:21](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/SuperPaymaster/index.ts#L21) |
1363
+
1364
+ ***
1365
+
1366
+ ### getUserOpHashV07()
1367
+
1368
+ ```ts
1369
+ function getUserOpHashV07(
1370
+ userOp,
1371
+ entryPoint,
1372
+ chainId): `0x${string}`;
1373
+ ```
1374
+
1375
+ Defined in: [V4/PaymasterUtils.ts:167](https://github.com/AAStarCommunity/aastar-sdk/blob/9355f214d4f7ac03755d574206ded22f6097f351/packages/paymaster/src/V4/PaymasterUtils.ts#L167)
1376
+
1377
+ #### Parameters
1378
+
1379
+ | Parameter | Type |
1380
+ | ------ | ------ |
1381
+ | `userOp` | `any` |
1382
+ | `entryPoint` | `` `0x${string}` `` |
1383
+ | `chainId` | `bigint` |
1384
+
1385
+ #### Returns
1386
+
1387
+ `` `0x${string}` ``