agent0-sdk 1.1.3 → 1.3.0
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/README.md +10 -10
- package/dist/core/agent.d.ts +10 -3
- package/dist/core/agent.d.ts.map +1 -1
- package/dist/core/agent.js +56 -10
- package/dist/core/agent.js.map +1 -1
- package/dist/core/contracts.d.ts +36 -5
- package/dist/core/contracts.d.ts.map +1 -1
- package/dist/core/contracts.js +17 -5
- package/dist/core/contracts.js.map +1 -1
- package/dist/core/feedback-manager.d.ts +3 -3
- package/dist/core/feedback-manager.d.ts.map +1 -1
- package/dist/core/feedback-manager.js +29 -23
- package/dist/core/feedback-manager.js.map +1 -1
- package/dist/core/indexer.d.ts +1 -1
- package/dist/core/indexer.js +14 -14
- package/dist/core/indexer.js.map +1 -1
- package/dist/core/sdk.d.ts +2 -2
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +5 -5
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/subgraph-client.d.ts +4 -4
- package/dist/core/subgraph-client.d.ts.map +1 -1
- package/dist/core/subgraph-client.js +20 -20
- package/dist/core/subgraph-client.js.map +1 -1
- package/dist/core/viem-chain-client.d.ts.map +1 -1
- package/dist/core/viem-chain-client.js +7 -4
- package/dist/core/viem-chain-client.js.map +1 -1
- package/dist/models/generated/subgraph-types.d.ts +2 -3
- package/dist/models/generated/subgraph-types.d.ts.map +1 -1
- package/dist/models/interfaces.d.ts +13 -6
- package/dist/models/interfaces.d.ts.map +1 -1
- package/dist/utils/validation.d.ts +1 -1
- package/dist/utils/validation.d.ts.map +1 -1
- package/dist/utils/validation.js +2 -2
- package/dist/utils/validation.js.map +1 -1
- package/dist/utils/value-encoding.d.ts +22 -0
- package/dist/utils/value-encoding.d.ts.map +1 -0
- package/dist/utils/value-encoding.js +133 -0
- package/dist/utils/value-encoding.js.map +1 -0
- package/package.json +1 -1
- package/dist/core/web3-client.d.ts +0 -191
- package/dist/core/web3-client.d.ts.map +0 -1
- package/dist/core/web3-client.js +0 -350
- package/dist/core/web3-client.js.map +0 -1
- package/dist/taxonomies/all_domains.json +0 -1565
- package/dist/taxonomies/all_skills.json +0 -1030
package/dist/core/web3-client.js
DELETED
|
@@ -1,350 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Web3 integration layer for smart contract interactions using ethers.js
|
|
3
|
-
*/
|
|
4
|
-
import { ethers, } from 'ethers';
|
|
5
|
-
/**
|
|
6
|
-
* Web3 client for interacting with ERC-8004 smart contracts
|
|
7
|
-
*/
|
|
8
|
-
export class Web3Client {
|
|
9
|
-
/**
|
|
10
|
-
* Initialize Web3 client
|
|
11
|
-
* @param rpcUrl - RPC endpoint URL
|
|
12
|
-
* @param signerOrKey - Optional private key string OR ethers Wallet/Signer for signing transactions
|
|
13
|
-
*/
|
|
14
|
-
constructor(rpcUrl, signerOrKey) {
|
|
15
|
-
this.provider = new ethers.JsonRpcProvider(rpcUrl);
|
|
16
|
-
if (signerOrKey) {
|
|
17
|
-
if (typeof signerOrKey === 'string') {
|
|
18
|
-
// Private key string - create a new Wallet
|
|
19
|
-
// Validate that it's not an empty string
|
|
20
|
-
if (signerOrKey.trim() === '') {
|
|
21
|
-
throw new Error('Private key cannot be empty');
|
|
22
|
-
}
|
|
23
|
-
this.signer = new ethers.Wallet(signerOrKey, this.provider);
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
// Already a Wallet or Signer - connect to provider if needed
|
|
27
|
-
const currentProvider = signerOrKey.provider;
|
|
28
|
-
if (currentProvider && currentProvider === this.provider) {
|
|
29
|
-
// Already connected to the same provider
|
|
30
|
-
this.signer = signerOrKey;
|
|
31
|
-
}
|
|
32
|
-
else if (typeof signerOrKey.connect === 'function') {
|
|
33
|
-
// Connect to provider
|
|
34
|
-
try {
|
|
35
|
-
this.signer = signerOrKey.connect(this.provider);
|
|
36
|
-
}
|
|
37
|
-
catch (error) {
|
|
38
|
-
throw new Error(`Failed to connect signer to provider: ${error instanceof Error ? error.message : String(error)}`);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
else {
|
|
42
|
-
// Signer without connect method - use as-is
|
|
43
|
-
this.signer = signerOrKey;
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
// Get chain ID asynchronously (will be set in async initialization)
|
|
48
|
-
// For now, we'll fetch it when needed
|
|
49
|
-
this.chainId = 0n;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Initialize the client (fetch chain ID)
|
|
53
|
-
*/
|
|
54
|
-
async initialize() {
|
|
55
|
-
const network = await this.provider.getNetwork();
|
|
56
|
-
this.chainId = network.chainId;
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Get contract instance
|
|
60
|
-
*/
|
|
61
|
-
getContract(address, abi) {
|
|
62
|
-
const signerOrProvider = this.signer || this.provider;
|
|
63
|
-
return new ethers.Contract(address, abi, signerOrProvider);
|
|
64
|
-
}
|
|
65
|
-
/**
|
|
66
|
-
* Call a contract method (view/pure function)
|
|
67
|
-
*/
|
|
68
|
-
async callContract(contract, methodName, ...args) {
|
|
69
|
-
const method = contract[methodName];
|
|
70
|
-
if (!method || typeof method !== 'function') {
|
|
71
|
-
throw new Error(`Method ${methodName} not found on contract`);
|
|
72
|
-
}
|
|
73
|
-
return await method(...args);
|
|
74
|
-
}
|
|
75
|
-
/**
|
|
76
|
-
* Execute a contract transaction
|
|
77
|
-
* For overloaded functions like register(), use registerAgent() wrapper instead
|
|
78
|
-
*/
|
|
79
|
-
async transactContract(contract, methodName, options = {}, ...args) {
|
|
80
|
-
if (!this.signer) {
|
|
81
|
-
throw new Error('Cannot execute transaction: SDK is in read-only mode. Provide a private key to enable write operations.');
|
|
82
|
-
}
|
|
83
|
-
// Special handling for register() function with multiple overloads
|
|
84
|
-
if (methodName === 'register') {
|
|
85
|
-
return this.registerAgent(contract, options, ...args);
|
|
86
|
-
}
|
|
87
|
-
const method = contract[methodName];
|
|
88
|
-
if (!method || typeof method !== 'function') {
|
|
89
|
-
throw new Error(`Method ${methodName} not found on contract`);
|
|
90
|
-
}
|
|
91
|
-
// Build transaction options - filter out undefined values
|
|
92
|
-
const txOptions = Object.fromEntries(Object.entries(options).filter(([_, value]) => value !== undefined));
|
|
93
|
-
// Send transaction
|
|
94
|
-
const tx = await method(...args);
|
|
95
|
-
const txResponse = await tx;
|
|
96
|
-
return txResponse.hash;
|
|
97
|
-
}
|
|
98
|
-
/**
|
|
99
|
-
* Router wrapper for register() function overloads
|
|
100
|
-
* Intelligently selects the correct overload based on arguments:
|
|
101
|
-
* - register() - no arguments
|
|
102
|
-
* - register(string agentURI) - just agentURI
|
|
103
|
-
* - register(string agentURI, tuple[] metadata) - agentURI + metadata
|
|
104
|
-
*/
|
|
105
|
-
async registerAgent(contract, options, ...args) {
|
|
106
|
-
if (!this.signer) {
|
|
107
|
-
throw new Error('No signer available for transaction');
|
|
108
|
-
}
|
|
109
|
-
const contractInterface = contract.interface;
|
|
110
|
-
// Determine which overload to use based on arguments
|
|
111
|
-
let functionName;
|
|
112
|
-
let callArgs;
|
|
113
|
-
if (args.length === 0) {
|
|
114
|
-
// register() - no arguments
|
|
115
|
-
functionName = 'register()';
|
|
116
|
-
callArgs = [];
|
|
117
|
-
}
|
|
118
|
-
else if (args.length === 1 && typeof args[0] === 'string') {
|
|
119
|
-
// register(string agentURI) - just agentURI
|
|
120
|
-
functionName = 'register(string)';
|
|
121
|
-
callArgs = [args[0]];
|
|
122
|
-
}
|
|
123
|
-
else if (args.length === 2 && typeof args[0] === 'string' && Array.isArray(args[1])) {
|
|
124
|
-
// register(string agentURI, tuple[] metadata) - agentURI + metadata
|
|
125
|
-
functionName = 'register(string,(string,bytes)[])';
|
|
126
|
-
callArgs = [args[0], args[1]];
|
|
127
|
-
}
|
|
128
|
-
else {
|
|
129
|
-
throw new Error(`Invalid arguments for register(). Expected: () | (string) | (string, tuple[]), got ${args.length} arguments`);
|
|
130
|
-
}
|
|
131
|
-
// Get the specific function fragment using the signature
|
|
132
|
-
const functionFragment = contractInterface.getFunction(functionName);
|
|
133
|
-
if (!functionFragment) {
|
|
134
|
-
throw new Error(`Function ${functionName} not found in contract ABI`);
|
|
135
|
-
}
|
|
136
|
-
// Encode function data to avoid ambiguity - this bypasses function resolution
|
|
137
|
-
const data = contractInterface.encodeFunctionData(functionFragment, callArgs);
|
|
138
|
-
// Send transaction directly with encoded data (no function call resolution needed)
|
|
139
|
-
const txResponse = await this.signer.sendTransaction({
|
|
140
|
-
to: contract.target,
|
|
141
|
-
data: data,
|
|
142
|
-
});
|
|
143
|
-
return txResponse.hash;
|
|
144
|
-
}
|
|
145
|
-
/**
|
|
146
|
-
* Wait for transaction to be mined
|
|
147
|
-
*/
|
|
148
|
-
async waitForTransaction(txHash, timeout = 180000) {
|
|
149
|
-
return (await this.provider.waitForTransaction(txHash, undefined, timeout));
|
|
150
|
-
}
|
|
151
|
-
/**
|
|
152
|
-
* Get contract events
|
|
153
|
-
*/
|
|
154
|
-
async getEvents(contract, eventName, fromBlock = 0, toBlock) {
|
|
155
|
-
const filter = contract.filters[eventName]();
|
|
156
|
-
return await contract.queryFilter(filter, fromBlock, toBlock);
|
|
157
|
-
}
|
|
158
|
-
/**
|
|
159
|
-
* Sign a message with the account's private key
|
|
160
|
-
*/
|
|
161
|
-
async signMessage(message) {
|
|
162
|
-
if (!this.signer) {
|
|
163
|
-
throw new Error('No signer available');
|
|
164
|
-
}
|
|
165
|
-
return await this.signer.signMessage(message);
|
|
166
|
-
}
|
|
167
|
-
/**
|
|
168
|
-
* Sign typed data (EIP-712) with the account's private key
|
|
169
|
-
*/
|
|
170
|
-
async signTypedData(domain, types, value) {
|
|
171
|
-
if (!this.signer) {
|
|
172
|
-
throw new Error('No signer available');
|
|
173
|
-
}
|
|
174
|
-
// ethers.js v6 signTypedData signature
|
|
175
|
-
const sig = await this.signer.signTypedData(domain, types, value);
|
|
176
|
-
return this.normalizeEcdsaSignature(sig);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Build canonical EIP-712 typed data for IdentityRegistry.setAgentWallet (ERC-8004 Jan 2026).
|
|
180
|
-
*
|
|
181
|
-
* Contract expects:
|
|
182
|
-
* - domain: name="ERC8004IdentityRegistry", version="1"
|
|
183
|
-
* - primary type: AgentWalletSet(uint256 agentId,address newWallet,address owner,uint256 deadline)
|
|
184
|
-
*/
|
|
185
|
-
buildAgentWalletSetTypedData(params) {
|
|
186
|
-
const domain = {
|
|
187
|
-
name: params.domainName || 'ERC8004IdentityRegistry',
|
|
188
|
-
version: params.domainVersion || '1',
|
|
189
|
-
chainId: params.chainId,
|
|
190
|
-
verifyingContract: params.verifyingContract,
|
|
191
|
-
};
|
|
192
|
-
const types = {
|
|
193
|
-
AgentWalletSet: [
|
|
194
|
-
{ name: 'agentId', type: 'uint256' },
|
|
195
|
-
{ name: 'newWallet', type: 'address' },
|
|
196
|
-
{ name: 'owner', type: 'address' },
|
|
197
|
-
{ name: 'deadline', type: 'uint256' },
|
|
198
|
-
],
|
|
199
|
-
};
|
|
200
|
-
const message = {
|
|
201
|
-
agentId: params.agentId,
|
|
202
|
-
newWallet: params.newWallet,
|
|
203
|
-
owner: params.owner,
|
|
204
|
-
deadline: params.deadline,
|
|
205
|
-
};
|
|
206
|
-
return { domain, types, message };
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Legacy typed-data variant (without owner field).
|
|
210
|
-
* Some deployments may use AgentWalletSet(uint256 agentId,address newWallet,uint256 deadline).
|
|
211
|
-
*/
|
|
212
|
-
buildAgentWalletSetTypedDataNoOwner(params) {
|
|
213
|
-
const domain = {
|
|
214
|
-
name: params.domainName || 'ERC8004IdentityRegistry',
|
|
215
|
-
version: params.domainVersion || '1',
|
|
216
|
-
chainId: params.chainId,
|
|
217
|
-
verifyingContract: params.verifyingContract,
|
|
218
|
-
};
|
|
219
|
-
const types = {
|
|
220
|
-
AgentWalletSet: [
|
|
221
|
-
{ name: 'agentId', type: 'uint256' },
|
|
222
|
-
{ name: 'newWallet', type: 'address' },
|
|
223
|
-
{ name: 'deadline', type: 'uint256' },
|
|
224
|
-
],
|
|
225
|
-
};
|
|
226
|
-
const message = {
|
|
227
|
-
agentId: params.agentId,
|
|
228
|
-
newWallet: params.newWallet,
|
|
229
|
-
deadline: params.deadline,
|
|
230
|
-
};
|
|
231
|
-
return { domain, types, message };
|
|
232
|
-
}
|
|
233
|
-
/**
|
|
234
|
-
* Sign EIP-712 typed data with either:
|
|
235
|
-
* - a private key string (EOA), or
|
|
236
|
-
* - an ethers Signer (EOA / smart account with a signer abstraction).
|
|
237
|
-
*/
|
|
238
|
-
async signTypedDataWith(signerOrKey, domain, types, message) {
|
|
239
|
-
if (typeof signerOrKey === 'string') {
|
|
240
|
-
const key = signerOrKey.startsWith('0x') ? signerOrKey : `0x${signerOrKey}`;
|
|
241
|
-
const wallet = new ethers.Wallet(key);
|
|
242
|
-
const sig = await wallet.signTypedData(domain, types, message);
|
|
243
|
-
return this.normalizeEcdsaSignature(sig);
|
|
244
|
-
}
|
|
245
|
-
const sig = await signerOrKey.signTypedData(domain, types, message);
|
|
246
|
-
return this.normalizeEcdsaSignature(sig);
|
|
247
|
-
}
|
|
248
|
-
/**
|
|
249
|
-
* Normalize ECDSA signatures to use v = 27/28 (some contracts/libraries expect this).
|
|
250
|
-
* ethers may produce signatures with v in {0,1}.
|
|
251
|
-
*/
|
|
252
|
-
normalizeEcdsaSignature(signature) {
|
|
253
|
-
const sig = signature.startsWith('0x') ? signature : `0x${signature}`;
|
|
254
|
-
const bytes = ethers.getBytes(sig);
|
|
255
|
-
if (bytes.length !== 65) {
|
|
256
|
-
return sig;
|
|
257
|
-
}
|
|
258
|
-
const v = bytes[64];
|
|
259
|
-
if (v === 0 || v === 1) {
|
|
260
|
-
bytes[64] = v + 27;
|
|
261
|
-
return ethers.hexlify(bytes);
|
|
262
|
-
}
|
|
263
|
-
return sig;
|
|
264
|
-
}
|
|
265
|
-
/**
|
|
266
|
-
* Recover the signer address for EIP-712 typed data (EOA path).
|
|
267
|
-
*/
|
|
268
|
-
recoverTypedDataSigner(domain, types, message, signature) {
|
|
269
|
-
return ethers.verifyTypedData(domain, types, message, signature);
|
|
270
|
-
}
|
|
271
|
-
/**
|
|
272
|
-
* Resolve an address for a provided signer or private key string.
|
|
273
|
-
*/
|
|
274
|
-
async addressOf(signerOrKey) {
|
|
275
|
-
if (typeof signerOrKey === 'string') {
|
|
276
|
-
const key = signerOrKey.startsWith('0x') ? signerOrKey : `0x${signerOrKey}`;
|
|
277
|
-
return new ethers.Wallet(key).address;
|
|
278
|
-
}
|
|
279
|
-
return await signerOrKey.getAddress();
|
|
280
|
-
}
|
|
281
|
-
/**
|
|
282
|
-
* Recover address from message and signature
|
|
283
|
-
*/
|
|
284
|
-
recoverAddress(message, signature) {
|
|
285
|
-
return ethers.verifyMessage(message, signature);
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Compute Keccak-256 hash
|
|
289
|
-
*/
|
|
290
|
-
keccak256(data) {
|
|
291
|
-
if (typeof data === 'string') {
|
|
292
|
-
return ethers.keccak256(ethers.toUtf8Bytes(data));
|
|
293
|
-
}
|
|
294
|
-
// For Uint8Array, convert to hex string first
|
|
295
|
-
return ethers.keccak256(ethers.hexlify(data));
|
|
296
|
-
}
|
|
297
|
-
/**
|
|
298
|
-
* Convert address to checksum format
|
|
299
|
-
*/
|
|
300
|
-
toChecksumAddress(address) {
|
|
301
|
-
return ethers.getAddress(address);
|
|
302
|
-
}
|
|
303
|
-
/**
|
|
304
|
-
* Check if string is a valid Ethereum address
|
|
305
|
-
*/
|
|
306
|
-
isAddress(address) {
|
|
307
|
-
try {
|
|
308
|
-
return ethers.isAddress(address);
|
|
309
|
-
}
|
|
310
|
-
catch {
|
|
311
|
-
return false;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Get ETH balance of an address
|
|
316
|
-
*/
|
|
317
|
-
async getBalance(address) {
|
|
318
|
-
return await this.provider.getBalance(address);
|
|
319
|
-
}
|
|
320
|
-
/**
|
|
321
|
-
* Get transaction count (nonce) of an address
|
|
322
|
-
*/
|
|
323
|
-
async getTransactionCount(address) {
|
|
324
|
-
return await this.provider.getTransactionCount(address, 'pending');
|
|
325
|
-
}
|
|
326
|
-
/**
|
|
327
|
-
* Get the account address (if signer is available)
|
|
328
|
-
*/
|
|
329
|
-
get address() {
|
|
330
|
-
if (!this.signer)
|
|
331
|
-
return undefined;
|
|
332
|
-
// Wallet has address property, Signer might need getAddress()
|
|
333
|
-
if ('address' in this.signer) {
|
|
334
|
-
return this.signer.address;
|
|
335
|
-
}
|
|
336
|
-
// For generic Signer, we can't get address synchronously
|
|
337
|
-
// This is a limitation of the Signer interface
|
|
338
|
-
return undefined;
|
|
339
|
-
}
|
|
340
|
-
/**
|
|
341
|
-
* Get the account address asynchronously (if signer is available)
|
|
342
|
-
* Use this method when you need the address from a generic Signer
|
|
343
|
-
*/
|
|
344
|
-
async getAddress() {
|
|
345
|
-
if (!this.signer)
|
|
346
|
-
return undefined;
|
|
347
|
-
return await this.signer.getAddress();
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
//# sourceMappingURL=web3-client.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"web3-client.js","sourceRoot":"","sources":["../../src/core/web3-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EACL,MAAM,GAMP,MAAM,QAAQ,CAAC;AAShB;;GAEG;AACH,MAAM,OAAO,UAAU;IAKrB;;;;OAIG;IACH,YAAY,MAAc,EAAE,WAAsC;QAChE,IAAI,CAAC,QAAQ,GAAG,IAAI,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,CAAC;QAEnD,IAAI,WAAW,EAAE,CAAC;YAChB,IAAI,OAAO,WAAW,KAAK,QAAQ,EAAE,CAAC;gBACpC,2CAA2C;gBAC3C,yCAAyC;gBACzC,IAAI,WAAW,CAAC,IAAI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