@aastar/core 0.16.7

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 (136) hide show
  1. package/LICENSE +21 -0
  2. package/dist/abis/BLSAggregator.json +686 -0
  3. package/dist/abis/BLSValidator.json +42 -0
  4. package/dist/abis/DVTValidator.json +368 -0
  5. package/dist/abis/Eip7702Support.json +24 -0
  6. package/dist/abis/EntryPoint.json +1382 -0
  7. package/dist/abis/GToken.json +513 -0
  8. package/dist/abis/GTokenStaking.json +949 -0
  9. package/dist/abis/LegacyAccount.json +625 -0
  10. package/dist/abis/MySBT.json +1518 -0
  11. package/dist/abis/Paymaster.json +1143 -0
  12. package/dist/abis/PaymasterFactory.json +640 -0
  13. package/dist/abis/Registry.json +1942 -0
  14. package/dist/abis/ReputationSystem.json +699 -0
  15. package/dist/abis/SenderCreator.json +99 -0
  16. package/dist/abis/Simple7702Account.json +395 -0
  17. package/dist/abis/SimpleAccount.json +560 -0
  18. package/dist/abis/SimpleAccountFactory.json +111 -0
  19. package/dist/abis/SimpleAccountFactoryV08.json +87 -0
  20. package/dist/abis/SimpleAccountV08.json +557 -0
  21. package/dist/abis/SuperPaymaster.json +1781 -0
  22. package/dist/abis/UserOperationLib.json +57 -0
  23. package/dist/abis/abi.config.json +24 -0
  24. package/dist/abis/index.d.ts +1126 -0
  25. package/dist/abis/index.js +91 -0
  26. package/dist/abis/xPNTsFactory.json +718 -0
  27. package/dist/abis/xPNTsToken.json +1280 -0
  28. package/dist/actions/StateValidator.d.ts +68 -0
  29. package/dist/actions/StateValidator.js +187 -0
  30. package/dist/actions/StateValidator.test.d.ts +1 -0
  31. package/dist/actions/StateValidator.test.js +144 -0
  32. package/dist/actions/account.d.ts +55 -0
  33. package/dist/actions/account.js +133 -0
  34. package/dist/actions/account.test.d.ts +1 -0
  35. package/dist/actions/account.test.js +118 -0
  36. package/dist/actions/aggregator.d.ts +17 -0
  37. package/dist/actions/aggregator.js +31 -0
  38. package/dist/actions/aggregator.test.d.ts +1 -0
  39. package/dist/actions/aggregator.test.js +67 -0
  40. package/dist/actions/dvt.d.ts +30 -0
  41. package/dist/actions/dvt.js +41 -0
  42. package/dist/actions/dvt.test.d.ts +1 -0
  43. package/dist/actions/dvt.test.js +98 -0
  44. package/dist/actions/entryPoint.d.ts +90 -0
  45. package/dist/actions/entryPoint.js +211 -0
  46. package/dist/actions/entryPoint.test.d.ts +1 -0
  47. package/dist/actions/entryPoint.test.js +139 -0
  48. package/dist/actions/factory.d.ts +215 -0
  49. package/dist/actions/factory.js +442 -0
  50. package/dist/actions/factory.test.d.ts +1 -0
  51. package/dist/actions/factory.test.js +197 -0
  52. package/dist/actions/faucet.d.ts +48 -0
  53. package/dist/actions/faucet.js +337 -0
  54. package/dist/actions/faucet.test.d.ts +1 -0
  55. package/dist/actions/faucet.test.js +120 -0
  56. package/dist/actions/gtokenExtended.d.ts +39 -0
  57. package/dist/actions/gtokenExtended.js +115 -0
  58. package/dist/actions/gtokenExtended.test.d.ts +1 -0
  59. package/dist/actions/gtokenExtended.test.js +118 -0
  60. package/dist/actions/index.d.ts +15 -0
  61. package/dist/actions/index.js +17 -0
  62. package/dist/actions/paymasterV4.d.ts +170 -0
  63. package/dist/actions/paymasterV4.js +334 -0
  64. package/dist/actions/paymasterV4.test.d.ts +1 -0
  65. package/dist/actions/paymasterV4.test.js +159 -0
  66. package/dist/actions/registry.d.ts +246 -0
  67. package/dist/actions/registry.js +667 -0
  68. package/dist/actions/registry.test.d.ts +1 -0
  69. package/dist/actions/registry.test.js +360 -0
  70. package/dist/actions/reputation.d.ts +129 -0
  71. package/dist/actions/reputation.js +281 -0
  72. package/dist/actions/reputation.test.d.ts +1 -0
  73. package/dist/actions/reputation.test.js +169 -0
  74. package/dist/actions/sbt.d.ts +191 -0
  75. package/dist/actions/sbt.js +533 -0
  76. package/dist/actions/sbt.test.d.ts +1 -0
  77. package/dist/actions/sbt.test.js +256 -0
  78. package/dist/actions/staking.d.ts +132 -0
  79. package/dist/actions/staking.js +330 -0
  80. package/dist/actions/staking.test.d.ts +1 -0
  81. package/dist/actions/staking.test.js +223 -0
  82. package/dist/actions/superPaymaster.d.ts +237 -0
  83. package/dist/actions/superPaymaster.js +644 -0
  84. package/dist/actions/superPaymaster.test.d.ts +1 -0
  85. package/dist/actions/superPaymaster.test.js +287 -0
  86. package/dist/actions/tokens.d.ts +229 -0
  87. package/dist/actions/tokens.js +415 -0
  88. package/dist/actions/tokens.test.d.ts +1 -0
  89. package/dist/actions/tokens.test.js +53 -0
  90. package/dist/actions/validators.d.ts +194 -0
  91. package/dist/actions/validators.js +433 -0
  92. package/dist/actions/validators.test.d.ts +1 -0
  93. package/dist/actions/validators.test.js +215 -0
  94. package/dist/branding.d.ts +30 -0
  95. package/dist/branding.js +30 -0
  96. package/dist/clients/BaseClient.d.ts +25 -0
  97. package/dist/clients/BaseClient.js +66 -0
  98. package/dist/clients/types.d.ts +60 -0
  99. package/dist/clients/types.js +1 -0
  100. package/dist/clients.d.ts +5 -0
  101. package/dist/clients.js +11 -0
  102. package/dist/communities.d.ts +52 -0
  103. package/dist/communities.js +73 -0
  104. package/dist/config/ContractConfigManager.d.ts +20 -0
  105. package/dist/config/ContractConfigManager.js +48 -0
  106. package/dist/constants.d.ts +88 -0
  107. package/dist/constants.js +125 -0
  108. package/dist/contract-addresses.d.ts +110 -0
  109. package/dist/contract-addresses.js +99 -0
  110. package/dist/contracts.d.ts +424 -0
  111. package/dist/contracts.js +343 -0
  112. package/dist/contracts.test.d.ts +1 -0
  113. package/dist/contracts.test.js +40 -0
  114. package/dist/crypto/blsSigner.d.ts +64 -0
  115. package/dist/crypto/blsSigner.js +98 -0
  116. package/dist/crypto/index.d.ts +1 -0
  117. package/dist/crypto/index.js +1 -0
  118. package/dist/index.d.ts +21 -0
  119. package/dist/index.js +21 -0
  120. package/dist/networks.d.ts +127 -0
  121. package/dist/networks.js +118 -0
  122. package/dist/requirementChecker.d.ts +38 -0
  123. package/dist/requirementChecker.js +139 -0
  124. package/dist/requirementChecker.test.d.ts +1 -0
  125. package/dist/requirementChecker.test.js +60 -0
  126. package/dist/roles.d.ts +204 -0
  127. package/dist/roles.js +211 -0
  128. package/dist/roles.test.d.ts +1 -0
  129. package/dist/roles.test.js +23 -0
  130. package/dist/utils/validation.d.ts +24 -0
  131. package/dist/utils/validation.js +56 -0
  132. package/dist/utils/validation.test.d.ts +1 -0
  133. package/dist/utils/validation.test.js +40 -0
  134. package/dist/utils.d.ts +12 -0
  135. package/dist/utils.js +14 -0
  136. package/package.json +33 -0
@@ -0,0 +1,237 @@
1
+ import { type Address, type PublicClient, type WalletClient, type Hex, type Hash, type Account } from 'viem';
2
+ export type SuperPaymasterActions = {
3
+ superPaymasterDeposit: (args: {
4
+ amount: bigint;
5
+ account?: Account | Address;
6
+ }) => Promise<Hash>;
7
+ /** @deprecated Use superPaymasterDeposit for clarity */
8
+ superPaymasterDepositAPNTs: (args: {
9
+ amount: bigint;
10
+ account?: Account | Address;
11
+ }) => Promise<Hash>;
12
+ superPaymasterDepositETH: (args: {
13
+ value: bigint;
14
+ account?: Account | Address;
15
+ }) => Promise<Hash>;
16
+ superPaymasterDepositFor: (args: {
17
+ operator: Address;
18
+ amount: bigint;
19
+ account?: Account | Address;
20
+ }) => Promise<Hash>;
21
+ superPaymasterWithdrawTo: (args: {
22
+ to: Address;
23
+ amount: bigint;
24
+ account?: Account | Address;
25
+ }) => Promise<Hash>;
26
+ superPaymasterAddSuperStake: (args: {
27
+ amount: bigint;
28
+ account?: Account | Address;
29
+ }) => Promise<Hash>;
30
+ superPaymasterUnlockSuperStake: (args: {
31
+ account?: Account | Address;
32
+ }) => Promise<Hash>;
33
+ superPaymasterWithdrawStake: (args: {
34
+ to: Address;
35
+ account?: Account | Address;
36
+ }) => Promise<Hash>;
37
+ superPaymasterConfigureOperator: (args: {
38
+ xPNTsToken: Address;
39
+ treasury: Address;
40
+ exchangeRate: bigint;
41
+ account?: Account | Address;
42
+ }) => Promise<Hash>;
43
+ superPaymasterSetOperatorPaused: (args: {
44
+ operator: Address;
45
+ paused: boolean;
46
+ account?: Account | Address;
47
+ }) => Promise<Hash>;
48
+ superPaymasterSetOperatorLimits: (args: {
49
+ operator: Address;
50
+ limits: any;
51
+ account?: Account | Address;
52
+ }) => Promise<Hash>;
53
+ superPaymasterUpdateReputation: (args: {
54
+ operator: Address;
55
+ newReputation: bigint;
56
+ account?: Account | Address;
57
+ }) => Promise<Hash>;
58
+ superPaymasterExecuteSlashWithBLS: (args: {
59
+ operator: Address;
60
+ roleId: Hex;
61
+ amount: bigint;
62
+ reason: string;
63
+ blsSignature: Hex;
64
+ account?: Account | Address;
65
+ }) => Promise<Hash>;
66
+ superPaymasterSlashOperator: (args: {
67
+ operator: Address;
68
+ amount: bigint;
69
+ reason: string;
70
+ account?: Account | Address;
71
+ }) => Promise<Hash>;
72
+ superPaymasterSetAPNTsPrice: (args: {
73
+ priceUSD: bigint;
74
+ account?: Account | Address;
75
+ }) => Promise<Hash>;
76
+ superPaymasterSetCachedPrice: (args: {
77
+ price: bigint;
78
+ account?: Account | Address;
79
+ }) => Promise<Hash>;
80
+ superPaymasterSetProtocolFee: (args: {
81
+ feeRecipient: Address;
82
+ feeBps: bigint;
83
+ account?: Account | Address;
84
+ }) => Promise<Hash>;
85
+ superPaymasterBlockUser: (args: {
86
+ user: Address;
87
+ blocked: boolean;
88
+ account?: Account | Address;
89
+ }) => Promise<Hash>;
90
+ superPaymasterUpdateBlockedStatus: (args: {
91
+ user: Address;
92
+ blocked: boolean;
93
+ account?: Account | Address;
94
+ }) => Promise<Hash>;
95
+ superPaymasterValidatePaymasterUserOp: (args: {
96
+ userOp: any;
97
+ userOpHash: Hex;
98
+ maxCost: bigint;
99
+ }) => Promise<any>;
100
+ superPaymasterPostOp: (args: {
101
+ mode: number;
102
+ context: Hex;
103
+ actualGasCost: bigint;
104
+ actualUserOpFeePerGas: bigint;
105
+ }) => Promise<void>;
106
+ superPaymasterOperators: (args: {
107
+ operator: Address;
108
+ }) => Promise<any>;
109
+ superPaymasterGetDeposit: () => Promise<bigint>;
110
+ superPaymasterGetAvailableCredit: (args: {
111
+ operator: Address;
112
+ user: Address;
113
+ }) => Promise<bigint>;
114
+ superPaymasterBlockedUsers: (args: {
115
+ user: Address;
116
+ }) => Promise<boolean>;
117
+ superPaymasterBalanceOfOperator: (args: {
118
+ operator: Address;
119
+ }) => Promise<bigint>;
120
+ superPaymasterAPNTsPriceUSD: () => Promise<bigint>;
121
+ superPaymasterCachedPrice: () => Promise<any>;
122
+ superPaymasterProtocolFee: () => Promise<any>;
123
+ superPaymasterProtocolFeeBPS: () => Promise<bigint>;
124
+ superPaymasterProtocolRevenue: () => Promise<bigint>;
125
+ superPaymasterTreasury: () => Promise<Address>;
126
+ superPaymasterXpntsFactory: () => Promise<Address>;
127
+ superPaymasterEntryPoint: () => Promise<Address>;
128
+ superPaymasterTotalTrackedBalance: () => Promise<bigint>;
129
+ superPaymasterLastUserOpTimestamp: (args: {
130
+ user: Address;
131
+ }) => Promise<bigint>;
132
+ superPaymasterGetSlashHistory: (args: {
133
+ operator: Address;
134
+ }) => Promise<any[]>;
135
+ superPaymasterGetSlashCount: (args: {
136
+ operator: Address;
137
+ }) => Promise<bigint>;
138
+ superPaymasterGetLatestSlash: (args: {
139
+ operator: Address;
140
+ }) => Promise<any>;
141
+ superPaymasterSlashHistory: (args: {
142
+ operator: Address;
143
+ index: bigint;
144
+ }) => Promise<any>;
145
+ superPaymasterUpdatePrice: (args: {
146
+ account?: Account | Address;
147
+ }) => Promise<Hash>;
148
+ superPaymasterUpdatePriceDVT: (args: {
149
+ price: bigint;
150
+ proof: Hex;
151
+ account?: Account | Address;
152
+ }) => Promise<Hash>;
153
+ superPaymasterSetTreasury: (args: {
154
+ treasury: Address;
155
+ account?: Account | Address;
156
+ }) => Promise<Hash>;
157
+ superPaymasterWithdrawProtocolRevenue: (args: {
158
+ to: Address;
159
+ account?: Account | Address;
160
+ }) => Promise<Hash>;
161
+ superPaymasterSetXPNTsFactory: (args: {
162
+ factory: Address;
163
+ account?: Account | Address;
164
+ }) => Promise<Hash>;
165
+ superPaymasterSetAPNTsToken: (args: {
166
+ token: Address;
167
+ account?: Account | Address;
168
+ }) => Promise<Hash>;
169
+ superPaymasterSetBLSAggregator: (args: {
170
+ aggregator: Address;
171
+ account?: Account | Address;
172
+ }) => Promise<Hash>;
173
+ superPaymasterOnTransferReceived: (args: {
174
+ from: Address;
175
+ amount: bigint;
176
+ data: Hex;
177
+ }) => Promise<any>;
178
+ superPaymasterWithdrawAPNTs: (args: {
179
+ amount: bigint;
180
+ account?: Account | Address;
181
+ }) => Promise<Hash>;
182
+ superPaymasterAPNTS_TOKEN: () => Promise<Address>;
183
+ superPaymasterREGISTRY: () => Promise<Address>;
184
+ superPaymasterBLS_AGGREGATOR: () => Promise<Address>;
185
+ superPaymasterETH_USD_PRICE_FEED: () => Promise<Address>;
186
+ superPaymasterPAYMASTER_DATA_OFFSET: () => Promise<bigint>;
187
+ superPaymasterRATE_OFFSET: () => Promise<bigint>;
188
+ superPaymasterBPS_DENOMINATOR: () => Promise<bigint>;
189
+ superPaymasterPRICE_CACHE_DURATION: () => Promise<bigint>;
190
+ superPaymasterPRICE_STALENESS_THRESHOLD: () => Promise<bigint>;
191
+ superPaymasterMAX_ETH_USD_PRICE: () => Promise<bigint>;
192
+ superPaymasterMIN_ETH_USD_PRICE: () => Promise<bigint>;
193
+ transferSuperPaymasterOwnership: (args: {
194
+ newOwner: Address;
195
+ account?: Account | Address;
196
+ }) => Promise<Hash>;
197
+ superPaymasterOwner: () => Promise<Address>;
198
+ renounceSuperPaymasterOwnership: (args: {
199
+ account?: Account | Address;
200
+ }) => Promise<Hash>;
201
+ superPaymasterAddStake: (args: {
202
+ amount: bigint;
203
+ account?: Account | Address;
204
+ }) => Promise<Hash>;
205
+ superPaymasterDepositForAlias: (args: {
206
+ operator: Address;
207
+ amount: bigint;
208
+ account?: Account | Address;
209
+ }) => Promise<Hash>;
210
+ superPaymasterUnlockStake: (args: {
211
+ account?: Account | Address;
212
+ }) => Promise<Hash>;
213
+ superPaymasterWithdraw: (args: {
214
+ amount: bigint;
215
+ account?: Account | Address;
216
+ }) => Promise<Hash>;
217
+ superPaymasterWithdrawAlias: (args: {
218
+ amount: bigint;
219
+ account?: Account | Address;
220
+ }) => Promise<Hash>;
221
+ superPaymasterMAX_PROTOCOL_FEE: () => Promise<bigint>;
222
+ superPaymasterVALIDATION_BUFFER_BPS: () => Promise<bigint>;
223
+ superPaymasterPriceStalenessThreshold: () => Promise<bigint>;
224
+ superPaymasterSbtHolders: (args: {
225
+ user: Address;
226
+ }) => Promise<boolean>;
227
+ superPaymasterUserOpState: (args: {
228
+ userOpHash: Hex;
229
+ }) => Promise<any>;
230
+ superPaymasterUpdateSBTStatus: (args: {
231
+ user: Address;
232
+ hasSBT: boolean;
233
+ account?: Account | Address;
234
+ }) => Promise<Hash>;
235
+ superPaymasterVersion: () => Promise<string>;
236
+ };
237
+ export declare const superPaymasterActions: (address: Address) => (client: PublicClient | WalletClient) => SuperPaymasterActions;