@ashlar-blue/x402-trust 0.3.0 → 0.5.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 +68 -21
- package/dist/cli.d.ts +3 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +46 -0
- package/dist/cli.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/isda-cdm.d.ts +83 -0
- package/dist/isda-cdm.d.ts.map +1 -0
- package/dist/isda-cdm.js +182 -0
- package/dist/isda-cdm.js.map +1 -0
- package/dist/mcp-server.d.ts +191 -0
- package/dist/mcp-server.d.ts.map +1 -0
- package/dist/mcp-server.js +536 -0
- package/dist/mcp-server.js.map +1 -0
- package/dist/open-catalog.d.ts.map +1 -1
- package/dist/open-catalog.js +1 -1
- package/dist/open-catalog.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/package.json +8 -2
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
export declare const MCP_SERVER_INFO: {
|
|
2
|
+
readonly name: "@ashlar-blue/x402-trust";
|
|
3
|
+
readonly title: "Ashlar Blue x402 Trust Layer MCP Server";
|
|
4
|
+
readonly version: "0.4.0";
|
|
5
|
+
};
|
|
6
|
+
export declare const X402_MCP_TOOLS: readonly [{
|
|
7
|
+
readonly name: "x402_check_service";
|
|
8
|
+
readonly description: "Discover and verify an x402 payment endpoint by domain (DNS TXT _x402 + /.well-known/x402). Verifies same-origin requirements, attestation checkability, and live facilitator consistency, returning an authoritative safeToPay decision with full rationale.";
|
|
9
|
+
readonly inputSchema: {
|
|
10
|
+
readonly type: "object";
|
|
11
|
+
readonly properties: {
|
|
12
|
+
readonly domain: {
|
|
13
|
+
readonly type: "string";
|
|
14
|
+
readonly description: "Bare domain name or hostname to discover (e.g. \"api.flareclaw.app\" or \"correntelabs.com\")";
|
|
15
|
+
};
|
|
16
|
+
readonly requireAttestation: {
|
|
17
|
+
readonly type: "boolean";
|
|
18
|
+
readonly description: "If true, safeToPay requires an independently checkable hardware TEE attestation verifier (default: false)";
|
|
19
|
+
};
|
|
20
|
+
readonly requireLiveConsistent: {
|
|
21
|
+
readonly type: "boolean";
|
|
22
|
+
readonly description: "If true, safeToPay requires live facilitator /supported capability cross-check to pass (default: false)";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly required: readonly ["domain"];
|
|
26
|
+
};
|
|
27
|
+
}, {
|
|
28
|
+
readonly name: "x402_verify_attestation_entry";
|
|
29
|
+
readonly description: "Mathematically verify a hardware-attested directory entry (Intel TDX / AMD SEV quote measurement + MRTD hash) against a signed directory root. Pure math (RFC 6962), zero network, zero trust in intermediate servers.";
|
|
30
|
+
readonly inputSchema: {
|
|
31
|
+
readonly type: "object";
|
|
32
|
+
readonly properties: {
|
|
33
|
+
readonly entry: {
|
|
34
|
+
readonly type: "object";
|
|
35
|
+
readonly description: "The DirectoryEntry object containing domain, verdict, detail, and optional record";
|
|
36
|
+
};
|
|
37
|
+
readonly index: {
|
|
38
|
+
readonly type: "number";
|
|
39
|
+
readonly description: "Zero-based leaf index in the census";
|
|
40
|
+
};
|
|
41
|
+
readonly size: {
|
|
42
|
+
readonly type: "number";
|
|
43
|
+
readonly description: "Total number of entries in the census";
|
|
44
|
+
};
|
|
45
|
+
readonly proof: {
|
|
46
|
+
readonly type: "array";
|
|
47
|
+
readonly items: {
|
|
48
|
+
readonly type: "string";
|
|
49
|
+
};
|
|
50
|
+
readonly description: "Array of 32-byte hex sibling hashes forming the Merkle audit path";
|
|
51
|
+
};
|
|
52
|
+
readonly outputRoot: {
|
|
53
|
+
readonly type: "string";
|
|
54
|
+
readonly description: "The 32-byte hex signed outputRoot of the directory census";
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
readonly required: readonly ["entry", "index", "size", "proof", "outputRoot"];
|
|
58
|
+
};
|
|
59
|
+
}, {
|
|
60
|
+
readonly name: "x402_verify_transcript_inclusion";
|
|
61
|
+
readonly description: "Mathematically verify that a specific agent-to-agent session interaction {drawId, nonce, seed} is provably included in a signed Merkle transcript root (RFC 6962). Pure math, zero network.";
|
|
62
|
+
readonly inputSchema: {
|
|
63
|
+
readonly type: "object";
|
|
64
|
+
readonly properties: {
|
|
65
|
+
readonly entry: {
|
|
66
|
+
readonly type: "object";
|
|
67
|
+
readonly description: "The TranscriptEntry object with drawId, nonce, and seed";
|
|
68
|
+
};
|
|
69
|
+
readonly index: {
|
|
70
|
+
readonly type: "number";
|
|
71
|
+
readonly description: "Zero-based leaf index in the transcript";
|
|
72
|
+
};
|
|
73
|
+
readonly size: {
|
|
74
|
+
readonly type: "number";
|
|
75
|
+
readonly description: "Total number of entries in the transcript";
|
|
76
|
+
};
|
|
77
|
+
readonly proof: {
|
|
78
|
+
readonly type: "array";
|
|
79
|
+
readonly items: {
|
|
80
|
+
readonly type: "string";
|
|
81
|
+
};
|
|
82
|
+
readonly description: "Array of 32-byte hex sibling hashes forming the Merkle audit path";
|
|
83
|
+
};
|
|
84
|
+
readonly expectedRoot: {
|
|
85
|
+
readonly type: "string";
|
|
86
|
+
readonly description: "The expected 32-byte hex Merkle root";
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
readonly required: readonly ["entry", "index", "size", "proof", "expectedRoot"];
|
|
90
|
+
};
|
|
91
|
+
}, {
|
|
92
|
+
readonly name: "x402_verify_reconcile_row";
|
|
93
|
+
readonly description: "Verify a payment authorization settlement reconciliation row (EIP-3009 / XRPL) against its signed census root without network calls.";
|
|
94
|
+
readonly inputSchema: {
|
|
95
|
+
readonly type: "object";
|
|
96
|
+
readonly properties: {
|
|
97
|
+
readonly row: {
|
|
98
|
+
readonly type: "object";
|
|
99
|
+
readonly description: "The ReconcileRow containing domain, category, a, b, and note";
|
|
100
|
+
};
|
|
101
|
+
readonly index: {
|
|
102
|
+
readonly type: "number";
|
|
103
|
+
readonly description: "Zero-based row index in the reconciliation";
|
|
104
|
+
};
|
|
105
|
+
readonly size: {
|
|
106
|
+
readonly type: "number";
|
|
107
|
+
readonly description: "Total number of rows in the reconciliation";
|
|
108
|
+
};
|
|
109
|
+
readonly proof: {
|
|
110
|
+
readonly type: "array";
|
|
111
|
+
readonly items: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
};
|
|
114
|
+
readonly description: "Array of 32-byte hex sibling hashes";
|
|
115
|
+
};
|
|
116
|
+
readonly rowsRoot: {
|
|
117
|
+
readonly type: "string";
|
|
118
|
+
readonly description: "The expected signed rowsRoot (hex string)";
|
|
119
|
+
};
|
|
120
|
+
};
|
|
121
|
+
readonly required: readonly ["row", "index", "size", "proof", "rowsRoot"];
|
|
122
|
+
};
|
|
123
|
+
}, {
|
|
124
|
+
readonly name: "x402_catalog_search";
|
|
125
|
+
readonly description: "Search the open x402 resource directory with provenance tags (Bazaar-mirror vs discovery). Filter by network, source, or independently checkable attestation.";
|
|
126
|
+
readonly inputSchema: {
|
|
127
|
+
readonly type: "object";
|
|
128
|
+
readonly properties: {
|
|
129
|
+
readonly source: {
|
|
130
|
+
readonly type: "string";
|
|
131
|
+
readonly enum: readonly ["bazaar-mirror", "discovery"];
|
|
132
|
+
readonly description: "Filter by provenance lane";
|
|
133
|
+
};
|
|
134
|
+
readonly network: {
|
|
135
|
+
readonly type: "string";
|
|
136
|
+
readonly description: "Blockchain network identifier (e.g. \"coston2\", \"flare\", \"base\", \"eip155:114\")";
|
|
137
|
+
};
|
|
138
|
+
readonly attested: {
|
|
139
|
+
readonly type: "boolean";
|
|
140
|
+
readonly description: "If true, only return entries with independently checkable attestation claims";
|
|
141
|
+
};
|
|
142
|
+
readonly limit: {
|
|
143
|
+
readonly type: "number";
|
|
144
|
+
readonly description: "Number of rows to return (default: 50, max: 500)";
|
|
145
|
+
};
|
|
146
|
+
readonly offset: {
|
|
147
|
+
readonly type: "number";
|
|
148
|
+
readonly description: "Pagination offset";
|
|
149
|
+
};
|
|
150
|
+
};
|
|
151
|
+
};
|
|
152
|
+
}, {
|
|
153
|
+
readonly name: "x402_catalog_get";
|
|
154
|
+
readonly description: "Look up verified Open Catalog records for an exact resource URL, prefix, or domain across both discovery and bazaar-mirror lanes.";
|
|
155
|
+
readonly inputSchema: {
|
|
156
|
+
readonly type: "object";
|
|
157
|
+
readonly properties: {
|
|
158
|
+
readonly resource: {
|
|
159
|
+
readonly type: "string";
|
|
160
|
+
readonly description: "Resource URL or bare hostname";
|
|
161
|
+
};
|
|
162
|
+
};
|
|
163
|
+
readonly required: readonly ["resource"];
|
|
164
|
+
};
|
|
165
|
+
}, {
|
|
166
|
+
readonly name: "x402_catalog_stats";
|
|
167
|
+
readonly description: "Retrieve high-level network statistics: total mirrored vs discovered vs attested services, network distribution, and the on-chain Coston2/Flare anchor hash.";
|
|
168
|
+
readonly inputSchema: {
|
|
169
|
+
readonly type: "object";
|
|
170
|
+
readonly properties: {};
|
|
171
|
+
};
|
|
172
|
+
}];
|
|
173
|
+
/** Handle a single JSON-RPC 2.0 request */
|
|
174
|
+
export declare function handleMcpRequest(request: {
|
|
175
|
+
jsonrpc?: string;
|
|
176
|
+
id?: string | number | null;
|
|
177
|
+
method?: string;
|
|
178
|
+
params?: Record<string, any>;
|
|
179
|
+
}, catalogStatePath?: string): Promise<{
|
|
180
|
+
jsonrpc: '2.0';
|
|
181
|
+
id: string | number | null;
|
|
182
|
+
result?: any;
|
|
183
|
+
error?: {
|
|
184
|
+
code: number;
|
|
185
|
+
message: string;
|
|
186
|
+
data?: any;
|
|
187
|
+
};
|
|
188
|
+
}>;
|
|
189
|
+
/** Run the MCP server over standard input/output (stdio) */
|
|
190
|
+
export declare function startStdioMcpServer(catalogStatePath?: string): void;
|
|
191
|
+
//# sourceMappingURL=mcp-server.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mcp-server.d.ts","sourceRoot":"","sources":["../src/mcp-server.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,eAAe;;;;CAIlB,CAAC;AAEX,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwKjB,CAAC;AAEX,2CAA2C;AAC3C,wBAAsB,gBAAgB,CAClC,OAAO,EAAE;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;CAAE,EACzG,gBAAgB,CAAC,EAAE,MAAM,GAC1B,OAAO,CAAC;IAAE,OAAO,EAAE,KAAK,CAAC;IAAC,EAAE,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAAC,MAAM,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,GAAG,CAAA;KAAE,CAAA;CAAE,CAAC,CAsV9H;AAED,4DAA4D;AAC5D,wBAAgB,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,QAyB5D"}
|