agent0-sdk 1.0.1__py3-none-any.whl → 1.2.0__py3-none-any.whl

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.
agent0_sdk/__init__.py CHANGED
@@ -30,7 +30,7 @@ except ImportError:
30
30
  Agent = None
31
31
  _sdk_available = False
32
32
 
33
- __version__ = "1.0.1"
33
+ __version__ = "1.2.0"
34
34
  __all__ = [
35
35
  "SDK",
36
36
  "Agent",
agent0_sdk/core/agent.py CHANGED
@@ -327,7 +327,8 @@ class Agent:
327
327
  oasf_endpoint = Endpoint(
328
328
  type=EndpointType.OASF,
329
329
  value="https://github.com/agntcy/oasf/",
330
- meta={"version": "v0.8.0", "skills": [], "domains": []}
330
+ # Version string follows ERC-8004 spec example ("0.8")
331
+ meta={"version": "0.8", "skills": [], "domains": []}
331
332
  )
332
333
  self.registration_file.endpoints.append(oasf_endpoint)
333
334
  return oasf_endpoint
@@ -529,14 +530,14 @@ class Agent:
529
530
  raise ValueError("Wallet address cannot be empty. Use a non-zero address.")
530
531
 
531
532
  # Validate address format
532
- if not addr.startswith("0x") or len(addr) != 42:
533
- raise ValueError(f"Invalid Ethereum address format: {addr}. Must be 42 characters starting with '0x'")
534
-
535
- # Validate hexadecimal characters
536
- try:
537
- int(addr[2:], 16)
538
- except ValueError:
539
- raise ValueError(f"Invalid hexadecimal characters in address: {addr}")
533
+ if not addr.startswith("0x") or len(addr) != 42:
534
+ raise ValueError(f"Invalid Ethereum address format: {addr}. Must be 42 characters starting with '0x'")
535
+
536
+ # Validate hexadecimal characters
537
+ try:
538
+ int(addr[2:], 16)
539
+ except ValueError:
540
+ raise ValueError(f"Invalid hexadecimal characters in address: {addr}")
540
541
 
541
542
  # Determine chain ID to use (local bookkeeping)
542
543
  if chainId is None:
@@ -159,7 +159,7 @@ IDENTITY_REGISTRY_ABI = [
159
159
  {"internalType": "uint256", "name": "agentId", "type": "uint256"}
160
160
  ],
161
161
  "name": "getAgentWallet",
162
- "outputs": [{"internalType": "address", "name": "", "type": "address"}],
162
+ "outputs": [{"internalType": "bytes", "name": "", "type": "bytes"}],
163
163
  "stateMutability": "view",
164
164
  "type": "function"
165
165
  },
@@ -175,6 +175,15 @@ IDENTITY_REGISTRY_ABI = [
175
175
  "stateMutability": "nonpayable",
176
176
  "type": "function"
177
177
  },
178
+ {
179
+ "inputs": [
180
+ {"internalType": "uint256", "name": "agentId", "type": "uint256"}
181
+ ],
182
+ "name": "unsetAgentWallet",
183
+ "outputs": [],
184
+ "stateMutability": "nonpayable",
185
+ "type": "function"
186
+ },
178
187
 
179
188
  # Events
180
189
  {
@@ -222,7 +231,8 @@ REPUTATION_REGISTRY_ABI = [
222
231
  {
223
232
  "inputs": [
224
233
  {"internalType": "uint256", "name": "agentId", "type": "uint256"},
225
- {"internalType": "uint8", "name": "score", "type": "uint8"},
234
+ {"internalType": "int256", "name": "value", "type": "int256"},
235
+ {"internalType": "uint8", "name": "valueDecimals", "type": "uint8"},
226
236
  {"internalType": "string", "name": "tag1", "type": "string"},
227
237
  {"internalType": "string", "name": "tag2", "type": "string"},
228
238
  {"internalType": "string", "name": "endpoint", "type": "string"},
@@ -275,7 +285,8 @@ REPUTATION_REGISTRY_ABI = [
275
285
  ],
276
286
  "name": "readFeedback",
277
287
  "outputs": [
278
- {"internalType": "uint8", "name": "score", "type": "uint8"},
288
+ {"internalType": "int256", "name": "value", "type": "int256"},
289
+ {"internalType": "uint8", "name": "valueDecimals", "type": "uint8"},
279
290
  {"internalType": "string", "name": "tag1", "type": "string"},
280
291
  {"internalType": "string", "name": "tag2", "type": "string"},
281
292
  {"internalType": "bool", "name": "isRevoked", "type": "bool"}
@@ -293,7 +304,8 @@ REPUTATION_REGISTRY_ABI = [
293
304
  "name": "getSummary",
294
305
  "outputs": [
295
306
  {"internalType": "uint64", "name": "count", "type": "uint64"},
296
- {"internalType": "uint8", "name": "averageScore", "type": "uint8"}
307
+ {"internalType": "int256", "name": "summaryValue", "type": "int256"},
308
+ {"internalType": "uint8", "name": "summaryValueDecimals", "type": "uint8"}
297
309
  ],
298
310
  "stateMutability": "view",
299
311
  "type": "function"
@@ -308,9 +320,10 @@ REPUTATION_REGISTRY_ABI = [
308
320
  ],
309
321
  "name": "readAllFeedback",
310
322
  "outputs": [
311
- {"internalType": "address[]", "name": "clientAddresses", "type": "address[]"},
323
+ {"internalType": "address[]", "name": "clients", "type": "address[]"},
312
324
  {"internalType": "uint64[]", "name": "feedbackIndexes", "type": "uint64[]"},
313
- {"internalType": "uint8[]", "name": "scores", "type": "uint8[]"},
325
+ {"internalType": "int256[]", "name": "values", "type": "int256[]"},
326
+ {"internalType": "uint8[]", "name": "valueDecimals", "type": "uint8[]"},
314
327
  {"internalType": "string[]", "name": "tag1s", "type": "string[]"},
315
328
  {"internalType": "string[]", "name": "tag2s", "type": "string[]"},
316
329
  {"internalType": "bool[]", "name": "revokedStatuses", "type": "bool[]"}
@@ -345,8 +358,10 @@ REPUTATION_REGISTRY_ABI = [
345
358
  {"indexed": True, "internalType": "uint256", "name": "agentId", "type": "uint256"},
346
359
  {"indexed": True, "internalType": "address", "name": "clientAddress", "type": "address"},
347
360
  {"indexed": False, "internalType": "uint64", "name": "feedbackIndex", "type": "uint64"},
348
- {"indexed": False, "internalType": "uint8", "name": "score", "type": "uint8"},
349
- {"indexed": True, "internalType": "string", "name": "tag1", "type": "string"},
361
+ {"indexed": False, "internalType": "int256", "name": "value", "type": "int256"},
362
+ {"indexed": False, "internalType": "uint8", "name": "valueDecimals", "type": "uint8"},
363
+ {"indexed": True, "internalType": "string", "name": "indexedTag1", "type": "string"},
364
+ {"indexed": False, "internalType": "string", "name": "tag1", "type": "string"},
350
365
  {"indexed": False, "internalType": "string", "name": "tag2", "type": "string"},
351
366
  {"indexed": False, "internalType": "string", "name": "endpoint", "type": "string"},
352
367
  {"indexed": False, "internalType": "string", "name": "feedbackURI", "type": "string"},