@aastar/core 0.16.7 → 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
package/dist/actions/tokens.d.ts
CHANGED
|
@@ -1,167 +1,188 @@
|
|
|
1
1
|
import { type Address, type PublicClient, type WalletClient, type Hex, type Hash, type Account } from 'viem';
|
|
2
|
-
export type
|
|
3
|
-
|
|
2
|
+
export type ERC20Actions = {
|
|
3
|
+
totalSupply: (args: {
|
|
4
4
|
token: Address;
|
|
5
5
|
}) => Promise<bigint>;
|
|
6
|
-
|
|
6
|
+
balanceOf: (args: {
|
|
7
7
|
token: Address;
|
|
8
8
|
account: Address;
|
|
9
9
|
}) => Promise<bigint>;
|
|
10
|
-
|
|
11
|
-
token: Address;
|
|
12
|
-
}) => Promise<bigint>;
|
|
13
|
-
tokenRemainingMintableSupply: (args: {
|
|
14
|
-
token: Address;
|
|
15
|
-
}) => Promise<bigint>;
|
|
16
|
-
tokenTransfer: (args: {
|
|
10
|
+
transfer: (args: {
|
|
17
11
|
token: Address;
|
|
18
12
|
to: Address;
|
|
19
13
|
amount: bigint;
|
|
20
14
|
account?: Account | Address;
|
|
21
15
|
}) => Promise<Hash>;
|
|
22
|
-
|
|
16
|
+
transferFrom: (args: {
|
|
23
17
|
token: Address;
|
|
24
18
|
from: Address;
|
|
25
19
|
to: Address;
|
|
26
20
|
amount: bigint;
|
|
27
21
|
account?: Account | Address;
|
|
28
22
|
}) => Promise<Hash>;
|
|
29
|
-
|
|
23
|
+
approve: (args: {
|
|
30
24
|
token: Address;
|
|
31
25
|
spender: Address;
|
|
32
26
|
amount: bigint;
|
|
33
27
|
account?: Account | Address;
|
|
34
28
|
}) => Promise<Hash>;
|
|
35
|
-
|
|
29
|
+
allowance: (args: {
|
|
36
30
|
token: Address;
|
|
37
31
|
owner: Address;
|
|
38
32
|
spender: Address;
|
|
39
33
|
}) => Promise<bigint>;
|
|
40
|
-
|
|
34
|
+
name: (args: {
|
|
35
|
+
token: Address;
|
|
36
|
+
}) => Promise<string>;
|
|
37
|
+
symbol: (args: {
|
|
38
|
+
token: Address;
|
|
39
|
+
}) => Promise<string>;
|
|
40
|
+
decimals: (args: {
|
|
41
|
+
token: Address;
|
|
42
|
+
}) => Promise<number>;
|
|
43
|
+
};
|
|
44
|
+
export type GTokenActions = ERC20Actions & {
|
|
45
|
+
mint: (args: {
|
|
41
46
|
token: Address;
|
|
42
47
|
to: Address;
|
|
43
48
|
amount: bigint;
|
|
44
49
|
account?: Account | Address;
|
|
45
50
|
}) => Promise<Hash>;
|
|
46
|
-
|
|
51
|
+
burn: (args: {
|
|
47
52
|
token: Address;
|
|
48
53
|
amount: bigint;
|
|
49
54
|
account?: Account | Address;
|
|
50
55
|
}) => Promise<Hash>;
|
|
51
|
-
|
|
56
|
+
burnFrom: (args: {
|
|
52
57
|
token: Address;
|
|
53
58
|
from: Address;
|
|
54
59
|
amount: bigint;
|
|
55
60
|
account?: Account | Address;
|
|
56
61
|
}) => Promise<Hash>;
|
|
57
|
-
|
|
62
|
+
cap: (args: {
|
|
58
63
|
token: Address;
|
|
59
|
-
}) => Promise<
|
|
60
|
-
|
|
64
|
+
}) => Promise<bigint>;
|
|
65
|
+
remainingMintableSupply: (args: {
|
|
61
66
|
token: Address;
|
|
62
|
-
}) => Promise<
|
|
63
|
-
|
|
67
|
+
}) => Promise<bigint>;
|
|
68
|
+
version: (args: {
|
|
64
69
|
token: Address;
|
|
65
|
-
}) => Promise<
|
|
66
|
-
|
|
70
|
+
}) => Promise<string>;
|
|
71
|
+
owner: (args: {
|
|
67
72
|
token: Address;
|
|
68
73
|
}) => Promise<Address>;
|
|
69
|
-
|
|
74
|
+
transferOwnership: (args: {
|
|
70
75
|
token: Address;
|
|
71
76
|
newOwner: Address;
|
|
72
77
|
account?: Account | Address;
|
|
73
78
|
}) => Promise<Hash>;
|
|
74
|
-
|
|
79
|
+
renounceOwnership: (args: {
|
|
75
80
|
token: Address;
|
|
76
81
|
account?: Account | Address;
|
|
77
82
|
}) => Promise<Hash>;
|
|
78
|
-
|
|
83
|
+
};
|
|
84
|
+
export type XPNTsTokenActions = ERC20Actions & {
|
|
85
|
+
mint: (args: {
|
|
79
86
|
token: Address;
|
|
80
|
-
|
|
87
|
+
to: Address;
|
|
88
|
+
amount: bigint;
|
|
81
89
|
account?: Account | Address;
|
|
82
90
|
}) => Promise<Hash>;
|
|
83
|
-
|
|
84
|
-
token: Address;
|
|
85
|
-
user: Address;
|
|
86
|
-
}) => Promise<bigint>;
|
|
87
|
-
tokenRepayDebt: (args: {
|
|
91
|
+
burn: (args: {
|
|
88
92
|
token: Address;
|
|
89
93
|
amount: bigint;
|
|
90
94
|
account?: Account | Address;
|
|
91
95
|
}) => Promise<Hash>;
|
|
92
|
-
|
|
96
|
+
burnFrom: (args: {
|
|
93
97
|
token: Address;
|
|
94
|
-
|
|
98
|
+
from: Address;
|
|
95
99
|
amount: bigint;
|
|
96
|
-
data?: Hex;
|
|
97
100
|
account?: Account | Address;
|
|
98
101
|
}) => Promise<Hash>;
|
|
99
|
-
|
|
102
|
+
burnFromWithOpHash: (args: {
|
|
100
103
|
token: Address;
|
|
101
|
-
|
|
104
|
+
from: Address;
|
|
105
|
+
amount: bigint;
|
|
106
|
+
userOpHash: Hex;
|
|
102
107
|
account?: Account | Address;
|
|
103
108
|
}) => Promise<Hash>;
|
|
104
|
-
|
|
109
|
+
exchangeRate: (args: {
|
|
105
110
|
token: Address;
|
|
106
|
-
|
|
111
|
+
}) => Promise<bigint>;
|
|
112
|
+
updateExchangeRate: (args: {
|
|
113
|
+
token: Address;
|
|
114
|
+
newRate: bigint;
|
|
107
115
|
account?: Account | Address;
|
|
108
116
|
}) => Promise<Hash>;
|
|
109
|
-
|
|
110
|
-
token: Address;
|
|
111
|
-
spender: Address;
|
|
112
|
-
}) => Promise<boolean>;
|
|
113
|
-
tokenSUPERPAYMASTER_ADDRESS: (args: {
|
|
117
|
+
debts: (args: {
|
|
114
118
|
token: Address;
|
|
115
|
-
|
|
116
|
-
|
|
119
|
+
user: Address;
|
|
120
|
+
}) => Promise<bigint>;
|
|
121
|
+
getDebt: (args: {
|
|
117
122
|
token: Address;
|
|
118
|
-
|
|
119
|
-
|
|
123
|
+
user: Address;
|
|
124
|
+
}) => Promise<bigint>;
|
|
125
|
+
recordDebt: (args: {
|
|
120
126
|
token: Address;
|
|
121
|
-
|
|
127
|
+
user: Address;
|
|
128
|
+
amountXPNTs: bigint;
|
|
122
129
|
account?: Account | Address;
|
|
123
130
|
}) => Promise<Hash>;
|
|
124
|
-
|
|
131
|
+
repayDebt: (args: {
|
|
125
132
|
token: Address;
|
|
126
|
-
|
|
133
|
+
amount: bigint;
|
|
127
134
|
account?: Account | Address;
|
|
128
135
|
}) => Promise<Hash>;
|
|
129
|
-
|
|
130
|
-
token: Address;
|
|
131
|
-
}) => Promise<string>;
|
|
132
|
-
tokenCommunityENS: (args: {
|
|
133
|
-
token: Address;
|
|
134
|
-
}) => Promise<string>;
|
|
135
|
-
tokenExchangeRate: (args: {
|
|
136
|
+
spendingLimits: (args: {
|
|
136
137
|
token: Address;
|
|
138
|
+
owner: Address;
|
|
139
|
+
spender: Address;
|
|
137
140
|
}) => Promise<bigint>;
|
|
138
|
-
|
|
141
|
+
cumulativeSpent: (args: {
|
|
139
142
|
token: Address;
|
|
140
|
-
|
|
143
|
+
owner: Address;
|
|
144
|
+
spender: Address;
|
|
141
145
|
}) => Promise<bigint>;
|
|
142
|
-
|
|
146
|
+
setPaymasterLimit: (args: {
|
|
143
147
|
token: Address;
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
spender: Address;
|
|
149
|
+
limit: bigint;
|
|
150
|
+
account?: Account | Address;
|
|
151
|
+
}) => Promise<Hash>;
|
|
152
|
+
DEFAULT_SPENDING_LIMIT_APNTS: (args: {
|
|
146
153
|
token: Address;
|
|
147
|
-
user: Address;
|
|
148
154
|
}) => Promise<bigint>;
|
|
149
|
-
|
|
155
|
+
getDefaultSpendingLimitXPNTs: (args: {
|
|
150
156
|
token: Address;
|
|
151
|
-
user: Address;
|
|
152
157
|
}) => Promise<bigint>;
|
|
153
|
-
|
|
158
|
+
needsApproval: (args: {
|
|
159
|
+
token: Address;
|
|
160
|
+
owner: Address;
|
|
161
|
+
spender: Address;
|
|
162
|
+
amount: bigint;
|
|
163
|
+
}) => Promise<boolean>;
|
|
164
|
+
addAutoApprovedSpender: (args: {
|
|
165
|
+
token: Address;
|
|
166
|
+
spender: Address;
|
|
167
|
+
account?: Account | Address;
|
|
168
|
+
}) => Promise<Hash>;
|
|
169
|
+
removeAutoApprovedSpender: (args: {
|
|
154
170
|
token: Address;
|
|
155
|
-
|
|
171
|
+
spender: Address;
|
|
172
|
+
account?: Account | Address;
|
|
173
|
+
}) => Promise<Hash>;
|
|
174
|
+
autoApprovedSpenders: (args: {
|
|
175
|
+
token: Address;
|
|
176
|
+
spender: Address;
|
|
156
177
|
}) => Promise<boolean>;
|
|
157
|
-
|
|
178
|
+
DOMAIN_SEPARATOR: (args: {
|
|
158
179
|
token: Address;
|
|
159
180
|
}) => Promise<Hex>;
|
|
160
|
-
|
|
181
|
+
nonces: (args: {
|
|
161
182
|
token: Address;
|
|
162
183
|
owner: Address;
|
|
163
184
|
}) => Promise<bigint>;
|
|
164
|
-
|
|
185
|
+
permit: (args: {
|
|
165
186
|
token: Address;
|
|
166
187
|
owner: Address;
|
|
167
188
|
spender: Address;
|
|
@@ -172,58 +193,59 @@ export type TokenActions = {
|
|
|
172
193
|
s: Hex;
|
|
173
194
|
account?: Account | Address;
|
|
174
195
|
}) => Promise<Hash>;
|
|
175
|
-
|
|
196
|
+
eip712Domain: (args: {
|
|
176
197
|
token: Address;
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
tokenBurnFromWithOpHash: (args: {
|
|
198
|
+
}) => Promise<any>;
|
|
199
|
+
transferAndCall: (args: {
|
|
180
200
|
token: Address;
|
|
181
|
-
|
|
201
|
+
to: Address;
|
|
182
202
|
amount: bigint;
|
|
183
|
-
|
|
184
|
-
|
|
203
|
+
data?: Hex;
|
|
204
|
+
account?: Account | Address;
|
|
185
205
|
}) => Promise<Hash>;
|
|
186
|
-
|
|
187
|
-
token: Address;
|
|
188
|
-
}) => Promise<Address>;
|
|
189
|
-
tokenEip712Domain: (args: {
|
|
190
|
-
token: Address;
|
|
191
|
-
}) => Promise<any>;
|
|
192
|
-
tokenGetDefaultSpendingLimitXPNTs: (args: {
|
|
193
|
-
token: Address;
|
|
194
|
-
}) => Promise<bigint>;
|
|
195
|
-
tokenGetMetadata: (args: {
|
|
206
|
+
communityENS: (args: {
|
|
196
207
|
token: Address;
|
|
197
208
|
}) => Promise<string>;
|
|
198
|
-
|
|
209
|
+
communityName: (args: {
|
|
199
210
|
token: Address;
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
amount: bigint;
|
|
203
|
-
}) => Promise<boolean>;
|
|
204
|
-
tokenRecordDebt: (args: {
|
|
211
|
+
}) => Promise<string>;
|
|
212
|
+
communityOwner: (args: {
|
|
205
213
|
token: Address;
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
account?: Account | Address;
|
|
209
|
-
}) => Promise<Hash>;
|
|
210
|
-
tokenDEFAULT_SPENDING_LIMIT_APNTS: (args: {
|
|
214
|
+
}) => Promise<Address>;
|
|
215
|
+
getMetadata: (args: {
|
|
211
216
|
token: Address;
|
|
212
|
-
}) => Promise<
|
|
213
|
-
|
|
217
|
+
}) => Promise<{
|
|
218
|
+
name: string;
|
|
219
|
+
symbol: string;
|
|
220
|
+
communityName: string;
|
|
221
|
+
communityENS: string;
|
|
222
|
+
communityOwner: Address;
|
|
223
|
+
}>;
|
|
224
|
+
transferCommunityOwnership: (args: {
|
|
214
225
|
token: Address;
|
|
215
|
-
|
|
216
|
-
limit: bigint;
|
|
226
|
+
newOwner: Address;
|
|
217
227
|
account?: Account | Address;
|
|
218
228
|
}) => Promise<Hash>;
|
|
219
|
-
|
|
229
|
+
setSuperPaymasterAddress: (args: {
|
|
220
230
|
token: Address;
|
|
221
|
-
|
|
231
|
+
spAddress: Address;
|
|
222
232
|
account?: Account | Address;
|
|
223
233
|
}) => Promise<Hash>;
|
|
224
|
-
|
|
234
|
+
SUPERPAYMASTER_ADDRESS: (args: {
|
|
235
|
+
token: Address;
|
|
236
|
+
}) => Promise<Address>;
|
|
237
|
+
FACTORY: (args: {
|
|
238
|
+
token: Address;
|
|
239
|
+
}) => Promise<Address>;
|
|
240
|
+
version: (args: {
|
|
225
241
|
token: Address;
|
|
226
242
|
}) => Promise<string>;
|
|
243
|
+
usedOpHashes: (args: {
|
|
244
|
+
token: Address;
|
|
245
|
+
opHash: Hex;
|
|
246
|
+
}) => Promise<boolean>;
|
|
227
247
|
};
|
|
228
|
-
export
|
|
229
|
-
export declare const
|
|
248
|
+
export type TokenActions = GTokenActions & XPNTsTokenActions;
|
|
249
|
+
export declare const gTokenActions: (address?: Address) => (client: PublicClient | WalletClient) => GTokenActions;
|
|
250
|
+
export declare const xPNTsTokenActions: (address?: Address) => (client: PublicClient | WalletClient) => XPNTsTokenActions;
|
|
251
|
+
export declare const tokenActions: (address?: Address) => (client: PublicClient | WalletClient) => TokenActions;
|