@leashmarket/mcp-core 0.1.0 → 0.2.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 +69 -0
- package/dist/helpers/probe-payment-link.d.ts +8 -9
- package/dist/helpers/probe-payment-link.d.ts.map +1 -1
- package/dist/helpers/probe-payment-link.js +30 -23
- package/dist/helpers/probe-payment-link.js.map +1 -1
- package/dist/host.d.ts +9 -0
- package/dist/host.d.ts.map +1 -1
- package/dist/tools/create-payment-link.d.ts.map +1 -1
- package/dist/tools/create-payment-link.js +5 -1
- package/dist/tools/create-payment-link.js.map +1 -1
- package/dist/tools/get-receipt.d.ts +4 -3
- package/dist/tools/get-receipt.d.ts.map +1 -1
- package/dist/tools/get-receipt.js +8 -7
- package/dist/tools/get-receipt.js.map +1 -1
- package/dist/tools/pay-payment-link.d.ts.map +1 -1
- package/dist/tools/pay-payment-link.js +6 -1
- package/dist/tools/pay-payment-link.js.map +1 -1
- package/dist/tools/receipts.js +1 -1
- package/dist/tools/receipts.js.map +1 -1
- package/package.json +3 -2
package/README.md
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
# @leashmarket/mcp-core
|
|
2
|
+
|
|
3
|
+
Host-agnostic core for every Leash MCP surface.
|
|
4
|
+
|
|
5
|
+
Defines the `LeashHost` runtime contract, `LeashTool` primitive, and the full
|
|
6
|
+
`LEASH_TOOLS` catalogue that all adapters (`@leashmarket/mcp`, Claude Agent SDK,
|
|
7
|
+
browser runtimes) iterate over.
|
|
8
|
+
|
|
9
|
+
## Install
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
npm install @leashmarket/mcp-core
|
|
13
|
+
# or
|
|
14
|
+
pnpm add @leashmarket/mcp-core
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## What lives here
|
|
18
|
+
|
|
19
|
+
| Export | Purpose |
|
|
20
|
+
| -------------------------- | ------------------------------------------------------------------------------------------------------ |
|
|
21
|
+
| `LeashHost` | Runtime contract every host implements (wallet, RPC, API key, …) |
|
|
22
|
+
| `LeashTool` / `defineTool` | Tool-definition primitive (name, Zod schema, typed handler) |
|
|
23
|
+
| `LEASH_TOOLS` | Canonical tool list adapters iterate — discover, pay, receipts, spend limits, etc. |
|
|
24
|
+
| `helpers/*` | Pure utilities: `probePaymentLink`, `fetchDiscover`, `fetchReputation`, token catalog, address helpers |
|
|
25
|
+
|
|
26
|
+
## Usage
|
|
27
|
+
|
|
28
|
+
```ts
|
|
29
|
+
import { LEASH_TOOLS, type LeashHost } from '@leashmarket/mcp-core';
|
|
30
|
+
|
|
31
|
+
// Implement the host contract for your runtime
|
|
32
|
+
const host: LeashHost = {
|
|
33
|
+
apiKey: process.env.LEASH_API_KEY!,
|
|
34
|
+
apiUrl: 'https://api.leash.market',
|
|
35
|
+
network: 'solana-mainnet',
|
|
36
|
+
rpcUrl: 'https://api.mainnet-beta.solana.com',
|
|
37
|
+
signer: mySigner,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
// Iterate tools and wire them into your adapter
|
|
41
|
+
for (const tool of LEASH_TOOLS) {
|
|
42
|
+
registerTool(tool.name, tool.schema, (args) => tool.handler(host, args));
|
|
43
|
+
}
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Using helpers directly
|
|
47
|
+
|
|
48
|
+
```ts
|
|
49
|
+
import { probePaymentLink, fetchDiscover } from '@leashmarket/mcp-core/helpers';
|
|
50
|
+
|
|
51
|
+
// Check if a URL is a valid x402 paywall
|
|
52
|
+
const result = await probePaymentLink('https://api.example.com/endpoint');
|
|
53
|
+
|
|
54
|
+
// Browse the discover catalog
|
|
55
|
+
const { items } = await fetchDiscover('https://api.leash.market', {
|
|
56
|
+
capability: 'translate text',
|
|
57
|
+
});
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
## Docs
|
|
61
|
+
|
|
62
|
+
Full tool reference and host contract: [docs.leash.market/sdk/mcp-core](https://docs.leash.market/sdk/mcp-core)
|
|
63
|
+
|
|
64
|
+
## Develop
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pnpm --filter @leashmarket/mcp-core build
|
|
68
|
+
pnpm --filter @leashmarket/mcp-core test
|
|
69
|
+
```
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* GET a Leash paywall URL and classify it as **x402** (payment-required
|
|
3
|
+
* header) or **MPP** (problem+json body) using the same rules as
|
|
4
|
+
* `@leashmarket/core` {@link detectProtocol}.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
8
|
-
* query (with a lenient fallback to `accepts[0]`).
|
|
9
|
-
*
|
|
10
|
-
* Throws on every error path so callers can wrap once and surface
|
|
11
|
-
* the message verbatim to the model.
|
|
6
|
+
* Returns a `PaymentRequirementPreview` the buyer artifact (or MCP
|
|
7
|
+
* `pay`) can consume. Throws on non-402 responses and unrecognised 402s.
|
|
12
8
|
*/
|
|
13
9
|
export type PaymentRequirementPreview = {
|
|
10
|
+
protocol: 'x402' | 'mpp';
|
|
14
11
|
network: string;
|
|
15
12
|
pay_to: string;
|
|
16
13
|
asset: string;
|
|
17
14
|
amount_atomic: string;
|
|
18
15
|
currency: string;
|
|
19
16
|
description?: string;
|
|
17
|
+
/** Present when `protocol === 'mpp'`. */
|
|
18
|
+
challenge_id?: string;
|
|
20
19
|
};
|
|
21
20
|
export declare function probePaymentLink(url: string): Promise<PaymentRequirementPreview>;
|
|
22
21
|
//# sourceMappingURL=probe-payment-link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe-payment-link.d.ts","sourceRoot":"","sources":["../../src/helpers/probe-payment-link.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"probe-payment-link.d.ts","sourceRoot":"","sources":["../../src/helpers/probe-payment-link.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAMH,MAAM,MAAM,yBAAyB,GAAG;IACtC,QAAQ,EAAE,MAAM,GAAG,KAAK,CAAC;IACzB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,yCAAyC;IACzC,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,CAAC;AAcF,wBAAsB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,yBAAyB,CAAC,CAgFtF"}
|
|
@@ -1,15 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* GET
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* GET a Leash paywall URL and classify it as **x402** (payment-required
|
|
3
|
+
* header) or **MPP** (problem+json body) using the same rules as
|
|
4
|
+
* `@leashmarket/core` {@link detectProtocol}.
|
|
5
5
|
*
|
|
6
|
-
*
|
|
7
|
-
* `
|
|
8
|
-
* query (with a lenient fallback to `accepts[0]`).
|
|
9
|
-
*
|
|
10
|
-
* Throws on every error path so callers can wrap once and surface
|
|
11
|
-
* the message verbatim to the model.
|
|
6
|
+
* Returns a `PaymentRequirementPreview` the buyer artifact (or MCP
|
|
7
|
+
* `pay`) can consume. Throws on non-402 responses and unrecognised 402s.
|
|
12
8
|
*/
|
|
9
|
+
import { detectProtocol } from '@leashmarket/core';
|
|
13
10
|
import { decodeBase64Json } from './base64-json.js';
|
|
14
11
|
import { symbolForMintSafe } from './token-catalog.js';
|
|
15
12
|
/**
|
|
@@ -25,13 +22,31 @@ function symbolForMintAnyNetwork(mint) {
|
|
|
25
22
|
}
|
|
26
23
|
export async function probePaymentLink(url) {
|
|
27
24
|
const res = await fetch(url, { method: 'GET' });
|
|
28
|
-
|
|
29
|
-
|
|
25
|
+
const det = await detectProtocol(res);
|
|
26
|
+
if (det.protocol === 'none') {
|
|
27
|
+
throw new Error(`expected 402 from paywall, got HTTP ${det.status}`);
|
|
28
|
+
}
|
|
29
|
+
if (det.protocol === 'unknown') {
|
|
30
|
+
throw new Error(`paywall response is neither x402 nor MPP: ${det.detail}`);
|
|
30
31
|
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
if (det.protocol === 'mpp') {
|
|
33
|
+
const ch = det.challenge;
|
|
34
|
+
const fromRegistry = symbolForMintAnyNetwork(ch.request.asset);
|
|
35
|
+
const currency = ch.request.currency ?? fromRegistry ?? 'USDC';
|
|
36
|
+
const out = {
|
|
37
|
+
protocol: 'mpp',
|
|
38
|
+
network: ch.request.network,
|
|
39
|
+
pay_to: ch.request.recipient,
|
|
40
|
+
asset: ch.request.asset,
|
|
41
|
+
amount_atomic: ch.request.amount,
|
|
42
|
+
currency,
|
|
43
|
+
challenge_id: ch.challengeId,
|
|
44
|
+
};
|
|
45
|
+
if (ch.detail)
|
|
46
|
+
out.description = ch.detail;
|
|
47
|
+
return out;
|
|
34
48
|
}
|
|
49
|
+
const header = det.paymentRequiredHeader;
|
|
35
50
|
const decoded = decodeBase64Json(header);
|
|
36
51
|
if (!decoded || !Array.isArray(decoded.accepts) || decoded.accepts.length === 0) {
|
|
37
52
|
throw new Error(decoded?.error ?? 'malformed payment-required header');
|
|
@@ -53,18 +68,10 @@ export async function probePaymentLink(url) {
|
|
|
53
68
|
if (!chosen.network || !chosen.payTo || !chosen.asset || !chosen.amount) {
|
|
54
69
|
throw new Error('payment-required entry missing required fields');
|
|
55
70
|
}
|
|
56
|
-
// Currency resolution order:
|
|
57
|
-
// 1. explicit `currency` on the chosen accept (extension surface;
|
|
58
|
-
// vanilla x402 envelopes don't carry it, but we look anyway),
|
|
59
|
-
// 2. catalog reverse-lookup keyed by the asset mint (covers every
|
|
60
|
-
// Leash-self-hosted x402 link since the API shapes 402 quotes
|
|
61
|
-
// from the catalogued USDC/USDG/USDT mint),
|
|
62
|
-
// 3. last-resort 'USDC' so the model never sees an empty ticker.
|
|
63
|
-
// The previous unconditional `?? 'USDC'` mis-labelled USDG/USDT links
|
|
64
|
-
// and caused buyer-kit to ask for the wrong asset → `preferred_asset_unavailable`.
|
|
65
71
|
const fromRegistry = symbolForMintAnyNetwork(chosen.asset);
|
|
66
72
|
const currency = chosen.currency ?? fromRegistry ?? 'USDC';
|
|
67
73
|
const out = {
|
|
74
|
+
protocol: 'x402',
|
|
68
75
|
network: chosen.network,
|
|
69
76
|
pay_to: chosen.payTo,
|
|
70
77
|
asset: chosen.asset,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"probe-payment-link.js","sourceRoot":"","sources":["../../src/helpers/probe-payment-link.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"probe-payment-link.js","sourceRoot":"","sources":["../../src/helpers/probe-payment-link.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAcvD;;;;;;;GAOG;AACH,SAAS,uBAAuB,CAAC,IAAY;IAC3C,OAAO,iBAAiB,CAAC,IAAI,EAAE,QAAQ,CAAC,IAAI,iBAAiB,CAAC,IAAI,EAAE,SAAS,CAAC,IAAI,IAAI,CAAC;AACzF,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,gBAAgB,CAAC,GAAW;IAChD,MAAM,GAAG,GAAG,MAAM,KAAK,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,CAAC,CAAC;IAChD,MAAM,GAAG,GAAG,MAAM,cAAc,CAAC,GAAG,CAAC,CAAC;IAEtC,IAAI,GAAG,CAAC,QAAQ,KAAK,MAAM,EAAE,CAAC;QAC5B,MAAM,IAAI,KAAK,CAAC,uCAAuC,GAAG,CAAC,MAAM,EAAE,CAAC,CAAC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CAAC,WAAW,CAAC;IAC7D,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/dist/host.d.ts
CHANGED
|
@@ -28,9 +28,18 @@ export type CreatePaymentLinkArgs = {
|
|
|
28
28
|
currency: StableSymbol;
|
|
29
29
|
label: string;
|
|
30
30
|
description?: string;
|
|
31
|
+
/** Hosted paywall rail. Defaults to x402 (`payment-required`). */
|
|
32
|
+
protocol?: 'x402' | 'mpp';
|
|
31
33
|
};
|
|
32
34
|
export type PayArgs = {
|
|
33
35
|
url: string;
|
|
36
|
+
/** HTTP method for the paid request. Default GET (matches most `/x/<id>` links). */
|
|
37
|
+
method?: 'GET' | 'POST';
|
|
38
|
+
/**
|
|
39
|
+
* Raw request body for POST (e.g. JSON). Ignored when `method` is GET
|
|
40
|
+
* or omitted.
|
|
41
|
+
*/
|
|
42
|
+
body?: string;
|
|
34
43
|
};
|
|
35
44
|
export type WithdrawArgs = {
|
|
36
45
|
token: WithdrawableToken;
|
package/dist/host.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"host.d.ts","sourceRoot":"","sources":["../src/host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAEjD,iEAAiE;AACjE,MAAM,MAAM,UAAU,GAAG,eAAe,GAAG,gBAAgB,CAAC;AAE5D,+DAA+D;AAC/D,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAEpD,0EAA0E;AAC1E,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,YAAY,CAAC;AAOrD,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,YAAY,CAAC;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"host.d.ts","sourceRoot":"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;;;;OAQG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEjE;;;;OAIG;IACH,WAAW,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE7D;;;;OAIG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEvD;;;OAGG;IACH,QAAQ,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEvD;;;OAGG;IACH,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3D;;;;;OAKG;IACH,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEzE;;;;;;;OAOG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,aAAa,CAAC,IAAI,EAAE,iBAAiB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAEjE;;;;;OAKG;IACH,UAAU,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3D;;;;;OAKG;IACH,kBAAkB,CAAC,IAAI,EAAE,sBAAsB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IAE3E;;;;;OAKG;IACH,iBAAiB,CAAC,IAAI,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;CAC1E"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-payment-link.d.ts","sourceRoot":"","sources":["../../src/tools/create-payment-link.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create-payment-link.d.ts","sourceRoot":"","sources":["../../src/tools/create-payment-link.ts"],"names":[],"mappings":"AA2BA,eAAO,MAAM,qBAAqB,gCAQhC,CAAC"}
|
|
@@ -15,11 +15,15 @@ const inputSchema = z.object({
|
|
|
15
15
|
.max(120)
|
|
16
16
|
.describe('Human-readable label for the link (e.g. "Coffee — large").'),
|
|
17
17
|
description: z.string().max(500).optional(),
|
|
18
|
+
protocol: z
|
|
19
|
+
.enum(['x402', 'mpp'])
|
|
20
|
+
.optional()
|
|
21
|
+
.describe('Paywall protocol: `x402` (HTTP 402 + payment-required) or `mpp` (application/problem+json + MPP settle). Defaults to x402.'),
|
|
18
22
|
});
|
|
19
23
|
export const createPaymentLinkTool = defineTool({
|
|
20
24
|
name: 'leash_create_payment_link',
|
|
21
25
|
description: [
|
|
22
|
-
'Create
|
|
26
|
+
'Create a payment link (x402 or MPP) the user (or another agent) can call to pay this agent in USDC/USDG/USDT.',
|
|
23
27
|
'Requires an on-chain agent (treasury). Returns the public share URL on success — quote it back as a markdown link.',
|
|
24
28
|
].join(' '),
|
|
25
29
|
inputSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-payment-link.js","sourceRoot":"","sources":["../../src/tools/create-payment-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,MAAM,EAAE,CAAC;SACN,MAAM,EAAE;SACR,QAAQ,EAAE;SACV,QAAQ,CAAC,mEAAmE,CAAC;IAChF,QAAQ,EAAE,CAAC;SACR,IAAI,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;SAC9B,OAAO,CAAC,MAAM,CAAC;SACf,QAAQ,CAAC,4CAA4C,CAAC;IACzD,KAAK,EAAE,CAAC;SACL,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CAAC,4DAA4D,CAAC;IACzE,WAAW,EA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-1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `leash_get_receipt` — fetch a single
|
|
3
|
-
* `receipt_hash
|
|
2
|
+
* `leash_get_receipt` — fetch a single canonical receipt by its deterministic
|
|
3
|
+
* `receipt_hash` (legacy v0.1 / dual-protocol v0.2).
|
|
4
4
|
*
|
|
5
5
|
* Why this exists
|
|
6
6
|
* ---------------
|
|
7
7
|
* The explorer renders a receipt detail page at `/receipt/{hash}` with
|
|
8
8
|
* the full canonical JSON the seller published (including price legs,
|
|
9
|
-
* facilitator URL, request shape, and
|
|
9
|
+
* facilitator URL, request shape, and on-chain settlement — `tx_sig` or
|
|
10
|
+
* MPP `mpp_settlement_tx`). Agents
|
|
10
11
|
* working over MCP/CLI need the same payload programmatically — to
|
|
11
12
|
* verify a counterparty's claim ("here's the hash, prove the call was
|
|
12
13
|
* paid"), reconcile bookkeeping against an internal ledger, or feed
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-receipt.d.ts","sourceRoot":"","sources":["../../src/tools/get-receipt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"get-receipt.d.ts","sourceRoot":"","sources":["../../src/tools/get-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAgBH,eAAO,MAAM,cAAc,gCAUzB,CAAC"}
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `leash_get_receipt` — fetch a single
|
|
3
|
-
* `receipt_hash
|
|
2
|
+
* `leash_get_receipt` — fetch a single canonical receipt by its deterministic
|
|
3
|
+
* `receipt_hash` (legacy v0.1 / dual-protocol v0.2).
|
|
4
4
|
*
|
|
5
5
|
* Why this exists
|
|
6
6
|
* ---------------
|
|
7
7
|
* The explorer renders a receipt detail page at `/receipt/{hash}` with
|
|
8
8
|
* the full canonical JSON the seller published (including price legs,
|
|
9
|
-
* facilitator URL, request shape, and
|
|
9
|
+
* facilitator URL, request shape, and on-chain settlement — `tx_sig` or
|
|
10
|
+
* MPP `mpp_settlement_tx`). Agents
|
|
10
11
|
* working over MCP/CLI need the same payload programmatically — to
|
|
11
12
|
* verify a counterparty's claim ("here's the hash, prove the call was
|
|
12
13
|
* paid"), reconcile bookkeeping against an internal ledger, or feed
|
|
@@ -25,14 +26,14 @@ const inputSchema = z.object({
|
|
|
25
26
|
.string()
|
|
26
27
|
.min(8)
|
|
27
28
|
.max(128)
|
|
28
|
-
.describe('The 64-hex-char `receipt_hash` from a Leash
|
|
29
|
+
.describe('The 64-hex-char `receipt_hash` from a Leash receipt (v0.1 or v0.2). Same value the explorer renders at `/receipt/{hash}` and the buyer/seller kits return as `receipt.receipt_hash`. Network is bound to the host\u2019s API key.'),
|
|
29
30
|
});
|
|
30
31
|
export const getReceiptTool = defineTool({
|
|
31
32
|
name: 'leash_get_receipt',
|
|
32
33
|
description: [
|
|
33
|
-
'Look up a single
|
|
34
|
-
'Use this when an agent or user hands you a hash and you need to surface the request URL, method, decision (allow/deny), price (amount/fee/gross), facilitator, on-chain tx_sig, and the prev/current hash chain.',
|
|
35
|
-
'On `status: "ok"`, the `receipt` field holds the canonical
|
|
34
|
+
'Look up a single receipt by its deterministic `receipt_hash` and return the full canonical JSON \u2014 the same blob the explorer shows at `/receipt/{hash}`.',
|
|
35
|
+
'Use this when an agent or user hands you a hash and you need to surface the request URL, method, decision (allow/deny), price (amount/fee/gross), facilitator, on-chain settlement (`tx_sig` or MPP `mpp_settlement_tx`), and the prev/current hash chain.',
|
|
36
|
+
'On `status: "ok"`, the `receipt` field holds the canonical object (v0.1 or v0.2 with `protocol`); an `explorer_url` is also returned so the LLM can quote a clickable link.',
|
|
36
37
|
'Returns `status: "not_found"` if the hash exists on the sibling cluster (cross-network reads are impossible by design).',
|
|
37
38
|
].join(' '),
|
|
38
39
|
inputSchema,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"get-receipt.js","sourceRoot":"","sources":["../../src/tools/get-receipt.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"get-receipt.js","sourceRoot":"","sources":["../../src/tools/get-receipt.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,YAAY,EAAE,CAAC;SACZ,MAAM,EAAE;SACR,GAAG,CAAC,CAAC,CAAC;SACN,GAAG,CAAC,GAAG,CAAC;SACR,QAAQ,CACP,mOAAmO,CACpO;CACJ,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,UAAU,CAAC;IACvC,IAAI,EAAE,mBAAmB;IACzB,WAAW,EAAE;QACX,+JAA+J;QAC/J,4PAA4P;QAC5P,6KAA6K;QAC7K,yHAAyH;KAC1H,CAAC,IAAI,CAAC,GAAG,CAAC;IACX,WAAW;IACX,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,CAAC;CACnD,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay-payment-link.d.ts","sourceRoot":"","sources":["../../src/tools/pay-payment-link.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"pay-payment-link.d.ts","sourceRoot":"","sources":["../../src/tools/pay-payment-link.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,kBAAkB,gCAW7B,CAAC"}
|
|
@@ -2,11 +2,16 @@ import { z } from 'zod';
|
|
|
2
2
|
import { defineTool } from '../tool.js';
|
|
3
3
|
const inputSchema = z.object({
|
|
4
4
|
url: z.string().url().describe('The full https://…/x/<id>?network=… payment link.'),
|
|
5
|
+
method: z
|
|
6
|
+
.enum(['GET', 'POST'])
|
|
7
|
+
.optional()
|
|
8
|
+
.describe('HTTP method for the paid request. Default GET.'),
|
|
9
|
+
body: z.string().optional().describe('JSON (or other) body when using POST. Ignored for GET.'),
|
|
5
10
|
});
|
|
6
11
|
export const payPaymentLinkTool = defineTool({
|
|
7
12
|
name: 'leash_pay_payment_link',
|
|
8
13
|
description: [
|
|
9
|
-
'Pay an x402 payment link from the agent treasury under the per-action / per-task / per-day caps.',
|
|
14
|
+
'Pay an x402 or MPP (Leash dual-protocol) payment link from the agent treasury under the per-action / per-task / per-day caps.',
|
|
10
15
|
'Behaviour depends on the host runtime:',
|
|
11
16
|
' - In the chat product the call DOES NOT settle on its own — the operator key lives in the user’s Privy wallet, not the server. The tool probes the URL for a 402 quote and returns a `payment_request` artifact the chat UI renders as a "Pay" card. Reply with one short sentence telling the user to confirm in the Pay card below.',
|
|
12
17
|
' - In the standalone MCP / CLI runtime the call SETTLES the payment using the local executive keypair and returns a `payment_receipt` blob with the on-chain signature. Surface the receipt hash + amount in your reply.',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay-payment-link.js","sourceRoot":"","sources":["../../src/tools/pay-payment-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;
|
|
1
|
+
{"version":3,"file":"pay-payment-link.js","sourceRoot":"","sources":["../../src/tools/pay-payment-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAAM,WAAW,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3B,GAAG,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,mDAAmD,CAAC;IACnF,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;SACrB,QAAQ,EAAE;SACV,QAAQ,CAAC,gDAAgD,CAAC;IAC7D,IAAI,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,wDAAwD,CAAC;CAC/F,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,kBAAkB,GAAG,UAAU,CAAC;IAC3C,IAAI,EAAE,wBAAwB;IAC9B,WAAW,EAAE;QACX,+HAA+H;QAC/H,wCAAwC;QACxC,yUAAyU;QACzU,2NAA2N;QAC3N,8DAA8D;KAC/D,CAAC,IAAI,CAAC,GAAG,CAAC;IACX,WAAW;IACX,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,IAAI,CAAC;CAC5C,CAAC,CAAC"}
|
package/dist/tools/receipts.js
CHANGED
|
@@ -16,7 +16,7 @@ const inputSchema = z.object({
|
|
|
16
16
|
export const receiptsTool = defineTool({
|
|
17
17
|
name: 'leash_receipts',
|
|
18
18
|
description: [
|
|
19
|
-
'List recent
|
|
19
|
+
'List recent payment receipts for the active agent (x402 and MPP v0.2) — every payment sent or received, newest first.',
|
|
20
20
|
'Each receipt carries a Solana tx_signature and a deterministic receipt_hash so the user can verify on Solscan or the Leash explorer.',
|
|
21
21
|
'On `status: "ok"`, surface a short summary (count + total volume + most-recent counterparty) and offer a link to the explorer URL. Quote tx hashes as inline `code`.',
|
|
22
22
|
].join(' '),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"receipts.js","sourceRoot":"","sources":["../../src/tools/receipts.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAExC,MAA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C,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC;CACjD,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"access": "public"
|
|
4
4
|
},
|
|
5
5
|
"name": "@leashmarket/mcp-core",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "0.2.0",
|
|
7
7
|
"private": false,
|
|
8
8
|
"type": "module",
|
|
9
9
|
"main": "./dist/index.js",
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"dist"
|
|
27
27
|
],
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"zod": "^3.24.1"
|
|
29
|
+
"zod": "^3.24.1",
|
|
30
|
+
"@leashmarket/core": "0.2.0"
|
|
30
31
|
},
|
|
31
32
|
"devDependencies": {
|
|
32
33
|
"typescript": "^5.7.2",
|