@aastar/core 0.16.8 → 0.16.12
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/sbt.d.ts
CHANGED
|
@@ -1,190 +1,180 @@
|
|
|
1
1
|
import { type Address, type PublicClient, type WalletClient, type Hex, type Hash, type Account } from 'viem';
|
|
2
|
+
export type SBTMembership = {
|
|
3
|
+
community: Address;
|
|
4
|
+
joinedAt: bigint;
|
|
5
|
+
lastActiveTime: bigint;
|
|
6
|
+
isActive: boolean;
|
|
7
|
+
metadata: string;
|
|
8
|
+
};
|
|
9
|
+
export type SBTData = {
|
|
10
|
+
holder: Address;
|
|
11
|
+
firstCommunity: Address;
|
|
12
|
+
mintedAt: bigint;
|
|
13
|
+
totalCommunities: bigint;
|
|
14
|
+
};
|
|
2
15
|
export type SBTActions = {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
to: Address;
|
|
6
|
-
tokenURI: string;
|
|
7
|
-
account?: Account | Address;
|
|
8
|
-
}) => Promise<Hash>;
|
|
9
|
-
sbtAirdropMint: (args: {
|
|
16
|
+
airdropMint: (args: {
|
|
17
|
+
user: Address;
|
|
10
18
|
roleId: Hex;
|
|
11
|
-
|
|
12
|
-
tokenURI: string;
|
|
19
|
+
roleData: Hex;
|
|
13
20
|
account?: Account | Address;
|
|
14
21
|
}) => Promise<Hash>;
|
|
15
|
-
|
|
22
|
+
mintForRole: (args: {
|
|
23
|
+
user: Address;
|
|
16
24
|
roleId: Hex;
|
|
17
|
-
|
|
25
|
+
roleData: Hex;
|
|
18
26
|
account?: Account | Address;
|
|
19
27
|
}) => Promise<Hash>;
|
|
20
|
-
|
|
28
|
+
getUserSBT: (args: {
|
|
21
29
|
user: Address;
|
|
22
|
-
roleId: Hex;
|
|
23
30
|
}) => Promise<bigint>;
|
|
24
|
-
|
|
31
|
+
getSBTData: (args: {
|
|
32
|
+
tokenId: bigint;
|
|
33
|
+
}) => Promise<SBTData>;
|
|
34
|
+
getCommunityMembership: (args: {
|
|
25
35
|
tokenId: bigint;
|
|
26
|
-
}) => Promise<any>;
|
|
27
|
-
sbtGetCommunityMembership: (args: {
|
|
28
|
-
user: Address;
|
|
29
36
|
community: Address;
|
|
30
|
-
}) => Promise<
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
}) => Promise<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}) => Promise<
|
|
37
|
-
|
|
37
|
+
}) => Promise<SBTMembership>;
|
|
38
|
+
getMemberships: (args: {
|
|
39
|
+
tokenId: bigint;
|
|
40
|
+
}) => Promise<SBTMembership[]>;
|
|
41
|
+
getActiveMemberships: (args: {
|
|
42
|
+
tokenId: bigint;
|
|
43
|
+
}) => Promise<Address[]>;
|
|
44
|
+
verifyCommunityMembership: (args: {
|
|
38
45
|
user: Address;
|
|
39
46
|
community: Address;
|
|
40
47
|
}) => Promise<boolean>;
|
|
41
|
-
|
|
48
|
+
userToSBT: (args: {
|
|
42
49
|
user: Address;
|
|
43
50
|
}) => Promise<bigint>;
|
|
44
|
-
|
|
51
|
+
sbtData: (args: {
|
|
45
52
|
tokenId: bigint;
|
|
46
|
-
}) => Promise<
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}) => Promise<
|
|
51
|
-
|
|
53
|
+
}) => Promise<SBTData>;
|
|
54
|
+
membershipIndex: (args: {
|
|
55
|
+
tokenId: bigint;
|
|
56
|
+
community: Address;
|
|
57
|
+
}) => Promise<bigint>;
|
|
58
|
+
balanceOf: (args: {
|
|
52
59
|
owner: Address;
|
|
53
60
|
}) => Promise<bigint>;
|
|
54
|
-
|
|
61
|
+
ownerOf: (args: {
|
|
55
62
|
tokenId: bigint;
|
|
56
63
|
}) => Promise<Address>;
|
|
57
|
-
|
|
64
|
+
safeTransferFrom: (args: {
|
|
58
65
|
from: Address;
|
|
59
66
|
to: Address;
|
|
60
67
|
tokenId: bigint;
|
|
68
|
+
data?: Hex;
|
|
61
69
|
account?: Account | Address;
|
|
62
70
|
}) => Promise<Hash>;
|
|
63
|
-
|
|
71
|
+
transferFrom: (args: {
|
|
64
72
|
from: Address;
|
|
65
73
|
to: Address;
|
|
66
74
|
tokenId: bigint;
|
|
67
75
|
account?: Account | Address;
|
|
68
76
|
}) => Promise<Hash>;
|
|
69
|
-
|
|
77
|
+
approve: (args: {
|
|
70
78
|
to: Address;
|
|
71
79
|
tokenId: bigint;
|
|
72
80
|
account?: Account | Address;
|
|
73
81
|
}) => Promise<Hash>;
|
|
74
|
-
|
|
82
|
+
setApprovalForAll: (args: {
|
|
75
83
|
operator: Address;
|
|
76
84
|
approved: boolean;
|
|
77
85
|
account?: Account | Address;
|
|
78
86
|
}) => Promise<Hash>;
|
|
79
|
-
|
|
87
|
+
getApproved: (args: {
|
|
80
88
|
tokenId: bigint;
|
|
81
89
|
}) => Promise<Address>;
|
|
82
|
-
|
|
90
|
+
isApprovedForAll: (args: {
|
|
83
91
|
owner: Address;
|
|
84
92
|
operator: Address;
|
|
85
93
|
}) => Promise<boolean>;
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
94
|
+
name: () => Promise<string>;
|
|
95
|
+
symbol: () => Promise<string>;
|
|
96
|
+
tokenURI: (args: {
|
|
89
97
|
tokenId: bigint;
|
|
90
98
|
}) => Promise<string>;
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
index: bigint;
|
|
94
|
-
}) => Promise<bigint>;
|
|
95
|
-
sbtTokenOfOwnerByIndex: (args: {
|
|
96
|
-
owner: Address;
|
|
97
|
-
index: bigint;
|
|
98
|
-
}) => Promise<bigint>;
|
|
99
|
-
sbtSupportsInterface: (args: {
|
|
99
|
+
nextTokenId: () => Promise<bigint>;
|
|
100
|
+
supportsInterface: (args: {
|
|
100
101
|
interfaceId: Hex;
|
|
101
102
|
}) => Promise<boolean>;
|
|
102
|
-
|
|
103
|
-
sbtMint: (args: {
|
|
104
|
-
to: Address;
|
|
105
|
-
tokenURI: string;
|
|
106
|
-
account?: Account | Address;
|
|
107
|
-
}) => Promise<Hash>;
|
|
108
|
-
sbtBurn: (args: {
|
|
109
|
-
tokenId: bigint;
|
|
110
|
-
account?: Account | Address;
|
|
111
|
-
}) => Promise<Hash>;
|
|
112
|
-
sbtBurnSBT: (args: {
|
|
113
|
-
tokenId: bigint;
|
|
114
|
-
account?: Account | Address;
|
|
115
|
-
}) => Promise<Hash>;
|
|
116
|
-
sbtDeactivateAllMemberships: (args: {
|
|
103
|
+
burnSBT: (args: {
|
|
117
104
|
user: Address;
|
|
118
105
|
account?: Account | Address;
|
|
119
106
|
}) => Promise<Hash>;
|
|
120
|
-
|
|
107
|
+
setBaseURI: (args: {
|
|
121
108
|
baseURI: string;
|
|
122
109
|
account?: Account | Address;
|
|
123
110
|
}) => Promise<Hash>;
|
|
124
|
-
|
|
111
|
+
leaveCommunity: (args: {
|
|
125
112
|
community: Address;
|
|
126
113
|
account?: Account | Address;
|
|
127
114
|
}) => Promise<Hash>;
|
|
128
|
-
|
|
129
|
-
|
|
115
|
+
deactivateMembership: (args: {
|
|
116
|
+
user: Address;
|
|
117
|
+
community: Address;
|
|
130
118
|
account?: Account | Address;
|
|
131
119
|
}) => Promise<Hash>;
|
|
132
|
-
|
|
120
|
+
deactivateAllMemberships: (args: {
|
|
133
121
|
user: Address;
|
|
134
122
|
account?: Account | Address;
|
|
135
123
|
}) => Promise<Hash>;
|
|
136
|
-
|
|
137
|
-
user: Address;
|
|
138
|
-
}) => Promise<bigint>;
|
|
139
|
-
sbtWeeklyActivity: (args: {
|
|
124
|
+
recordActivity: (args: {
|
|
140
125
|
user: Address;
|
|
126
|
+
account?: Account | Address;
|
|
127
|
+
}) => Promise<Hash>;
|
|
128
|
+
lastActivityTime: (args: {
|
|
129
|
+
tokenId: bigint;
|
|
130
|
+
community: Address;
|
|
141
131
|
}) => Promise<bigint>;
|
|
142
|
-
|
|
143
|
-
|
|
132
|
+
weeklyActivity: (args: {
|
|
133
|
+
tokenId: bigint;
|
|
134
|
+
community: Address;
|
|
135
|
+
week: bigint;
|
|
136
|
+
}) => Promise<boolean>;
|
|
137
|
+
reputationCalculator: () => Promise<Address>;
|
|
138
|
+
setReputationCalculator: (args: {
|
|
144
139
|
calculator: Address;
|
|
145
140
|
account?: Account | Address;
|
|
146
141
|
}) => Promise<Hash>;
|
|
147
|
-
|
|
148
|
-
|
|
142
|
+
mintFee: () => Promise<bigint>;
|
|
143
|
+
setMintFee: (args: {
|
|
149
144
|
fee: bigint;
|
|
150
145
|
account?: Account | Address;
|
|
151
146
|
}) => Promise<Hash>;
|
|
152
|
-
|
|
153
|
-
|
|
147
|
+
minLockAmount: () => Promise<bigint>;
|
|
148
|
+
setMinLockAmount: (args: {
|
|
154
149
|
amount: bigint;
|
|
155
150
|
account?: Account | Address;
|
|
156
151
|
}) => Promise<Hash>;
|
|
157
|
-
|
|
152
|
+
pause: (args: {
|
|
158
153
|
account?: Account | Address;
|
|
159
154
|
}) => Promise<Hash>;
|
|
160
|
-
|
|
155
|
+
unpause: (args: {
|
|
161
156
|
account?: Account | Address;
|
|
162
157
|
}) => Promise<Hash>;
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
158
|
+
paused: () => Promise<boolean>;
|
|
159
|
+
daoMultisig: () => Promise<Address>;
|
|
160
|
+
setDAOMultisig: (args: {
|
|
166
161
|
multisig: Address;
|
|
167
162
|
account?: Account | Address;
|
|
168
163
|
}) => Promise<Hash>;
|
|
169
|
-
|
|
164
|
+
setRegistry: (args: {
|
|
170
165
|
registry: Address;
|
|
171
166
|
account?: Account | Address;
|
|
172
167
|
}) => Promise<Hash>;
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
sbtGTOKEN_STAKING: () => Promise<Address>;
|
|
180
|
-
sbtGTOKEN: () => Promise<Address>;
|
|
181
|
-
sbtSUPER_PAYMASTER: () => Promise<Address>;
|
|
182
|
-
sbtOwner: () => Promise<Address>;
|
|
183
|
-
sbtTransferSBTOwnership: (args: {
|
|
168
|
+
version: () => Promise<string>;
|
|
169
|
+
REGISTRY: () => Promise<Address>;
|
|
170
|
+
GTOKEN_STAKING: () => Promise<Address>;
|
|
171
|
+
GTOKEN: () => Promise<Address>;
|
|
172
|
+
owner: () => Promise<Address>;
|
|
173
|
+
transferOwnership: (args: {
|
|
184
174
|
newOwner: Address;
|
|
185
175
|
account?: Account | Address;
|
|
186
176
|
}) => Promise<Hash>;
|
|
187
|
-
|
|
177
|
+
renounceOwnership: (args: {
|
|
188
178
|
account?: Account | Address;
|
|
189
179
|
}) => Promise<Hash>;
|
|
190
180
|
};
|