@aastar/core 0.16.8 → 0.16.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/abis/PaymasterV4_2.json +1193 -0
- package/dist/abis/SuperPaymaster.json +1 -1
- package/dist/abis/aPNTs.json +1160 -0
- package/dist/abis/abi.config.json +3 -3
- package/dist/abis/index.d.ts +15 -104
- package/dist/abis/index.js +22 -46
- package/dist/actions/account.d.ts +0 -15
- package/dist/actions/account.js +143 -108
- package/dist/actions/aggregator.d.ts +68 -7
- package/dist/actions/aggregator.js +328 -28
- package/dist/actions/dvt.d.ts +33 -5
- package/dist/actions/dvt.js +238 -38
- package/dist/actions/entryPoint.d.ts +3 -63
- package/dist/actions/entryPoint.js +52 -184
- package/dist/actions/factory.d.ts +48 -115
- package/dist/actions/factory.js +638 -438
- package/dist/actions/faucet.d.ts +23 -27
- package/dist/actions/faucet.js +150 -289
- package/dist/actions/index.d.ts +1 -2
- package/dist/actions/index.js +2 -4
- package/dist/actions/paymaster.d.ts +147 -0
- package/dist/actions/paymaster.js +706 -0
- package/dist/actions/paymasterV4.d.ts +26 -95
- package/dist/actions/paymasterV4.js +28 -121
- package/dist/actions/registry.d.ts +116 -165
- package/dist/actions/registry.js +855 -654
- package/dist/actions/reputation.d.ts +74 -52
- package/dist/actions/reputation.js +548 -242
- package/dist/actions/sbt.d.ts +90 -100
- package/dist/actions/sbt.js +801 -518
- package/dist/actions/staking.d.ts +45 -32
- package/dist/actions/staking.js +431 -260
- package/dist/actions/superPaymaster.d.ts +140 -158
- package/dist/actions/superPaymaster.js +965 -631
- package/dist/actions/tokens.d.ts +130 -108
- package/dist/actions/tokens.js +470 -414
- package/dist/actions/validators.d.ts +0 -73
- package/dist/actions/validators.js +0 -94
- package/dist/clients/BaseClient.d.ts +3 -3
- package/dist/clients/BundlerClient.d.ts +55 -0
- package/dist/clients/BundlerClient.js +92 -0
- package/dist/communities.js +2 -2
- package/dist/constants.js +1 -28
- package/dist/contract-addresses.d.ts +5 -14
- package/dist/contract-addresses.js +3 -9
- package/dist/contract-versions.d.ts +138 -0
- package/dist/contract-versions.js +328 -0
- package/dist/contracts.d.ts +6 -24
- package/dist/contracts.js +2 -2
- package/dist/errors/index.d.ts +57 -0
- package/dist/errors/index.js +123 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +2 -1
- package/dist/requirementChecker.d.ts +35 -1
- package/dist/requirementChecker.js +39 -1
- package/dist/roles.d.ts +50 -61
- package/dist/roles.js +50 -61
- package/dist/validators/index.d.ts +35 -0
- package/dist/validators/index.js +60 -0
- package/package.json +5 -13
|
@@ -1,246 +1,197 @@
|
|
|
1
1
|
import { type Address, type PublicClient, type WalletClient, type Hex, type Hash, type Account } from 'viem';
|
|
2
|
-
|
|
2
|
+
export type RoleConfigDetailed = {
|
|
3
|
+
minStake: bigint;
|
|
4
|
+
entryBurn: bigint;
|
|
5
|
+
slashThreshold: number;
|
|
6
|
+
slashBase: number;
|
|
7
|
+
slashInc: number;
|
|
8
|
+
slashMax: number;
|
|
9
|
+
exitFeePercent: number;
|
|
10
|
+
isActive: boolean;
|
|
11
|
+
minExitFee: bigint;
|
|
12
|
+
description: string;
|
|
13
|
+
owner: Address;
|
|
14
|
+
roleLockDuration: bigint;
|
|
15
|
+
};
|
|
3
16
|
export type RegistryActions = {
|
|
4
|
-
|
|
17
|
+
configureRole: (args: {
|
|
18
|
+
roleId: Hex;
|
|
19
|
+
config: RoleConfigDetailed;
|
|
20
|
+
account?: Account | Address;
|
|
21
|
+
}) => Promise<Hash>;
|
|
22
|
+
adminConfigureRole: (args: {
|
|
23
|
+
roleId: Hex;
|
|
24
|
+
minStake: bigint;
|
|
25
|
+
entryBurn: bigint;
|
|
26
|
+
exitFeePercent: bigint;
|
|
27
|
+
minExitFee: bigint;
|
|
28
|
+
account?: Account | Address;
|
|
29
|
+
}) => Promise<Hash>;
|
|
30
|
+
createNewRole: (args: {
|
|
5
31
|
roleId: Hex;
|
|
6
|
-
config:
|
|
32
|
+
config: RoleConfigDetailed;
|
|
33
|
+
roleOwner: Address;
|
|
7
34
|
account?: Account | Address;
|
|
8
35
|
}) => Promise<Hash>;
|
|
9
|
-
|
|
36
|
+
registerRole: (args: {
|
|
10
37
|
roleId: Hex;
|
|
11
38
|
user: Address;
|
|
12
39
|
data: Hex;
|
|
13
40
|
account?: Account | Address;
|
|
14
41
|
}) => Promise<Hash>;
|
|
15
|
-
|
|
42
|
+
registerRoleSelf: (args: {
|
|
16
43
|
roleId: Hex;
|
|
17
44
|
data: Hex;
|
|
18
45
|
account?: Account | Address;
|
|
19
46
|
}) => Promise<Hash>;
|
|
20
|
-
|
|
21
|
-
user: Address;
|
|
47
|
+
safeMintForRole: (args: {
|
|
22
48
|
roleId: Hex;
|
|
23
|
-
}) => Promise<boolean>;
|
|
24
|
-
registryUnRegisterRole: (args: {
|
|
25
49
|
user: Address;
|
|
26
|
-
|
|
50
|
+
data: Hex;
|
|
27
51
|
account?: Account | Address;
|
|
28
52
|
}) => Promise<Hash>;
|
|
29
|
-
|
|
53
|
+
hasRole: (args: {
|
|
54
|
+
roleId: Hex;
|
|
55
|
+
user: Address;
|
|
56
|
+
}) => Promise<boolean>;
|
|
57
|
+
getRoleConfig: (args: {
|
|
30
58
|
roleId: Hex;
|
|
31
|
-
}) => Promise<
|
|
32
|
-
|
|
59
|
+
}) => Promise<RoleConfigDetailed>;
|
|
60
|
+
setRoleLockDuration: (args: {
|
|
33
61
|
roleId: Hex;
|
|
34
62
|
duration: bigint;
|
|
35
63
|
account?: Account | Address;
|
|
36
64
|
}) => Promise<Hash>;
|
|
37
|
-
|
|
65
|
+
setRoleOwner: (args: {
|
|
38
66
|
roleId: Hex;
|
|
39
67
|
newOwner: Address;
|
|
40
68
|
account?: Account | Address;
|
|
41
69
|
}) => Promise<Hash>;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
}) => Promise<
|
|
46
|
-
|
|
47
|
-
name: string;
|
|
48
|
-
}) => Promise<Address>;
|
|
49
|
-
registryCommunityByENS: (args: {
|
|
50
|
-
ensName: string;
|
|
51
|
-
}) => Promise<Address>;
|
|
52
|
-
registryCommunityByNameV3: (args: {
|
|
70
|
+
exitRole: (args: {
|
|
71
|
+
roleId: Hex;
|
|
72
|
+
account?: Account | Address;
|
|
73
|
+
}) => Promise<Hash>;
|
|
74
|
+
communityByName: (args: {
|
|
53
75
|
name: string;
|
|
54
76
|
}) => Promise<Address>;
|
|
55
|
-
|
|
77
|
+
communityByENS: (args: {
|
|
56
78
|
ensName: string;
|
|
57
79
|
}) => Promise<Address>;
|
|
58
|
-
|
|
59
|
-
roleId: Hex;
|
|
60
|
-
}) => Promise<string>;
|
|
61
|
-
registryExecutedProposals: (args: {
|
|
62
|
-
proposalId: bigint;
|
|
63
|
-
}) => Promise<boolean>;
|
|
64
|
-
registryGetAccountCommunity: (args: {
|
|
65
|
-
account: Address;
|
|
66
|
-
}) => Promise<Address>;
|
|
67
|
-
registryLastReputationEpoch: () => Promise<bigint>;
|
|
68
|
-
registryIsReputationSource: (args: {
|
|
69
|
-
source: Address;
|
|
70
|
-
}) => Promise<boolean>;
|
|
71
|
-
registryRoleCounts: (args: {
|
|
72
|
-
roleId: Hex;
|
|
73
|
-
}) => Promise<bigint>;
|
|
74
|
-
registryRoleMembers: (args: {
|
|
75
|
-
roleId: Hex;
|
|
76
|
-
index: bigint;
|
|
77
|
-
}) => Promise<Address>;
|
|
78
|
-
registryRoleMemberIndex: (args: {
|
|
79
|
-
roleId: Hex;
|
|
80
|
-
user: Address;
|
|
81
|
-
}) => Promise<bigint>;
|
|
82
|
-
registryRoleMetadata: (args: {
|
|
83
|
-
roleId: Hex;
|
|
84
|
-
user?: Address;
|
|
85
|
-
}) => Promise<Hex>;
|
|
86
|
-
registryRoleStakes: (args: {
|
|
87
|
-
roleId: Hex;
|
|
88
|
-
user: Address;
|
|
89
|
-
}) => Promise<bigint>;
|
|
90
|
-
registryRoleSBTTokenIds: (args: {
|
|
91
|
-
roleId: Hex;
|
|
92
|
-
user: Address;
|
|
93
|
-
}) => Promise<bigint>;
|
|
94
|
-
registryUserRoles: (args: {
|
|
95
|
-
user: Address;
|
|
96
|
-
index: bigint;
|
|
97
|
-
}) => Promise<Hex>;
|
|
98
|
-
registryUserRoleCount: (args: {
|
|
80
|
+
getCreditLimit: (args: {
|
|
99
81
|
user: Address;
|
|
100
82
|
}) => Promise<bigint>;
|
|
101
|
-
|
|
83
|
+
globalReputation: (args: {
|
|
102
84
|
user: Address;
|
|
103
85
|
}) => Promise<bigint>;
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
scores: bigint[];
|
|
107
|
-
epoch: bigint;
|
|
108
|
-
proof: Hex;
|
|
86
|
+
addLevelThreshold: (args: {
|
|
87
|
+
threshold: bigint;
|
|
109
88
|
account?: Account | Address;
|
|
110
89
|
}) => Promise<Hash>;
|
|
111
|
-
|
|
112
|
-
|
|
90
|
+
batchUpdateGlobalReputation: (args: {
|
|
91
|
+
proposalId: bigint;
|
|
113
92
|
users: Address[];
|
|
114
|
-
|
|
93
|
+
newScores: bigint[];
|
|
94
|
+
epoch: bigint;
|
|
115
95
|
proof: Hex;
|
|
116
96
|
account?: Account | Address;
|
|
117
97
|
}) => Promise<Hash>;
|
|
118
|
-
|
|
119
|
-
operator: Address;
|
|
120
|
-
}) => Promise<boolean>;
|
|
121
|
-
registrySetBLSValidator: (args: {
|
|
98
|
+
setBLSValidator: (args: {
|
|
122
99
|
validator: Address;
|
|
123
100
|
account?: Account | Address;
|
|
124
101
|
}) => Promise<Hash>;
|
|
125
|
-
|
|
102
|
+
setBLSAggregator: (args: {
|
|
126
103
|
aggregator: Address;
|
|
127
104
|
account?: Account | Address;
|
|
128
105
|
}) => Promise<Hash>;
|
|
129
|
-
|
|
106
|
+
setMySBT: (args: {
|
|
130
107
|
sbt: Address;
|
|
131
108
|
account?: Account | Address;
|
|
132
109
|
}) => Promise<Hash>;
|
|
133
|
-
|
|
110
|
+
setSuperPaymaster: (args: {
|
|
134
111
|
paymaster: Address;
|
|
135
112
|
account?: Account | Address;
|
|
136
113
|
}) => Promise<Hash>;
|
|
137
|
-
|
|
114
|
+
setStaking: (args: {
|
|
138
115
|
staking: Address;
|
|
139
116
|
account?: Account | Address;
|
|
140
117
|
}) => Promise<Hash>;
|
|
141
|
-
|
|
118
|
+
setReputationSource: (args: {
|
|
142
119
|
source: Address;
|
|
143
120
|
account?: Account | Address;
|
|
144
121
|
}) => Promise<Hash>;
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
registryRenounceOwnership: (args: {
|
|
157
|
-
account?: Account | Address;
|
|
158
|
-
}) => Promise<Hash>;
|
|
159
|
-
registryRoleConfigs: (args: {
|
|
160
|
-
roleId: Hex;
|
|
161
|
-
}) => Promise<any>;
|
|
162
|
-
registryGetRoleMemberCount: (args: {
|
|
163
|
-
roleId: Hex;
|
|
164
|
-
}) => Promise<bigint>;
|
|
165
|
-
registryLevelThresholds: (args: {
|
|
166
|
-
level: bigint;
|
|
122
|
+
blsValidator: () => Promise<Address>;
|
|
123
|
+
blsAggregator: () => Promise<Address>;
|
|
124
|
+
MYSBT: () => Promise<Address>;
|
|
125
|
+
SUPER_PAYMASTER: () => Promise<Address>;
|
|
126
|
+
GTOKEN_STAKING: () => Promise<Address>;
|
|
127
|
+
reputationSource: () => Promise<Address>;
|
|
128
|
+
isReputationSource: (args: {
|
|
129
|
+
source: Address;
|
|
130
|
+
}) => Promise<boolean>;
|
|
131
|
+
lastReputationEpoch: (args: {
|
|
132
|
+
user: Address;
|
|
167
133
|
}) => Promise<bigint>;
|
|
168
|
-
|
|
134
|
+
roleConfigs: (args: {
|
|
169
135
|
roleId: Hex;
|
|
170
|
-
}) => Promise<
|
|
171
|
-
|
|
136
|
+
}) => Promise<RoleConfigDetailed>;
|
|
137
|
+
getRoleUserCount: (args: {
|
|
172
138
|
roleId: Hex;
|
|
173
|
-
}) => Promise<
|
|
174
|
-
|
|
139
|
+
}) => Promise<bigint>;
|
|
140
|
+
getRoleMembers: (args: {
|
|
175
141
|
roleId: Hex;
|
|
176
142
|
}) => Promise<Address[]>;
|
|
177
|
-
|
|
178
|
-
roleId: Hex;
|
|
179
|
-
}) => Promise<bigint>;
|
|
180
|
-
registryGetUserRoles: (args: {
|
|
143
|
+
getUserRoles: (args: {
|
|
181
144
|
user: Address;
|
|
182
145
|
}) => Promise<Hex[]>;
|
|
183
|
-
|
|
146
|
+
roleMembers: (args: {
|
|
184
147
|
roleId: Hex;
|
|
185
|
-
|
|
186
|
-
}) => Promise<
|
|
187
|
-
|
|
148
|
+
index: bigint;
|
|
149
|
+
}) => Promise<Address>;
|
|
150
|
+
userRoles: (args: {
|
|
151
|
+
user: Address;
|
|
152
|
+
index: bigint;
|
|
153
|
+
}) => Promise<Hex>;
|
|
154
|
+
userRoleCount: (args: {
|
|
155
|
+
user: Address;
|
|
156
|
+
}) => Promise<bigint>;
|
|
157
|
+
creditTierConfig: (args: {
|
|
158
|
+
tierIndex: bigint;
|
|
159
|
+
}) => Promise<bigint>;
|
|
160
|
+
levelThresholds: (args: {
|
|
161
|
+
levelIndex: bigint;
|
|
162
|
+
}) => Promise<bigint>;
|
|
163
|
+
calculateExitFee: (args: {
|
|
188
164
|
roleId: Hex;
|
|
189
165
|
amount: bigint;
|
|
190
166
|
}) => Promise<bigint>;
|
|
191
|
-
|
|
192
|
-
threshold: bigint;
|
|
193
|
-
account?: Account | Address;
|
|
194
|
-
}) => Promise<Hash>;
|
|
195
|
-
registrySetLevelThreshold: (args: {
|
|
196
|
-
index: bigint;
|
|
197
|
-
threshold: bigint;
|
|
198
|
-
account?: Account | Address;
|
|
199
|
-
}) => Promise<Hash>;
|
|
200
|
-
registryAccountToUser: (args: {
|
|
167
|
+
accountToUser: (args: {
|
|
201
168
|
account: Address;
|
|
202
169
|
}) => Promise<Address>;
|
|
203
|
-
|
|
170
|
+
roleOwners: (args: {
|
|
171
|
+
roleId: Hex;
|
|
172
|
+
}) => Promise<Address>;
|
|
173
|
+
roleStakes: (args: {
|
|
174
|
+
roleId: Hex;
|
|
204
175
|
user: Address;
|
|
205
176
|
}) => Promise<bigint>;
|
|
206
|
-
|
|
207
|
-
level: bigint;
|
|
208
|
-
limit: bigint;
|
|
209
|
-
account?: Account | Address;
|
|
210
|
-
}) => Promise<Hash>;
|
|
211
|
-
registryCreditTierConfig: (args: {
|
|
212
|
-
level: bigint;
|
|
213
|
-
}) => Promise<bigint>;
|
|
214
|
-
registryAdminConfigureRole: (args: {
|
|
215
|
-
roleId: Hex;
|
|
216
|
-
minStake: bigint;
|
|
217
|
-
entryBurn: bigint;
|
|
218
|
-
exitFeePercent: number;
|
|
219
|
-
minExitFee: bigint;
|
|
220
|
-
account?: Account | Address;
|
|
221
|
-
}) => Promise<Hash>;
|
|
222
|
-
registryCreateNewRole: (args: {
|
|
177
|
+
roleLockDurations: (args: {
|
|
223
178
|
roleId: Hex;
|
|
224
|
-
|
|
225
|
-
|
|
179
|
+
}) => Promise<bigint>;
|
|
180
|
+
ROLE_COMMUNITY: () => Promise<Hex>;
|
|
181
|
+
ROLE_ENDUSER: () => Promise<Hex>;
|
|
182
|
+
ROLE_PAYMASTER_SUPER: () => Promise<Hex>;
|
|
183
|
+
ROLE_PAYMASTER_AOA: () => Promise<Hex>;
|
|
184
|
+
ROLE_DVT: () => Promise<Hex>;
|
|
185
|
+
ROLE_KMS: () => Promise<Hex>;
|
|
186
|
+
ROLE_ANODE: () => Promise<Hex>;
|
|
187
|
+
owner: () => Promise<Address>;
|
|
188
|
+
transferOwnership: (args: {
|
|
189
|
+
newOwner: Address;
|
|
226
190
|
account?: Account | Address;
|
|
227
191
|
}) => Promise<Hash>;
|
|
228
|
-
|
|
229
|
-
roleId: Hex;
|
|
230
|
-
user: Address;
|
|
231
|
-
data: Hex;
|
|
192
|
+
renounceOwnership: (args: {
|
|
232
193
|
account?: Account | Address;
|
|
233
194
|
}) => Promise<Hash>;
|
|
234
|
-
|
|
235
|
-
registryROLE_ENDUSER: () => Promise<Hex>;
|
|
236
|
-
registryROLE_PAYMASTER_SUPER: () => Promise<Hex>;
|
|
237
|
-
registryROLE_PAYMASTER_AOA: () => Promise<Hex>;
|
|
238
|
-
registryROLE_DVT: () => Promise<Hex>;
|
|
239
|
-
registryROLE_KMS: () => Promise<Hex>;
|
|
240
|
-
registryROLE_ANODE: () => Promise<Hex>;
|
|
241
|
-
registryGTOKEN_STAKING: () => Promise<Address>;
|
|
242
|
-
registryMYSBT: () => Promise<Address>;
|
|
243
|
-
registrySUPER_PAYMASTER: () => Promise<Address>;
|
|
244
|
-
registryVersion: () => Promise<string>;
|
|
195
|
+
version: () => Promise<string>;
|
|
245
196
|
};
|
|
246
197
|
export declare const registryActions: (address: Address) => (client: PublicClient | WalletClient) => RegistryActions;
|