@agenticprimitives/contracts 1.0.0-alpha.25 → 1.0.0-alpha.27

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 (33) hide show
  1. package/AUDIT.md +5 -0
  2. package/README.md +2 -0
  3. package/deployments-faithchain.json +2 -1
  4. package/dist/abi/AgentAccount.json +127 -0
  5. package/dist/abi/AgentAccountFactory.json +18 -0
  6. package/dist/abi/ApprovedHashRegistry.json +47 -2
  7. package/dist/abi/CustodyPolicy.json +35 -0
  8. package/dist/abi/DigestBindingEnforcer.json +125 -3
  9. package/dist/abi/EstateProjectionRegistry.json +293 -0
  10. package/dist/abi/IApprovedHashRegistryWrite.json +35 -0
  11. package/dist/abi/ICustodyPolicyAccountModuleView.json +31 -0
  12. package/dist/abi/PayloadClassesEnforcer.json +117 -0
  13. package/dist/abi/{ContentCorpusRegistry.json → ReceiptAnchorRegistry.json} +61 -82
  14. package/dist/abi/TreasurySpendPolicy.json +369 -0
  15. package/dist/abi/index.d.ts +6 -0
  16. package/dist/abi/index.js +6 -0
  17. package/dist/deployments/faithchain.d.ts +1 -0
  18. package/dist/deployments/faithchain.js +1 -0
  19. package/package.json +16 -5
  20. package/src/AgentAccount.sol +137 -7
  21. package/src/AgentAccountFactory.sol +17 -10
  22. package/src/ApprovedHashRegistry.sol +41 -6
  23. package/src/IAgentAccount.sol +23 -0
  24. package/src/custody/CustodyPolicy.sol +72 -2
  25. package/src/custody/TreasurySpendPolicy.sol +166 -0
  26. package/src/enforcers/DigestBindingEnforcer.sol +45 -10
  27. package/src/enforcers/PayloadClassesEnforcer.sol +30 -0
  28. package/src/provenance/ReceiptAnchorRegistry.sol +55 -0
  29. package/src/registry/EstateProjectionRegistry.sol +109 -0
  30. package/deployments-anvil.json +0 -1
  31. package/dist/abi/AgentSkillClaimRegistry.json +0 -735
  32. package/dist/abi/IERC1271.json +0 -26
  33. package/dist/abi/ValidationAttestationRegistry.json +0 -205
@@ -0,0 +1,369 @@
1
+ [
2
+ {
3
+ "type": "function",
4
+ "name": "budget",
5
+ "inputs": [
6
+ {
7
+ "name": "account",
8
+ "type": "address",
9
+ "internalType": "address"
10
+ }
11
+ ],
12
+ "outputs": [
13
+ {
14
+ "name": "asset",
15
+ "type": "address",
16
+ "internalType": "address"
17
+ },
18
+ {
19
+ "name": "ceiling",
20
+ "type": "uint256",
21
+ "internalType": "uint256"
22
+ },
23
+ {
24
+ "name": "windowSeconds",
25
+ "type": "uint64",
26
+ "internalType": "uint64"
27
+ },
28
+ {
29
+ "name": "windowStart",
30
+ "type": "uint64",
31
+ "internalType": "uint64"
32
+ },
33
+ {
34
+ "name": "windowIndex",
35
+ "type": "uint64",
36
+ "internalType": "uint64"
37
+ },
38
+ {
39
+ "name": "spent",
40
+ "type": "uint256",
41
+ "internalType": "uint256"
42
+ },
43
+ {
44
+ "name": "installed",
45
+ "type": "bool",
46
+ "internalType": "bool"
47
+ }
48
+ ],
49
+ "stateMutability": "view"
50
+ },
51
+ {
52
+ "type": "function",
53
+ "name": "decodeBatch",
54
+ "inputs": [
55
+ {
56
+ "name": "msgData",
57
+ "type": "bytes",
58
+ "internalType": "bytes"
59
+ }
60
+ ],
61
+ "outputs": [
62
+ {
63
+ "name": "",
64
+ "type": "tuple[]",
65
+ "internalType": "struct TreasurySpendPolicy.Call[]",
66
+ "components": [
67
+ {
68
+ "name": "target",
69
+ "type": "address",
70
+ "internalType": "address"
71
+ },
72
+ {
73
+ "name": "value",
74
+ "type": "uint256",
75
+ "internalType": "uint256"
76
+ },
77
+ {
78
+ "name": "data",
79
+ "type": "bytes",
80
+ "internalType": "bytes"
81
+ }
82
+ ]
83
+ }
84
+ ],
85
+ "stateMutability": "pure"
86
+ },
87
+ {
88
+ "type": "function",
89
+ "name": "decodeSingle",
90
+ "inputs": [
91
+ {
92
+ "name": "msgData",
93
+ "type": "bytes",
94
+ "internalType": "bytes"
95
+ }
96
+ ],
97
+ "outputs": [
98
+ {
99
+ "name": "",
100
+ "type": "address",
101
+ "internalType": "address"
102
+ },
103
+ {
104
+ "name": "",
105
+ "type": "uint256",
106
+ "internalType": "uint256"
107
+ },
108
+ {
109
+ "name": "",
110
+ "type": "bytes",
111
+ "internalType": "bytes"
112
+ }
113
+ ],
114
+ "stateMutability": "pure"
115
+ },
116
+ {
117
+ "type": "function",
118
+ "name": "isModuleType",
119
+ "inputs": [
120
+ {
121
+ "name": "moduleTypeId",
122
+ "type": "uint256",
123
+ "internalType": "uint256"
124
+ }
125
+ ],
126
+ "outputs": [
127
+ {
128
+ "name": "",
129
+ "type": "bool",
130
+ "internalType": "bool"
131
+ }
132
+ ],
133
+ "stateMutability": "pure"
134
+ },
135
+ {
136
+ "type": "function",
137
+ "name": "moduleId",
138
+ "inputs": [],
139
+ "outputs": [
140
+ {
141
+ "name": "",
142
+ "type": "string",
143
+ "internalType": "string"
144
+ }
145
+ ],
146
+ "stateMutability": "pure"
147
+ },
148
+ {
149
+ "type": "function",
150
+ "name": "onInstall",
151
+ "inputs": [
152
+ {
153
+ "name": "initData",
154
+ "type": "bytes",
155
+ "internalType": "bytes"
156
+ }
157
+ ],
158
+ "outputs": [],
159
+ "stateMutability": "nonpayable"
160
+ },
161
+ {
162
+ "type": "function",
163
+ "name": "onUninstall",
164
+ "inputs": [
165
+ {
166
+ "name": "",
167
+ "type": "bytes",
168
+ "internalType": "bytes"
169
+ }
170
+ ],
171
+ "outputs": [],
172
+ "stateMutability": "nonpayable"
173
+ },
174
+ {
175
+ "type": "function",
176
+ "name": "postCheck",
177
+ "inputs": [
178
+ {
179
+ "name": "",
180
+ "type": "bytes",
181
+ "internalType": "bytes"
182
+ }
183
+ ],
184
+ "outputs": [],
185
+ "stateMutability": "nonpayable"
186
+ },
187
+ {
188
+ "type": "function",
189
+ "name": "preCheck",
190
+ "inputs": [
191
+ {
192
+ "name": "",
193
+ "type": "address",
194
+ "internalType": "address"
195
+ },
196
+ {
197
+ "name": "",
198
+ "type": "uint256",
199
+ "internalType": "uint256"
200
+ },
201
+ {
202
+ "name": "msgData",
203
+ "type": "bytes",
204
+ "internalType": "bytes"
205
+ }
206
+ ],
207
+ "outputs": [
208
+ {
209
+ "name": "",
210
+ "type": "bytes",
211
+ "internalType": "bytes"
212
+ }
213
+ ],
214
+ "stateMutability": "nonpayable"
215
+ },
216
+ {
217
+ "type": "function",
218
+ "name": "remaining",
219
+ "inputs": [
220
+ {
221
+ "name": "account",
222
+ "type": "address",
223
+ "internalType": "address"
224
+ }
225
+ ],
226
+ "outputs": [
227
+ {
228
+ "name": "left",
229
+ "type": "uint256",
230
+ "internalType": "uint256"
231
+ },
232
+ {
233
+ "name": "ceiling",
234
+ "type": "uint256",
235
+ "internalType": "uint256"
236
+ }
237
+ ],
238
+ "stateMutability": "view"
239
+ },
240
+ {
241
+ "type": "event",
242
+ "name": "BudgetInstalled",
243
+ "inputs": [
244
+ {
245
+ "name": "account",
246
+ "type": "address",
247
+ "indexed": true,
248
+ "internalType": "address"
249
+ },
250
+ {
251
+ "name": "asset",
252
+ "type": "address",
253
+ "indexed": true,
254
+ "internalType": "address"
255
+ },
256
+ {
257
+ "name": "ceiling",
258
+ "type": "uint256",
259
+ "indexed": false,
260
+ "internalType": "uint256"
261
+ },
262
+ {
263
+ "name": "windowSeconds",
264
+ "type": "uint64",
265
+ "indexed": false,
266
+ "internalType": "uint64"
267
+ },
268
+ {
269
+ "name": "windowStart",
270
+ "type": "uint64",
271
+ "indexed": false,
272
+ "internalType": "uint64"
273
+ }
274
+ ],
275
+ "anonymous": false
276
+ },
277
+ {
278
+ "type": "event",
279
+ "name": "BudgetUninstalled",
280
+ "inputs": [
281
+ {
282
+ "name": "account",
283
+ "type": "address",
284
+ "indexed": true,
285
+ "internalType": "address"
286
+ }
287
+ ],
288
+ "anonymous": false
289
+ },
290
+ {
291
+ "type": "event",
292
+ "name": "Spent",
293
+ "inputs": [
294
+ {
295
+ "name": "account",
296
+ "type": "address",
297
+ "indexed": true,
298
+ "internalType": "address"
299
+ },
300
+ {
301
+ "name": "windowIndex",
302
+ "type": "uint64",
303
+ "indexed": true,
304
+ "internalType": "uint64"
305
+ },
306
+ {
307
+ "name": "amount",
308
+ "type": "uint256",
309
+ "indexed": false,
310
+ "internalType": "uint256"
311
+ },
312
+ {
313
+ "name": "spentInWindow",
314
+ "type": "uint256",
315
+ "indexed": false,
316
+ "internalType": "uint256"
317
+ }
318
+ ],
319
+ "anonymous": false
320
+ },
321
+ {
322
+ "type": "error",
323
+ "name": "AlreadyInstalledOn",
324
+ "inputs": [
325
+ {
326
+ "name": "account",
327
+ "type": "address",
328
+ "internalType": "address"
329
+ }
330
+ ]
331
+ },
332
+ {
333
+ "type": "error",
334
+ "name": "BadBudget",
335
+ "inputs": []
336
+ },
337
+ {
338
+ "type": "error",
339
+ "name": "BudgetExceeded",
340
+ "inputs": [
341
+ {
342
+ "name": "ceiling",
343
+ "type": "uint256",
344
+ "internalType": "uint256"
345
+ },
346
+ {
347
+ "name": "spentInWindow",
348
+ "type": "uint256",
349
+ "internalType": "uint256"
350
+ },
351
+ {
352
+ "name": "amount",
353
+ "type": "uint256",
354
+ "internalType": "uint256"
355
+ }
356
+ ]
357
+ },
358
+ {
359
+ "type": "error",
360
+ "name": "NotInstalledOn",
361
+ "inputs": [
362
+ {
363
+ "name": "account",
364
+ "type": "address",
365
+ "internalType": "address"
366
+ }
367
+ ]
368
+ }
369
+ ]
@@ -24,6 +24,7 @@ export declare const CaveatEnforcerBase: Abi;
24
24
  export declare const CustodyPolicy: Abi;
25
25
  export declare const DelegationManager: Abi;
26
26
  export declare const DigestBindingEnforcer: Abi;
27
+ export declare const EstateProjectionRegistry: Abi;
27
28
  export declare const GeoFeatureRegistry: Abi;
28
29
  export declare const GovernanceManaged: Abi;
29
30
  export declare const IAgentAccount: Abi;
@@ -32,8 +33,10 @@ export declare const IAgentAccountFactoryView: Abi;
32
33
  export declare const IAgentAccountPauseView: Abi;
33
34
  export declare const IAgenticPrimitivesAgentAccount: Abi;
34
35
  export declare const IApprovedHashRegistryView: Abi;
36
+ export declare const IApprovedHashRegistryWrite: Abi;
35
37
  export declare const IAttributeReader: Abi;
36
38
  export declare const ICaveatEnforcer: Abi;
39
+ export declare const ICustodyPolicyAccountModuleView: Abi;
37
40
  export declare const ICustodyPolicyFactoryView: Abi;
38
41
  export declare const ICustodyPolicyPauseView: Abi;
39
42
  export declare const IDelegationManager: Abi;
@@ -49,11 +52,13 @@ export declare const MultiSendCallOnly: Abi;
49
52
  export declare const MultiSendCallOnlyHarness: Abi;
50
53
  export declare const OntologyTermRegistry: Abi;
51
54
  export declare const P256Verifier: Abi;
55
+ export declare const PayloadClassesEnforcer: Abi;
52
56
  export declare const PaymentEnforcer: Abi;
53
57
  export declare const PaymentEscrow: Abi;
54
58
  export declare const PaymentReceiptRegistry: Abi;
55
59
  export declare const PermissionlessSubregistry: Abi;
56
60
  export declare const QuorumEnforcer: Abi;
61
+ export declare const ReceiptAnchorRegistry: Abi;
57
62
  export declare const RelationshipTypeRegistry: Abi;
58
63
  export declare const ShapeRegistry: Abi;
59
64
  export declare const SignatureSlotRecovery: Abi;
@@ -61,6 +66,7 @@ export declare const SkillDefinitionRegistry: Abi;
61
66
  export declare const SmartAgentModuleTypes: Abi;
62
67
  export declare const SmartAgentPaymaster: Abi;
63
68
  export declare const TimestampEnforcer: Abi;
69
+ export declare const TreasurySpendPolicy: Abi;
64
70
  export declare const UniversalSignatureValidator: Abi;
65
71
  export declare const ValueEnforcer: Abi;
66
72
  export declare const WebAuthnLib: Abi;
package/dist/abi/index.js CHANGED
@@ -24,6 +24,7 @@ export { default as CaveatEnforcerBase } from './CaveatEnforcerBase.json' with {
24
24
  export { default as CustodyPolicy } from './CustodyPolicy.json' with { type: 'json' };
25
25
  export { default as DelegationManager } from './DelegationManager.json' with { type: 'json' };
26
26
  export { default as DigestBindingEnforcer } from './DigestBindingEnforcer.json' with { type: 'json' };
27
+ export { default as EstateProjectionRegistry } from './EstateProjectionRegistry.json' with { type: 'json' };
27
28
  export { default as GeoFeatureRegistry } from './GeoFeatureRegistry.json' with { type: 'json' };
28
29
  export { default as GovernanceManaged } from './GovernanceManaged.json' with { type: 'json' };
29
30
  export { default as IAgentAccount } from './IAgentAccount.json' with { type: 'json' };
@@ -32,8 +33,10 @@ export { default as IAgentAccountFactoryView } from './IAgentAccountFactoryView.
32
33
  export { default as IAgentAccountPauseView } from './IAgentAccountPauseView.json' with { type: 'json' };
33
34
  export { default as IAgenticPrimitivesAgentAccount } from './IAgenticPrimitivesAgentAccount.json' with { type: 'json' };
34
35
  export { default as IApprovedHashRegistryView } from './IApprovedHashRegistryView.json' with { type: 'json' };
36
+ export { default as IApprovedHashRegistryWrite } from './IApprovedHashRegistryWrite.json' with { type: 'json' };
35
37
  export { default as IAttributeReader } from './IAttributeReader.json' with { type: 'json' };
36
38
  export { default as ICaveatEnforcer } from './ICaveatEnforcer.json' with { type: 'json' };
39
+ export { default as ICustodyPolicyAccountModuleView } from './ICustodyPolicyAccountModuleView.json' with { type: 'json' };
37
40
  export { default as ICustodyPolicyFactoryView } from './ICustodyPolicyFactoryView.json' with { type: 'json' };
38
41
  export { default as ICustodyPolicyPauseView } from './ICustodyPolicyPauseView.json' with { type: 'json' };
39
42
  export { default as IDelegationManager } from './IDelegationManager.json' with { type: 'json' };
@@ -49,11 +52,13 @@ export { default as MultiSendCallOnly } from './MultiSendCallOnly.json' with { t
49
52
  export { default as MultiSendCallOnlyHarness } from './MultiSendCallOnlyHarness.json' with { type: 'json' };
50
53
  export { default as OntologyTermRegistry } from './OntologyTermRegistry.json' with { type: 'json' };
51
54
  export { default as P256Verifier } from './P256Verifier.json' with { type: 'json' };
55
+ export { default as PayloadClassesEnforcer } from './PayloadClassesEnforcer.json' with { type: 'json' };
52
56
  export { default as PaymentEnforcer } from './PaymentEnforcer.json' with { type: 'json' };
53
57
  export { default as PaymentEscrow } from './PaymentEscrow.json' with { type: 'json' };
54
58
  export { default as PaymentReceiptRegistry } from './PaymentReceiptRegistry.json' with { type: 'json' };
55
59
  export { default as PermissionlessSubregistry } from './PermissionlessSubregistry.json' with { type: 'json' };
56
60
  export { default as QuorumEnforcer } from './QuorumEnforcer.json' with { type: 'json' };
61
+ export { default as ReceiptAnchorRegistry } from './ReceiptAnchorRegistry.json' with { type: 'json' };
57
62
  export { default as RelationshipTypeRegistry } from './RelationshipTypeRegistry.json' with { type: 'json' };
58
63
  export { default as ShapeRegistry } from './ShapeRegistry.json' with { type: 'json' };
59
64
  export { default as SignatureSlotRecovery } from './SignatureSlotRecovery.json' with { type: 'json' };
@@ -61,6 +66,7 @@ export { default as SkillDefinitionRegistry } from './SkillDefinitionRegistry.js
61
66
  export { default as SmartAgentModuleTypes } from './SmartAgentModuleTypes.json' with { type: 'json' };
62
67
  export { default as SmartAgentPaymaster } from './SmartAgentPaymaster.json' with { type: 'json' };
63
68
  export { default as TimestampEnforcer } from './TimestampEnforcer.json' with { type: 'json' };
69
+ export { default as TreasurySpendPolicy } from './TreasurySpendPolicy.json' with { type: 'json' };
64
70
  export { default as UniversalSignatureValidator } from './UniversalSignatureValidator.json' with { type: 'json' };
65
71
  export { default as ValueEnforcer } from './ValueEnforcer.json' with { type: 'json' };
66
72
  export { default as WebAuthnLib } from './WebAuthnLib.json' with { type: 'json' };
@@ -36,6 +36,7 @@ export interface Deployments {
36
36
  readonly "valueEnforcer": Address;
37
37
  readonly "agentRegistryBase": Address;
38
38
  readonly "digestBindingEnforcer": Address;
39
+ readonly "receiptAnchorRegistry": Address;
39
40
  readonly "chainId": number;
40
41
  readonly "permissionlessSubregistries": string;
41
42
  readonly "deploymentEpoch": string;
@@ -48,6 +48,7 @@ export const CONTRACTS = {
48
48
  },
49
49
  "agentRegistryBase": "0x0Be172F1b5cfD1d084CEc2cF2Af0A0cE9023Deb1",
50
50
  "digestBindingEnforcer": "0xA3bb9BCC9b2F6F2419E1aBe5ED6Fd5399b9E68e1",
51
+ "receiptAnchorRegistry": "0x0e339334B4438F7546FD53837FDC8943cB3Cf54C",
51
52
  "deploymentEpoch": "ep_80afd31afaeacbf9"
52
53
  };
53
54
  export default CONTRACTS;
package/package.json CHANGED
@@ -1,18 +1,22 @@
1
1
  {
2
2
  "name": "@agenticprimitives/contracts",
3
- "version": "1.0.0-alpha.25",
3
+ "version": "1.0.0-alpha.27",
4
4
  "type": "module",
5
5
  "description": "Solidity contracts + ABIs + flattened sources + per-network deployment addresses for the agenticprimitives stack.",
6
+ "homepage": "https://agenticprimitives.dev",
7
+ "bugs": {
8
+ "url": "https://github.com/agentictrustlabs/agenticprimitives/issues"
9
+ },
10
+ "author": {
11
+ "name": "Agentic Trust Labs",
12
+ "url": "https://agenticprimitives.dev"
13
+ },
6
14
  "license": "MIT",
7
15
  "repository": {
8
16
  "type": "git",
9
17
  "url": "git+https://github.com/agentictrustlabs/agenticprimitives.git",
10
18
  "directory": "packages/contracts"
11
19
  },
12
- "homepage": "https://github.com/agentictrustlabs/agenticprimitives/tree/master/packages/contracts",
13
- "bugs": {
14
- "url": "https://github.com/agentictrustlabs/agenticprimitives/issues"
15
- },
16
20
  "exports": {
17
21
  "./abi": "./dist/abi/index.js",
18
22
  "./abi/*": "./dist/abi/*.json",
@@ -48,6 +52,13 @@
48
52
  "peerDependencies": {
49
53
  "viem": "^2.52.2"
50
54
  },
55
+ "keywords": [
56
+ "agentic-primitives",
57
+ "agenticprimitives",
58
+ "ai-agents",
59
+ "agent-authority",
60
+ "agentic-trust"
61
+ ],
51
62
  "scripts": {
52
63
  "setup": "bash setup.sh",
53
64
  "build": "forge build && pnpm run build:abi && pnpm run build:deployments",