@agenticprimitives/agent-profile 0.1.0-alpha.2
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/LICENSE +21 -0
- package/README.md +113 -0
- package/dist/abis.d.ts +336 -0
- package/dist/abis.d.ts.map +1 -0
- package/dist/abis.js +98 -0
- package/dist/abis.js.map +1 -0
- package/dist/caip10.d.ts +37 -0
- package/dist/caip10.d.ts.map +1 -0
- package/dist/caip10.js +56 -0
- package/dist/caip10.js.map +1 -0
- package/dist/calls.d.ts +74 -0
- package/dist/calls.d.ts.map +1 -0
- package/dist/calls.js +105 -0
- package/dist/calls.js.map +1 -0
- package/dist/client.d.ts +81 -0
- package/dist/client.d.ts.map +1 -0
- package/dist/client.js +200 -0
- package/dist/client.js.map +1 -0
- package/dist/constants.d.ts +30 -0
- package/dist/constants.d.ts.map +1 -0
- package/dist/constants.js +34 -0
- package/dist/constants.js.map +1 -0
- package/dist/errors.d.ts +22 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +44 -0
- package/dist/errors.js.map +1 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +22 -0
- package/dist/index.js.map +1 -0
- package/dist/profile.d.ts +25 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +101 -0
- package/dist/profile.js.map +1 -0
- package/dist/types.d.ts +102 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +2 -0
- package/dist/types.js.map +1 -0
- package/package.json +67 -0
- package/spec.md +12 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Agentic Trust Labs
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
# @agenticprimitives/agent-profile
|
|
2
|
+
|
|
3
|
+
Typed **profile facet** for Smart Agents — AgentCard schema, CAIP-10 helpers,
|
|
4
|
+
and endpoint-verification methods.
|
|
5
|
+
|
|
6
|
+
The canonical identifier is the Smart Agent address (`agent-account`). This
|
|
7
|
+
package publishes and verifies off-chain profile manifests **about** that
|
|
8
|
+
address. It does not deploy accounts, resolve `.agent` names, or run login
|
|
9
|
+
ceremonies.
|
|
10
|
+
|
|
11
|
+
> **Layer:** Discover — a profile **facet** (not login — that is `connect-auth`; not canonical identity — that is `agent-account`).
|
|
12
|
+
> **Canonical key:** the Smart Agent address the AgentCard describes.
|
|
13
|
+
|
|
14
|
+
Where [`agent-naming`](../agent-naming) maps names → addresses, this package
|
|
15
|
+
maps addresses → typed profiles and optional endpoint-control proofs.
|
|
16
|
+
|
|
17
|
+
## Use This When
|
|
18
|
+
|
|
19
|
+
- You author or validate an `AgentCard` (person, org, service, MCP server, …).
|
|
20
|
+
- You need deterministic `profileContentHash` for on-chain `metadata-hash`.
|
|
21
|
+
- You need CAIP-10 `nativeId` encode/decode (strict encode, permissive decode).
|
|
22
|
+
- You need endpoint verification methods (DNS TXT, signed URL, …) — Phase 2+.
|
|
23
|
+
- You build encoded calls to register or update on-chain profile anchors.
|
|
24
|
+
|
|
25
|
+
## Do Not Use This For
|
|
26
|
+
|
|
27
|
+
- `.agent` names or namehash → `agent-naming`.
|
|
28
|
+
- Smart Agent deploy / UserOps → `agent-account`.
|
|
29
|
+
- Passkey / SIWE / JWT → `connect-auth`.
|
|
30
|
+
- Trust-fabric edges → `agent-relationships`.
|
|
31
|
+
- UAID string generation → refused ([ADR-0008](../../docs/architecture/decisions/0008-caip10-nativeid-record-predicate.md)).
|
|
32
|
+
|
|
33
|
+
## Install
|
|
34
|
+
|
|
35
|
+
Workspace-internal; not yet published.
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
pnpm add @agenticprimitives/agent-profile
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## 60-Second Quickstart
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
import {
|
|
45
|
+
canonicalProfileJson,
|
|
46
|
+
profileContentHash,
|
|
47
|
+
buildCaip10Address,
|
|
48
|
+
type AgentCard,
|
|
49
|
+
} from '@agenticprimitives/agent-profile';
|
|
50
|
+
|
|
51
|
+
const canonicalAddr = '0x0000000000000000000000000000000000000003' as const;
|
|
52
|
+
|
|
53
|
+
const profile: AgentCard = {
|
|
54
|
+
type: 'person',
|
|
55
|
+
displayName: 'Alice',
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
const hash = profileContentHash(profile);
|
|
59
|
+
const nativeId = buildCaip10Address({
|
|
60
|
+
namespace: 'eip155',
|
|
61
|
+
reference: '84532',
|
|
62
|
+
address: canonicalAddr,
|
|
63
|
+
});
|
|
64
|
+
// Anchor hash + nativeId on chain via agent-naming records or profile resolver.
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Main Concepts
|
|
68
|
+
|
|
69
|
+
- **AgentCard**: HCS-11-aligned typed JSON discriminated by `type`.
|
|
70
|
+
- **Profile facet**: `metadata-uri` + `metadata-hash` pointing at the canonical SA.
|
|
71
|
+
- **CAIP-10 `nativeId`**: cross-registry back-link; must match SA on EVM chains.
|
|
72
|
+
- **Verification**: proves an MCP/A2A URL is controlled by the SA (not naming).
|
|
73
|
+
|
|
74
|
+
See [`docs/concepts.md`](docs/concepts.md).
|
|
75
|
+
|
|
76
|
+
## Subpath Exports
|
|
77
|
+
|
|
78
|
+
- `@agenticprimitives/agent-profile/caip10` — CAIP-10 helpers only.
|
|
79
|
+
- `@agenticprimitives/agent-profile/profile` — canonical JSON + content hash.
|
|
80
|
+
|
|
81
|
+
## Status
|
|
82
|
+
|
|
83
|
+
Phase 1 — pure helpers + client skeleton. `AgentIdentityClient` reads throw
|
|
84
|
+
`I Phase 2`; writes throw `I Phase 4`. Shape is locked for demo authoring.
|
|
85
|
+
|
|
86
|
+
## Security Invariants
|
|
87
|
+
|
|
88
|
+
- Profile content-hash is deterministic (canonical JSON).
|
|
89
|
+
- No raw passkey material in profiles.
|
|
90
|
+
- Verification methods are explicit, not auto-selected.
|
|
91
|
+
|
|
92
|
+
See [`docs/security.md`](docs/security.md) and [`AUDIT.md`](AUDIT.md).
|
|
93
|
+
|
|
94
|
+
## Documentation Map
|
|
95
|
+
|
|
96
|
+
- [`docs/concepts.md`](docs/concepts.md) — profile facet vs canonical SA.
|
|
97
|
+
- [`docs/api.md`](docs/api.md) — public API guide.
|
|
98
|
+
- [`docs/security.md`](docs/security.md) — invariants.
|
|
99
|
+
- [`docs/troubleshooting.md`](docs/troubleshooting.md) — common errors.
|
|
100
|
+
- [`docs/migration.md`](docs/migration.md) — migration notes.
|
|
101
|
+
- [`CLAUDE.md`](CLAUDE.md) — agent routing.
|
|
102
|
+
- [`spec.md`](spec.md) — spec pointer.
|
|
103
|
+
|
|
104
|
+
## Validation
|
|
105
|
+
|
|
106
|
+
```bash
|
|
107
|
+
pnpm check:agent-profile
|
|
108
|
+
pnpm check:forbidden-terms
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
## License
|
|
112
|
+
|
|
113
|
+
UNLICENSED.
|
package/dist/abis.d.ts
ADDED
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
export declare const agentProfileResolverAbi: readonly [{
|
|
2
|
+
readonly type: "error";
|
|
3
|
+
readonly name: "NotAgentOwner";
|
|
4
|
+
readonly inputs: readonly [];
|
|
5
|
+
}, {
|
|
6
|
+
readonly type: "error";
|
|
7
|
+
readonly name: "AlreadyRegistered";
|
|
8
|
+
readonly inputs: readonly [];
|
|
9
|
+
}, {
|
|
10
|
+
readonly type: "error";
|
|
11
|
+
readonly name: "NotRegistered";
|
|
12
|
+
readonly inputs: readonly [];
|
|
13
|
+
}, {
|
|
14
|
+
readonly type: "error";
|
|
15
|
+
readonly name: "PredicateNotActive";
|
|
16
|
+
readonly inputs: readonly [];
|
|
17
|
+
}, {
|
|
18
|
+
readonly type: "error";
|
|
19
|
+
readonly name: "AttributeNotSet";
|
|
20
|
+
readonly inputs: readonly [];
|
|
21
|
+
}, {
|
|
22
|
+
readonly type: "event";
|
|
23
|
+
readonly name: "AgentRegistered";
|
|
24
|
+
readonly inputs: readonly [{
|
|
25
|
+
readonly name: "agent";
|
|
26
|
+
readonly type: "address";
|
|
27
|
+
readonly indexed: true;
|
|
28
|
+
}, {
|
|
29
|
+
readonly name: "displayName";
|
|
30
|
+
readonly type: "string";
|
|
31
|
+
readonly indexed: false;
|
|
32
|
+
}, {
|
|
33
|
+
readonly name: "agentKind";
|
|
34
|
+
readonly type: "bytes32";
|
|
35
|
+
readonly indexed: true;
|
|
36
|
+
}];
|
|
37
|
+
}, {
|
|
38
|
+
readonly type: "event";
|
|
39
|
+
readonly name: "MetadataUpdated";
|
|
40
|
+
readonly inputs: readonly [{
|
|
41
|
+
readonly name: "agent";
|
|
42
|
+
readonly type: "address";
|
|
43
|
+
readonly indexed: true;
|
|
44
|
+
}, {
|
|
45
|
+
readonly name: "metadataURI";
|
|
46
|
+
readonly type: "string";
|
|
47
|
+
readonly indexed: false;
|
|
48
|
+
}, {
|
|
49
|
+
readonly name: "metadataHash";
|
|
50
|
+
readonly type: "bytes32";
|
|
51
|
+
readonly indexed: false;
|
|
52
|
+
}];
|
|
53
|
+
}, {
|
|
54
|
+
readonly type: "event";
|
|
55
|
+
readonly name: "PropertySet";
|
|
56
|
+
readonly inputs: readonly [{
|
|
57
|
+
readonly name: "agent";
|
|
58
|
+
readonly type: "address";
|
|
59
|
+
readonly indexed: true;
|
|
60
|
+
}, {
|
|
61
|
+
readonly name: "predicate";
|
|
62
|
+
readonly type: "bytes32";
|
|
63
|
+
readonly indexed: true;
|
|
64
|
+
}];
|
|
65
|
+
}, {
|
|
66
|
+
readonly type: "event";
|
|
67
|
+
readonly name: "AttributeSet";
|
|
68
|
+
readonly inputs: readonly [{
|
|
69
|
+
readonly name: "subject";
|
|
70
|
+
readonly type: "bytes32";
|
|
71
|
+
readonly indexed: true;
|
|
72
|
+
}, {
|
|
73
|
+
readonly name: "predicate";
|
|
74
|
+
readonly type: "bytes32";
|
|
75
|
+
readonly indexed: true;
|
|
76
|
+
}, {
|
|
77
|
+
readonly name: "datatype";
|
|
78
|
+
readonly type: "uint8";
|
|
79
|
+
readonly indexed: false;
|
|
80
|
+
}, {
|
|
81
|
+
readonly name: "version";
|
|
82
|
+
readonly type: "uint64";
|
|
83
|
+
readonly indexed: false;
|
|
84
|
+
}];
|
|
85
|
+
}, {
|
|
86
|
+
readonly type: "function";
|
|
87
|
+
readonly name: "ONTOLOGY";
|
|
88
|
+
readonly stateMutability: "view";
|
|
89
|
+
readonly inputs: readonly [];
|
|
90
|
+
readonly outputs: readonly [{
|
|
91
|
+
readonly type: "address";
|
|
92
|
+
}];
|
|
93
|
+
}, {
|
|
94
|
+
readonly type: "function";
|
|
95
|
+
readonly name: "register";
|
|
96
|
+
readonly stateMutability: "nonpayable";
|
|
97
|
+
readonly inputs: readonly [{
|
|
98
|
+
readonly name: "agent";
|
|
99
|
+
readonly type: "address";
|
|
100
|
+
}, {
|
|
101
|
+
readonly name: "displayName";
|
|
102
|
+
readonly type: "string";
|
|
103
|
+
}, {
|
|
104
|
+
readonly name: "description";
|
|
105
|
+
readonly type: "string";
|
|
106
|
+
}, {
|
|
107
|
+
readonly name: "agentKind";
|
|
108
|
+
readonly type: "bytes32";
|
|
109
|
+
}, {
|
|
110
|
+
readonly name: "profileSchemaURI";
|
|
111
|
+
readonly type: "string";
|
|
112
|
+
}];
|
|
113
|
+
readonly outputs: readonly [];
|
|
114
|
+
}, {
|
|
115
|
+
readonly type: "function";
|
|
116
|
+
readonly name: "setMetadata";
|
|
117
|
+
readonly stateMutability: "nonpayable";
|
|
118
|
+
readonly inputs: readonly [{
|
|
119
|
+
readonly name: "agent";
|
|
120
|
+
readonly type: "address";
|
|
121
|
+
}, {
|
|
122
|
+
readonly name: "metadataURI";
|
|
123
|
+
readonly type: "string";
|
|
124
|
+
}, {
|
|
125
|
+
readonly name: "metadataHash";
|
|
126
|
+
readonly type: "bytes32";
|
|
127
|
+
}];
|
|
128
|
+
readonly outputs: readonly [];
|
|
129
|
+
}, {
|
|
130
|
+
readonly type: "function";
|
|
131
|
+
readonly name: "setStringProperty";
|
|
132
|
+
readonly stateMutability: "nonpayable";
|
|
133
|
+
readonly inputs: readonly [{
|
|
134
|
+
readonly name: "agent";
|
|
135
|
+
readonly type: "address";
|
|
136
|
+
}, {
|
|
137
|
+
readonly name: "predicate";
|
|
138
|
+
readonly type: "bytes32";
|
|
139
|
+
}, {
|
|
140
|
+
readonly name: "value";
|
|
141
|
+
readonly type: "string";
|
|
142
|
+
}];
|
|
143
|
+
readonly outputs: readonly [];
|
|
144
|
+
}, {
|
|
145
|
+
readonly type: "function";
|
|
146
|
+
readonly name: "setAddressProperty";
|
|
147
|
+
readonly stateMutability: "nonpayable";
|
|
148
|
+
readonly inputs: readonly [{
|
|
149
|
+
readonly name: "agent";
|
|
150
|
+
readonly type: "address";
|
|
151
|
+
}, {
|
|
152
|
+
readonly name: "predicate";
|
|
153
|
+
readonly type: "bytes32";
|
|
154
|
+
}, {
|
|
155
|
+
readonly name: "value";
|
|
156
|
+
readonly type: "address";
|
|
157
|
+
}];
|
|
158
|
+
readonly outputs: readonly [];
|
|
159
|
+
}, {
|
|
160
|
+
readonly type: "function";
|
|
161
|
+
readonly name: "setBoolProperty";
|
|
162
|
+
readonly stateMutability: "nonpayable";
|
|
163
|
+
readonly inputs: readonly [{
|
|
164
|
+
readonly name: "agent";
|
|
165
|
+
readonly type: "address";
|
|
166
|
+
}, {
|
|
167
|
+
readonly name: "predicate";
|
|
168
|
+
readonly type: "bytes32";
|
|
169
|
+
}, {
|
|
170
|
+
readonly name: "value";
|
|
171
|
+
readonly type: "bool";
|
|
172
|
+
}];
|
|
173
|
+
readonly outputs: readonly [];
|
|
174
|
+
}, {
|
|
175
|
+
readonly type: "function";
|
|
176
|
+
readonly name: "setBytes32Property";
|
|
177
|
+
readonly stateMutability: "nonpayable";
|
|
178
|
+
readonly inputs: readonly [{
|
|
179
|
+
readonly name: "agent";
|
|
180
|
+
readonly type: "address";
|
|
181
|
+
}, {
|
|
182
|
+
readonly name: "predicate";
|
|
183
|
+
readonly type: "bytes32";
|
|
184
|
+
}, {
|
|
185
|
+
readonly name: "value";
|
|
186
|
+
readonly type: "bytes32";
|
|
187
|
+
}];
|
|
188
|
+
readonly outputs: readonly [];
|
|
189
|
+
}, {
|
|
190
|
+
readonly type: "function";
|
|
191
|
+
readonly name: "setUintProperty";
|
|
192
|
+
readonly stateMutability: "nonpayable";
|
|
193
|
+
readonly inputs: readonly [{
|
|
194
|
+
readonly name: "agent";
|
|
195
|
+
readonly type: "address";
|
|
196
|
+
}, {
|
|
197
|
+
readonly name: "predicate";
|
|
198
|
+
readonly type: "bytes32";
|
|
199
|
+
}, {
|
|
200
|
+
readonly name: "value";
|
|
201
|
+
readonly type: "uint256";
|
|
202
|
+
}];
|
|
203
|
+
readonly outputs: readonly [];
|
|
204
|
+
}, {
|
|
205
|
+
readonly type: "function";
|
|
206
|
+
readonly name: "setActive";
|
|
207
|
+
readonly stateMutability: "nonpayable";
|
|
208
|
+
readonly inputs: readonly [{
|
|
209
|
+
readonly name: "agent";
|
|
210
|
+
readonly type: "address";
|
|
211
|
+
}, {
|
|
212
|
+
readonly name: "active";
|
|
213
|
+
readonly type: "bool";
|
|
214
|
+
}];
|
|
215
|
+
readonly outputs: readonly [];
|
|
216
|
+
}, {
|
|
217
|
+
readonly type: "function";
|
|
218
|
+
readonly name: "isRegistered";
|
|
219
|
+
readonly stateMutability: "view";
|
|
220
|
+
readonly inputs: readonly [{
|
|
221
|
+
readonly name: "agent";
|
|
222
|
+
readonly type: "address";
|
|
223
|
+
}];
|
|
224
|
+
readonly outputs: readonly [{
|
|
225
|
+
readonly type: "bool";
|
|
226
|
+
}];
|
|
227
|
+
}, {
|
|
228
|
+
readonly type: "function";
|
|
229
|
+
readonly name: "getStringProperty";
|
|
230
|
+
readonly stateMutability: "view";
|
|
231
|
+
readonly inputs: readonly [{
|
|
232
|
+
readonly name: "agent";
|
|
233
|
+
readonly type: "address";
|
|
234
|
+
}, {
|
|
235
|
+
readonly name: "predicate";
|
|
236
|
+
readonly type: "bytes32";
|
|
237
|
+
}];
|
|
238
|
+
readonly outputs: readonly [{
|
|
239
|
+
readonly type: "string";
|
|
240
|
+
}];
|
|
241
|
+
}, {
|
|
242
|
+
readonly type: "function";
|
|
243
|
+
readonly name: "getAddressProperty";
|
|
244
|
+
readonly stateMutability: "view";
|
|
245
|
+
readonly inputs: readonly [{
|
|
246
|
+
readonly name: "agent";
|
|
247
|
+
readonly type: "address";
|
|
248
|
+
}, {
|
|
249
|
+
readonly name: "predicate";
|
|
250
|
+
readonly type: "bytes32";
|
|
251
|
+
}];
|
|
252
|
+
readonly outputs: readonly [{
|
|
253
|
+
readonly type: "address";
|
|
254
|
+
}];
|
|
255
|
+
}, {
|
|
256
|
+
readonly type: "function";
|
|
257
|
+
readonly name: "getBoolProperty";
|
|
258
|
+
readonly stateMutability: "view";
|
|
259
|
+
readonly inputs: readonly [{
|
|
260
|
+
readonly name: "agent";
|
|
261
|
+
readonly type: "address";
|
|
262
|
+
}, {
|
|
263
|
+
readonly name: "predicate";
|
|
264
|
+
readonly type: "bytes32";
|
|
265
|
+
}];
|
|
266
|
+
readonly outputs: readonly [{
|
|
267
|
+
readonly type: "bool";
|
|
268
|
+
}];
|
|
269
|
+
}, {
|
|
270
|
+
readonly type: "function";
|
|
271
|
+
readonly name: "getBytes32Property";
|
|
272
|
+
readonly stateMutability: "view";
|
|
273
|
+
readonly inputs: readonly [{
|
|
274
|
+
readonly name: "agent";
|
|
275
|
+
readonly type: "address";
|
|
276
|
+
}, {
|
|
277
|
+
readonly name: "predicate";
|
|
278
|
+
readonly type: "bytes32";
|
|
279
|
+
}];
|
|
280
|
+
readonly outputs: readonly [{
|
|
281
|
+
readonly type: "bytes32";
|
|
282
|
+
}];
|
|
283
|
+
}, {
|
|
284
|
+
readonly type: "function";
|
|
285
|
+
readonly name: "getUintProperty";
|
|
286
|
+
readonly stateMutability: "view";
|
|
287
|
+
readonly inputs: readonly [{
|
|
288
|
+
readonly name: "agent";
|
|
289
|
+
readonly type: "address";
|
|
290
|
+
}, {
|
|
291
|
+
readonly name: "predicate";
|
|
292
|
+
readonly type: "bytes32";
|
|
293
|
+
}];
|
|
294
|
+
readonly outputs: readonly [{
|
|
295
|
+
readonly type: "uint256";
|
|
296
|
+
}];
|
|
297
|
+
}, {
|
|
298
|
+
readonly type: "function";
|
|
299
|
+
readonly name: "getPredicateKeys";
|
|
300
|
+
readonly stateMutability: "view";
|
|
301
|
+
readonly inputs: readonly [{
|
|
302
|
+
readonly name: "agent";
|
|
303
|
+
readonly type: "address";
|
|
304
|
+
}];
|
|
305
|
+
readonly outputs: readonly [{
|
|
306
|
+
readonly type: "bytes32[]";
|
|
307
|
+
}];
|
|
308
|
+
}, {
|
|
309
|
+
readonly type: "function";
|
|
310
|
+
readonly name: "agentCount";
|
|
311
|
+
readonly stateMutability: "view";
|
|
312
|
+
readonly inputs: readonly [];
|
|
313
|
+
readonly outputs: readonly [{
|
|
314
|
+
readonly type: "uint256";
|
|
315
|
+
}];
|
|
316
|
+
}, {
|
|
317
|
+
readonly type: "function";
|
|
318
|
+
readonly name: "getAllAgents";
|
|
319
|
+
readonly stateMutability: "view";
|
|
320
|
+
readonly inputs: readonly [];
|
|
321
|
+
readonly outputs: readonly [{
|
|
322
|
+
readonly type: "address[]";
|
|
323
|
+
}];
|
|
324
|
+
}, {
|
|
325
|
+
readonly type: "function";
|
|
326
|
+
readonly name: "subjectFor";
|
|
327
|
+
readonly stateMutability: "pure";
|
|
328
|
+
readonly inputs: readonly [{
|
|
329
|
+
readonly name: "agent";
|
|
330
|
+
readonly type: "address";
|
|
331
|
+
}];
|
|
332
|
+
readonly outputs: readonly [{
|
|
333
|
+
readonly type: "bytes32";
|
|
334
|
+
}];
|
|
335
|
+
}];
|
|
336
|
+
//# sourceMappingURL=abis.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.d.ts","sourceRoot":"","sources":["../src/abis.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+F1B,CAAC"}
|
package/dist/abis.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
// Identity-contract ABIs — source of truth:
|
|
2
|
+
// packages/contracts/src/identity/*.sol (spec 217 / ID Phase 3).
|
|
3
|
+
// AgentProfileResolver inherits the shared AttributeStorage from the
|
|
4
|
+
// NS Phase 3 ontology stack; predicates registered in
|
|
5
|
+
// OntologyTermRegistry govern what can be written.
|
|
6
|
+
export const agentProfileResolverAbi = [
|
|
7
|
+
{ type: 'error', name: 'NotAgentOwner', inputs: [] },
|
|
8
|
+
{ type: 'error', name: 'AlreadyRegistered', inputs: [] },
|
|
9
|
+
{ type: 'error', name: 'NotRegistered', inputs: [] },
|
|
10
|
+
// From AttributeStorage base.
|
|
11
|
+
{ type: 'error', name: 'PredicateNotActive', inputs: [] },
|
|
12
|
+
{ type: 'error', name: 'AttributeNotSet', inputs: [] },
|
|
13
|
+
{
|
|
14
|
+
type: 'event', name: 'AgentRegistered',
|
|
15
|
+
inputs: [
|
|
16
|
+
{ name: 'agent', type: 'address', indexed: true },
|
|
17
|
+
{ name: 'displayName', type: 'string', indexed: false },
|
|
18
|
+
{ name: 'agentKind', type: 'bytes32', indexed: true },
|
|
19
|
+
],
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: 'event', name: 'MetadataUpdated',
|
|
23
|
+
inputs: [
|
|
24
|
+
{ name: 'agent', type: 'address', indexed: true },
|
|
25
|
+
{ name: 'metadataURI', type: 'string', indexed: false },
|
|
26
|
+
{ name: 'metadataHash', type: 'bytes32', indexed: false },
|
|
27
|
+
],
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
type: 'event', name: 'PropertySet',
|
|
31
|
+
inputs: [
|
|
32
|
+
{ name: 'agent', type: 'address', indexed: true },
|
|
33
|
+
{ name: 'predicate', type: 'bytes32', indexed: true },
|
|
34
|
+
],
|
|
35
|
+
},
|
|
36
|
+
// From AttributeStorage base.
|
|
37
|
+
{
|
|
38
|
+
type: 'event', name: 'AttributeSet',
|
|
39
|
+
inputs: [
|
|
40
|
+
{ name: 'subject', type: 'bytes32', indexed: true },
|
|
41
|
+
{ name: 'predicate', type: 'bytes32', indexed: true },
|
|
42
|
+
{ name: 'datatype', type: 'uint8', indexed: false },
|
|
43
|
+
{ name: 'version', type: 'uint64', indexed: false },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
{ type: 'function', name: 'ONTOLOGY', stateMutability: 'view', inputs: [], outputs: [{ type: 'address' }] },
|
|
47
|
+
// ─── Writes ─────────────────────────────────────────────────────
|
|
48
|
+
{
|
|
49
|
+
type: 'function', name: 'register', stateMutability: 'nonpayable',
|
|
50
|
+
inputs: [
|
|
51
|
+
{ name: 'agent', type: 'address' },
|
|
52
|
+
{ name: 'displayName', type: 'string' },
|
|
53
|
+
{ name: 'description', type: 'string' },
|
|
54
|
+
{ name: 'agentKind', type: 'bytes32' },
|
|
55
|
+
{ name: 'profileSchemaURI', type: 'string' },
|
|
56
|
+
], outputs: [],
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'function', name: 'setMetadata', stateMutability: 'nonpayable',
|
|
60
|
+
inputs: [
|
|
61
|
+
{ name: 'agent', type: 'address' },
|
|
62
|
+
{ name: 'metadataURI', type: 'string' },
|
|
63
|
+
{ name: 'metadataHash', type: 'bytes32' },
|
|
64
|
+
], outputs: [],
|
|
65
|
+
},
|
|
66
|
+
{ type: 'function', name: 'setStringProperty', stateMutability: 'nonpayable',
|
|
67
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }, { name: 'value', type: 'string' }], outputs: [] },
|
|
68
|
+
{ type: 'function', name: 'setAddressProperty', stateMutability: 'nonpayable',
|
|
69
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }, { name: 'value', type: 'address' }], outputs: [] },
|
|
70
|
+
{ type: 'function', name: 'setBoolProperty', stateMutability: 'nonpayable',
|
|
71
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }, { name: 'value', type: 'bool' }], outputs: [] },
|
|
72
|
+
{ type: 'function', name: 'setBytes32Property', stateMutability: 'nonpayable',
|
|
73
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }, { name: 'value', type: 'bytes32' }], outputs: [] },
|
|
74
|
+
{ type: 'function', name: 'setUintProperty', stateMutability: 'nonpayable',
|
|
75
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }, { name: 'value', type: 'uint256' }], outputs: [] },
|
|
76
|
+
{ type: 'function', name: 'setActive', stateMutability: 'nonpayable',
|
|
77
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'active', type: 'bool' }], outputs: [] },
|
|
78
|
+
// ─── Reads ──────────────────────────────────────────────────────
|
|
79
|
+
{ type: 'function', name: 'isRegistered', stateMutability: 'view',
|
|
80
|
+
inputs: [{ name: 'agent', type: 'address' }], outputs: [{ type: 'bool' }] },
|
|
81
|
+
{ type: 'function', name: 'getStringProperty', stateMutability: 'view',
|
|
82
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }], outputs: [{ type: 'string' }] },
|
|
83
|
+
{ type: 'function', name: 'getAddressProperty', stateMutability: 'view',
|
|
84
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }], outputs: [{ type: 'address' }] },
|
|
85
|
+
{ type: 'function', name: 'getBoolProperty', stateMutability: 'view',
|
|
86
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }], outputs: [{ type: 'bool' }] },
|
|
87
|
+
{ type: 'function', name: 'getBytes32Property', stateMutability: 'view',
|
|
88
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }], outputs: [{ type: 'bytes32' }] },
|
|
89
|
+
{ type: 'function', name: 'getUintProperty', stateMutability: 'view',
|
|
90
|
+
inputs: [{ name: 'agent', type: 'address' }, { name: 'predicate', type: 'bytes32' }], outputs: [{ type: 'uint256' }] },
|
|
91
|
+
{ type: 'function', name: 'getPredicateKeys', stateMutability: 'view',
|
|
92
|
+
inputs: [{ name: 'agent', type: 'address' }], outputs: [{ type: 'bytes32[]' }] },
|
|
93
|
+
{ type: 'function', name: 'agentCount', stateMutability: 'view', inputs: [], outputs: [{ type: 'uint256' }] },
|
|
94
|
+
{ type: 'function', name: 'getAllAgents', stateMutability: 'view', inputs: [], outputs: [{ type: 'address[]' }] },
|
|
95
|
+
{ type: 'function', name: 'subjectFor', stateMutability: 'pure',
|
|
96
|
+
inputs: [{ name: 'agent', type: 'address' }], outputs: [{ type: 'bytes32' }] },
|
|
97
|
+
];
|
|
98
|
+
//# sourceMappingURL=abis.js.map
|
package/dist/abis.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"abis.js","sourceRoot":"","sources":["../src/abis.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,iEAAiE;AACjE,qEAAqE;AACrE,sDAAsD;AACtD,mDAAmD;AAEnD,MAAM,CAAC,MAAM,uBAAuB,GAAG;IACrC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE;IACpD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE,MAAM,EAAE,EAAE,EAAE;IACxD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,eAAe,EAAE,MAAM,EAAE,EAAE,EAAE;IACpD,8BAA8B;IAC9B,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,oBAAoB,EAAE,MAAM,EAAE,EAAE,EAAE;IACzD,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,iBAAiB,EAAE,MAAM,EAAE,EAAE,EAAE;IAEtD;QACE,IAAI,EAAE,OAAO,EAAE,I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,SAAS,EAAE,CAAC,EAAE;IAC7G,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,EAAE,CAAC,EAAE;IACjH,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM;QAC7D,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAAE;CACxE,CAAC"}
|
package/dist/caip10.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* CAIP-10 chain-agnostic account identifier helpers (HCS-14 +
|
|
3
|
+
* ERC-8004 aligned; ADR-0008).
|
|
4
|
+
*
|
|
5
|
+
* Subpath: `@agenticprimitives/agent-profile/caip10`.
|
|
6
|
+
*
|
|
7
|
+
* Grammar (per CAIP-10):
|
|
8
|
+
* <namespace>:<reference>:<address>
|
|
9
|
+
*
|
|
10
|
+
* Encoder is strict (allowlist-only namespaces); decoder is permissive
|
|
11
|
+
* (any grammar-valid string accepted) — this is the "validate at write,
|
|
12
|
+
* forward-compat at read" pattern.
|
|
13
|
+
*/
|
|
14
|
+
import { CAIP10_NAMESPACE_ALLOWLIST } from './constants';
|
|
15
|
+
import type { Caip10Address, Caip10Parts } from '@agenticprimitives/types';
|
|
16
|
+
export type { Caip10Address, Caip10Parts };
|
|
17
|
+
export { CAIP10_NAMESPACE_ALLOWLIST };
|
|
18
|
+
/**
|
|
19
|
+
* Build a CAIP-10 string. Strict on the encode side — namespace must
|
|
20
|
+
* be in `CAIP10_NAMESPACE_ALLOWLIST`. Address half is lowercased for
|
|
21
|
+
* `eip155` so callers can't smuggle two different on-chain canonical
|
|
22
|
+
* forms past the equality check.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildCaip10Address(parts: Caip10Parts): Caip10Address;
|
|
25
|
+
/**
|
|
26
|
+
* Parse any grammar-valid CAIP-10 string into its parts. Permissive on
|
|
27
|
+
* the read side — does NOT require namespace allowlist membership
|
|
28
|
+
* (forward-compat: future indexers may publish namespaces we haven't
|
|
29
|
+
* yet added). Throws only on grammar violations.
|
|
30
|
+
*/
|
|
31
|
+
export declare function parseCaip10(value: string): Caip10Parts;
|
|
32
|
+
/**
|
|
33
|
+
* Grammar-only validity check (does NOT enforce the allowlist).
|
|
34
|
+
* Use `buildCaip10Address` if you need allowlist enforcement.
|
|
35
|
+
*/
|
|
36
|
+
export declare function isValidCaip10(value: string): boolean;
|
|
37
|
+
//# sourceMappingURL=caip10.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"caip10.d.ts","sourceRoot":"","sources":["../src/caip10.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAEzD,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAM3E,YAAY,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC;AAC3C,OAAO,EAAE,0BAA0B,EAAE,CAAC;AAItC;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,WAAW,GAAG,aAAa,CAcpE;AAED;;;;;GAKG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,WAAW,CAMtD;AAED;;;GAGG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEpD"}
|