@agenticprimitives/contracts 1.0.0-alpha.4 → 1.0.0-alpha.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 (57) hide show
  1. package/AUDIT.md +304 -47
  2. package/README.md +19 -8
  3. package/deployments-base-sepolia.json +1 -0
  4. package/dist/abi/AgentAccount.json +1647 -0
  5. package/dist/abi/AgentAccountFactory.json +472 -0
  6. package/dist/abi/AgentNameRegistry.json +46 -0
  7. package/dist/abi/AgreementRegistry.json +432 -0
  8. package/dist/abi/AttestationRegistry.json +436 -0
  9. package/dist/abi/CallDataHashEnforcer.json +119 -0
  10. package/dist/abi/CustodyPolicy.json +1111 -0
  11. package/dist/abi/DelegationManager.json +645 -0
  12. package/dist/abi/GeoFeatureRegistry.json +625 -0
  13. package/dist/abi/IAgentAccount.json +262 -0
  14. package/dist/abi/IAgentAccountFactoryAccessor.json +15 -0
  15. package/dist/abi/IAgentAccountFactoryView.json +41 -0
  16. package/dist/abi/IAgentAccountPauseView.json +15 -0
  17. package/dist/abi/IAgenticPrimitivesAgentAccount.json +15 -0
  18. package/dist/abi/IApprovedHashRegistryView.json +26 -0
  19. package/dist/abi/ICustodyPolicyFactoryView.json +15 -0
  20. package/dist/abi/ICustodyPolicyPauseView.json +15 -0
  21. package/dist/abi/IDelegationManager.json +171 -0
  22. package/dist/abi/IERC7579HookLike.json +44 -0
  23. package/dist/abi/IERC7579ModuleLike.json +28 -0
  24. package/dist/abi/PermissionlessSubregistry.json +5 -0
  25. package/dist/abi/QuorumEnforcer.json +295 -0
  26. package/dist/abi/SignatureSlotRecovery.json +88 -0
  27. package/dist/abi/SkillDefinitionRegistry.json +491 -0
  28. package/dist/abi/SmartAgentPaymaster.json +664 -0
  29. package/dist/abi/UniversalSignatureValidator.json +65 -0
  30. package/dist/abi/index.d.ts +23 -0
  31. package/dist/abi/index.js +23 -0
  32. package/dist/deployments/base-sepolia.d.ts +37 -0
  33. package/dist/deployments/base-sepolia.js +35 -0
  34. package/dist/deployments/index.d.ts +8 -0
  35. package/dist/deployments/index.js +13 -0
  36. package/package.json +20 -3
  37. package/src/AgentAccount.sol +130 -9
  38. package/src/AgentAccountFactory.sol +34 -5
  39. package/src/SmartAgentPaymaster.sol +2 -0
  40. package/src/UniversalSignatureValidator.sol +3 -0
  41. package/src/agency/DelegationManager.sol +155 -0
  42. package/src/agency/IDelegationManager.sol +35 -0
  43. package/src/agreement/AgreementRegistry.sol +306 -0
  44. package/src/attestation/AttestationRegistry.sol +320 -0
  45. package/src/custody/CustodyPolicy.sol +79 -2
  46. package/src/enforcers/AllowedMethodsEnforcer.sol +6 -0
  47. package/src/enforcers/AllowedTargetsEnforcer.sol +6 -0
  48. package/src/enforcers/CallDataHashEnforcer.sol +61 -0
  49. package/src/enforcers/QuorumEnforcer.sol +8 -0
  50. package/src/enforcers/TimestampEnforcer.sol +7 -0
  51. package/src/enforcers/ValueEnforcer.sol +6 -0
  52. package/src/geo/GeoFeatureRegistry.sol +197 -0
  53. package/src/naming/AgentNameRegistry.sol +25 -13
  54. package/src/naming/AgentNameUniversalResolver.sol +1 -1
  55. package/src/naming/PermissionlessSubregistry.sol +19 -2
  56. package/src/relationships/AgentRelationship.sol +8 -0
  57. package/src/skills/SkillDefinitionRegistry.sol +187 -0
@@ -0,0 +1,262 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "acceptSessionDelegation",
5
+ "inputs": [
6
+ {
7
+ "name": "sessionDelegationHash",
8
+ "type": "bytes32",
9
+ "internalType": "bytes32"
10
+ }
11
+ ],
12
+ "outputs": [],
13
+ "stateMutability": "nonpayable"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "addCustodian",
18
+ "inputs": [
19
+ {
20
+ "name": "owner",
21
+ "type": "address",
22
+ "internalType": "address"
23
+ }
24
+ ],
25
+ "outputs": [],
26
+ "stateMutability": "nonpayable"
27
+ },
28
+ {
29
+ "type": "function",
30
+ "name": "bundlerSigner",
31
+ "inputs": [],
32
+ "outputs": [
33
+ {
34
+ "name": "",
35
+ "type": "address",
36
+ "internalType": "address"
37
+ }
38
+ ],
39
+ "stateMutability": "view"
40
+ },
41
+ {
42
+ "type": "function",
43
+ "name": "custodianCount",
44
+ "inputs": [],
45
+ "outputs": [
46
+ {
47
+ "name": "",
48
+ "type": "uint256",
49
+ "internalType": "uint256"
50
+ }
51
+ ],
52
+ "stateMutability": "view"
53
+ },
54
+ {
55
+ "type": "function",
56
+ "name": "hasAcceptedSessionDelegation",
57
+ "inputs": [
58
+ {
59
+ "name": "sessionDelegationHash",
60
+ "type": "bytes32",
61
+ "internalType": "bytes32"
62
+ }
63
+ ],
64
+ "outputs": [
65
+ {
66
+ "name": "",
67
+ "type": "bool",
68
+ "internalType": "bool"
69
+ }
70
+ ],
71
+ "stateMutability": "view"
72
+ },
73
+ {
74
+ "type": "function",
75
+ "name": "isCustodian",
76
+ "inputs": [
77
+ {
78
+ "name": "account",
79
+ "type": "address",
80
+ "internalType": "address"
81
+ }
82
+ ],
83
+ "outputs": [
84
+ {
85
+ "name": "",
86
+ "type": "bool",
87
+ "internalType": "bool"
88
+ }
89
+ ],
90
+ "stateMutability": "view"
91
+ },
92
+ {
93
+ "type": "function",
94
+ "name": "isValidSignature",
95
+ "inputs": [
96
+ {
97
+ "name": "hash",
98
+ "type": "bytes32",
99
+ "internalType": "bytes32"
100
+ },
101
+ {
102
+ "name": "signature",
103
+ "type": "bytes",
104
+ "internalType": "bytes"
105
+ }
106
+ ],
107
+ "outputs": [
108
+ {
109
+ "name": "",
110
+ "type": "bytes4",
111
+ "internalType": "bytes4"
112
+ }
113
+ ],
114
+ "stateMutability": "view"
115
+ },
116
+ {
117
+ "type": "function",
118
+ "name": "removeCustodian",
119
+ "inputs": [
120
+ {
121
+ "name": "owner",
122
+ "type": "address",
123
+ "internalType": "address"
124
+ }
125
+ ],
126
+ "outputs": [],
127
+ "stateMutability": "nonpayable"
128
+ },
129
+ {
130
+ "type": "function",
131
+ "name": "sessionIssuer",
132
+ "inputs": [],
133
+ "outputs": [
134
+ {
135
+ "name": "",
136
+ "type": "address",
137
+ "internalType": "address"
138
+ }
139
+ ],
140
+ "stateMutability": "view"
141
+ },
142
+ {
143
+ "type": "function",
144
+ "name": "upgradeToWithAuthorization",
145
+ "inputs": [
146
+ {
147
+ "name": "newImpl",
148
+ "type": "address",
149
+ "internalType": "address"
150
+ },
151
+ {
152
+ "name": "ownerSig",
153
+ "type": "bytes",
154
+ "internalType": "bytes"
155
+ }
156
+ ],
157
+ "outputs": [],
158
+ "stateMutability": "nonpayable"
159
+ },
160
+ {
161
+ "type": "function",
162
+ "name": "validateUserOp",
163
+ "inputs": [
164
+ {
165
+ "name": "userOp",
166
+ "type": "tuple",
167
+ "internalType": "struct PackedUserOperation",
168
+ "components": [
169
+ {
170
+ "name": "sender",
171
+ "type": "address",
172
+ "internalType": "address"
173
+ },
174
+ {
175
+ "name": "nonce",
176
+ "type": "uint256",
177
+ "internalType": "uint256"
178
+ },
179
+ {
180
+ "name": "initCode",
181
+ "type": "bytes",
182
+ "internalType": "bytes"
183
+ },
184
+ {
185
+ "name": "callData",
186
+ "type": "bytes",
187
+ "internalType": "bytes"
188
+ },
189
+ {
190
+ "name": "accountGasLimits",
191
+ "type": "bytes32",
192
+ "internalType": "bytes32"
193
+ },
194
+ {
195
+ "name": "preVerificationGas",
196
+ "type": "uint256",
197
+ "internalType": "uint256"
198
+ },
199
+ {
200
+ "name": "gasFees",
201
+ "type": "bytes32",
202
+ "internalType": "bytes32"
203
+ },
204
+ {
205
+ "name": "paymasterAndData",
206
+ "type": "bytes",
207
+ "internalType": "bytes"
208
+ },
209
+ {
210
+ "name": "signature",
211
+ "type": "bytes",
212
+ "internalType": "bytes"
213
+ }
214
+ ]
215
+ },
216
+ {
217
+ "name": "userOpHash",
218
+ "type": "bytes32",
219
+ "internalType": "bytes32"
220
+ },
221
+ {
222
+ "name": "missingAccountFunds",
223
+ "type": "uint256",
224
+ "internalType": "uint256"
225
+ }
226
+ ],
227
+ "outputs": [
228
+ {
229
+ "name": "validationData",
230
+ "type": "uint256",
231
+ "internalType": "uint256"
232
+ }
233
+ ],
234
+ "stateMutability": "nonpayable"
235
+ },
236
+ {
237
+ "type": "event",
238
+ "name": "CustodianAdded",
239
+ "inputs": [
240
+ {
241
+ "name": "owner",
242
+ "type": "address",
243
+ "indexed": true,
244
+ "internalType": "address"
245
+ }
246
+ ],
247
+ "anonymous": false
248
+ },
249
+ {
250
+ "type": "event",
251
+ "name": "CustodianRemoved",
252
+ "inputs": [
253
+ {
254
+ "name": "owner",
255
+ "type": "address",
256
+ "indexed": true,
257
+ "internalType": "address"
258
+ }
259
+ ],
260
+ "anonymous": false
261
+ }
262
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "factory",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "address",
10
+ "internalType": "address"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ }
15
+ ]
@@ -0,0 +1,41 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "bundlerSigner",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "address",
10
+ "internalType": "address"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "governance",
18
+ "inputs": [],
19
+ "outputs": [
20
+ {
21
+ "name": "",
22
+ "type": "address",
23
+ "internalType": "address"
24
+ }
25
+ ],
26
+ "stateMutability": "view"
27
+ },
28
+ {
29
+ "type": "function",
30
+ "name": "sessionIssuer",
31
+ "inputs": [],
32
+ "outputs": [
33
+ {
34
+ "name": "",
35
+ "type": "address",
36
+ "internalType": "address"
37
+ }
38
+ ],
39
+ "stateMutability": "view"
40
+ }
41
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "isPaused",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "bool",
10
+ "internalType": "bool"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ }
15
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "isAgenticPrimitivesAgentAccount",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "bool",
10
+ "internalType": "bool"
11
+ }
12
+ ],
13
+ "stateMutability": "pure"
14
+ }
15
+ ]
@@ -0,0 +1,26 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "isApproved",
5
+ "inputs": [
6
+ {
7
+ "name": "signer",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ },
11
+ {
12
+ "name": "hash",
13
+ "type": "bytes32",
14
+ "internalType": "bytes32"
15
+ }
16
+ ],
17
+ "outputs": [
18
+ {
19
+ "name": "",
20
+ "type": "bool",
21
+ "internalType": "bool"
22
+ }
23
+ ],
24
+ "stateMutability": "view"
25
+ }
26
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "governance",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "address",
10
+ "internalType": "address"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ }
15
+ ]
@@ -0,0 +1,15 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "isPaused",
5
+ "inputs": [],
6
+ "outputs": [
7
+ {
8
+ "name": "",
9
+ "type": "bool",
10
+ "internalType": "bool"
11
+ }
12
+ ],
13
+ "stateMutability": "view"
14
+ }
15
+ ]
@@ -170,6 +170,177 @@
170
170
  "outputs": [],
171
171
  "stateMutability": "nonpayable"
172
172
  },
173
+ {
174
+ "type": "function",
175
+ "name": "verifyAuthorization",
176
+ "inputs": [
177
+ {
178
+ "name": "delegations",
179
+ "type": "tuple[]",
180
+ "internalType": "struct IDelegationManager.Delegation[]",
181
+ "components": [
182
+ {
183
+ "name": "delegator",
184
+ "type": "address",
185
+ "internalType": "address"
186
+ },
187
+ {
188
+ "name": "delegate",
189
+ "type": "address",
190
+ "internalType": "address"
191
+ },
192
+ {
193
+ "name": "authority",
194
+ "type": "bytes32",
195
+ "internalType": "bytes32"
196
+ },
197
+ {
198
+ "name": "caveats",
199
+ "type": "tuple[]",
200
+ "internalType": "struct IDelegationManager.Caveat[]",
201
+ "components": [
202
+ {
203
+ "name": "enforcer",
204
+ "type": "address",
205
+ "internalType": "address"
206
+ },
207
+ {
208
+ "name": "terms",
209
+ "type": "bytes",
210
+ "internalType": "bytes"
211
+ },
212
+ {
213
+ "name": "args",
214
+ "type": "bytes",
215
+ "internalType": "bytes"
216
+ }
217
+ ]
218
+ },
219
+ {
220
+ "name": "salt",
221
+ "type": "uint256",
222
+ "internalType": "uint256"
223
+ },
224
+ {
225
+ "name": "signature",
226
+ "type": "bytes",
227
+ "internalType": "bytes"
228
+ }
229
+ ]
230
+ },
231
+ {
232
+ "name": "sender",
233
+ "type": "address",
234
+ "internalType": "address"
235
+ }
236
+ ],
237
+ "outputs": [
238
+ {
239
+ "name": "ok",
240
+ "type": "bool",
241
+ "internalType": "bool"
242
+ },
243
+ {
244
+ "name": "reason",
245
+ "type": "string",
246
+ "internalType": "string"
247
+ }
248
+ ],
249
+ "stateMutability": "view"
250
+ },
251
+ {
252
+ "type": "function",
253
+ "name": "verifyAuthorizationForCall",
254
+ "inputs": [
255
+ {
256
+ "name": "delegations",
257
+ "type": "tuple[]",
258
+ "internalType": "struct IDelegationManager.Delegation[]",
259
+ "components": [
260
+ {
261
+ "name": "delegator",
262
+ "type": "address",
263
+ "internalType": "address"
264
+ },
265
+ {
266
+ "name": "delegate",
267
+ "type": "address",
268
+ "internalType": "address"
269
+ },
270
+ {
271
+ "name": "authority",
272
+ "type": "bytes32",
273
+ "internalType": "bytes32"
274
+ },
275
+ {
276
+ "name": "caveats",
277
+ "type": "tuple[]",
278
+ "internalType": "struct IDelegationManager.Caveat[]",
279
+ "components": [
280
+ {
281
+ "name": "enforcer",
282
+ "type": "address",
283
+ "internalType": "address"
284
+ },
285
+ {
286
+ "name": "terms",
287
+ "type": "bytes",
288
+ "internalType": "bytes"
289
+ },
290
+ {
291
+ "name": "args",
292
+ "type": "bytes",
293
+ "internalType": "bytes"
294
+ }
295
+ ]
296
+ },
297
+ {
298
+ "name": "salt",
299
+ "type": "uint256",
300
+ "internalType": "uint256"
301
+ },
302
+ {
303
+ "name": "signature",
304
+ "type": "bytes",
305
+ "internalType": "bytes"
306
+ }
307
+ ]
308
+ },
309
+ {
310
+ "name": "sender",
311
+ "type": "address",
312
+ "internalType": "address"
313
+ },
314
+ {
315
+ "name": "target",
316
+ "type": "address",
317
+ "internalType": "address"
318
+ },
319
+ {
320
+ "name": "value",
321
+ "type": "uint256",
322
+ "internalType": "uint256"
323
+ },
324
+ {
325
+ "name": "data",
326
+ "type": "bytes",
327
+ "internalType": "bytes"
328
+ }
329
+ ],
330
+ "outputs": [
331
+ {
332
+ "name": "ok",
333
+ "type": "bool",
334
+ "internalType": "bool"
335
+ },
336
+ {
337
+ "name": "reason",
338
+ "type": "string",
339
+ "internalType": "string"
340
+ }
341
+ ],
342
+ "stateMutability": "view"
343
+ },
173
344
  {
174
345
  "type": "event",
175
346
  "name": "DelegationRedeemed",
@@ -0,0 +1,44 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "postCheck",
5
+ "inputs": [
6
+ {
7
+ "name": "hookData",
8
+ "type": "bytes",
9
+ "internalType": "bytes"
10
+ }
11
+ ],
12
+ "outputs": [],
13
+ "stateMutability": "nonpayable"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "preCheck",
18
+ "inputs": [
19
+ {
20
+ "name": "msgSender",
21
+ "type": "address",
22
+ "internalType": "address"
23
+ },
24
+ {
25
+ "name": "value",
26
+ "type": "uint256",
27
+ "internalType": "uint256"
28
+ },
29
+ {
30
+ "name": "msgData",
31
+ "type": "bytes",
32
+ "internalType": "bytes"
33
+ }
34
+ ],
35
+ "outputs": [
36
+ {
37
+ "name": "",
38
+ "type": "bytes",
39
+ "internalType": "bytes"
40
+ }
41
+ ],
42
+ "stateMutability": "nonpayable"
43
+ }
44
+ ]
@@ -0,0 +1,28 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "onInstall",
5
+ "inputs": [
6
+ {
7
+ "name": "data",
8
+ "type": "bytes",
9
+ "internalType": "bytes"
10
+ }
11
+ ],
12
+ "outputs": [],
13
+ "stateMutability": "nonpayable"
14
+ },
15
+ {
16
+ "type": "function",
17
+ "name": "onUninstall",
18
+ "inputs": [
19
+ {
20
+ "name": "data",
21
+ "type": "bytes",
22
+ "internalType": "bytes"
23
+ }
24
+ ],
25
+ "outputs": [],
26
+ "stateMutability": "nonpayable"
27
+ }
28
+ ]
@@ -199,6 +199,11 @@
199
199
  "name": "LabelTooShort",
200
200
  "inputs": []
201
201
  },
202
+ {
203
+ "type": "error",
204
+ "name": "ReentrancyGuardReentrantCall",
205
+ "inputs": []
206
+ },
202
207
  {
203
208
  "type": "error",
204
209
  "name": "ZeroNewOwner",