agentic-payments 0.1.1 → 0.1.3
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/dist/mcp/tools/consensus.d.ts +11 -1
- package/dist/mcp/tools/consensus.d.ts.map +1 -1
- package/dist/mcp/tools/consensus.js +66 -17
- package/dist/mcp/tools/consensus.js.map +1 -1
- package/dist/mcp/tools/mandate.d.ts +16 -0
- package/dist/mcp/tools/mandate.d.ts.map +1 -1
- package/dist/mcp/tools/mandate.js +42 -4
- package/dist/mcp/tools/mandate.js.map +1 -1
- package/package.json +1 -1
|
@@ -3,7 +3,17 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import type { ToolResult, VerifyConsensusArgs } from './types.js';
|
|
5
5
|
/**
|
|
6
|
-
* Verify payment signature with multi-agent consensus
|
|
6
|
+
* Verify payment signature with multi-agent Byzantine consensus
|
|
7
|
+
*
|
|
8
|
+
* Implements cryptographic multi-agent verification where:
|
|
9
|
+
* - Each agent independently verifies the signature
|
|
10
|
+
* - Consensus threshold determines approval (e.g., 13 of 20 agents = 65%)
|
|
11
|
+
* - Byzantine fault tolerance: system remains secure even if f < n/3 agents are compromised
|
|
12
|
+
*
|
|
13
|
+
* Example: $50K vendor contract with 20 agents (procurement, finance, legal, audit, etc.)
|
|
14
|
+
* - Requires 13 signatures (65% consensus)
|
|
15
|
+
* - Can tolerate up to 6 compromised agents (7 would be 35% < required 65%)
|
|
16
|
+
* - No single agent or small group can authorize fraudulent transactions
|
|
7
17
|
*/
|
|
8
18
|
export declare function verifyConsensusTool(args: VerifyConsensusArgs): Promise<ToolResult>;
|
|
9
19
|
//# sourceMappingURL=consensus.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consensus.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/consensus.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"consensus.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/consensus.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAElE;;;;;;;;;;;;GAYG;AACH,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,mBAAmB,GACxB,OAAO,CAAC,UAAU,CAAC,CAmFrB"}
|
|
@@ -2,30 +2,79 @@
|
|
|
2
2
|
* Consensus verification MCP tools
|
|
3
3
|
*/
|
|
4
4
|
import { VerificationSystemBuilder } from '../../verification.js';
|
|
5
|
+
import { AgentIdentity } from '../../identity.js';
|
|
5
6
|
/**
|
|
6
|
-
* Verify payment signature with multi-agent consensus
|
|
7
|
+
* Verify payment signature with multi-agent Byzantine consensus
|
|
8
|
+
*
|
|
9
|
+
* Implements cryptographic multi-agent verification where:
|
|
10
|
+
* - Each agent independently verifies the signature
|
|
11
|
+
* - Consensus threshold determines approval (e.g., 13 of 20 agents = 65%)
|
|
12
|
+
* - Byzantine fault tolerance: system remains secure even if f < n/3 agents are compromised
|
|
13
|
+
*
|
|
14
|
+
* Example: $50K vendor contract with 20 agents (procurement, finance, legal, audit, etc.)
|
|
15
|
+
* - Requires 13 signatures (65% consensus)
|
|
16
|
+
* - Can tolerate up to 6 compromised agents (7 would be 35% < required 65%)
|
|
17
|
+
* - No single agent or small group can authorize fraudulent transactions
|
|
7
18
|
*/
|
|
8
19
|
export async function verifyConsensusTool(args) {
|
|
9
20
|
try {
|
|
10
|
-
const { agent_public_keys, consensus_threshold = 0.67, } = args;
|
|
11
|
-
//
|
|
12
|
-
const
|
|
21
|
+
const { message, signature, public_key, agent_public_keys, consensus_threshold = 0.67, } = args;
|
|
22
|
+
// Decode inputs from hex strings
|
|
23
|
+
const messageBytes = Buffer.from(message, 'hex');
|
|
24
|
+
const signatureBytes = Buffer.from(signature, 'hex');
|
|
25
|
+
const publicKeyBytes = Buffer.from(public_key, 'hex');
|
|
26
|
+
// Create agent identities from public keys
|
|
27
|
+
const agents = [];
|
|
28
|
+
for (const agentPubKey of agent_public_keys) {
|
|
29
|
+
const agentPubKeyBytes = Buffer.from(agentPubKey, 'hex');
|
|
30
|
+
// Create identity with public key only (no private key for verification)
|
|
31
|
+
const identity = await AgentIdentity.fromPublicKey(agentPubKeyBytes);
|
|
32
|
+
agents.push(identity);
|
|
33
|
+
}
|
|
34
|
+
if (agents.length === 0) {
|
|
35
|
+
return {
|
|
36
|
+
success: false,
|
|
37
|
+
error: 'No agents provided for consensus verification',
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
// Calculate minimum required agents based on threshold
|
|
41
|
+
const minRequired = Math.ceil(agents.length * consensus_threshold);
|
|
42
|
+
// Build verification system with Byzantine fault tolerance
|
|
43
|
+
const system = new VerificationSystemBuilder()
|
|
13
44
|
.consensusThreshold(consensus_threshold)
|
|
14
|
-
.minAgents(
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
//
|
|
21
|
-
|
|
45
|
+
.minAgents(minRequired)
|
|
46
|
+
.maxAgents(agents.length)
|
|
47
|
+
.timeout(5000)
|
|
48
|
+
.parallel(true) // Parallel verification for performance
|
|
49
|
+
.addAgents(agents)
|
|
50
|
+
.build();
|
|
51
|
+
// Verify with multi-agent consensus
|
|
52
|
+
const result = await system.verifyWithConsensus(signatureBytes, messageBytes, publicKeyBytes);
|
|
53
|
+
// Return detailed consensus results
|
|
22
54
|
return {
|
|
23
55
|
success: true,
|
|
24
|
-
verified:
|
|
25
|
-
consensus_reached:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
56
|
+
verified: result.isValid,
|
|
57
|
+
consensus_reached: result.consensusReached,
|
|
58
|
+
votes_for: result.votesFor,
|
|
59
|
+
votes_against: result.votesAgainst,
|
|
60
|
+
total_votes: result.totalVotes,
|
|
61
|
+
consensus_percentage: Math.round(result.consensusPercentage * 100),
|
|
62
|
+
threshold_percentage: Math.round(consensus_threshold * 100),
|
|
63
|
+
required_votes: minRequired,
|
|
64
|
+
agent_count: agents.length,
|
|
65
|
+
total_latency_ms: result.totalLatencyMs,
|
|
66
|
+
avg_latency_ms: Math.round(result.avgLatencyMs * 100) / 100,
|
|
67
|
+
agent_votes: result.agentVotes.map(v => ({
|
|
68
|
+
agent_id: v.agentId,
|
|
69
|
+
vote: v.vote ? 'approve' : 'reject',
|
|
70
|
+
timestamp: v.timestamp,
|
|
71
|
+
latency_ms: v.latencyMs,
|
|
72
|
+
})),
|
|
73
|
+
byzantine_fault_tolerance: {
|
|
74
|
+
max_compromised_agents: Math.floor(agents.length / 3) - 1,
|
|
75
|
+
security_margin: result.votesFor - minRequired,
|
|
76
|
+
is_byzantine_secure: result.votesFor >= minRequired,
|
|
77
|
+
},
|
|
29
78
|
};
|
|
30
79
|
}
|
|
31
80
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"consensus.js","sourceRoot":"","sources":["../../../src/mcp/tools/consensus.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"consensus.js","sourceRoot":"","sources":["../../../src/mcp/tools/consensus.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,yBAAyB,EAAE,MAAM,uBAAuB,CAAC;AAClE,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAGlD;;;;;;;;;;;;GAYG;AACH,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACvC,IAAyB;IAEzB,IAAI,CAAC;QACH,MAAM,EACJ,OAAO,EACP,SAAS,EACT,UAAU,EACV,iBAAiB,EACjB,mBAAmB,GAAG,IAAI,GAC3B,GAAG,IAAI,CAAC;QAET,iCAAiC;QACjC,MAAM,YAAY,GAAG,MAAM,CAAC,IAAI,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC;QACjD,MAAM,cAAc,GAAG,MAAM,CAAC,IAAI,CAAC,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okeMandateTool(args: RevokeMandateArgs): Promise<Tool
|
|
|
24
24
|
export declare function listRevocationsTool(): Promise<ToolResult>;
|
|
25
25
|
/**
|
|
26
26
|
* Get mandate information
|
|
27
|
+
*
|
|
28
|
+
* Note: Active Mandates are stateless by design - they are cryptographic objects
|
|
29
|
+
* that can be created, signed, and verified without central storage. This library
|
|
30
|
+
* provides the cryptographic primitives, but does not implement storage.
|
|
31
|
+
*
|
|
32
|
+
* To integrate mandate storage:
|
|
33
|
+
* 1. Store signed mandates in your application database after creation
|
|
34
|
+
* 2. Index by mandate_id for quick retrieval
|
|
35
|
+
* 3. Check revocation list before authorizing payments
|
|
36
|
+
* 4. Implement your own getMandateInfo that queries your storage
|
|
37
|
+
*
|
|
38
|
+
* Example storage implementations:
|
|
39
|
+
* - PostgreSQL with JSONB columns for mandate bodies
|
|
40
|
+
* - Redis for high-performance caching
|
|
41
|
+
* - IPFS for decentralized storage
|
|
42
|
+
* - Blockchain for immutable audit trails
|
|
27
43
|
*/
|
|
28
44
|
export declare function getMandateInfoTool(args: {
|
|
29
45
|
mandate_id: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mandate.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/mandate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,UAAU,CAAC,CA4BrB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,UAAU,CAAC,CAmCrB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,UAAU,CAAC,CAmCrB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,UAAU,CAAC,CAerB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC,CAe/D;AAED
|
|
1
|
+
{"version":3,"file":"mandate.d.ts","sourceRoot":"","sources":["../../../src/mcp/tools/mandate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAYH,OAAO,KAAK,EACV,UAAU,EACV,uBAAuB,EACvB,eAAe,EACf,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,wBAAsB,uBAAuB,CAC3C,IAAI,EAAE,uBAAuB,GAC5B,OAAO,CAAC,UAAU,CAAC,CA4BrB;AAED;;GAEG;AACH,wBAAsB,eAAe,CACnC,IAAI,EAAE,eAAe,GACpB,OAAO,CAAC,UAAU,CAAC,CAmCrB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,UAAU,CAAC,CAmCrB;AAED;;GAEG;AACH,wBAAsB,iBAAiB,CACrC,IAAI,EAAE,iBAAiB,GACtB,OAAO,CAAC,UAAU,CAAC,CAerB;AAED;;GAEG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,UAAU,CAAC,CAe/D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAsB,kBAAkB,CAAC,IAAI,EAAE;IAC7C,UAAU,EAAE,MAAM,CAAC;CACpB,GAAG,OAAO,CAAC,UAAU,CAAC,CAuCtB"}
|
|
@@ -143,16 +143,54 @@ export async function listRevocationsTool() {
|
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
145
|
* Get mandate information
|
|
146
|
+
*
|
|
147
|
+
* Note: Active Mandates are stateless by design - they are cryptographic objects
|
|
148
|
+
* that can be created, signed, and verified without central storage. This library
|
|
149
|
+
* provides the cryptographic primitives, but does not implement storage.
|
|
150
|
+
*
|
|
151
|
+
* To integrate mandate storage:
|
|
152
|
+
* 1. Store signed mandates in your application database after creation
|
|
153
|
+
* 2. Index by mandate_id for quick retrieval
|
|
154
|
+
* 3. Check revocation list before authorizing payments
|
|
155
|
+
* 4. Implement your own getMandateInfo that queries your storage
|
|
156
|
+
*
|
|
157
|
+
* Example storage implementations:
|
|
158
|
+
* - PostgreSQL with JSONB columns for mandate bodies
|
|
159
|
+
* - Redis for high-performance caching
|
|
160
|
+
* - IPFS for decentralized storage
|
|
161
|
+
* - Blockchain for immutable audit trails
|
|
146
162
|
*/
|
|
147
163
|
export async function getMandateInfoTool(args) {
|
|
148
164
|
try {
|
|
149
165
|
const { mandate_id } = args;
|
|
150
|
-
// This is a placeholder - in a real implementation, you would
|
|
151
|
-
// fetch mandate details from storage
|
|
152
166
|
return {
|
|
153
|
-
success:
|
|
167
|
+
success: false,
|
|
154
168
|
mandate_id,
|
|
155
|
-
|
|
169
|
+
error: 'Mandate storage not implemented - this library is stateless',
|
|
170
|
+
message: `Active Mandates are cryptographic objects that don't require central storage.
|
|
171
|
+
To retrieve mandate information:
|
|
172
|
+
1. Implement storage in your application (database, cache, IPFS, etc.)
|
|
173
|
+
2. Store signed mandates after creation with create_active_mandate
|
|
174
|
+
3. Query your storage by mandate_id when needed
|
|
175
|
+
4. Verify signatures with verify_mandate before authorizing payments
|
|
176
|
+
|
|
177
|
+
Example mandate storage schema:
|
|
178
|
+
{
|
|
179
|
+
"mandate_id": "mandate_uuid",
|
|
180
|
+
"signed_mandate": { /* SignedMandate object */ },
|
|
181
|
+
"created_at": "2025-01-15T10:00:00Z",
|
|
182
|
+
"last_used": "2025-01-20T15:30:00Z",
|
|
183
|
+
"total_spent": 0,
|
|
184
|
+
"is_revoked": false
|
|
185
|
+
}`,
|
|
186
|
+
architecture: 'stateless',
|
|
187
|
+
storage_options: [
|
|
188
|
+
'PostgreSQL (JSONB)',
|
|
189
|
+
'Redis (caching)',
|
|
190
|
+
'IPFS (decentralized)',
|
|
191
|
+
'Blockchain (immutable)',
|
|
192
|
+
'Application in-memory',
|
|
193
|
+
],
|
|
156
194
|
};
|
|
157
195
|
}
|
|
158
196
|
catch (error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mandate.js","sourceRoot":"","sources":["../../../src/mcp/tools/mandate.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,EAAE,IAAI,MAAM,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,MAAM,EACN,iBAAiB,EACjB,iBAAiB,EACjB,kBAAkB,GACnB,MAAM,+BAA+B,CAAC;AAUvC;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,IAA6B;IAE7B,IAAI,CAAC;QACH,MAAM,OAAO,GAAgB;YAC3B,UAAU,EAAE,WAAW,MAAM,EAAE,EAAE;YACjC,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,MAAM,EAAE,IAAI,CAAC,MAAM;YACnB,GAAG,EAAE;gBACH,MAAM,EAAE,IAAI,CAAC,MAAM;gBACnB,QAAQ,EAAE,IAAI,CAAC,QAAQ;gBACvB,MAAM,EAAE,IAAI,CAAC,MAAM;aACpB;YACD,UAAU,EACR,IAAI,CAAC,UAAU,IAAI,IAAI,IAAI,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,QAAQ,CAAC,CAAC,WAAW,EAAE;YAClE,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC;YACnE,GAAG,CAAC,IAAI,CAAC,cAAc,IAAI,EAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,CAAC;SACpE,CAAC;QAEF,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO;SACR,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO;YACL,OAAO,EAAE,KAAK;YACd,KAAK,EAAE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