@blindmarket/mcp-server 0.3.4 → 0.3.6
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 +74 -11
- package/dist/crypto.d.ts +16 -0
- package/dist/crypto.d.ts.map +1 -1
- package/dist/crypto.js +41 -0
- package/dist/crypto.js.map +1 -1
- package/dist/index.js +29 -14
- package/dist/index.js.map +1 -1
- package/dist/rent.d.ts +4 -1
- package/dist/rent.d.ts.map +1 -1
- package/dist/rent.js +836 -51
- package/dist/rent.js.map +1 -1
- package/dist/settlement.d.ts +98 -0
- package/dist/settlement.d.ts.map +1 -0
- package/dist/settlement.js +145 -0
- package/dist/settlement.js.map +1 -0
- package/dist/state.d.ts +27 -5
- package/dist/state.d.ts.map +1 -1
- package/dist/state.js.map +1 -1
- package/dist/tools.d.ts +2 -1
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +28 -22
- package/dist/tools.js.map +1 -1
- package/dist/wallet.d.ts +6 -11
- package/dist/wallet.d.ts.map +1 -1
- package/dist/wallet.js +48 -14
- package/dist/wallet.js.map +1 -1
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -22,14 +22,56 @@ Environment:
|
|
|
22
22
|
|
|
23
23
|
| Variable | Required | Purpose |
|
|
24
24
|
|---|---|---|
|
|
25
|
-
| `BLINDMARKET_API_KEY` | yes | `sk_…` key from the web app (Settings → API keys). **
|
|
26
|
-
| `BLINDMARKET_PRIVATE_KEY` | for
|
|
25
|
+
| `BLINDMARKET_API_KEY` | yes | `sk_…` key from the web app (Settings → API keys). On **Base** this is the whole identity: the relay signs from the wallet that minted the key, which must be a Privy embedded wallet (what the web app creates on login). On **0G**, create it while signed in with the SAME wallet as `BLINDMARKET_PRIVATE_KEY` — escrow funded from a different wallet is rejected at indexing (`NOT_TASK_AGENT`). |
|
|
26
|
+
| `BLINDMARKET_PRIVATE_KEY` | 0G: yes · Base: for private briefs | On **0G** this wallet funds escrow in native 0G, pays gas, and signs `submitEvidence` for `complete_task`. On **Base** nothing is *signed* locally — the relay does that — but this key is still the executor's **decryption identity**: `fetch_brief` unwraps a private brief with it, so the pubkey you pass to `register_as_executor` must be the one `wallet_status` reports as `executorPublicKey`. Omit for read-only use or Base tasks that are all public. |
|
|
27
27
|
| `BLINDMARKET_API_BASE` | no | Default `https://api.blindmarket.xyz` |
|
|
28
|
-
| `BLINDMARKET_RPC_URL` | no | Default `https://evmrpc.0g.ai` |
|
|
28
|
+
| `BLINDMARKET_RPC_URL` | no | 0G RPC for the local wallet. Default `https://evmrpc.0g.ai` |
|
|
29
|
+
| `BLINDMARKET_SETTLEMENT` | no | Force `0g` or `base`. Default: ask the backend (`GET /health/bridge`) which chain escrow settles on — `base` whenever it has a Base escrow and a Base marketplace signer configured. `base` fails loudly if the backend is not actually in Base mode. |
|
|
30
|
+
| `BLINDMARKET_BASE_ESCROW_ADDRESS` | with forced `base` | The escrow the backend builds against, when `/health/bridge` cannot confirm it. Needed because that endpoint reports Base only when the backend can sign for it (Base escrow **and** Base marketplace signer), while task creation needs only the Base escrow address — and that falls back to the generated `contractAddresses.ts`, so a backend with an empty Base `.env` still builds Base transactions. Only read when `BLINDMARKET_SETTLEMENT=base`. |
|
|
31
|
+
| `BLINDMARKET_BASE_CHAIN_ID` | no | Chain for that override. Default `84532` (Base Sepolia). |
|
|
32
|
+
| `BLINDMARKET_BASE_RPC_URL` | no | Read-only Base RPC for allowance/balance checks and receipt polling. Default by chain: `https://sepolia.base.org` (84532) / `https://mainnet.base.org` (8453). |
|
|
33
|
+
| `BLINDMARKET_USDC_ADDRESS` | no | Override the USDC address if the backend reports a Base chain not listed in `settlement.ts`. |
|
|
34
|
+
|
|
35
|
+
How a spend is paid, by settlement mode (`wallet_status` shows which you are in):
|
|
36
|
+
|
|
37
|
+
| | 0G (legacy) | Base |
|
|
38
|
+
|---|---|---|
|
|
39
|
+
| Escrow token | native 0G, 18 decimals | USDC, 6 decimals |
|
|
40
|
+
| Who signs | `BLINDMARKET_PRIVATE_KEY`, locally | the backend relay — Privy signs from your API key's wallet |
|
|
41
|
+
| Gas | native 0G from the same wallet | paid in USDC by the relay; you never hold ETH |
|
|
42
|
+
| Extra step | — | a USDC `approve` to the escrow before `createTask`, persisted in the spend ledger so a retry never re-approves |
|
|
43
|
+
| `post_task` amount | `amount: "2.5"` = 2.5 0G | `amount: "2.5"` = 2.5 USDC |
|
|
44
|
+
|
|
45
|
+
**What an `sk_` key can do on Base — read this before putting one in a config file.** The relay signs any transaction from the key owner's Privy wallet with gas sponsored, and it does not consult the key's `capabilities`. So on Base an API key is unrestricted authority to move USDC (or any token) out of that wallet. Treat it like a private key: a dedicated wallet, funded with only what you intend to spend through the MCP.
|
|
46
|
+
|
|
47
|
+
Discovery is a hint, not a proof: `/health/bridge` reports Base only when the backend has a Base marketplace signer, while task creation routes on `BASE_ESCROW_ADDRESS` alone. Every send therefore checks the unsigned tx targets the escrow the current mode expects and refuses with `ESCROW_MISMATCH` otherwise — that check is what prevents native 0G value being sent to a Base address.
|
|
48
|
+
|
|
49
|
+
### Base: what the wallet and key must be
|
|
50
|
+
|
|
51
|
+
Proven end-to-end on Base Sepolia (task 11 on `0xCca5ab…`, posted and refunded through this server with no private key). Three things had to be true, none of them obvious:
|
|
52
|
+
|
|
53
|
+
1. **The relay wallet must be owned by the same Privy key quorum as the backend's `PRIVY_AUTHORIZATION_KEY`.** A wallet created by an ordinary email/social login is owned by a *different*, auto-generated quorum, and every relay fails with `No valid authorization keys or user signing keys available`. Create one via the Privy API with `owner_id` set to that quorum (`privy.wallets().create({ chain_type: 'ethereum', owner_id })`), then fund it.
|
|
54
|
+
2. **The `sk_` key must be bound to that wallet.** A key minted in the web app binds to whichever wallet is *primary* at mint time, and `lookupApiKey` rebuilds the caller as only that address — so a key minted while an external wallet (OKX, MetaMask) is primary can never relay. `backend/scripts/mint-mcp-key.mjs` mints a key bound to a chosen address directly in Postgres.
|
|
55
|
+
3. **Gas.** Sponsored first, always (`asset: usdc`), which is the mainnet path and needs no native token. Where Privy has no sponsorship configured for the chain — Base Sepolia answers `Gas sponsorship is not enabled` — the server retries once with `sponsor: false` and the wallet pays gas from its own native balance, so it needs a little ETH there. That fallback is keyed on the backend's `UNSUPPORTED_CHAIN` code; any other failure surfaces as itself.
|
|
56
|
+
|
|
57
|
+
To be explicit about what is and is not proven: the relay, ownership gate, authorization signing, escrow, and refund are all observed on-chain. **"Users hold only USDC and never need native gas" is not** — it depends on Privy sponsorship being enabled for the app, and it was not. That claim can only be verified where sponsorship is configured.
|
|
29
58
|
|
|
30
59
|
## Harness configuration
|
|
31
60
|
|
|
32
|
-
**Claude Code**
|
|
61
|
+
**Claude Code — Base (no private key)**
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
claude mcp add blindmarket \
|
|
65
|
+
--env BLINDMARKET_API_KEY=sk_... \
|
|
66
|
+
--env BLINDMARKET_API_BASE=https://api.blindmarket.xyz \
|
|
67
|
+
--env BLINDMARKET_SETTLEMENT=base \
|
|
68
|
+
--env BLINDMARKET_BASE_ESCROW_ADDRESS=0xCca5ab873158b888158AD9Dc36fb4Ee683eFbEBf \
|
|
69
|
+
-- node /path/to/BlindBounty/mcp/dist/index.js
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
(`BLINDMARKET_BASE_ESCROW_ADDRESS` is only needed while `/health/bridge` cannot confirm Base — see the env table. Use the mainnet escrow once deployed.)
|
|
73
|
+
|
|
74
|
+
**Claude Code — 0G (legacy, local wallet)**
|
|
33
75
|
|
|
34
76
|
```bash
|
|
35
77
|
claude mcp add blindmarket \
|
|
@@ -81,10 +123,31 @@ transaction hash.
|
|
|
81
123
|
|
|
82
124
|
## Executor runtime tools (gated off)
|
|
83
125
|
|
|
84
|
-
`runtime_start` / `runtime_stop` / … are disabled by default
|
|
85
|
-
`WorkerRuntime` they wrap
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
126
|
+
`runtime_start` / `runtime_stop` / … are disabled by default. The SDK
|
|
127
|
+
`WorkerRuntime` they wrap has been brought in line with the backend (it now
|
|
128
|
+
registers the API key owner's uncompressed pubkey, reads the `{ meta, state }`
|
|
129
|
+
browse entries, claims tasks via `/accept` with bid-and-retry on `NEEDS_WRAP`,
|
|
130
|
+
and delivers through submit → sign → finalize with `/rebroadcast` healing), but
|
|
131
|
+
that loop is verified against stubbed backends only — not yet end to end on a
|
|
132
|
+
live one. It signs `submitEvidence` **locally** (no relay): it needs
|
|
133
|
+
`BLINDMARKET_PRIVATE_KEY` to be the wallet that owns `BLINDMARKET_API_KEY`, and
|
|
134
|
+
an RPC for the settlement chain (`BLINDMARKET_RPC_URL` for 0G,
|
|
135
|
+
`BLINDMARKET_BASE_RPC_URL` for Base — there is no default for Base, and tasks
|
|
136
|
+
on a chain without an RPC are skipped by the runtime itself: the backend stores
|
|
137
|
+
the declared `supportedChains` but does not filter offers or `/accept` by it).
|
|
138
|
+
Without `BLINDMARKET_PRIVATE_KEY` the runtime refuses to start (SDK 0.6.0) —
|
|
139
|
+
it no longer registers a throwaway wallet. `BLINDMARKET_EXPERIMENTAL_RUNTIME=true`
|
|
140
|
+
enables it. The maintained way to EARN is still a platform agent deployed in
|
|
141
|
+
the web app, operated via the remote MCP endpoint's `start_agent` /
|
|
142
|
+
`stop_agent` / `get_agent_logs` tools.
|
|
143
|
+
|
|
144
|
+
## Delivering a task by hand
|
|
145
|
+
|
|
146
|
+
`accept_task` → `fetch_brief` → `complete_task`. There is no `submit_result`
|
|
147
|
+
tool any more: it called `/submit`, which only builds an unsigned
|
|
148
|
+
`submitEvidence` and marks the task `submitted`, never signed it, and left
|
|
149
|
+
`complete_task` to 409 on that state. `complete_task` is the single delivery
|
|
150
|
+
path and heals a task stranded that way (it re-broadcasts the stored result via
|
|
151
|
+
`/rebroadcast`). `create_agent` no longer generates a wallet or returns a key —
|
|
152
|
+
it registers the local wallet's public key, and the executor is always the
|
|
153
|
+
wallet that owns the API key.
|
package/dist/crypto.d.ts
CHANGED
|
@@ -11,4 +11,20 @@ export declare function generateAesKey(): Buffer;
|
|
|
11
11
|
export declare function aesEncrypt(plain: Buffer, key: Buffer): Buffer;
|
|
12
12
|
export declare function eciesEncrypt(payload: Buffer, recipientPubHex: string): Buffer;
|
|
13
13
|
export declare function sha256Hex(data: Buffer): string;
|
|
14
|
+
/** Inverse of aesEncrypt: [12 IV][16 tag][ciphertext] → plaintext. Mirrors
|
|
15
|
+
* backend/src/services/crypto.ts aesDecrypt exactly. */
|
|
16
|
+
export declare function aesDecrypt(blob: Buffer, key: Buffer): Buffer;
|
|
17
|
+
/**
|
|
18
|
+
* Inverse of eciesEncrypt, for the secp256k1 wire format posters use to wrap
|
|
19
|
+
* the brief's AES key to an executor: [65-byte ephemeral pubkey][AES-GCM blob].
|
|
20
|
+
* Shared secret is the ECDH X coordinate — createECDH.computeSecret returns
|
|
21
|
+
* exactly that, matching the `slice(4, 68)` the encrypt side takes — then
|
|
22
|
+
* HKDF-SHA256 with the same info string. This is what lets an MCP executor
|
|
23
|
+
* open a PRIVATE brief; before it existed, fetch_brief could only ever return
|
|
24
|
+
* public briefs and told the caller to use a platform agent for the rest.
|
|
25
|
+
*/
|
|
26
|
+
export declare function eciesDecrypt(blob: Buffer, recipientPrivHex: string): Buffer;
|
|
27
|
+
/** Uncompressed secp256k1 public key (hex, no 0x) for a private key — the
|
|
28
|
+
* exact form /a2a/register requires so posters can wrap keys to this executor. */
|
|
29
|
+
export declare function derivePublicKeyHex(privHex: string): string;
|
|
14
30
|
//# sourceMappingURL=crypto.d.ts.map
|
package/dist/crypto.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"crypto.d.ts","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AAEH,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAK7D;AAED,wBAAgB,YAAY,CAAC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,GAAG,MAAM,CAQ7E;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE9C;AAID;yDACyD;AACzD,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAS5D;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,gBAAgB,EAAE,MAAM,GAAG,MAAM,CAS3E;AAED;mFACmF;AACnF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAE1D"}
|
package/dist/crypto.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import crypto from 'node:crypto';
|
|
2
2
|
import { Wallet, SigningKey } from 'ethers';
|
|
3
|
+
import { createECDH } from 'node:crypto';
|
|
3
4
|
/**
|
|
4
5
|
* Byte-for-byte port of the BlindMarket brief crypto, as generated by the
|
|
5
6
|
* "Use from your agent" script (frontend/src/components/UseFromAgentModal.tsx
|
|
@@ -30,4 +31,44 @@ export function eciesEncrypt(payload, recipientPubHex) {
|
|
|
30
31
|
export function sha256Hex(data) {
|
|
31
32
|
return crypto.createHash('sha256').update(data).digest('hex');
|
|
32
33
|
}
|
|
34
|
+
const IV_LENGTH = 12, TAG_LENGTH = 16, KEY_LENGTH = 32, ECIES_PUBKEY_LENGTH = 65;
|
|
35
|
+
/** Inverse of aesEncrypt: [12 IV][16 tag][ciphertext] → plaintext. Mirrors
|
|
36
|
+
* backend/src/services/crypto.ts aesDecrypt exactly. */
|
|
37
|
+
export function aesDecrypt(blob, key) {
|
|
38
|
+
if (key.length !== KEY_LENGTH)
|
|
39
|
+
throw new Error(`AES key must be ${KEY_LENGTH} bytes, got ${key.length}`);
|
|
40
|
+
if (blob.length < IV_LENGTH + TAG_LENGTH + 1)
|
|
41
|
+
throw new Error(`AES blob too short: ${blob.length} bytes`);
|
|
42
|
+
const iv = blob.subarray(0, IV_LENGTH);
|
|
43
|
+
const tag = blob.subarray(IV_LENGTH, IV_LENGTH + TAG_LENGTH);
|
|
44
|
+
const ct = blob.subarray(IV_LENGTH + TAG_LENGTH);
|
|
45
|
+
const d = crypto.createDecipheriv('aes-256-gcm', key, iv, { authTagLength: TAG_LENGTH });
|
|
46
|
+
d.setAuthTag(tag);
|
|
47
|
+
return Buffer.concat([d.update(ct), d.final()]);
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Inverse of eciesEncrypt, for the secp256k1 wire format posters use to wrap
|
|
51
|
+
* the brief's AES key to an executor: [65-byte ephemeral pubkey][AES-GCM blob].
|
|
52
|
+
* Shared secret is the ECDH X coordinate — createECDH.computeSecret returns
|
|
53
|
+
* exactly that, matching the `slice(4, 68)` the encrypt side takes — then
|
|
54
|
+
* HKDF-SHA256 with the same info string. This is what lets an MCP executor
|
|
55
|
+
* open a PRIVATE brief; before it existed, fetch_brief could only ever return
|
|
56
|
+
* public briefs and told the caller to use a platform agent for the rest.
|
|
57
|
+
*/
|
|
58
|
+
export function eciesDecrypt(blob, recipientPrivHex) {
|
|
59
|
+
if (blob.length < ECIES_PUBKEY_LENGTH + IV_LENGTH + TAG_LENGTH + 1)
|
|
60
|
+
throw new Error(`ECIES blob too short: ${blob.length} bytes`);
|
|
61
|
+
const ephemeralPub = blob.subarray(0, ECIES_PUBKEY_LENGTH);
|
|
62
|
+
const encrypted = blob.subarray(ECIES_PUBKEY_LENGTH);
|
|
63
|
+
const ecdh = createECDH('secp256k1');
|
|
64
|
+
ecdh.setPrivateKey(Buffer.from(recipientPrivHex.startsWith('0x') ? recipientPrivHex.slice(2) : recipientPrivHex, 'hex'));
|
|
65
|
+
const sharedX = ecdh.computeSecret(ephemeralPub);
|
|
66
|
+
const aesKey = Buffer.from(crypto.hkdfSync('sha256', sharedX, Buffer.alloc(0), 'BlindMarket-ECIES-v1', KEY_LENGTH));
|
|
67
|
+
return aesDecrypt(encrypted, aesKey);
|
|
68
|
+
}
|
|
69
|
+
/** Uncompressed secp256k1 public key (hex, no 0x) for a private key — the
|
|
70
|
+
* exact form /a2a/register requires so posters can wrap keys to this executor. */
|
|
71
|
+
export function derivePublicKeyHex(privHex) {
|
|
72
|
+
return SigningKey.computePublicKey(privHex.startsWith('0x') ? privHex : `0x${privHex}`, false).slice(2);
|
|
73
|
+
}
|
|
33
74
|
//# sourceMappingURL=crypto.js.map
|
package/dist/crypto.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"crypto.js","sourceRoot":"","sources":["../src/crypto.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC;;;;;;;;GAQG;AAEH,MAAM,UAAU,cAAc;IAC5B,OAAO,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAa,EAAE,GAAW;IACnD,MAAM,EAAE,GAAG,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,CAAC;IAClC,MAAM,CAAC,GAAG,MAAM,CAAC,cAAc,CAAC,aAAa,EAAE,GAAG,EAAE,EAAE,CAAC,CAAC;IACxD,MAAM,EAAE,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE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M,IAAI,KAAK,CAAC,yBAAyB,IAAI,CAAC,MAAM,QAAQ,CAAC,CAAC;IAClI,MAAM,YAAY,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,mBAAmB,CAAC,CAAC;IAC3D,MAAM,SAAS,GAAG,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,CAAC;IACrD,MAAM,IAAI,GAAG,UAAU,CAAC,WAAW,CAAC,CAAC;IACrC,IAAI,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,gBAAgB,EAAE,KAAK,CAAC,CAAC,CAAC;IACzH,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;IACjD,MAAM,MAAM,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,QAAQ,EAAE,OAAO,EAAE,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,sBAAsB,EAAE,UAAU,CAAC,CAAC,CAAC;IACpH,OAAO,UAAU,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AACvC,CAAC;AAED;mFACmF;AACnF,MAAM,UAAU,kBAAkB,CAAC,OAAe;IAChD,OAAO,UAAU,CAAC,gBAAgB,CAAC,OAAO,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,OAAO,EAAE,EAAE,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AAC1G,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -31,28 +31,43 @@ const server = new McpServer({
|
|
|
31
31
|
name: 'BlindMarket MCP Server',
|
|
32
32
|
version: pkgVersion,
|
|
33
33
|
});
|
|
34
|
-
// Register all marketplace tools
|
|
35
|
-
registerMarketTools(server, bb);
|
|
36
34
|
// Tier-2 spending tools: local wallet + local encryption — trust-preserving
|
|
37
35
|
// rent/post through the CURRENT encrypted flow (see rent.ts). Registered even
|
|
38
36
|
// without a wallet so tools/list is stable; spends fail cleanly with NO_WALLET.
|
|
39
37
|
const walletCtx = loadWallet();
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
//
|
|
43
|
-
// the
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
// (
|
|
47
|
-
//
|
|
48
|
-
//
|
|
49
|
-
//
|
|
50
|
-
//
|
|
38
|
+
// Register all marketplace tools
|
|
39
|
+
registerMarketTools(server, bb, walletCtx);
|
|
40
|
+
// rent.ts owns settlement discovery (which chain escrow settles on, and so
|
|
41
|
+
// whether the local wallet or the Privy relay pays); wallet_status reports it.
|
|
42
|
+
const { settlement } = registerRentTools(server, cfg, walletCtx);
|
|
43
|
+
registerWalletTools(server, walletCtx, settlement);
|
|
44
|
+
// Executor runtime tools (runtime_start/stop/…) are GATED OFF by default.
|
|
45
|
+
// The three bugs this gate used to cite (wrappedKey parsed as a record, blob
|
|
46
|
+
// fetched by taskHash, submitEvidence never signed) were fixed long ago; what
|
|
47
|
+
// actually kept the SDK WorkerRuntime from ever completing a task was that it
|
|
48
|
+
// registered a compressed pubkey from a random wallet (rejected — and the
|
|
49
|
+
// executor is the API key's owner anyway), read GET /a2a/tasks entries as flat
|
|
50
|
+
// states instead of { meta, state } so it skipped every task, and waited for
|
|
51
|
+
// an 'assigned' status that does not exist instead of calling /accept. Those
|
|
52
|
+
// are fixed too, but only against stubbed backends — the loop has NOT been run
|
|
53
|
+
// end to end against a live one, and it signs locally (no Privy relay), so on
|
|
54
|
+
// Base the owner wallet needs its own key here plus ETH for gas. Hence still
|
|
55
|
+
// opt-in: BLINDMARKET_EXPERIMENTAL_RUNTIME=true, with BLINDMARKET_PRIVATE_KEY
|
|
56
|
+
// (the API key owner's) and an RPC for the settlement chain. The maintained
|
|
57
|
+
// path to EARN is a platform agent (backend/agents/worker.js) operated via the
|
|
58
|
+
// remote MCP endpoint's start_agent/stop_agent tools; one-off tasks go through
|
|
59
|
+
// accept_task → fetch_brief → complete_task.
|
|
51
60
|
const RUNTIME_TOOLS_ENABLED = process.env.BLINDMARKET_EXPERIMENTAL_RUNTIME === 'true';
|
|
52
61
|
// Register executor runtime tools (reads env config for the runtime)
|
|
53
62
|
const runtimeCfg = {
|
|
54
63
|
apiKey: cfg.apiKey,
|
|
55
64
|
apiBase: cfg.apiBase,
|
|
65
|
+
// The executor IS the API key's owner wallet; the runtime decrypts and signs
|
|
66
|
+
// with this key and refuses to start if it is not the owner's.
|
|
67
|
+
privateKey: walletCtx?.wallet.privateKey,
|
|
68
|
+
// The 0G RPC is the one the local wallet was loaded with (the SDK has no
|
|
69
|
+
// fallback RPC); Base is declared only when explicitly configured.
|
|
70
|
+
rpcUrls: { '0g': walletCtx?.rpcUrl, base: process.env.BLINDMARKET_BASE_RPC_URL },
|
|
56
71
|
displayName: process.env.BLINDMARKET_EXECUTOR_NAME ?? 'MCP Executor',
|
|
57
72
|
capabilities: parseCapabilities(process.env.BLINDMARKET_EXECUTOR_CAPABILITIES),
|
|
58
73
|
minReward: process.env.BLINDMARKET_EXECUTOR_MIN_REWARD,
|
|
@@ -72,7 +87,7 @@ const runtimeCfg = {
|
|
|
72
87
|
};
|
|
73
88
|
const runtime = RUNTIME_TOOLS_ENABLED ? registerRuntimeTools(server, runtimeCfg).runtime : null;
|
|
74
89
|
if (RUNTIME_TOOLS_ENABLED) {
|
|
75
|
-
console.error('[blindmarket-mcp] ⚠️ experimental runtime tools ENABLED — the
|
|
90
|
+
console.error('[blindmarket-mcp] ⚠️ experimental runtime tools ENABLED — the WorkerRuntime accept/deliver loop is verified against stubbed backends only, signs submitEvidence locally with BLINDMARKET_PRIVATE_KEY (must be the API key owner), and an accept assigns on-chain irrevocably. Watch runtime_status.');
|
|
76
91
|
}
|
|
77
92
|
// ── Transport ────────────────────────────────────────────────────────────────
|
|
78
93
|
async function main() {
|
package/dist/index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,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC;QAC3E,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACxB,IAAI,IAAI,KAAK,CAAC;gBAAE,OAAO,MAAM,CAAC,IAAI,KAAK,CAAC,iBAAiB,IAAI,EAAE,CAAC,CAAC,CAAC;YAClE,IAAI,CAAC;gBAAC,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;YAAC,CAAC;YACpC,MAAM,CAAC;gBAAC,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC;YAAC,CAAC;QAChC,CAAC,CAAC,CAAC;QACH,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAC3B,CAAC,CAAC,CAAC;AACL,CAAC"}
|
package/dist/rent.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import type { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
2
2
|
import type { McpConfig } from './config.js';
|
|
3
3
|
import type { WalletCtx } from './wallet.js';
|
|
4
|
-
|
|
4
|
+
import { type Settlement } from './settlement.js';
|
|
5
|
+
export declare function registerRentTools(server: McpServer, cfg: McpConfig, walletCtx: WalletCtx | null): {
|
|
6
|
+
settlement: () => Promise<Settlement>;
|
|
7
|
+
};
|
|
5
8
|
//# sourceMappingURL=rent.d.ts.map
|
package/dist/rent.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rent.d.ts","sourceRoot":"","sources":["../src/rent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"rent.d.ts","sourceRoot":"","sources":["../src/rent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AAGzE,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAG7C,OAAO,EAAiD,KAAK,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAmDjG,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,SAAS,EAAE,SAAS,GAAG,IAAI,GAAG;IAAE,UAAU,EAAE,MAAM,OAAO,CAAC,UAAU,CAAC,CAAA;CAAE,CAgqC3I"}
|