@continuumdao/continuum-node-sdk 1.2.29 → 1.3.1
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/core/ta/calculate.d.ts +15 -0
- package/dist/core/ta/calculate.d.ts.map +1 -0
- package/dist/core/ta/calculate.js +275 -0
- package/dist/core/ta/calculate.js.map +1 -0
- package/dist/core/ta/catalog.d.ts +26 -0
- package/dist/core/ta/catalog.d.ts.map +1 -0
- package/dist/core/ta/catalog.js +215 -0
- package/dist/core/ta/catalog.js.map +1 -0
- package/dist/core/ta/index.d.ts +5 -0
- package/dist/core/ta/index.d.ts.map +1 -0
- package/dist/core/ta/index.js +5 -0
- package/dist/core/ta/index.js.map +1 -0
- package/dist/core/ta/normalize-input.d.ts +30 -0
- package/dist/core/ta/normalize-input.d.ts.map +1 -0
- package/dist/core/ta/normalize-input.js +193 -0
- package/dist/core/ta/normalize-input.js.map +1 -0
- package/dist/core/ta/schemas.d.ts +151 -0
- package/dist/core/ta/schemas.d.ts.map +1 -0
- package/dist/core/ta/schemas.js +95 -0
- package/dist/core/ta/schemas.js.map +1 -0
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/mcp-resources.d.ts +5 -0
- package/dist/mcp/mcp-resources.d.ts.map +1 -0
- package/dist/mcp/mcp-resources.js +25 -0
- package/dist/mcp/mcp-resources.js.map +1 -0
- package/dist/mcp/register.d.ts +1 -0
- package/dist/mcp/register.d.ts.map +1 -1
- package/dist/mcp/register.js +19 -32
- package/dist/mcp/register.js.map +1 -1
- package/dist/mcp/resources/agent-cron-jobs.md +50 -0
- package/dist/mcp/resources/agent-mcp-servers.md +18 -0
- package/dist/mcp/resources/agent-skills.md +35 -0
- package/dist/mcp/resources/agent-webhooks.md +19 -0
- package/dist/mcp/resources/group.md +70 -0
- package/dist/mcp/resources/keygen.md +175 -0
- package/dist/mcp/resources/management-signer.md +110 -0
- package/dist/mcp/resources/mpc.md +227 -0
- package/dist/mcp/resources/overview.md +64 -0
- package/dist/mcp/resources/registry/address-book.md +53 -0
- package/dist/mcp/resources/registry/networks.md +59 -0
- package/dist/mcp/resources/registry/tokens.md +63 -0
- package/dist/mcp/resources/technical-indicators.md +86 -0
- package/dist/mcp/resources/vpn.md +41 -0
- package/dist/mcp/ta/register.d.ts +7 -0
- package/dist/mcp/ta/register.d.ts.map +1 -0
- package/dist/mcp/ta/register.js +36 -0
- package/dist/mcp/ta/register.js.map +1 -0
- package/dist/mcp/ta/resources/indicators.md +86 -0
- package/dist/mcp/ta-server/index.d.ts +2 -0
- package/dist/mcp/ta-server/index.d.ts.map +1 -0
- package/dist/mcp/ta-server/index.js +12 -0
- package/dist/mcp/ta-server/index.js.map +1 -0
- package/package.json +7 -1
package/dist/mcp/register.js
CHANGED
|
@@ -6,19 +6,19 @@ import { registerGroupTools } from './group.js';
|
|
|
6
6
|
import { registerKeyGenTools } from './keygen.js';
|
|
7
7
|
import { registerKeyGenMessagingTools } from './keygen-messaging.js';
|
|
8
8
|
import { registerManagementSignerTools } from './management-signer.js';
|
|
9
|
+
import { registerMcpMarkdownResource } from './mcp-resources.js';
|
|
9
10
|
import { registerNodeTools } from './node.js';
|
|
10
11
|
import { registerAddressBookTools } from './registry/address-book.js';
|
|
11
12
|
import { registerChainRegistryTools } from './registry/networks.js';
|
|
12
13
|
import { registerTokenRegistryTools } from './registry/tokens.js';
|
|
13
14
|
import { registerMpcTools } from './mpc.js';
|
|
15
|
+
import { registerTaResources, registerTaTools } from './ta/register.js';
|
|
14
16
|
import { registerVpnTools } from './vpn.js';
|
|
15
17
|
import { registerAgentMcpServerTools } from './agent-mcp-servers.js';
|
|
16
18
|
import { registerAgentEnvironmentVariableTools } from './agent-environment-variables.js';
|
|
17
19
|
import { registerAgentCronJobTools } from './agent-cron-jobs.js';
|
|
18
20
|
import { registerAgentWebhookTools } from './agent-webhooks.js';
|
|
19
21
|
import { registerAgentSkillTools } from './agent-skills.js';
|
|
20
|
-
import { promises as fs } from 'node:fs';
|
|
21
|
-
import path from 'node:path';
|
|
22
22
|
export function registerContinuumTools(server, config, defiContext) {
|
|
23
23
|
registerNodeTools(server, config);
|
|
24
24
|
registerGroupTools(server, config);
|
|
@@ -30,6 +30,7 @@ export function registerContinuumTools(server, config, defiContext) {
|
|
|
30
30
|
registerChainRegistryTools(server, config);
|
|
31
31
|
registerMpcTools(server, config);
|
|
32
32
|
registerVpnTools(server, config);
|
|
33
|
+
registerTaTools(server);
|
|
33
34
|
registerAgentMcpServerTools(server, config);
|
|
34
35
|
registerAgentEnvironmentVariableTools(server, config);
|
|
35
36
|
registerAgentCronJobTools(server, config);
|
|
@@ -53,36 +54,21 @@ export function createContinuumMcpServer(config, options = {}) {
|
|
|
53
54
|
},
|
|
54
55
|
});
|
|
55
56
|
registerContinuumTools(server, config, defiContext);
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
registerMarkdownResource('overview_docs', 'overview.md', 'High-level MCP host overview for this server.');
|
|
73
|
-
registerMarkdownResource('group_docs', 'group.md', 'Group creation flow and validation rules.');
|
|
74
|
-
registerMarkdownResource('sign_docs', 'sign.md', 'Modular signing flow and reusable signing tools.');
|
|
75
|
-
registerMarkdownResource('management_signer_docs', 'management-signer.md', 'Management signer lifecycle, MCP tools, and local key requirements.');
|
|
76
|
-
registerMarkdownResource('keygen_docs', 'keygen.md', 'Key generation request, acceptance, and result flow.');
|
|
77
|
-
registerMarkdownResource('address_book_registry_docs', 'registry/address-book.md', 'Address book registry tools and workflows.');
|
|
78
|
-
registerMarkdownResource('token_registry_docs', 'registry/tokens.md', 'Saved token registry tools and workflows.');
|
|
79
|
-
registerMarkdownResource('chain_registry_docs', 'registry/networks.md', 'Chain registry tools and workflows.');
|
|
80
|
-
registerMarkdownResource('mpc_docs', 'mpc.md', 'MPC multi-sign requests, Get Sig, Execute, and MPA workflows.');
|
|
81
|
-
registerMarkdownResource('vpn_docs', 'vpn.md', 'Admin VPN and peer egress: enable/disable, client configs, sharing, revoke.');
|
|
82
|
-
registerMarkdownResource('agent_mcp_servers_docs', 'agent-mcp-servers.md', 'Agent MCP server catalog: list, add, and remove node MCP integrations.');
|
|
83
|
-
registerMarkdownResource('agent_cron_jobs_docs', 'agent-cron-jobs.md', 'Agent cron jobs: scheduled agent tasks, run history, and lifecycle.');
|
|
84
|
-
registerMarkdownResource('agent_webhooks_docs', 'agent-webhooks.md', 'Agent inbound webhooks: list, add, activate, and test HTTP hook jobs.');
|
|
85
|
-
registerMarkdownResource('agent_skills_docs', 'agent-skills.md', 'Agent skills: local markdown/txt guidance files and initialLoad behavior.');
|
|
57
|
+
registerMcpMarkdownResource(server, 'overview_docs', 'overview.md', 'High-level MCP host overview for this server.');
|
|
58
|
+
registerMcpMarkdownResource(server, 'group_docs', 'group.md', 'Group creation flow and validation rules.');
|
|
59
|
+
registerMcpMarkdownResource(server, 'sign_docs', 'sign.md', 'Modular signing flow and reusable signing tools.');
|
|
60
|
+
registerMcpMarkdownResource(server, 'management_signer_docs', 'management-signer.md', 'Management signer lifecycle, MCP tools, and local key requirements.');
|
|
61
|
+
registerMcpMarkdownResource(server, 'keygen_docs', 'keygen.md', 'Key generation request, acceptance, and result flow.');
|
|
62
|
+
registerMcpMarkdownResource(server, 'address_book_registry_docs', 'registry/address-book.md', 'Address book registry tools and workflows.');
|
|
63
|
+
registerMcpMarkdownResource(server, 'token_registry_docs', 'registry/tokens.md', 'Saved token registry tools and workflows.');
|
|
64
|
+
registerMcpMarkdownResource(server, 'chain_registry_docs', 'registry/networks.md', 'Chain registry tools and workflows.');
|
|
65
|
+
registerMcpMarkdownResource(server, 'mpc_docs', 'mpc.md', 'MPC multi-sign requests, Get Sig, Execute, and MPA workflows.');
|
|
66
|
+
registerMcpMarkdownResource(server, 'vpn_docs', 'vpn.md', 'Admin VPN and peer egress: enable/disable, client configs, sharing, revoke.');
|
|
67
|
+
registerTaResources(server);
|
|
68
|
+
registerMcpMarkdownResource(server, 'agent_mcp_servers_docs', 'agent-mcp-servers.md', 'Agent MCP server catalog: list, add, and remove node MCP integrations.');
|
|
69
|
+
registerMcpMarkdownResource(server, 'agent_cron_jobs_docs', 'agent-cron-jobs.md', 'Agent cron jobs: scheduled agent tasks, run history, and lifecycle.');
|
|
70
|
+
registerMcpMarkdownResource(server, 'agent_webhooks_docs', 'agent-webhooks.md', 'Agent inbound webhooks: list, add, activate, and test HTTP hook jobs.');
|
|
71
|
+
registerMcpMarkdownResource(server, 'agent_skills_docs', 'agent-skills.md', 'Agent skills: local markdown/txt guidance files and initialLoad behavior.');
|
|
86
72
|
server.server.oninitialized = () => {
|
|
87
73
|
void server.server.sendToolListChanged().catch(error => {
|
|
88
74
|
console.error('Failed to send tools/list_changed notification:', error);
|
|
@@ -100,6 +86,7 @@ export { registerTokenRegistryTools } from './registry/tokens.js';
|
|
|
100
86
|
export { registerChainRegistryTools } from './registry/networks.js';
|
|
101
87
|
export { registerMpcTools } from './mpc.js';
|
|
102
88
|
export { registerVpnTools } from './vpn.js';
|
|
89
|
+
export { registerTaTools, registerTaResources } from './ta/register.js';
|
|
103
90
|
export { registerAgentMcpServerTools } from './agent-mcp-servers.js';
|
|
104
91
|
export { registerAgentCronJobTools } from './agent-cron-jobs.js';
|
|
105
92
|
export { registerAgentWebhookTools } from './agent-webhooks.js';
|
package/dist/mcp/register.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"register.js","sourceRoot":"","sources":["../../src/mcp/register.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,yCAAyC,CAAC;AAElE,OAAO,EACN,mBAAmB,GAEnB,M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CAAC;IAEF,OAAO,MAAM,CAAC;AACf,CAAC;AAED,OAAO,EAAC,iBAAiB,EAAC,MAAM,WAAW,CAAC;AAC5C,OAAO,EAAC,kBAAkB,EAAC,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,aAAa,CAAC;AACrE,OAAO,EAAC,4BAA4B,EAAC,MAAM,uBAAuB,CAAC;AACnE,OAAO,EACN,6BAA6B,EAC7B,0BAA0B,GAC1B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAC,wBAAwB,EAAC,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAC,0BAA0B,EAAC,MAAM,sBAAsB,CAAC;AAChE,OAAO,EAAC,0BAA0B,EAAC,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAC,gBAAgB,EAAC,MAAM,UAAU,CAAC;AAC1C,OAAO,EAAC,eAAe,EAAE,mBAAmB,EAAC,MAAM,kBAAkB,CAAC;AACtE,OAAO,EAAC,2BAA2B,EAAC,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAC,yBAAyB,EAAC,MAAM,sBAAsB,CAAC;AAC/D,OAAO,EAAC,yBAAyB,EAAC,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EAAC,uBAAuB,EAAC,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EAAC,YAAY,EAAE,yBAAyB,EAAE,OAAO,EAAC,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Agent cron jobs
|
|
2
|
+
|
|
3
|
+
Scheduled agent tasks stored under `agent_llm_config/cron/jobs.json`. Each job gets a fixed **conversationId**; every run appends to that thread.
|
|
4
|
+
|
|
5
|
+
## MCP tools
|
|
6
|
+
|
|
7
|
+
### Read (GET)
|
|
8
|
+
|
|
9
|
+
- `list_cron_jobs` — summaries only (no message body)
|
|
10
|
+
- `get_cron_job` — full job by **id** or **name** (includes message)
|
|
11
|
+
- `list_cron_job_runs` — recent run history for **jobId** (optional **limit**, default 50)
|
|
12
|
+
|
|
13
|
+
### Write (management-signed POST, preferred Ed25519 signer)
|
|
14
|
+
|
|
15
|
+
- `add_cron_job` — create job (**name**, **message**, **schedule**; optional **enabled**, **deleteAfterRun**)
|
|
16
|
+
- `update_cron_job` — update schedule/message/metadata only (not **enabled**)
|
|
17
|
+
- `activate_cron_job` / `deactivate_cron_job` — enable or disable without deleting
|
|
18
|
+
- `remove_cron_job` — delete job; optional **deleteConversation** (default false)
|
|
19
|
+
- `run_cron_job` — manual async trigger (works when deactivated)
|
|
20
|
+
|
|
21
|
+
## Schedule kinds
|
|
22
|
+
|
|
23
|
+
| kind | fields | behavior |
|
|
24
|
+
|------|--------|----------|
|
|
25
|
+
| `cron` | `expr` (5-field), optional `tz` (default UTC) | clock-anchored cron |
|
|
26
|
+
| `every` | `everyMs` | fixed interval from activation |
|
|
27
|
+
| `at` | `at` (RFC3339) | one-shot; defaults **deleteAfterRun: true** |
|
|
28
|
+
|
|
29
|
+
**`add_cron_job` schedule shorthands** (coerced automatically):
|
|
30
|
+
|
|
31
|
+
- `"every 5 minutes"`, `"5m"`, `"5 minutes"` → `{ "kind": "every", "everyMs": 300000 }`
|
|
32
|
+
- `"*/5 * * * *"` (5-field cron string) → `{ "kind": "cron", "expr": "...", "tz": "UTC" }`
|
|
33
|
+
- `300000` (number) → `{ "kind": "every", "everyMs": 300000 }`
|
|
34
|
+
|
|
35
|
+
Prefer structured objects when possible; use shorthands only when simpler for the caller.
|
|
36
|
+
|
|
37
|
+
## Suggested workflow
|
|
38
|
+
|
|
39
|
+
1. **`list_cron_jobs`** — inspect schedules, enabled state, last/next run.
|
|
40
|
+
2. **`get_cron_job`** — read the instruction message before editing.
|
|
41
|
+
3. **`add_cron_job`** or **`update_cron_job`** — set or change the agent prompt and schedule.
|
|
42
|
+
4. **`activate_cron_job`** / **`deactivate_cron_job`** — pause or resume scheduling.
|
|
43
|
+
5. **`run_cron_job`** — test immediately; then **`list_cron_job_runs`** for outcome.
|
|
44
|
+
6. **`remove_cron_job`** when retiring a task.
|
|
45
|
+
|
|
46
|
+
## Notes
|
|
47
|
+
|
|
48
|
+
- Scheduler can be disabled node-wide via `EnableAgentCron: false` or `MPC_AUTH_ENABLE_AGENT_CRON=0`; CRUD and manual runs still work.
|
|
49
|
+
- Cron runs use the full agent turn but fail if MCP elicitation would block on human input.
|
|
50
|
+
- Job **name**: lowercase `a-z`, digits, hyphen, underscore; max 64 chars.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Agent MCP servers
|
|
2
|
+
|
|
3
|
+
Tools for optional MCP servers on the node. Catalog templates come from the bind-mounted mpc-config file **`agent_llm_config.defaults/MCP_servers.json`** (not from this SDK).
|
|
4
|
+
|
|
5
|
+
**To add a new catalog server:** edit that JSON in the mpc-config repo — see **`mpc-config/agent_llm_config.defaults/CATALOG.md`**. Use **Variables** for secrets (`apiKeyEnvVar` / `envVars` names only — never inline `apiKey`). The agent must not see Variable values.
|
|
6
|
+
|
|
7
|
+
## Suggested workflow
|
|
8
|
+
|
|
9
|
+
1. **`list_mcp_servers`** — active servers plus **`availableCatalog`** / **`addableTemplates`** from the repository file (entries not yet on this node).
|
|
10
|
+
2. Activate a catalog row with **`add_mcp_server_from_catalog`** (management-signed), or **`add_mcp_server`** for a custom definition.
|
|
11
|
+
3. Set **Variables** before **`initialLoad`: true** when `apiKeyEnvVar` / `envVars` are required.
|
|
12
|
+
4. **`remove_mcp_server`** — user/catalog-activated servers only (not builtin **continuum**).
|
|
13
|
+
|
|
14
|
+
## IDs and transports
|
|
15
|
+
|
|
16
|
+
- **id**: lowercase `a-z`, digits, hyphen, underscore; max 64 chars.
|
|
17
|
+
- **http**: requires **url**
|
|
18
|
+
- **stdio**: requires **command**; optional **args**, **envVars**, **useUserFolder**, **runtime**
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Agent skills
|
|
2
|
+
|
|
3
|
+
Markdown or plain-text guidance stored under `agent_llm_config/Skills/` (manifest `skills.json` plus one file per skill). Skills are local to this node and are not propagated between nodes.
|
|
4
|
+
|
|
5
|
+
## MCP tools
|
|
6
|
+
|
|
7
|
+
### Read (GET)
|
|
8
|
+
|
|
9
|
+
- `list_skills` — skill names only (no content)
|
|
10
|
+
- `get_skill` — full skill by **name** (content, **initialLoad**, **format**)
|
|
11
|
+
|
|
12
|
+
### Write (management-signed POST, preferred Ed25519 signer)
|
|
13
|
+
|
|
14
|
+
- `add_skill` — upsert skill (**name**, **content**, **initialLoad**; optional **format** `md`|`txt`, default `md`)
|
|
15
|
+
- `remove_skill` — delete skill by **name**
|
|
16
|
+
|
|
17
|
+
## initialLoad
|
|
18
|
+
|
|
19
|
+
| Value | Behavior |
|
|
20
|
+
|-------|----------|
|
|
21
|
+
| `true` | Content injected as a **system** message at chat startup |
|
|
22
|
+
| `false` | Agent may load the skill during the session via `agent_load_skill` |
|
|
23
|
+
|
|
24
|
+
## Suggested workflow
|
|
25
|
+
|
|
26
|
+
1. **`list_skills`** — see what is configured.
|
|
27
|
+
2. **`get_skill`** — read existing content before editing.
|
|
28
|
+
3. **`add_skill`** — create or update a skill file and manifest entry.
|
|
29
|
+
4. **`remove_skill`** — retire a skill when no longer needed.
|
|
30
|
+
|
|
31
|
+
## Validation
|
|
32
|
+
|
|
33
|
+
- **name**: lowercase `a-z`, digits, hyphen, underscore; max 64 chars
|
|
34
|
+
- **content**: required; max **512 KiB**
|
|
35
|
+
- **format**: `md` (default) or `txt`
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Agent inbound webhooks
|
|
2
|
+
|
|
3
|
+
Tools for **inbound HTTP webhooks** that trigger agent chat turns (`POST /hooks/inbound/{id}` on the hook listener port, default `127.0.0.1:18090`).
|
|
4
|
+
|
|
5
|
+
Active webhooks live in MongoDB (`LocalAgentWebhooks`). Repository catalog templates are in `agent_llm_config.defaults/hooks/webhooks.json` (bind-mounted from mpc-config).
|
|
6
|
+
|
|
7
|
+
**Secrets:** use **`add_environment_variable`** for `WEBHOOK_SECRET_*` and `TELEGRAM_BOT_TOKEN`. The agent must not see Variable values — only names and `*Configured` flags in listings.
|
|
8
|
+
|
|
9
|
+
## Suggested workflow
|
|
10
|
+
|
|
11
|
+
1. **`list_webhooks`** — `activeWebhooks` plus `availableCatalog` (templates not yet on the node).
|
|
12
|
+
2. **`add_webhook_from_catalog`** or **`add_webhook`** (custom) — creates job + auto-generated secret env var name.
|
|
13
|
+
4. **`add_environment_variable`** — set provider signing secret (Stripe `whsec_`, Slack signing secret, etc.) before enabling.
|
|
14
|
+
5. **`activate_webhook`** — enable after secrets are configured.
|
|
15
|
+
6. **`run_webhook`** — manual test trigger.
|
|
16
|
+
|
|
17
|
+
## Types
|
|
18
|
+
|
|
19
|
+
`generic`, `github`, `gmail`, `proton`, `stripe`, `slack`, `telegram` — each verifies inbound auth differently. See mpc-config `docs/AGENT_HOOKS.md` for provider setup.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
# Group Operations
|
|
2
|
+
|
|
3
|
+
This document explains how to create and manage MPC groups with this server.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Groups define which node IDs can participate in key generation and signing.
|
|
8
|
+
A valid group must include your node and at least one peer. Group creation is unanimous: all requested nodes must accept before the group is formed. The originator is auto-agreed when creating the request and does not perform a separate accept step.
|
|
9
|
+
|
|
10
|
+
## MCP tools
|
|
11
|
+
|
|
12
|
+
- `list_group_requests`
|
|
13
|
+
- List MPC group requests with an optional filter (`all`, `pending`, `success`, `failed`; default `all`).
|
|
14
|
+
- Returns `groupRequests` entries with request ID, group ID, key list, status, originator, and signatures.
|
|
15
|
+
- `list_group_results`
|
|
16
|
+
- List completed MPC group results.
|
|
17
|
+
- Returns `groups` with `groupId` and `nodeKeys`.
|
|
18
|
+
- `create_group_request`
|
|
19
|
+
- Create a new MPC group request for the given `nodeIds` (minimum 2).
|
|
20
|
+
- Signs and POSTs internally with Ed25519 management signing.
|
|
21
|
+
- Returns `groupRequestId`, `selectedSigningKey`, and `signingMessage`.
|
|
22
|
+
- `accept_group_request`
|
|
23
|
+
- Accept a pending MPC group request by `requestId`.
|
|
24
|
+
- Signs and POSTs internally with Ed25519 management signing.
|
|
25
|
+
- Returns `message`, `selectedSigningKey`, and `signingMessage`.
|
|
26
|
+
|
|
27
|
+
SDK-only helpers (`availableNodeIds`, `validGroupNodeSets`, `buildCreateGroupRequest`, `buildAcceptGroupRequest`) are **not** registered as MCP tools. Use `node_id` to read this node's ID and pass explicit `nodeIds` to `create_group_request`; the server validates them against configured nodes.
|
|
28
|
+
|
|
29
|
+
## Create group flow
|
|
30
|
+
|
|
31
|
+
1. Read this node's ID
|
|
32
|
+
- Call `node_id`.
|
|
33
|
+
2. Ask the user which peer node IDs to include
|
|
34
|
+
- `nodeIds` must be 128-character hex node IDs from configured nodes.
|
|
35
|
+
3. (Optional) set preferred signer
|
|
36
|
+
- Call `set_preferred_management_signer`.
|
|
37
|
+
4. Submit group request
|
|
38
|
+
- Call `create_group_request` with `nodeIds`.
|
|
39
|
+
5. Group peers accept
|
|
40
|
+
- Other members call `accept_group_request` with the pending `requestId`.
|
|
41
|
+
- All requested nodes must accept; otherwise group creation does not complete. The originator is already counted as agreed at creation time.
|
|
42
|
+
6. Verify completion
|
|
43
|
+
- Use `list_group_results`, or filter `list_group_requests` with `success`.
|
|
44
|
+
|
|
45
|
+
## Validation rules enforced
|
|
46
|
+
|
|
47
|
+
`create_group_request` validates before signing:
|
|
48
|
+
|
|
49
|
+
- `nodeIds` must contain at least 2 unique values (duplicates are normalized away).
|
|
50
|
+
- Every ID must be a configured node ID (including this node).
|
|
51
|
+
- This node's ID must be included in `nodeIds`.
|
|
52
|
+
- A group with the same node set must not already exist.
|
|
53
|
+
|
|
54
|
+
`accept_group_request` validates before signing:
|
|
55
|
+
|
|
56
|
+
- `requestId` must be a valid group request ID (`NewGroup` + 25 hex characters). A hex suffix without the prefix is accepted and normalized automatically.
|
|
57
|
+
- The request must exist and have status `pending`.
|
|
58
|
+
|
|
59
|
+
## Signing behavior
|
|
60
|
+
|
|
61
|
+
`create_group_request` and `accept_group_request` sign and submit internally. Clients only pass business arguments (`nodeIds` or `requestId`). Do not use separate signing or build/sign/post tools.
|
|
62
|
+
|
|
63
|
+
Successful responses may include `selectedSigningKey` (the Ed25519 key used) and `signingMessage` (canonical JSON that was signed).
|
|
64
|
+
|
|
65
|
+
## Notes for MCP clients
|
|
66
|
+
|
|
67
|
+
- Prompt users for concrete node-ID choices, not free text.
|
|
68
|
+
- Use `list_group_requests` with `filter: "pending"` to find requests awaiting acceptance.
|
|
69
|
+
- Treat tool responses as source of truth for IDs and status.
|
|
70
|
+
- Load `management-signer.md` if signing fails due to missing or unavailable local keys.
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
# Key Generation
|
|
2
|
+
|
|
3
|
+
This document covers MPC key generation request lifecycle in this server.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
After a group is formed, keygen creates one MPC keypair shared across group members. KeyGen creation itself is unanimous: all requested group members must accept the request. The originator auto-agrees when creating the request and does not need a separate accept step.
|
|
8
|
+
That key can later be used in signing workflows.
|
|
9
|
+
|
|
10
|
+
## MCP tools
|
|
11
|
+
|
|
12
|
+
- `create_key_gen_request`
|
|
13
|
+
- Initiate a request to members of a group to generate a new MPC key pair.
|
|
14
|
+
- Input: `groupId`, `gate` (integer ≥ 2), `msgCheck`, `keyType`.
|
|
15
|
+
- Signs and POSTs internally with Ed25519 management signing.
|
|
16
|
+
- Returns `requestId`, `selectedSigningKey`, and `signingMessage`.
|
|
17
|
+
- `accept_key_gen_request`
|
|
18
|
+
- Accept a pending MPC key generation request.
|
|
19
|
+
- Input: `requestId` (KeyGen ID).
|
|
20
|
+
- Signs and POSTs internally.
|
|
21
|
+
- Returns `message`, `selectedSigningKey`, and `signingMessage`.
|
|
22
|
+
- `list_key_gen_requests`
|
|
23
|
+
- List MPC key generation requests with optional filter and pagination.
|
|
24
|
+
- Input: optional `filter`, `pagenum`, `pagesize`.
|
|
25
|
+
- Returns `localNodeId`, `requests`, and `agreementChecks` (whether this node must accept each request).
|
|
26
|
+
- `get_key_gen_request_by_id`
|
|
27
|
+
- Get a single MPC key generation request by ID.
|
|
28
|
+
- Input: `id` (KeyGen ID).
|
|
29
|
+
- Returns `request`, `localNodeId`, `isOriginatorLocal`, `agreementRequired`, and `note`.
|
|
30
|
+
- `fetch_key_gen_result`
|
|
31
|
+
- Get the MPC key generation result for a completed KeyGen (`GET /getKeyGenResultById`).
|
|
32
|
+
- Input: `id` (KeyGen ID).
|
|
33
|
+
- Returns the result payload (shape varies by key type and status). For **`secp256k1`**, the EVM executor/wallet address is **`ethereumaddress`** — use it as-is; do **not** derive an address from `pubkeyhex` or from `pubKey` on `get_preferred_key_gen`.
|
|
34
|
+
- `get_key_gen_parent_group_id`
|
|
35
|
+
- Get the parent group ID for a key generation request.
|
|
36
|
+
- Input: `id` (KeyGen ID).
|
|
37
|
+
- Returns `requestid` and `groupId`.
|
|
38
|
+
- `fetch_global_nonce_by_key_gen_id`
|
|
39
|
+
- Get the global nonce for a key generation request.
|
|
40
|
+
- Input: `id` (KeyGen ID).
|
|
41
|
+
- Returns `globalNonce`.
|
|
42
|
+
- `get_preferred_key_gen`
|
|
43
|
+
- Get the default multi-agree KeyGen for agent `POST /multiSignRequest` (`GET /getPreferredKeyGen`).
|
|
44
|
+
- Input: none.
|
|
45
|
+
- Returns `keyGenId`, `pubKey`, and `keyType` only (no EVM address). Empty strings when nothing is stored or the KeyGen is no longer valid. For executor address, chain with `fetch_key_gen_result` — see **EVM executor address** below.
|
|
46
|
+
- `post_preferred_key_gen`
|
|
47
|
+
- Store a multi-agree KeyGen request id as the agent default for composing multiSignRequest payloads (`POST /postPreferredKeyGen`).
|
|
48
|
+
- Input: `keyGenId` (KeyGen request ID).
|
|
49
|
+
- Signs and POSTs internally.
|
|
50
|
+
- Returns `message`, `selectedSigningKey`, and `signingMessage`.
|
|
51
|
+
- `send_key_gen_message`
|
|
52
|
+
- Send a top-level or reply message in a KeyGen channel (`POST /sendMessage`).
|
|
53
|
+
- Input: `keyGenId`, `body`, and either `title` (top-level) or `replyTo` (reply).
|
|
54
|
+
- **Orchestration sub-agents:** one reply with `replyTo` set to the top-level message id and `mpc-task-result v1` in the body (not `mpc-orchestrate-task`; no `@agent`). Include human-readable findings for the KeyGen group. **Orchestrator synthesis:** post a reply to the same top-level id when all tasks finish. Do not poll `list_key_gen_messages` for orchestration completion.
|
|
55
|
+
- Signs and POSTs internally.
|
|
56
|
+
- Returns `message`, `selectedSigningKey`, and `signingMessage`.
|
|
57
|
+
- `list_key_gen_messages`
|
|
58
|
+
- List KeyGen channel messages (`GET /listMessages`).
|
|
59
|
+
- Input: `keyGenId`; optional `unread`, `topLevel`, `fromTime`, `toTime`, `pagenum`, `pagesize`.
|
|
60
|
+
- Returns `{ list, total }`.
|
|
61
|
+
- `get_key_gen_message_by_id`
|
|
62
|
+
- Get one message (`GET /getMessageById`).
|
|
63
|
+
- Input: `keyGenId`, `messageId`.
|
|
64
|
+
- `get_key_gen_message_thread`
|
|
65
|
+
- Get a top-level message and nested replies (`GET /getMessageThread`).
|
|
66
|
+
- Input: `keyGenId`, `messageId` (top-level id).
|
|
67
|
+
- `mark_key_gen_message_read`
|
|
68
|
+
- Mark one message read for this node (`POST /markMessageRead`).
|
|
69
|
+
- Input: `keyGenId`, `messageId`; optional `signature` for the read receipt.
|
|
70
|
+
- Signs and POSTs internally.
|
|
71
|
+
- Returns `message` (`ok`), `selectedSigningKey`, and `signingMessage`.
|
|
72
|
+
- `multi_mark_key_gen_messages_read`
|
|
73
|
+
- Mark multiple messages read (`POST /multiMarkMessagesRead`).
|
|
74
|
+
- Input: `keyGenId`, `messageIds` (non-empty); optional `signature`.
|
|
75
|
+
- Signs and POSTs internally.
|
|
76
|
+
- Returns `marked`, `notFound`, `selectedSigningKey`, and `signingMessage`.
|
|
77
|
+
- Intended for external inbox poll scripts, not orchestration sub-agent return paths.
|
|
78
|
+
- `delete_key_gen_message`
|
|
79
|
+
- Soft-delete a message and its reply tree (`POST /deleteMessage`). Originator only.
|
|
80
|
+
- Input: `keyGenId`, `messageId`.
|
|
81
|
+
- Signs and POSTs internally.
|
|
82
|
+
- Returns `deleted`, `selectedSigningKey`, and `signingMessage`.
|
|
83
|
+
- `multi_delete_key_gen_messages`
|
|
84
|
+
- Batch soft-delete messages and reply trees (`POST /multiDeleteMessages`). Originator only per id.
|
|
85
|
+
- Input: `keyGenId`, `messageIds` (non-empty).
|
|
86
|
+
- Signs and POSTs internally.
|
|
87
|
+
- Returns `deleted`, `notFound`, `forbidden`, `selectedSigningKey`, and `signingMessage`.
|
|
88
|
+
|
|
89
|
+
SDK-only helpers (`buildCreateKeyGenRequest`, `buildAcceptKeyGenRequest`, `buildPostPreferredKeyGen`, `buildSendKeyGenMessage`, `buildMarkKeyGenMessageRead`, `buildMultiMarkKeyGenMessagesRead`, `buildDeleteKeyGenMessage`, `buildMultiDeleteKeyGenMessages`) are **not** registered as MCP tools.
|
|
90
|
+
|
|
91
|
+
## Create keygen flow
|
|
92
|
+
|
|
93
|
+
1. Ensure group exists and members agreed
|
|
94
|
+
- Validate via group tools (`list_group_results`) before keygen.
|
|
95
|
+
2. (Optional) set preferred signer
|
|
96
|
+
- Call `set_preferred_management_signer`.
|
|
97
|
+
3. Create request
|
|
98
|
+
- Call `create_key_gen_request` with:
|
|
99
|
+
- `groupId` — 64-character hex group ID
|
|
100
|
+
- `gate` — signing threshold: minimum number of group members that must participate to sign (CGGMP24/FROST)
|
|
101
|
+
- `msgCheck` — `multi-agree` or `tx-check`
|
|
102
|
+
- `keyType` — `ed25519` or `secp256k1`
|
|
103
|
+
4. Peers accept
|
|
104
|
+
- Each non-originator group member calls `accept_key_gen_request` with the pending `requestId`.
|
|
105
|
+
- KeyGen is formed only when all requested members have agreed; originator agreement is automatic on request creation.
|
|
106
|
+
- Use `list_key_gen_requests` or `get_key_gen_request_by_id` to read `agreementRequired` / `isOriginatorLocal`.
|
|
107
|
+
5. Track progress
|
|
108
|
+
- Poll `list_key_gen_requests` (optional filters below) or `get_key_gen_request_by_id`.
|
|
109
|
+
6. Read result
|
|
110
|
+
- Call `fetch_key_gen_result` when the request has completed successfully.
|
|
111
|
+
- For `secp256k1`, read **`ethereumaddress`** from the result when you need the on-chain MPC wallet (executor).
|
|
112
|
+
- Optionally call `fetch_global_nonce_by_key_gen_id` or `get_key_gen_parent_group_id` for follow-up workflows.
|
|
113
|
+
|
|
114
|
+
## EVM executor address (preferred KeyGen)
|
|
115
|
+
|
|
116
|
+
When the user asks for the **Ethereum address** of the **preferred** KeyGen (or “MPC wallet” / “executor” for EVM txs):
|
|
117
|
+
|
|
118
|
+
1. `get_preferred_key_gen` → `keyGenId` (ignore `pubKey` for address answers).
|
|
119
|
+
2. `fetch_key_gen_result` with `{ "id": "<keyGenId>" }` → **`ethereumaddress`**.
|
|
120
|
+
|
|
121
|
+
Do **not** (even when `fetch_key_gen_result` errors):
|
|
122
|
+
|
|
123
|
+
- Convert `pubKey` or `pubkeyhex` to an address (Keccak-256 in the model is wrong often; never “derive manually”).
|
|
124
|
+
- Explain how derivation works instead of fixing the lookup.
|
|
125
|
+
- Infer the address from past transaction `from` / swapper fields.
|
|
126
|
+
|
|
127
|
+
On **`fetch_key_gen_result` failure**, report the exact tool error, suggest **retry**, and point to the **node UI** KeyGen result page. A request can show **success** before this node returns a result object from `/getKeyGenResultById`.
|
|
128
|
+
|
|
129
|
+
`get_preferred_key_gen` intentionally omits `ethereumaddress` so the full result stays on `/getKeyGenResultById`.
|
|
130
|
+
|
|
131
|
+
## Inputs that matter
|
|
132
|
+
|
|
133
|
+
- `groupId`: target group to generate a key for.
|
|
134
|
+
- `gate`: CGGMP24/FROST signing threshold (minimum nodes required to sign after KeyGen completes). Sent to the API as `threshold`. Gate does not change unanimous agreement requirements for group or keygen creation.
|
|
135
|
+
- `msgCheck`: downstream signing policy mode (`multi-agree` or `tx-check`).
|
|
136
|
+
- `keyType`: MPC key curve/type (`ed25519` or `secp256k1`).
|
|
137
|
+
|
|
138
|
+
## List filters
|
|
139
|
+
|
|
140
|
+
`list_key_gen_requests` accepts optional `filter`:
|
|
141
|
+
|
|
142
|
+
- `all`
|
|
143
|
+
- `pending`
|
|
144
|
+
- `success`
|
|
145
|
+
- `failed`
|
|
146
|
+
- `agree`
|
|
147
|
+
- `originator`
|
|
148
|
+
|
|
149
|
+
Optional pagination: `pagenum` (non-negative integer), `pagesize` (positive integer).
|
|
150
|
+
|
|
151
|
+
## Signing behavior
|
|
152
|
+
|
|
153
|
+
`create_key_gen_request` and `accept_key_gen_request` sign and submit internally. Pass business arguments only (`groupId`, `gate`, `msgCheck`, `keyType`, or `requestId`); do not orchestrate signing manually.
|
|
154
|
+
|
|
155
|
+
Successful responses may include `selectedSigningKey` (the Ed25519 key used) and `signingMessage` (canonical JSON that was signed).
|
|
156
|
+
|
|
157
|
+
## Status expectations
|
|
158
|
+
|
|
159
|
+
Keygen requests can move through states such as:
|
|
160
|
+
|
|
161
|
+
- `pending`
|
|
162
|
+
- `agree`
|
|
163
|
+
- `success`
|
|
164
|
+
- `failed`
|
|
165
|
+
|
|
166
|
+
Exact transitions depend on group member participation and backend processing.
|
|
167
|
+
|
|
168
|
+
## Client guidance
|
|
169
|
+
|
|
170
|
+
- For EVM executor address questions, use **EVM executor address** above (`get_preferred_key_gen` then `fetch_key_gen_result`).
|
|
171
|
+
- Show users the `requestId` immediately after creation (format: `KeyGen…`).
|
|
172
|
+
- Keep the request ID available for accept and query tools.
|
|
173
|
+
- Check `agreementChecks` or `agreementRequired` before prompting a user to accept.
|
|
174
|
+
- Prefer explicit polling over assumptions about completion timing.
|
|
175
|
+
- Load `management-signer.md` if signing fails due to missing or unavailable local keys.
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Management Signer
|
|
2
|
+
|
|
3
|
+
This server signs management actions with Ed25519 keys. Management signer tools configure authorized keys on the node and ensure matching local private key material is available for agent-signed requests.
|
|
4
|
+
|
|
5
|
+
## Goal
|
|
6
|
+
|
|
7
|
+
Maintain usable local signer keys and keep authorized public keys in sync with the node.
|
|
8
|
+
|
|
9
|
+
## MCP tools
|
|
10
|
+
|
|
11
|
+
- `get_management_signers`
|
|
12
|
+
- List allowed management signers configured on the node (`managementKeys` entries with labels and validity).
|
|
13
|
+
- `has_management_signer`
|
|
14
|
+
- Check whether the node has an Ed25519 management signer configured (`hasEdDSAKey`).
|
|
15
|
+
- `list_management_signers_detailed`
|
|
16
|
+
- List allowed signers with preferred signer, per-key nonce, local file name, and local private-key availability.
|
|
17
|
+
- `get_preferred_management_signer`
|
|
18
|
+
- Read the resolved preferred management signer public key.
|
|
19
|
+
- `get_management_signer`
|
|
20
|
+
- Read the preferred signer with `nonce` and `nodeKey` (signing context for the active signer).
|
|
21
|
+
- `set_preferred_management_signer`
|
|
22
|
+
- Set the preferred management signer (signs internally with Ed25519).
|
|
23
|
+
- `add_management_signer`
|
|
24
|
+
- Add a new Ed25519 management signer on the node; the server generates the key pair and writes files under `mpcConfigPath/added_keys` (Docker: `/app/added_keys/added_key_<N>`). Requires an existing authorized signer with a local private key.
|
|
25
|
+
- `create_management_signer_keypair`
|
|
26
|
+
- **Deprecated.** Generates a local keypair only (does not register on the node). Prefer `add_management_signer`.
|
|
27
|
+
|
|
28
|
+
Low-level SDK helpers (`buildManagementPostRequest`, `managementSign`, `buildAddManagementSigner`, and similar build/sign/post steps) are **not** registered as MCP tools. Clients must use the tools above or route tools that sign internally.
|
|
29
|
+
|
|
30
|
+
## Key lifecycle
|
|
31
|
+
|
|
32
|
+
1. Check whether any Ed25519 management signer is configured
|
|
33
|
+
- `has_management_signer`
|
|
34
|
+
2. Inspect current signer state
|
|
35
|
+
- `get_management_signers` for node authorization list
|
|
36
|
+
- `list_management_signers_detailed` before signed workflows (preferred signer, nonce, local key status)
|
|
37
|
+
3. Add a new authorized signer (normal path)
|
|
38
|
+
- `add_management_signer` — node generates the key pair server-side
|
|
39
|
+
4. Set default signer for signed tools
|
|
40
|
+
- `set_preferred_management_signer` with a 64-character hex Ed25519 public key
|
|
41
|
+
5. (Optional) read signing context
|
|
42
|
+
- `get_management_signer` for `publicKey`, `nonce`, and `nodeKey`
|
|
43
|
+
|
|
44
|
+
## `list_management_signers_detailed` output use
|
|
45
|
+
|
|
46
|
+
Response fields:
|
|
47
|
+
|
|
48
|
+
- `preferredSigner` (top-level, when resolvable)
|
|
49
|
+
- Per key in `keys`:
|
|
50
|
+
- `localFileName`
|
|
51
|
+
- `kind` (`EdDSA`)
|
|
52
|
+
- `value` (public key)
|
|
53
|
+
- `nonce`
|
|
54
|
+
- `label`
|
|
55
|
+
- `localPrivateKeyAvailable`
|
|
56
|
+
- `localPrivateKeyError` (when missing or unusable)
|
|
57
|
+
|
|
58
|
+
Use this as the source of truth before any signed operation.
|
|
59
|
+
|
|
60
|
+
## Adding a management signer
|
|
61
|
+
|
|
62
|
+
`add_management_signer`:
|
|
63
|
+
|
|
64
|
+
- takes no arguments
|
|
65
|
+
- signs `{ nonce, clientSig: "", nodeKey }` with an existing authorized management key (Ed25519)
|
|
66
|
+
- POST `/addManagementKey`
|
|
67
|
+
- returns `publicKey`, `nodeKey`, and optionally `keySlot`, `fileName`, `privateKeyPath`, `publicKeyPath` from the node response
|
|
68
|
+
|
|
69
|
+
The node writes key files under `mpcConfigPath/added_keys`. Use this for normal operation.
|
|
70
|
+
|
|
71
|
+
## Deprecated local keypair generation
|
|
72
|
+
|
|
73
|
+
`create_management_signer_keypair`:
|
|
74
|
+
|
|
75
|
+
- writes files under `mpcConfigPath/added_keys`
|
|
76
|
+
- labels file as `added_key_{N}` based on current key count
|
|
77
|
+
- returns generated public key and file paths
|
|
78
|
+
- does **not** authorize the new key on the node
|
|
79
|
+
|
|
80
|
+
Use only when you need a local key file before node authorization is possible (bootstrap / offline generation).
|
|
81
|
+
|
|
82
|
+
## Preferred signer rules
|
|
83
|
+
|
|
84
|
+
`set_preferred_management_signer`:
|
|
85
|
+
|
|
86
|
+
1. Requested public key must already be in allowed management keys.
|
|
87
|
+
2. Matching local private key must exist and be readable (bootstrap key or `added_keys` entry).
|
|
88
|
+
3. Private key must derive to the same Ed25519 public key.
|
|
89
|
+
|
|
90
|
+
If any check fails, the tool returns a clear error and does not call `/setPreferredSigner`.
|
|
91
|
+
|
|
92
|
+
Signer resolution for signed route tools (server-side):
|
|
93
|
+
|
|
94
|
+
1. If a preferred signer is set: it must be allowed and have a usable local keypair.
|
|
95
|
+
2. Otherwise: the server uses the first allowed key with a usable local private key.
|
|
96
|
+
3. If none qualify: the tool fails with an explicit error.
|
|
97
|
+
|
|
98
|
+
## Operational checks
|
|
99
|
+
|
|
100
|
+
- If only a bootstrap key exists, ensure its private key is present locally under `mpcConfigPath/bootstrap_key`.
|
|
101
|
+
- If preferred signer is set to a key not available locally, signed tools will fail.
|
|
102
|
+
- If key files are moved or renamed manually, local key matching can fail.
|
|
103
|
+
- If `localPrivateKeyAvailable` is false, signing tools will fail for that key.
|
|
104
|
+
|
|
105
|
+
## Recommended client behavior
|
|
106
|
+
|
|
107
|
+
- Refresh `list_management_signers_detailed` before each signed workflow.
|
|
108
|
+
- Show preferred signer and nonce when asking for approval.
|
|
109
|
+
- Prefer explicit error surfacing (missing private key, unauthorized key, nonce mismatch, parse errors).
|
|
110
|
+
- Load `sign.md` for how signed route tools use the preferred signer internally.
|