@aifinpay/mcp 2.5.0 → 2.7.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 +111 -20
- package/dist/config.d.ts +6 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +39 -4
- package/dist/config.js.map +1 -1
- package/dist/native-price.d.ts +1 -1
- package/dist/native-price.d.ts.map +1 -1
- package/dist/native-price.js +3 -3
- package/dist/native-price.js.map +1 -1
- package/dist/pay-chains.d.ts +5 -4
- package/dist/pay-chains.d.ts.map +1 -1
- package/dist/pay-chains.js +29 -28
- package/dist/pay-chains.js.map +1 -1
- package/dist/payment-identity.d.ts +17 -0
- package/dist/payment-identity.d.ts.map +1 -0
- package/dist/payment-identity.js +75 -0
- package/dist/payment-identity.js.map +1 -0
- package/dist/payment-state.d.ts +2 -1
- package/dist/payment-state.d.ts.map +1 -1
- package/dist/payment-state.js +52 -17
- package/dist/payment-state.js.map +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +3 -2
- package/dist/server.js.map +1 -1
- package/dist/tools/agent-claim-self.d.ts +3 -3
- package/dist/tools/agent-claim-self.d.ts.map +1 -1
- package/dist/tools/agent-claim-self.js +65 -88
- package/dist/tools/agent-claim-self.js.map +1 -1
- package/dist/tools/agent-history.d.ts +0 -1
- package/dist/tools/agent-history.d.ts.map +1 -1
- package/dist/tools/agent-history.js +51 -52
- package/dist/tools/agent-history.js.map +1 -1
- package/dist/tools/agent-quota.d.ts.map +1 -1
- package/dist/tools/agent-quota.js +42 -11
- package/dist/tools/agent-quota.js.map +1 -1
- package/dist/tools/payable-fetch.d.ts.map +1 -1
- package/dist/tools/payable-fetch.js +156 -57
- package/dist/tools/payable-fetch.js.map +1 -1
- package/package.json +6 -6
- package/skills/SKILL.md +165 -43
- package/dist/directory.d.ts +0 -55
- package/dist/directory.d.ts.map +0 -1
- package/dist/directory.js +0 -56
- package/dist/directory.js.map +0 -1
- package/dist/tools/agent-call.d.ts +0 -68
- package/dist/tools/agent-call.d.ts.map +0 -1
- package/dist/tools/agent-call.js +0 -129
- package/dist/tools/agent-call.js.map +0 -1
- package/dist/tools/agent-quote.d.ts +0 -41
- package/dist/tools/agent-quote.d.ts.map +0 -1
- package/dist/tools/agent-quote.js +0 -81
- package/dist/tools/agent-quote.js.map +0 -1
- package/dist/tools/pay-with-split.d.ts +0 -93
- package/dist/tools/pay-with-split.d.ts.map +0 -1
- package/dist/tools/pay-with-split.js +0 -138
- package/dist/tools/pay-with-split.js.map +0 -1
package/dist/tools/agent-call.js
DELETED
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* `agent_call` — unified registry-resolved paid HTTP call.
|
|
3
|
-
*
|
|
4
|
-
* The agent picks a provider by name ("exa", "io-net", "venice", …),
|
|
5
|
-
* the SDK looks up the bridge URL + price from the public AiFinPay
|
|
6
|
-
* registry, negotiates the 402 challenge, settles on Polygon via
|
|
7
|
-
* B2BSplitter.payMatic, retries with proof, and returns the upstream
|
|
8
|
-
* response body.
|
|
9
|
-
*
|
|
10
|
-
* Use this in preference to `payable_fetch` when you have a registered
|
|
11
|
-
* provider name — it auto-routes price, chain, and bridge URL.
|
|
12
|
-
*
|
|
13
|
-
* Requires the EVM address (from `agent_address`) to be funded with POL
|
|
14
|
-
* on Polygon mainnet (gas + payment), or USDC if the provider quotes in
|
|
15
|
-
* stablecoin.
|
|
16
|
-
*/
|
|
17
|
-
export function agentCallTool() {
|
|
18
|
-
return {
|
|
19
|
-
name: "agent_call",
|
|
20
|
-
description: "USE THIS TOOL whenever the user asks to call, pay, query, search via, " +
|
|
21
|
-
"or use any of these AiFinPay-registered paid providers: 'exa' (neural " +
|
|
22
|
-
"web search), 'io-net' (LLM inference, Llama-3.3-70B), 'venice' (image " +
|
|
23
|
-
"generation), or any other provider listed at " +
|
|
24
|
-
"https://aifinpay.io/api/providers. " +
|
|
25
|
-
"DO NOT use WebSearch or WebFetch for these providers — they are paid " +
|
|
26
|
-
"APIs accessible only through this MCP, and a plain web search will " +
|
|
27
|
-
"return public marketing pages instead of the actual API. " +
|
|
28
|
-
"Natural-language triggers that should invoke this tool: 'call exa for X', " +
|
|
29
|
-
"'search exa', 'pay venice to generate Y', 'use io-net to run inference', " +
|
|
30
|
-
"'query exa', 'ask io-net'. Provider name maps to the `provider` argument. " +
|
|
31
|
-
"Body is the provider-specific request shape (e.g. {messages:[...]} for " +
|
|
32
|
-
"io-net inference, {query:'...'} for exa search). Returns the upstream " +
|
|
33
|
-
"response with the Polygon tx hash + Polygonscan link prepended. " +
|
|
34
|
-
"Settlement is automatic — Polygon mainnet, atomic 99/1 split via B2BSplitter.",
|
|
35
|
-
inputSchema: {
|
|
36
|
-
type: "object",
|
|
37
|
-
properties: {
|
|
38
|
-
provider: {
|
|
39
|
-
type: "string",
|
|
40
|
-
description: "Registered provider name. Example: 'io-net', 'exa', 'venice'.",
|
|
41
|
-
},
|
|
42
|
-
body: {
|
|
43
|
-
type: "object",
|
|
44
|
-
description: "Provider-specific request body. Forwarded to the bridge after payment.",
|
|
45
|
-
additionalProperties: true,
|
|
46
|
-
},
|
|
47
|
-
method: {
|
|
48
|
-
type: "string",
|
|
49
|
-
enum: ["GET", "POST"],
|
|
50
|
-
default: "POST",
|
|
51
|
-
description: "HTTP method. Defaults to POST (matches all current providers).",
|
|
52
|
-
},
|
|
53
|
-
cost: {
|
|
54
|
-
type: "number",
|
|
55
|
-
description: "Optional override of the registry-quoted price (USD). Use to enforce a stricter budget cap.",
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
required: ["provider"],
|
|
59
|
-
},
|
|
60
|
-
// Settles a real on-chain payment to an arbitrary registered provider.
|
|
61
|
-
annotations: { readOnlyHint: false, openWorldHint: true, destructiveHint: true },
|
|
62
|
-
outputSchema: { type: "object" },
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
export async function runAgentCall(ctx, args) {
|
|
66
|
-
const provider = args.provider;
|
|
67
|
-
const body = args.body;
|
|
68
|
-
const method = args.method ?? "POST";
|
|
69
|
-
const cost = args.cost;
|
|
70
|
-
if (!provider) {
|
|
71
|
-
return {
|
|
72
|
-
isError: true,
|
|
73
|
-
content: [{ type: "text", text: "`provider` is required (e.g. 'exa', 'io-net')" }],
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
try {
|
|
77
|
-
const resp = await ctx.agent.call({
|
|
78
|
-
provider,
|
|
79
|
-
body,
|
|
80
|
-
method,
|
|
81
|
-
cost,
|
|
82
|
-
});
|
|
83
|
-
if (resp === null) {
|
|
84
|
-
return {
|
|
85
|
-
isError: true,
|
|
86
|
-
content: [{ type: "text", text: "Call skipped — budget cap exceeded (on_limit_exceeded='skip')." }],
|
|
87
|
-
};
|
|
88
|
-
}
|
|
89
|
-
const text = await resp.text();
|
|
90
|
-
let parsed = text;
|
|
91
|
-
try {
|
|
92
|
-
parsed = JSON.parse(text);
|
|
93
|
-
}
|
|
94
|
-
catch { /* keep as text */ }
|
|
95
|
-
// Pull the @internal settlement metadata attached by AiFinPayAgent.call
|
|
96
|
-
// (see unifiedAgent.ts). Surfacing the tx hash here lets the agent show
|
|
97
|
-
// a clickable explorer link in chat without re-querying the chain.
|
|
98
|
-
const meta = resp;
|
|
99
|
-
const txHash = meta.aifinpayTx;
|
|
100
|
-
const txChain = meta.aifinpayChain;
|
|
101
|
-
const txLine = txHash
|
|
102
|
-
? `Paid on ${txChain ?? "polygon"}. Tx: ${txHash} → https://${txChain === "solana" ? "solscan.io/tx" : "polygonscan.com/tx"}/${txHash}\n\n`
|
|
103
|
-
: "";
|
|
104
|
-
const bodyText = typeof parsed === "string"
|
|
105
|
-
? parsed
|
|
106
|
-
: JSON.stringify({ status: resp.status, body: parsed }, null, 2);
|
|
107
|
-
return {
|
|
108
|
-
content: [
|
|
109
|
-
{
|
|
110
|
-
type: "text",
|
|
111
|
-
text: txLine + bodyText,
|
|
112
|
-
},
|
|
113
|
-
],
|
|
114
|
-
};
|
|
115
|
-
}
|
|
116
|
-
catch (err) {
|
|
117
|
-
const message = err instanceof Error ? err.message : String(err);
|
|
118
|
-
const hint = message.toLowerCase().includes("budget")
|
|
119
|
-
? "Tip: increase the per-call cost cap or use `agent_quote` to preview before paying."
|
|
120
|
-
: message.toLowerCase().includes("revert") || message.toLowerCase().includes("insufficient")
|
|
121
|
-
? `Tip: ensure the EVM address ${ctx.agent.evmAddress} holds enough POL on Polygon for gas + payment.`
|
|
122
|
-
: `Provider may be misconfigured. Check https://aifinpay.io/api/providers.`;
|
|
123
|
-
return {
|
|
124
|
-
isError: true,
|
|
125
|
-
content: [{ type: "text", text: `agent_call failed: ${message}\n\n${hint}` }],
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
//# sourceMappingURL=agent-call.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-call.js","sourceRoot":"","sources":["../../src/tools/agent-call.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa;IAC3B,OAAO;QACL,IAAI,EAAE,YAAY;QAClB,WAAW,EACT,wEAAwE;YACxE,wEAAwE;YACxE,wEAAwE;YACxE,+CAA+C;YAC/C,qCAAqC;YACrC,uEAAuE;YACvE,qEAAqE;YACrE,2DAA2D;YAC3D,4EAA4E;YAC5E,2EAA2E;YAC3E,4EAA4E;YAC5E,yEAAyE;YACzE,wEAAwE;YACxE,kEAAkE;YAClE,+EAA+E;QACjF,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,+DAA+D;iBAC7E;gBACD,IAAI,EAAE;oBACJ,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,wEAAwE;oBACrF,oBAAoB,EAAE,IAAI;iBAC3B;gBACD,MAAM,EAAE;oBACN,IAAI,EAAE,QAAQ;o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C,WAAW,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,IAAI,OAAO,CAAC,WAAW,EAAE,CAAC,QAAQ,CAAC,cAAc,CAAC;gBAC1F,CAAC,CAAC,+BAA+B,GAAG,CAAC,KAAK,CAAC,UAAU,iDAAiD;gBACtG,CAAC,CAAC,yEAAyE,CAAC;QAClF,OAAO;YACL,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB,OAAO,OAAO,IAAI,EAAE,EAAE,CAAC;SAC9E,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import type { ToolContext } from "../server.js";
|
|
2
|
-
export declare function agentQuoteTool(): {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: string;
|
|
7
|
-
properties: {
|
|
8
|
-
url: {
|
|
9
|
-
type: string;
|
|
10
|
-
description: string;
|
|
11
|
-
};
|
|
12
|
-
method: {
|
|
13
|
-
type: string;
|
|
14
|
-
enum: string[];
|
|
15
|
-
default: string;
|
|
16
|
-
};
|
|
17
|
-
};
|
|
18
|
-
required: string[];
|
|
19
|
-
};
|
|
20
|
-
annotations: {
|
|
21
|
-
readOnlyHint: boolean;
|
|
22
|
-
openWorldHint: boolean;
|
|
23
|
-
destructiveHint: boolean;
|
|
24
|
-
};
|
|
25
|
-
outputSchema: {
|
|
26
|
-
type: string;
|
|
27
|
-
};
|
|
28
|
-
};
|
|
29
|
-
export declare function runAgentQuote(ctx: ToolContext, args: Record<string, unknown>): Promise<{
|
|
30
|
-
isError: boolean;
|
|
31
|
-
content: {
|
|
32
|
-
type: string;
|
|
33
|
-
text: string;
|
|
34
|
-
}[];
|
|
35
|
-
} | {
|
|
36
|
-
content: {
|
|
37
|
-
type: string;
|
|
38
|
-
text: string;
|
|
39
|
-
}[];
|
|
40
|
-
}>;
|
|
41
|
-
//# sourceMappingURL=agent-quote.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-quote.d.ts","sourceRoot":"","sources":["../../src/tools/agent-quote.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;EAuB7B;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;GA2D9B"}
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import { detectFacilitator } from "@aifinpay/agent";
|
|
2
|
-
export function agentQuoteTool() {
|
|
3
|
-
return {
|
|
4
|
-
name: "agent_quote",
|
|
5
|
-
description: "Inspect a 402 challenge for a URL WITHOUT paying. Returns the detected " +
|
|
6
|
-
"facilitator flavor and the merchant's quoted amount + fee preview. " +
|
|
7
|
-
"Use before payable_fetch to decide whether the cost is acceptable.",
|
|
8
|
-
inputSchema: {
|
|
9
|
-
type: "object",
|
|
10
|
-
properties: {
|
|
11
|
-
url: { type: "string", description: "Target URL (https)." },
|
|
12
|
-
method: {
|
|
13
|
-
type: "string",
|
|
14
|
-
enum: ["GET", "POST"],
|
|
15
|
-
default: "GET",
|
|
16
|
-
},
|
|
17
|
-
},
|
|
18
|
-
required: ["url"],
|
|
19
|
-
},
|
|
20
|
-
// Read-only probe, but reaches arbitrary external URLs → openWorldHint true.
|
|
21
|
-
annotations: { readOnlyHint: true, openWorldHint: true, destructiveHint: false },
|
|
22
|
-
outputSchema: { type: "object" },
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
export async function runAgentQuote(ctx, args) {
|
|
26
|
-
const url = String(args.url ?? "");
|
|
27
|
-
if (!url)
|
|
28
|
-
return errorResult("missing required arg: url");
|
|
29
|
-
const method = String(args.method ?? "GET").toUpperCase();
|
|
30
|
-
const resp = await ctx.agent.inner.fetchImpl(url, { method });
|
|
31
|
-
if (resp.status !== 402) {
|
|
32
|
-
return {
|
|
33
|
-
content: [
|
|
34
|
-
{
|
|
35
|
-
type: "text",
|
|
36
|
-
text: JSON.stringify({
|
|
37
|
-
status: resp.status,
|
|
38
|
-
note: resp.status === 200
|
|
39
|
-
? "no payment required — you can hit this without paying"
|
|
40
|
-
: `unexpected status ${resp.status} on initial probe`,
|
|
41
|
-
}, null, 2),
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
const facilitator = await detectFacilitator(resp);
|
|
48
|
-
let bodyPreview = null;
|
|
49
|
-
try {
|
|
50
|
-
bodyPreview = await resp.clone().json();
|
|
51
|
-
}
|
|
52
|
-
catch {
|
|
53
|
-
bodyPreview = (await resp.clone().text()).slice(0, 500);
|
|
54
|
-
}
|
|
55
|
-
return {
|
|
56
|
-
content: [
|
|
57
|
-
{
|
|
58
|
-
type: "text",
|
|
59
|
-
text: JSON.stringify({
|
|
60
|
-
facilitator: facilitator.name,
|
|
61
|
-
status: 402,
|
|
62
|
-
note: "fee-on-top engine not yet wired — quote shows merchant terms only. " +
|
|
63
|
-
"AiFinPay fee will be added on top at payment time.",
|
|
64
|
-
merchant_terms: bodyPreview,
|
|
65
|
-
}, null, 2),
|
|
66
|
-
},
|
|
67
|
-
],
|
|
68
|
-
};
|
|
69
|
-
}
|
|
70
|
-
catch (e) {
|
|
71
|
-
const err = e;
|
|
72
|
-
return errorResult(`could not detect facilitator: ${err.message}`);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
function errorResult(...lines) {
|
|
76
|
-
return {
|
|
77
|
-
isError: true,
|
|
78
|
-
content: lines.map((line) => ({ type: "text", text: line })),
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=agent-quote.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-quote.js","sourceRoot":"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C,IAAI,EAAE,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;KAC7D,CAAC;AACJ,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import type { ToolContext } from "../server.js";
|
|
2
|
-
export declare function payWithSplitTool(): {
|
|
3
|
-
name: string;
|
|
4
|
-
description: string;
|
|
5
|
-
inputSchema: {
|
|
6
|
-
type: string;
|
|
7
|
-
properties: {
|
|
8
|
-
chain: {
|
|
9
|
-
type: string;
|
|
10
|
-
enum: string[];
|
|
11
|
-
description: string;
|
|
12
|
-
};
|
|
13
|
-
merchant_wallet: {
|
|
14
|
-
type: string;
|
|
15
|
-
description: string;
|
|
16
|
-
};
|
|
17
|
-
merchant_amount: {
|
|
18
|
-
type: string;
|
|
19
|
-
description: string;
|
|
20
|
-
};
|
|
21
|
-
order_id: {
|
|
22
|
-
type: string;
|
|
23
|
-
description: string;
|
|
24
|
-
};
|
|
25
|
-
fee_recipient: {
|
|
26
|
-
type: string;
|
|
27
|
-
description: string;
|
|
28
|
-
};
|
|
29
|
-
};
|
|
30
|
-
required: string[];
|
|
31
|
-
};
|
|
32
|
-
annotations: {
|
|
33
|
-
readOnlyHint: boolean;
|
|
34
|
-
openWorldHint: boolean;
|
|
35
|
-
destructiveHint: boolean;
|
|
36
|
-
};
|
|
37
|
-
outputSchema: {
|
|
38
|
-
type: string;
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
export declare function runPayWithSplit(ctx: ToolContext, args: Record<string, unknown>): Promise<{
|
|
42
|
-
isError: boolean;
|
|
43
|
-
content: {
|
|
44
|
-
type: string;
|
|
45
|
-
text: string;
|
|
46
|
-
}[];
|
|
47
|
-
} | {
|
|
48
|
-
content: {
|
|
49
|
-
type: string;
|
|
50
|
-
text: string;
|
|
51
|
-
}[];
|
|
52
|
-
structuredContent: Record<string, unknown>;
|
|
53
|
-
}>;
|
|
54
|
-
export declare function quoteSplitTool(): {
|
|
55
|
-
name: string;
|
|
56
|
-
description: string;
|
|
57
|
-
inputSchema: {
|
|
58
|
-
type: string;
|
|
59
|
-
properties: {
|
|
60
|
-
chain: {
|
|
61
|
-
type: string;
|
|
62
|
-
enum: string[];
|
|
63
|
-
};
|
|
64
|
-
merchant_amount: {
|
|
65
|
-
type: string;
|
|
66
|
-
description: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
required: string[];
|
|
70
|
-
};
|
|
71
|
-
annotations: {
|
|
72
|
-
readOnlyHint: boolean;
|
|
73
|
-
openWorldHint: boolean;
|
|
74
|
-
destructiveHint: boolean;
|
|
75
|
-
};
|
|
76
|
-
outputSchema: {
|
|
77
|
-
type: string;
|
|
78
|
-
};
|
|
79
|
-
};
|
|
80
|
-
export declare function runQuoteSplit(ctx: ToolContext, args: Record<string, unknown>): Promise<{
|
|
81
|
-
isError: boolean;
|
|
82
|
-
content: {
|
|
83
|
-
type: string;
|
|
84
|
-
text: string;
|
|
85
|
-
}[];
|
|
86
|
-
} | {
|
|
87
|
-
content: {
|
|
88
|
-
type: string;
|
|
89
|
-
text: string;
|
|
90
|
-
}[];
|
|
91
|
-
structuredContent: Record<string, unknown>;
|
|
92
|
-
}>;
|
|
93
|
-
//# sourceMappingURL=pay-with-split.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pay-with-split.d.ts","sourceRoot":"","sources":["../../src/tools/pay-with-split.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAahD,wBAAgB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA8C/B;AAED,wBAAsB,eAAe,CACnC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;GAsC9B;AAED,wBAAgB,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;EAuB7B;AAED,wBAAsB,aAAa,CACjC,GAAG,EAAE,WAAW,EAChB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;;;;;;;;;;;;GAoB9B"}
|
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
// NOTE on the chain enum below: pay_with_split and quote_split are
|
|
2
|
-
// BACKEND-INVOICE-DRIVEN — they call the operator API
|
|
3
|
-
// (POST /api/b2b/pay-with-split, GET /api/b2b/quote-split), which supports
|
|
4
|
-
// solana + 6 on-chain-verified EVM chains (polygon, base, optimism,
|
|
5
|
-
// unichain, botchain, xrplevm). Keep this enum in lockstep with the
|
|
6
|
-
// backend's ../evm-chains.js registry — a chain listed here without
|
|
7
|
-
// backend support would just be rejected server-side. Stables: USDC on
|
|
8
|
-
// base/optimism/unichain, USDC+USDT on polygon; botchain/xrplevm are
|
|
9
|
-
// native-token only. Direct (non-invoice) splitter settlement lives in
|
|
10
|
-
// the SDK's AiFinPayAgent.call() (@aifinpay/agent >= 1.3.0).
|
|
11
|
-
export function payWithSplitTool() {
|
|
12
|
-
return {
|
|
13
|
-
name: "pay_with_split",
|
|
14
|
-
description: "Get on-chain instructions for a fee-on-top atomic 3-way payment. " +
|
|
15
|
-
"The merchant receives the FULL quoted price; AiFinPay protocol fee " +
|
|
16
|
-
"(1%) and creator/referral fee (0.01%) are added ON TOP. The agent " +
|
|
17
|
-
"executes the returned instructions with their chain SDK of choice. " +
|
|
18
|
-
"Returns 503 with onboarding message if the splitter is not yet " +
|
|
19
|
-
"deployed on the requested chain.",
|
|
20
|
-
inputSchema: {
|
|
21
|
-
type: "object",
|
|
22
|
-
properties: {
|
|
23
|
-
chain: {
|
|
24
|
-
type: "string",
|
|
25
|
-
enum: ["solana", "polygon", "base", "optimism", "unichain", "botchain", "xrplevm"],
|
|
26
|
-
description: "Chain to settle on.",
|
|
27
|
-
},
|
|
28
|
-
merchant_wallet: {
|
|
29
|
-
type: "string",
|
|
30
|
-
description: "Recipient — Solana base58 pubkey or Polygon 0x address.",
|
|
31
|
-
},
|
|
32
|
-
merchant_amount: {
|
|
33
|
-
type: "string",
|
|
34
|
-
description: "Merchant's quoted price in chain units (lamports for Solana, " +
|
|
35
|
-
"wei for Polygon). Use a string to preserve precision.",
|
|
36
|
-
},
|
|
37
|
-
order_id: {
|
|
38
|
-
type: "string",
|
|
39
|
-
description: "Off-chain reference (max 64 chars).",
|
|
40
|
-
},
|
|
41
|
-
fee_recipient: {
|
|
42
|
-
type: "string",
|
|
43
|
-
description: "Optional — receives the IP-creator fee. Omit to route the " +
|
|
44
|
-
"creator slot to AiFinPay treasury.",
|
|
45
|
-
},
|
|
46
|
-
},
|
|
47
|
-
required: ["chain", "merchant_wallet", "merchant_amount", "order_id"],
|
|
48
|
-
},
|
|
49
|
-
// Returns on-chain instructions/invoice; does not itself broadcast funds.
|
|
50
|
-
annotations: { readOnlyHint: false, openWorldHint: false, destructiveHint: false },
|
|
51
|
-
outputSchema: { type: "object" },
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
export async function runPayWithSplit(ctx, args) {
|
|
55
|
-
const chain = args.chain;
|
|
56
|
-
if (!chain || !["solana", "polygon", "base", "optimism", "unichain", "botchain", "xrplevm"].includes(chain)) {
|
|
57
|
-
return errorResult("chain must be 'solana', 'polygon', 'base', 'optimism', 'unichain', 'botchain' or 'xrplevm'");
|
|
58
|
-
}
|
|
59
|
-
const merchantWallet = String(args.merchant_wallet ?? "");
|
|
60
|
-
const merchantAmount = String(args.merchant_amount ?? "");
|
|
61
|
-
const orderId = String(args.order_id ?? "");
|
|
62
|
-
if (!merchantWallet || !merchantAmount || !orderId) {
|
|
63
|
-
return errorResult("merchant_wallet, merchant_amount, and order_id are all required");
|
|
64
|
-
}
|
|
65
|
-
const feeRecipient = typeof args.fee_recipient === "string" && args.fee_recipient
|
|
66
|
-
? args.fee_recipient
|
|
67
|
-
: undefined;
|
|
68
|
-
try {
|
|
69
|
-
const invoice = await ctx.agent.inner.payWithSplitInvoice({
|
|
70
|
-
// published @aifinpay/agent (<=1.3.0) still types this "solana"|"polygon";
|
|
71
|
-
// the value is forwarded verbatim to the backend, which accepts all 7.
|
|
72
|
-
// Drop the cast once agent >=1.3.1 (widened types) is published.
|
|
73
|
-
chain: chain,
|
|
74
|
-
merchantWallet,
|
|
75
|
-
merchantAmount,
|
|
76
|
-
orderId,
|
|
77
|
-
feeRecipient,
|
|
78
|
-
});
|
|
79
|
-
return {
|
|
80
|
-
content: [{ type: "text", text: JSON.stringify(invoice, null, 2) }],
|
|
81
|
-
structuredContent: invoice,
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
catch (e) {
|
|
85
|
-
const err = e;
|
|
86
|
-
return errorResult(`${err.constructor.name}: ${err.message}`);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
export function quoteSplitTool() {
|
|
90
|
-
return {
|
|
91
|
-
name: "quote_split",
|
|
92
|
-
description: "Pure-view: compute the fee-on-top breakdown (merchant + treasury + " +
|
|
93
|
-
"creator + total) for a given merchant amount. No payment, no auth. " +
|
|
94
|
-
"Use this BEFORE pay_with_split to decide whether the cost is " +
|
|
95
|
-
"acceptable.",
|
|
96
|
-
inputSchema: {
|
|
97
|
-
type: "object",
|
|
98
|
-
properties: {
|
|
99
|
-
chain: { type: "string", enum: ["solana", "polygon", "base", "optimism", "unichain", "botchain", "xrplevm"] },
|
|
100
|
-
merchant_amount: {
|
|
101
|
-
type: "string",
|
|
102
|
-
description: "Merchant's quoted price (lamports for Solana, wei for Polygon).",
|
|
103
|
-
},
|
|
104
|
-
},
|
|
105
|
-
required: ["chain", "merchant_amount"],
|
|
106
|
-
},
|
|
107
|
-
annotations: { readOnlyHint: true, openWorldHint: false, destructiveHint: false },
|
|
108
|
-
outputSchema: { type: "object" },
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
export async function runQuoteSplit(ctx, args) {
|
|
112
|
-
const chain = args.chain;
|
|
113
|
-
if (!chain || !["solana", "polygon", "base", "optimism", "unichain", "botchain", "xrplevm"].includes(chain)) {
|
|
114
|
-
return errorResult("chain must be 'solana', 'polygon', 'base', 'optimism', 'unichain', 'botchain' or 'xrplevm'");
|
|
115
|
-
}
|
|
116
|
-
const merchantAmount = String(args.merchant_amount ?? "");
|
|
117
|
-
if (!merchantAmount)
|
|
118
|
-
return errorResult("merchant_amount required");
|
|
119
|
-
try {
|
|
120
|
-
// Same published-type lag as above — cast until agent >=1.3.1 ships.
|
|
121
|
-
const quote = await ctx.agent.inner.quoteSplit({ chain: chain, merchantAmount });
|
|
122
|
-
return {
|
|
123
|
-
content: [{ type: "text", text: JSON.stringify(quote, null, 2) }],
|
|
124
|
-
structuredContent: quote,
|
|
125
|
-
};
|
|
126
|
-
}
|
|
127
|
-
catch (e) {
|
|
128
|
-
const err = e;
|
|
129
|
-
return errorResult(`${err.constructor.name}: ${err.message}`);
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
function errorResult(...lines) {
|
|
133
|
-
return {
|
|
134
|
-
isError: true,
|
|
135
|
-
content: lines.map((line) => ({ type: "text", text: line })),
|
|
136
|
-
};
|
|
137
|
-
}
|
|
138
|
-
//# sourceMappingURL=pay-with-split.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pay-with-split.js","sourceRoot":"","sources":["../../src/tools/pay-with-split.ts"],"names":[],"mappings":"AAEA,mEAAmE;AACnE,sDAAsD;AACtD,2EAA2E;AAC3E,oEAAoE;AACpE,oEAAoE;AACpE,oEAAoE;AACpE,uEAAuE;AACvE,qEAAqE;AACrE,uEAAuE;AACvE,6DAA6D;AAE7D,MAAM,UAAU,gBAAgB;IAC9B,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,WAAW,EACT,mEAAmE;YACnE,qEAAqE;YACrE,oEAAoE;YACpE,qEAAqE;YACrE,iEAAiE;YACjE,kCAAkC;QACpC,WAAW,EAAE;YACX,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,KAAK,EAAE;oBACL,IAAI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