trustrouter 0.1.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/LICENSE +21 -0
- package/README.md +151 -0
- package/SKILL.md +105 -0
- package/dist/cache.d.ts +19 -0
- package/dist/cache.d.ts.map +1 -0
- package/dist/cache.js +45 -0
- package/dist/cache.js.map +1 -0
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +58 -0
- package/dist/cli.js.map +1 -0
- package/dist/commands/find.d.ts +11 -0
- package/dist/commands/find.d.ts.map +1 -0
- package/dist/commands/find.js +100 -0
- package/dist/commands/find.js.map +1 -0
- package/dist/commands/inspect.d.ts +8 -0
- package/dist/commands/inspect.d.ts.map +1 -0
- package/dist/commands/inspect.js +137 -0
- package/dist/commands/inspect.js.map +1 -0
- package/dist/commands/list.d.ts +11 -0
- package/dist/commands/list.d.ts.map +1 -0
- package/dist/commands/list.js +93 -0
- package/dist/commands/list.js.map +1 -0
- package/dist/registry.d.ts +40 -0
- package/dist/registry.d.ts.map +1 -0
- package/dist/registry.js +437 -0
- package/dist/registry.js.map +1 -0
- package/dist/router/index.d.ts +14 -0
- package/dist/router/index.d.ts.map +1 -0
- package/dist/router/index.js +67 -0
- package/dist/router/index.js.map +1 -0
- package/package.json +55 -0
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import Table from "cli-table3";
|
|
3
|
+
import { fetchAgentById, fetchAgents } from "../registry.js";
|
|
4
|
+
import { computeTrustScore } from "../router/index.js";
|
|
5
|
+
import { setRefresh } from "../cache.js";
|
|
6
|
+
// Service type icons
|
|
7
|
+
const SERVICE_ICONS = {
|
|
8
|
+
a2a: "🤖",
|
|
9
|
+
mcp: "🔧",
|
|
10
|
+
web: "🌐",
|
|
11
|
+
oasf: "📦",
|
|
12
|
+
x402: "💰",
|
|
13
|
+
};
|
|
14
|
+
function serviceIcon(name) {
|
|
15
|
+
return SERVICE_ICONS[name.toLowerCase()] || "🔗";
|
|
16
|
+
}
|
|
17
|
+
export async function inspectCommand(idOrName, options) {
|
|
18
|
+
const isJson = options.output === "json";
|
|
19
|
+
if (options.refresh)
|
|
20
|
+
setRefresh(true);
|
|
21
|
+
try {
|
|
22
|
+
if (!isJson)
|
|
23
|
+
console.log(chalk.dim("\n Querying ERC-8004 service registry via public RPC..."));
|
|
24
|
+
let agent = null;
|
|
25
|
+
// Try numeric ID first
|
|
26
|
+
const numericId = parseInt(idOrName);
|
|
27
|
+
if (!isNaN(numericId) && String(numericId) === idOrName.trim()) {
|
|
28
|
+
agent = await fetchAgentById(numericId, options.chain);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
// Name-based search: fetch a batch and find by name
|
|
32
|
+
if (!isJson)
|
|
33
|
+
console.log(chalk.dim(` Searching by name: "${idOrName}"...`));
|
|
34
|
+
const agents = await fetchAgents({ chain: options.chain, first: 200 });
|
|
35
|
+
const needle = idOrName.toLowerCase();
|
|
36
|
+
agent = agents.find((a) => {
|
|
37
|
+
const name = a.registration.name?.toLowerCase() || "";
|
|
38
|
+
return name === needle || name.includes(needle);
|
|
39
|
+
}) ?? null;
|
|
40
|
+
}
|
|
41
|
+
if (!agent) {
|
|
42
|
+
if (isJson) {
|
|
43
|
+
console.log(JSON.stringify({ error: `Service "${idOrName}" not found` }));
|
|
44
|
+
process.exit(1);
|
|
45
|
+
}
|
|
46
|
+
console.log(chalk.yellow(`\n ⚠ Service "${idOrName}" not found.\n`));
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
const trustScore = computeTrustScore(agent);
|
|
50
|
+
if (isJson) {
|
|
51
|
+
console.log(JSON.stringify({
|
|
52
|
+
agentId: agent.agentId,
|
|
53
|
+
name: agent.registration.name,
|
|
54
|
+
description: agent.registration.description,
|
|
55
|
+
owner: agent.owner,
|
|
56
|
+
services: agent.registration.services || [],
|
|
57
|
+
x402Support: agent.registration.x402Support || false,
|
|
58
|
+
supportedTrust: agent.registration.supportedTrust || [],
|
|
59
|
+
trustScore,
|
|
60
|
+
feedbackCount: agent.feedbackCount,
|
|
61
|
+
avgScore: agent.avgScore,
|
|
62
|
+
}, null, 2));
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
// ── Pretty output ──────────────────────────────────────────
|
|
66
|
+
const name = agent.registration.name || "(unnamed)";
|
|
67
|
+
const desc = agent.registration.description || "(no description)";
|
|
68
|
+
console.log("");
|
|
69
|
+
console.log(chalk.bold.cyan(` 🔍 Service #${agent.agentId}`));
|
|
70
|
+
console.log(chalk.dim(" " + "─".repeat(58)));
|
|
71
|
+
// Info table
|
|
72
|
+
const infoTable = new Table({
|
|
73
|
+
chars: { mid: "", "left-mid": "", "mid-mid": "", "right-mid": "" },
|
|
74
|
+
colWidths: [16, 46],
|
|
75
|
+
style: { head: [], border: ["dim"], "padding-left": 2, "padding-right": 1 },
|
|
76
|
+
});
|
|
77
|
+
infoTable.push([chalk.bold("Name"), chalk.white.bold(name)], [chalk.bold("Description"), chalk.white(trunc(desc, 42))], [chalk.bold("Owner"), chalk.dim(trunc(agent.owner, 42))], [chalk.bold("Chain"), chalk.cyan(options.chain)]);
|
|
78
|
+
console.log(infoTable.toString());
|
|
79
|
+
// Services table
|
|
80
|
+
console.log(chalk.bold("\n 📡 Endpoints"));
|
|
81
|
+
if (agent.registration.services?.length) {
|
|
82
|
+
const svcTable = new Table({
|
|
83
|
+
head: ["Type", "Endpoint", "Version"].map(h => chalk.bold(h)),
|
|
84
|
+
colWidths: [12, 40, 10],
|
|
85
|
+
style: { head: [], border: ["dim"], "padding-left": 2, "padding-right": 1 },
|
|
86
|
+
});
|
|
87
|
+
agent.registration.services.forEach((svc) => {
|
|
88
|
+
svcTable.push([
|
|
89
|
+
serviceIcon(svc.name) + " " + chalk.green(svc.name.toUpperCase()),
|
|
90
|
+
chalk.dim(trunc(svc.endpoint, 38)),
|
|
91
|
+
svc.version ? chalk.dim(`v${svc.version}`) : chalk.dim("-"),
|
|
92
|
+
]);
|
|
93
|
+
});
|
|
94
|
+
console.log(svcTable.toString());
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
console.log(chalk.dim(" (none registered)"));
|
|
98
|
+
}
|
|
99
|
+
// Trust & Reputation table
|
|
100
|
+
console.log(chalk.bold("\n ⭐ Trust & Reputation"));
|
|
101
|
+
const trustTable = new Table({
|
|
102
|
+
chars: { mid: "", "left-mid": "", "mid-mid": "", "right-mid": "" },
|
|
103
|
+
colWidths: [16, 46],
|
|
104
|
+
style: { head: [], border: ["dim"], "padding-left": 2, "padding-right": 1 },
|
|
105
|
+
});
|
|
106
|
+
const scoreColor = trustScore >= 70 ? chalk.bold.green : trustScore >= 40 ? chalk.bold.yellow : chalk.bold.red;
|
|
107
|
+
trustTable.push([chalk.bold("Trust Score"), scoreColor(`${trustScore.toFixed(1)}/100`) + " " + scoreBar(trustScore)], [chalk.bold("Feedback"), `${agent.feedbackCount} review${agent.feedbackCount !== 1 ? "s" : ""}`], [chalk.bold("Avg Score"), agent.avgScore > 0 ? `${agent.avgScore.toFixed(2)}/100` : chalk.dim("n/a")], [chalk.bold("Validation"), agent.validationCount > 0 ? `${agent.validationCount} proof(s), avg ${agent.validationAvg}%` : chalk.dim("No proofs")], [chalk.bold("x402 Pay"), agent.registration.x402Support ? chalk.green.bold("✓ Supported") : chalk.dim("✗ Not supported")]);
|
|
108
|
+
console.log(trustTable.toString());
|
|
109
|
+
// Supported trust types
|
|
110
|
+
if (agent.registration.supportedTrust?.length) {
|
|
111
|
+
console.log(chalk.bold("\n 🛡️ Trust Types"));
|
|
112
|
+
agent.registration.supportedTrust.forEach((t) => {
|
|
113
|
+
console.log(chalk.green(` ▸ ${t}`));
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
console.log("");
|
|
117
|
+
}
|
|
118
|
+
catch (err) {
|
|
119
|
+
if (isJson) {
|
|
120
|
+
console.log(JSON.stringify({ error: err.message }));
|
|
121
|
+
process.exit(1);
|
|
122
|
+
}
|
|
123
|
+
console.error(chalk.red(`\n ✗ Error: ${err.message}\n`));
|
|
124
|
+
process.exit(1);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function scoreBar(score) {
|
|
128
|
+
const n = Math.min(100, Math.max(0, score));
|
|
129
|
+
const filled = Math.round(n / 10);
|
|
130
|
+
const bar = "█".repeat(filled) + "░".repeat(10 - filled);
|
|
131
|
+
const color = n >= 70 ? chalk.green : n >= 40 ? chalk.yellow : chalk.red;
|
|
132
|
+
return color(bar);
|
|
133
|
+
}
|
|
134
|
+
function trunc(s, n) {
|
|
135
|
+
return s.length > n ? s.slice(0, n - 1) + "…" : s;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=inspect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inspect.js","sourceRoot":"","sources":["../../src/commands/inspect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAEvD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,qBAAqB;AACrB,MAAM,aAAa,GAA2B;IAC1C,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,GAAG,EAAE,IAAI;IACT,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;CACb,CAAC;AAEF,SAAS,WAAW,CAAC,IAAY;IAC7B,OAAO,aAAa,CAAC,IAAI,CAAC,WAAW,EAAE,CAAC,IAAI,IAAI,CAAC;AACrD,CAAC;AAQD,MAAM,CAAC,KAAK,UAAU,cAAc,CAAC,QAAgB,EAAE,OAAuB;IAC1E,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;IACzC,IAAI,O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AAC,CAAC,CAAC,CAAC;IACpB,CAAC;AACL,CAAC;AAED,SAAS,QAAQ,CAAC,KAAa;IAC3B,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC,CAAC;IAC5C,MAAM,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAClC,MAAM,GAAG,GAAG,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,MAAM,CAAC,EAAE,GAAG,MAAM,CAAC,CAAC;IACzD,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IACzE,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC;AACtB,CAAC;AAED,SAAS,KAAK,CAAC,CAAS,EAAE,CAAS;IAC/B,OAAO,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
interface ListOptions {
|
|
2
|
+
chain: string;
|
|
3
|
+
sort: string;
|
|
4
|
+
limit: string;
|
|
5
|
+
type?: string;
|
|
6
|
+
output: string;
|
|
7
|
+
refresh?: boolean;
|
|
8
|
+
}
|
|
9
|
+
export declare function listCommand(options: ListOptions): Promise<void>;
|
|
10
|
+
export {};
|
|
11
|
+
//# sourceMappingURL=list.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.d.ts","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAMA,UAAU,WAAW;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAsB,WAAW,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CA8ErE"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import Table from "cli-table3";
|
|
3
|
+
import { fetchAgents, getTotalAgents } from "../registry.js";
|
|
4
|
+
import { rankAgents } from "../router/index.js";
|
|
5
|
+
import { setRefresh } from "../cache.js";
|
|
6
|
+
export async function listCommand(options) {
|
|
7
|
+
const isJson = options.output === "json";
|
|
8
|
+
if (options.refresh)
|
|
9
|
+
setRefresh(true);
|
|
10
|
+
try {
|
|
11
|
+
if (!isJson)
|
|
12
|
+
console.log(chalk.dim("\n Querying ERC-8004 service registry via public RPC..."));
|
|
13
|
+
const total = await getTotalAgents(options.chain);
|
|
14
|
+
const agents = await fetchAgents({ chain: options.chain, first: Math.min(parseInt(options.limit) * 2, 100) });
|
|
15
|
+
const results = rankAgents(agents, {
|
|
16
|
+
type: options.type,
|
|
17
|
+
sort: options.sort,
|
|
18
|
+
limit: parseInt(options.limit),
|
|
19
|
+
});
|
|
20
|
+
if (results.length === 0) {
|
|
21
|
+
if (isJson) {
|
|
22
|
+
console.log(JSON.stringify([]));
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
console.log(chalk.yellow("\n No services found.\n"));
|
|
26
|
+
}
|
|
27
|
+
return;
|
|
28
|
+
}
|
|
29
|
+
if (isJson) {
|
|
30
|
+
console.log(JSON.stringify(results.map((r) => ({
|
|
31
|
+
agentId: r.agent.agentId,
|
|
32
|
+
name: r.agent.registration.name,
|
|
33
|
+
trustScore: r.trustScore,
|
|
34
|
+
feedbackCount: r.agent.feedbackCount,
|
|
35
|
+
avgScore: r.agent.avgScore,
|
|
36
|
+
validationCount: r.agent.validationCount,
|
|
37
|
+
validationAvg: r.agent.validationAvg,
|
|
38
|
+
services: r.agent.registration.services || [],
|
|
39
|
+
x402Support: r.agent.registration.x402Support || false,
|
|
40
|
+
x402Endpoint: r.agent.registration.services?.find(svc => svc.name.toLowerCase() === "x402")?.endpoint || null,
|
|
41
|
+
})), null, 2));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
console.log("\n" + chalk.bold.cyan(" 📋 ERC-8004 Registered Services") +
|
|
45
|
+
chalk.dim(` (${total} total, showing ${results.length})`));
|
|
46
|
+
console.log("");
|
|
47
|
+
const table = new Table({
|
|
48
|
+
head: ["#", "ID", "Name", "Trust", "Reviews", "Services", "x402"].map((h) => chalk.bold(h)),
|
|
49
|
+
colWidths: [5, 8, 26, 14, 9, 22, 6],
|
|
50
|
+
style: { head: [], border: ["dim"] },
|
|
51
|
+
});
|
|
52
|
+
results.forEach((r, i) => {
|
|
53
|
+
const svcs = r.agent.registration.services?.map((s) => svcTag(s.name)).join(" ") || chalk.dim("-");
|
|
54
|
+
table.push([
|
|
55
|
+
chalk.dim(`${i + 1}`),
|
|
56
|
+
chalk.white(`${r.agent.agentId}`),
|
|
57
|
+
chalk.bold(trunc(r.agent.registration.name || "(unnamed)", 24)),
|
|
58
|
+
scoreBar(r.trustScore),
|
|
59
|
+
`${r.agent.feedbackCount}`,
|
|
60
|
+
svcs,
|
|
61
|
+
r.agent.registration.x402Support ? chalk.green("✓") : chalk.dim("-"),
|
|
62
|
+
]);
|
|
63
|
+
});
|
|
64
|
+
console.log(table.toString());
|
|
65
|
+
console.log(chalk.dim(`\n Sorted by: ${options.sort}\n`));
|
|
66
|
+
}
|
|
67
|
+
catch (err) {
|
|
68
|
+
if (isJson) {
|
|
69
|
+
console.log(JSON.stringify({ error: err.message }));
|
|
70
|
+
process.exit(1);
|
|
71
|
+
}
|
|
72
|
+
console.error(chalk.red(`\n ✗ Error: ${err.message}\n`));
|
|
73
|
+
process.exit(1);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
const SVC_ICONS = {
|
|
77
|
+
a2a: "🤖", mcp: "🔧", web: "🌐", oasf: "📦", x402: "💰",
|
|
78
|
+
};
|
|
79
|
+
function svcTag(name) {
|
|
80
|
+
const icon = SVC_ICONS[name.toLowerCase()] || "🔗";
|
|
81
|
+
return icon + chalk.dim(name.toUpperCase());
|
|
82
|
+
}
|
|
83
|
+
function trunc(s, n) {
|
|
84
|
+
return s.length > n ? s.slice(0, n - 1) + "…" : s;
|
|
85
|
+
}
|
|
86
|
+
function scoreBar(score) {
|
|
87
|
+
const n = Math.min(100, Math.max(0, score));
|
|
88
|
+
const filled = Math.round(n / 10);
|
|
89
|
+
const bar = "█".repeat(filled) + "░".repeat(10 - filled);
|
|
90
|
+
const color = n >= 70 ? chalk.green : n >= 40 ? chalk.yellow : chalk.red;
|
|
91
|
+
return color(bar) + chalk.dim(` ${n.toFixed(1)}`);
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list.js","sourceRoot":"","sources":["../../src/commands/list.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,MAAM,YAAY,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,UAAU,EAAoB,MAAM,oBAAoB,CAAC;AAClE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAWzC,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,OAAoB;IAClD,MAAM,MAAM,GAAG,OAAO,CAAC,MAAM,KAAK,MAAM,CAAC;IACzC,IAAI,OAAO,CAAC,OAAO;QAAE,UAAU,CAAC,IAAI,CAAC,CAAC;IAEtC,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ACzD,MAAM,KAAK,GAAG,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC;IACzE,OAAO,KAAK,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;AACtD,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export interface ServiceEntry {
|
|
2
|
+
name: string;
|
|
3
|
+
endpoint: string;
|
|
4
|
+
version?: string;
|
|
5
|
+
skills?: string[];
|
|
6
|
+
domains?: string[];
|
|
7
|
+
}
|
|
8
|
+
export interface RegistrationFile {
|
|
9
|
+
type?: string;
|
|
10
|
+
name?: string;
|
|
11
|
+
description?: string;
|
|
12
|
+
image?: string;
|
|
13
|
+
services?: ServiceEntry[];
|
|
14
|
+
x402Support?: boolean;
|
|
15
|
+
active?: boolean;
|
|
16
|
+
supportedTrust?: string[];
|
|
17
|
+
}
|
|
18
|
+
export interface AgentData {
|
|
19
|
+
agentId: number;
|
|
20
|
+
owner: string;
|
|
21
|
+
registration: RegistrationFile;
|
|
22
|
+
feedbackCount: number;
|
|
23
|
+
avgScore: number;
|
|
24
|
+
validationCount: number;
|
|
25
|
+
validationAvg: number;
|
|
26
|
+
}
|
|
27
|
+
/** Get all supported chain names */
|
|
28
|
+
export declare function getSupportedChains(): string[];
|
|
29
|
+
/** How many agents are registered (approximate) */
|
|
30
|
+
export declare function getTotalAgents(chain?: string): Promise<number>;
|
|
31
|
+
/** Fetch a batch of agents with their registration data */
|
|
32
|
+
export declare function fetchAgents(options?: {
|
|
33
|
+
chain?: string;
|
|
34
|
+
first?: number;
|
|
35
|
+
skip?: number;
|
|
36
|
+
}): Promise<AgentData[]>;
|
|
37
|
+
/** Fetch a single agent by ID */
|
|
38
|
+
export declare function fetchAgentById(agentId: number, chain?: string): Promise<AgentData | null>;
|
|
39
|
+
export declare function resolveRegistrationFile(uri: string | null): Promise<RegistrationFile>;
|
|
40
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../src/registry.ts"],"names":[],"mappings":"AA+GA,MAAM,WAAW,YAAY;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;CACtB;AAED,MAAM,WAAW,gBAAgB;IAC7B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,SAAS;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,YAAY,EAAE,gBAAgB,CAAC;IAC/B,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,eAAe,EAAE,MAAM,CAAC;IACxB,aAAa,EAAE,MAAM,CAAC;CACzB;AA+BD,oCAAoC;AACpC,wBAAgB,kBAAkB,IAAI,MAAM,EAAE,CAE7C;AAuGD,mDAAmD;AACnD,wBAAsB,cAAc,CAAC,KAAK,GAAE,MAAmB,GAAG,OAAO,CAAC,MAAM,CAAC,CAiBhF;AAED,2DAA2D;AAC3D,wBAAsB,W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