@continuumdao/continuum-node-sdk 1.3.0 → 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.
@@ -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.
@@ -0,0 +1,227 @@
1
+ # MPC Operations
2
+
3
+ This document covers MPC multi-sign request creation, agreement, Get Sig, Execute, and related workflows exposed through this server.
4
+
5
+ ## Purpose
6
+
7
+ After KeyGen completes, group members use MPC keys to propose and execute on-chain actions via `multiSignRequest`. This server wraps those flows as MCP tools: building proposals, submitting sign requests, coordinating multi-agree approval, triggering MPC signatures (Get Sig), broadcasting transactions (Execute), and managing MPA wallet setup on Linea.
8
+
9
+ Most create tools return a new `requestId`. Lifecycle and execution tools operate on that ID through pending → ready → signed → executed states.
10
+
11
+ Prerequisites: a formed group, completed KeyGen (`fetch_key_gen_result`), configured chain registry entries where needed, and available management signing (`management-signer.md`). The EVM **executor** address for a KeyGen is **`ethereumaddress`** on the KeyGen result (`secp256k1`); resolve preferred id via `get_preferred_key_gen` then `fetch_key_gen_result` — see `keygen.md` (**EVM executor address**).
12
+
13
+ ## MCP tools
14
+
15
+ ### Gas options (create + Get Sig)
16
+
17
+ - `get_multi_sign_gas_options`
18
+ - Resolve Custom Gas Config and fee tier choices before creating or triggering Get Sig.
19
+ - Input: `chainId` (for create planning) and/or `requestId` (for Get Sig planning).
20
+ - Returns `chainRegistryCustomGas`, `defaultGetSigFeeSpeed`, `proposalUsedCustomGas` / `proposalCustomGas` when the sign request used `useCustomGas`, plus guidance for `useCustomGas` and `feeSpeedTier`.
21
+
22
+ ### MultiSign request creation
23
+
24
+ All create tools below return `{ requestId }` unless noted.
25
+
26
+ Shared optional fields on most create inputs: `purpose`, `useCustomGas`, `startingNonce` (all require `keyGenId`).
27
+
28
+ - **`useCustomGas`** (default `false`): `false` = live RPC gas at proposal time; `true` = apply Custom Gas Config from the chain registry. Call `get_multi_sign_gas_options({ chainId })` and ask the user before creating.
29
+ - **Omitted `baseFee` / `priorityFee`** in the chain registry Custom Gas Config is valid when `useCustomGas: true` — the builder uses live RPC fees at proposal; configured values are optional floors/multipliers only.
30
+ - **`proposalTxParams`** on the sign request records gas limit and fee snapshot at create time.
31
+ - **Get Sig** (`trigger_sign_result`) refreshes fees via `feeSpeedTier` (default from `defaultGetSigFeeSpeed`).
32
+ - **MCP `build_*_multisign` tools** auto-submit and return `{ requestId }`. Treat `requestId` as success — do not call the same build tool again; use `list_sign_requests` to verify duplicates.
33
+
34
+ - `register_key_gen_on_linea`
35
+ - Register KeyGen with MultiSignAgentWallet on Linea (59144) via `register(string,string)` (keyGenId + address kind `ethereum`).
36
+ - Input: `keyGenId`; optional `purpose`, `useCustomGas`, `startingNonce`.
37
+ - `transfer_native_gas`
38
+ - Native gas transfer (send gas).
39
+ - Input: `keyGenId`, `chainId`, `toAddress`, `amountWei`; optional shared fields.
40
+ - `transfer_erc20`
41
+ - ERC-20 transfer.
42
+ - Input: `keyGenId`, `chainId`, `tokenAddress`, `toAddress`, `amountWei`; optional `transferSig` and shared fields.
43
+ - `transfer_erc721`
44
+ - ERC-721 `transferFrom`.
45
+ - Input: `keyGenId`, `chainId`, `tokenAddress`, `toAddress`, `tokenId`; optional `fromAddress`, `transferSig`, and shared fields.
46
+ - `transfer_ctm_erc20`
47
+ - Same-chain Continuum ERC-20 transfer.
48
+ - Input: same shape as `transfer_erc20`.
49
+ - `transfer_ctm_erc20_cross_chain`
50
+ - Cross-chain `c3transfer`.
51
+ - Input: `keyGenId`, `chainId`, `tokenAddress`, `toStr`, `amountWei`, `toChainIdStr`; optional `transferSig` and shared fields.
52
+ - `create_compose_multi_sign_request`
53
+ - Build a request from one or more compose actions (custom contract calls).
54
+ - Input: `keyGenId`, `chainId`, `actions[]` (`signature`, `contractAddress`, `args[]`, optional `valueWei`); optional shared fields.
55
+ - `create_forge_multi_sign_request`
56
+ - Build a request from Foundry broadcast JSON.
57
+ - Input: `keyGenId`, `broadcast` (`transactions[]` with `transaction` or `tx` objects); optional `destinationChainID`, `overrideSender`, `startingNonce`, and shared fields.
58
+ - `create_joined_multi_sign_request`
59
+ - Join two multiSignRequest helper payloads (single or batch each) into one batch on the same chain; reassigns nonces from `firstNonce`. Gas/fees are taken from each input’s serialized txs (not re-estimated). Both inputs must share the same `keyList` / `pubKey`. Chain longer flows by reusing prior join output as `payloadA` or `payloadB`.
60
+ - Input: `payloadA`, `payloadB` (helper JSON with `bodyForSign` or raw body), `firstNonce`; optional `purpose` override (default merges both purposes with ` | `).
61
+ - Returns `{ requestId }`.
62
+
63
+ ### MPA wallet (Linea)
64
+
65
+ - `get_mpa_wallet_status`
66
+ - Read MPA wallet registration and signing credits for a KeyGen.
67
+ - Input: `keyGenId`.
68
+ - Returns registration state, free transactions, deposit info, fee token, nonces, and optional error.
69
+ - `create_mpa_top_up_multi_sign_request`
70
+ - Create batch `multiSignRequest` (USDC `approve` on Linea fee token when needed + `deposit(string,string,uint256,uint256)` with deposit-only sentinel) to top up MPA KeyGen credits on Linea.
71
+ - Input: `keyGenId`, `amountWei`; optional shared fields.
72
+ - Fee token must be on the KeyGen executor. Does not activate the billing month.
73
+ - `create_mpa_sync_billing_multi_sign_request`
74
+ - Activate KeyGen MPA billing month via `syncBilling(string,string,uint256)` when the credit pool covers the monthly fee.
75
+ - Input: `keyGenId`; optional `globalNonce`, shared fields.
76
+ - Uses node-reported global nonce or chain pending nonce when `globalNonce` is omitted.
77
+ - `create_mpa_overage_purchase_multi_sign_request`
78
+ - Purchase extra signing credits via `purchaseOverageSignatures(string,string,uint256)` after the billing month is active.
79
+ - Input: `keyGenId`, `signatureCount`; optional shared fields.
80
+ - Withdraw authority debits the credit pool; non-authority executors include USDC `approve` for the overage fee.
81
+ - `register_vpn_on_linea`
82
+ - Register VPN billing via `registerVpn(string,bytes32)` on Linea.
83
+ - Input: `keyGenId`, `hostIpAddress`; optional `nodeKey` (defaults to this node's `/getNodeKey`), shared fields.
84
+ - `hostBinding` = `keccak256(encodePacked(nodeKey, hostIpAddress))`.
85
+ - `create_mpa_vpn_deposit_multi_sign_request`
86
+ - Deposit VPN credits via `depositVpn(string,bytes32,uint256,bool)` (approve + deposit when needed).
87
+ - Input: `keyGenId`, `hostIpAddress`, `amountWei`; optional `activateOnDeposit`, `nodeKey`, shared fields.
88
+ - `create_mpa_sync_vpn_billing_multi_sign_request`
89
+ - Activate VPN billing month via `syncVpnBilling(string,bytes32)` when the VPN credit pool covers the monthly fee.
90
+ - Input: `keyGenId`, `hostIpAddress`; optional `nodeKey`, shared fields.
91
+ - KeyGen executor must be the VPN withdraw authority.
92
+ - `get_mpa_vpn_status`
93
+ - Read on-chain VPN billing registration and credit pool for a host IP.
94
+ - Input: `hostIpAddress`; optional `nodeKey`.
95
+ - Returns registration state, credit pool, monthly fee, and active month info.
96
+
97
+ ### Sign request lifecycle
98
+
99
+ List/get tools return **compact summaries** by default (small fields: `requestId`, status, purpose, chain, keyGenId, timestamps). Use `get_sign_request_by_id({ requestId, compact: false })` only when you need the full API record.
100
+
101
+ **Request IDs** always include the `Sign` prefix (e.g. `Sign202605311437369991f054aa2`). Tools accept the 25-character hex suffix alone and add `Sign` automatically. Do not truncate IDs when copying from the UI.
102
+
103
+ - `list_sign_requests`
104
+ - List sign requests with optional filter and pagination (Join/History tab).
105
+ - Input: optional `filter`, `pagenum` (**zero-based** — first page is `0`), `pagesize` (default 20, max 50), `fromTime`, `toTime`.
106
+ - Returns compact `requests[]` summaries and optional `total`.
107
+ - **Do not use `filter: "pending"` alone to find Join Accept/Reject work** — the node app merges **`live` + `pending`**. New requests are usually status **`live`**. Use `list_sign_requests_awaiting_join` instead.
108
+ - Join agreement progress uses **`ClientSigs`** (management Accept/Reject), not **`SigList`** (MPC shares).
109
+ - `list_sign_requests_awaiting_join`
110
+ - Join tab list: merges `live` + `pending`, keeps rows where this node is in `KeyList`, excludes `success`.
111
+ - Input: none.
112
+ - Returns `{ localNodeId, requests[], joinAgreementChecks[] }`.
113
+ - When the user asks for sign requests waiting to be agreed, call this tool and filter where **`localAgreementPending: true`**, then `sign_request_agree`.
114
+ - `get_sign_request_by_id`
115
+ - Fetch a sign request by ID.
116
+ - Input: `requestId`; optional `compact` (default `true`), `txParams: true` to include transaction params from the API.
117
+ - Returns a compact summary by default, or the full sign request record when `compact: false`.
118
+ - `get_sign_request_status`
119
+ - Combined lifecycle + broadcast readiness (preferred status check).
120
+ - Input: `requestId`.
121
+ - Returns `{ lifecycleStatus, getSigTriggered, hasSignature, executedOnChain, readyToBroadcast, ... }`.
122
+ - **`lifecycleStatus: "success"` means MPC quorum agreed — not on-chain executed.** Use `executedOnChain` and `readyToBroadcast` before calling `broadcast_sign_result`.
123
+ - `tx_params_from_get_sign_request_id_data`
124
+ - Parse tx params from GET `/getSignRequestById` data.
125
+ - Input: `requestId`; optional `txParams`.
126
+ - Returns `{ txParams }` with `nonce`, `gasLimit`, `txType` (`eip1559` or `legacy`), and fee fields.
127
+ - `sign_request_agree`
128
+ - Agree to or reject a multi-agree sign request.
129
+ - Input: `requestId`; optional `accept` (default agree), `thoughts` (max 256 chars).
130
+ - **Always ask the user “Any thoughts to attach?” before calling** — wait for their reply, then pass it in `thoughts` or omit if they have none. Do not skip this prompt.
131
+ - Signs internally with Ed25519 management signing.
132
+ - Returns `{ message }`.
133
+ - `shelve_sign_request`
134
+ - Shelve a sign request (originator only).
135
+ - Before Get Sig: sets sign request lifecycle to shelved via `POST /shelveSignRequest`.
136
+ - After Get Sig (signature ready to broadcast): sets sign result status to shelved via `POST /updateSignResultStatusById`, then best-effort `POST /shelveSignRequest` (same as the node app Shelve button).
137
+ - Input: `requestId`.
138
+ - Signs internally with Ed25519 management signing.
139
+ - Returns `{ message }`.
140
+
141
+ ### Get Sig / Execute
142
+
143
+ - `list_sign_requests_ready`
144
+ - List sign requests ready for Get Sig / Execute.
145
+ - Input: optional `pagenum`, `pagesize`.
146
+ - Returns compact `{ requests[] }` summaries.
147
+ - `wait_for_sign_request_ready`
148
+ - Poll until a sign request appears in the ready list.
149
+ - Input: `requestId`; optional `pollMs`, `timeoutMs`.
150
+ - Returns `{ ready, detail? }` where `detail` is a compact summary when ready.
151
+ - `trigger_sign_result`
152
+ - Get Sig: trigger MPC signing with fresh tx params (does **not** broadcast). **Originator node only** — verify via the sign request `Purpose` key / originator fields, not merely `node_id`.
153
+ - Input: `requestId`; optional `feeSpeedTier` (`slow`, `normal`, `fast`, `advanced`; default = chain `defaultGetSigFeeSpeed` from `get_multi_sign_gas_options`) and advanced fee overrides in gwei when tier is `advanced`.
154
+ - Call `get_multi_sign_gas_options({ requestId })` first to show the user Custom Gas / default tier choices.
155
+ - Returns `{ requestId, signResultSummary }` (compact — not the full sign result blob).
156
+ - `get_sign_result_summary`
157
+ - Fetch a compact sign-result summary for broadcast planning.
158
+ - Input: `requestId`.
159
+ - Returns `{ requestId, signResultSummary }` with `executedOnChain`, `readyToBroadcast`, `hasSignature`, optional `transactionHashes`.
160
+ - **`readyToBroadcast: true` and `executedOnChain: false`** → call `broadcast_sign_result`.
161
+ - `broadcast_sign_result`
162
+ - Execute: broadcast signed tx(s) and mark sign result executed.
163
+ - Input: `requestId` only in most cases; optional `signResultId`, `slowBatch`.
164
+ - After Get Sig succeeds, call **only** `broadcast_sign_result({ requestId })` — do not re-load full sign requests/results unless debugging.
165
+ - Returns `{ requestId, txHashes, status: "executed" }`.
166
+ - `bump_or_cancel_sign_result`
167
+ - Bump or cancel stuck pending txs by creating a new `multiSignRequest`.
168
+ - Input: `sourceRequestId`, `keyGenId`; optional `purposeNote`, `cancelPendingTx`.
169
+ - Returns `{ requestId }`.
170
+
171
+ ## Typical multi-sign flow
172
+
173
+ 1. Create a proposal — call a create tool (e.g. `transfer_erc20`, `create_compose_multi_sign_request`) with a completed `keyGenId`.
174
+ 2. Coordinate agreement — if the KeyGen uses multi-agree policy, peers call `sign_request_agree` until enough members accept (gate threshold applies to signing, not unanimous keygen-style agreement). **Before each agree/reject call, ask “Any thoughts to attach?”** and include the user’s reply in `thoughts` when non-empty.
175
+ 3. Track status — `list_sign_requests`, `get_sign_request_by_id`, or `get_sign_request_status`.
176
+ 4. After Join quorum (may take days) — before Get Sig, optionally `list_sign_requests_ready` once; **do not** poll `wait_for_sign_request_ready` right after create.
177
+ 5. Get Sig — `trigger_sign_result` (optionally tune fee tier). Use the returned `signResultSummary`; avoid pulling full sign-result payloads into chat context.
178
+ 6. Execute — `broadcast_sign_result({ requestId })` only. Use `get_sign_result_summary` if you need execution details before broadcasting.
179
+ 7. If txs are stuck — `bump_or_cancel_sign_result` to submit a replacement/cancel request.
180
+
181
+ ## MPA on Linea flow
182
+
183
+ 1. Complete KeyGen and fetch the result (`fetch_key_gen_result`).
184
+ 2. Register on Linea — `register_key_gen_on_linea`.
185
+ 3. Check wallet — `get_mpa_wallet_status`.
186
+ 4. Top up credits if needed — `create_mpa_top_up_multi_sign_request`, then run the multi-sign flow above for that new request.
187
+
188
+ ## List filters
189
+
190
+ `list_sign_requests` accepts optional `filter`:
191
+
192
+ - `all`, `live`, `pending`, `success`, `blocked`, `shelved`
193
+
194
+ Use `live` for recently created requests. The create tools return `{ requestId }` directly — do not rely on listing to discover a new request ID.
195
+
196
+ **Join tab (Accept/Reject):** use `list_sign_requests_awaiting_join`, not `list_sign_requests` with `filter: "pending"`. The node app loads **`live` and `pending` together**; most new proposals have lifecycle status **`live`**. Check `localAgreementPending` on each summary (or `joinAgreementChecks`) — that uses **`ClientSigs`**, not `SigList`.
197
+
198
+ Optional pagination: `pagenum`, `pagesize`. Optional time range: `fromTime`, `toTime` (Unix timestamps).
199
+
200
+ ## Transfer recipients
201
+
202
+ For `transfer_erc20`, `transfer_native_gas`, and `transfer_erc721`, prefer registry names over raw IDs/addresses:
203
+
204
+ - `chainName` (as stored in `get_chain_registry`) instead of guessing `chainId`
205
+ - `toContactName` instead of `toAddress`
206
+ - `tokenSymbol` and `amount` on `transfer_erc20` instead of `tokenAddress` and `amountWei`
207
+
208
+ Exactly one of each pair is required where pairs are listed. Call `get_chain_registry` with `{}` or `{ chainName }` to resolve the correct chain before transfers.
209
+
210
+ ## Validation and behavior notes
211
+
212
+ - Create tools validate inputs against strict schemas (EVM addresses as `0x` + 40 hex chars, positive `chainId`, non-empty wei amounts as strings).
213
+ - `sign_request_agree` and `shelve_sign_request` use Ed25519 management signing internally; other create/execute tools build and submit `multiSignRequest` payloads through the MPC API layer.
214
+ - `trigger_sign_result` refreshes fee params and triggers MPC signing but does not broadcast on-chain.
215
+ - `broadcast_sign_result` submits signed transactions and marks the sign result executed.
216
+ - Shelving is restricted to the request originator. After Get Sig, shelving marks the sign result as shelved (will not broadcast) rather than only cancelling the pre-sign request.
217
+
218
+ ## Client guidance
219
+
220
+ - Always retain `requestId` from create tools for lifecycle, Get Sig, and Execute steps.
221
+ - Resolve `keyGenId` from KeyGen tools before any MPC create call.
222
+ - Prefer compact list/get tools and `get_sign_result_summary` in agent flows; use `get_sign_request_by_id({ compact: false })` only when debugging.
223
+ - Inspect `tx_params_from_get_sign_request_id_data` before Get Sig when showing users nonce/gas details.
224
+ - Do not poll `wait_for_sign_request_ready` immediately after create — Join agreement may take days. Use `list_sign_requests_ready` for a one-shot quorum check before Get Sig.
225
+ - Load `keygen.md` for KeyGen setup and `registry/networks.md` for chain configuration dependencies.
226
+ - Load `management-signer.md` if management-signed agree/shelve operations fail.
227
+ - Before `sign_request_agree`, always ask **“Any thoughts to attach?”** — never call agree/reject without that user prompt (omit `thoughts` only when the user explicitly has none).
@@ -0,0 +1,64 @@
1
+ # Continuum MCP Server Overview
2
+
3
+ This server helps an MCP client operate a Continuum node through safe, structured tools over the management API.
4
+
5
+ ## MCP convention (prompt vs resource)
6
+
7
+ - MCP servers do not typically force a universal "system prompt" into every client session.
8
+ - The standard pattern is to expose guidance as MCP resources and let the client load them at startup.
9
+ - For this server, `overview.md` is the high-level onboarding resource, while other resource files contain step-specific detail.
10
+
11
+ ## What this server is for
12
+
13
+ - Discover node state and health (`version`, `get_machine_info`, `get_node_id`, `health`, `connectivity_health`, `logs`).
14
+ - Manage EdDSA management keys and signer selection (`list_management_keys`, `create_eddsa_management_keypair`, `add_eddsa_management_key`, `set_preferred_management_key`, `get_preferred_management_key`).
15
+ - Coordinate group lifecycle (`list_available_node_ids`, `list_valid_group_node_sets`, `create_group_request`, `accept_group_request`).
16
+ - Coordinate MPC key generation (`create_key_gen_request`, `accept_key_gen_request`, `list_key_gen_requests`, `fetch_key_gen_result`, `get_preferred_key_gen`, `post_preferred_key_gen`, and related tools in `keygen.md`).
17
+ - KeyGen channel messaging (`send_key_gen_message`, `list_key_gen_messages`, `get_key_gen_message_by_id`, `get_key_gen_message_thread`, `mark_key_gen_message_read`, `multi_mark_key_gen_messages_read`, `delete_key_gen_message`, `multi_delete_key_gen_messages`) — see `keygen.md`.
18
+ - Manage the address book registry (`get_address_book_registry`, `add_to_address_book_registry`, `remove_from_address_book_registry`).
19
+ - Manage the token registry (`get_token_registry`, `add_to_token_registry`, `remove_from_token_registry`).
20
+ - Manage the chain registry (`get_chain_registry`, `add_to_chain_registry`, `remove_from_chain_registry`).
21
+ - Manage agent MCP servers on the node (`list_mcp_servers`, `add_mcp_server_from_catalog`, `get_mcp_server`, `add_mcp_server`, `remove_mcp_server`) — see `agent-mcp-servers.md`.
22
+ - Compute technical indicators from price/volume arrays (`list_technical_indicators`, `calculate_technical_indicator`) — see `technical-indicators.md`.
23
+ - Provide signed management route tools that handle signing internally (never expose manual signing/plan steps to clients).
24
+
25
+ ## Common node-operator loop
26
+
27
+ 1. Ensure management signing is available.
28
+ - Use `list_management_keys`.
29
+ - If needed: generate and add a key via `create_eddsa_management_keypair` + `add_eddsa_management_key`.
30
+ - Optionally pin default signer via `set_preferred_management_key`.
31
+ - If EdDSA is not configured yet, configure bootstrap management key material via node setup/browser flow.
32
+
33
+ 2. Form a group with other nodes (unanimous agreement required).
34
+ - Discover candidates with `list_available_node_ids` or `list_valid_group_node_sets`.
35
+ - Submit with `create_group_request`.
36
+ - Other members confirm with `accept_group_request` (originator is auto-agreed).
37
+
38
+ 3. Generate one or more MPC keys in that group (unanimous agreement required).
39
+ - Start with `create_key_gen_request`.
40
+ - Other members confirm with `accept_key_gen_request` (originator is auto-agreed).
41
+ - For the preferred KeyGen’s EVM executor address: `get_preferred_key_gen` then `fetch_key_gen_result` (see `keygen.md`).
42
+
43
+ 4. Use generated MPC key(s) for transaction signing workflows.
44
+ - Members propose sign requests.
45
+ - At least `gate` members must agree/sign for MPC SIGNATURE generation (with API threshold = gate - 1). This gate applies to sign requests only; group creation and keygen creation require all requested members to agree.
46
+
47
+ 5. Repeat for additional groups, keys, and signing operations.
48
+
49
+ ## Client orchestration guidance
50
+
51
+ - Keep user interaction simple: fetch options first, then ask for concrete selection, then execute.
52
+ - Prefer explicit tool inputs for business data (e.g., concrete node IDs), not signer index.
53
+ - For signed tools, rely on preferred signer (or automatic local-key fallback) rather than requesting signer selection each time.
54
+ - Use one route tool per signed action. Do not call `build_signed_request_plan` or `sign_management_message` (not available on this server).
55
+ - Treat tool output as source of truth; avoid guessing route payload shape.
56
+ - Load detailed docs by topic:
57
+ - keygen (including EVM executor address): `keygen.md`
58
+ - signing: `sign.md`
59
+ - groups: `group.md`
60
+ - management signer: `management-signer.md`
61
+ - address book: `registry/address-book.md`
62
+ - tokens: `registry/tokens.md`
63
+ - chains: `registry/networks.md`
64
+ - MPC operations: `mpc.md`
@@ -0,0 +1,53 @@
1
+ # Address Book Registry
2
+
3
+ This document covers the known-address registry (address book) managed through this server.
4
+
5
+ ## Purpose
6
+
7
+ The address book stores operator-curated recipient and contract addresses with optional labels and chain scope. The node uses these entries in MPC signing workflows.
8
+
9
+ Read operations are unsigned GETs. Add and remove operations sign and POST internally with Ed25519 management signing.
10
+
11
+ ## MCP tools
12
+
13
+ - `get_address_book_registry`
14
+ - Get known addresses from the address book registry.
15
+ - Optional query: `chain_type`, `chain_id`, `is_contract` (`"0"` or `"1"`).
16
+ - Returns entries keyed by chain type (each entry includes `address`, optional `name`, `chainIds`, `isContract`, `updatedAt`).
17
+ - `add_to_address_book_registry`
18
+ - Add an address to the address book registry.
19
+ - Input: `chainType`, `address`; optional `name`, `chainIds`, `isContract`.
20
+ - Signs and POSTs to `/addKnownAddress`.
21
+ - Returns `message`, `selectedSigningKey`, and `signingMessage`.
22
+ - `remove_from_address_book_registry`
23
+ - Remove an address from the address book registry.
24
+ - Input: `chainType`, `address`.
25
+ - Signs and POSTs to `/removeKnownAddress`.
26
+ - Returns `message`, `selectedSigningKey`, and `signingMessage`.
27
+
28
+ SDK-only helpers (`buildAddToAddressBookRegistry`, `buildRemoveFromAddressBookRegistry`) are **not** registered as MCP tools.
29
+
30
+ ## Address book flow
31
+
32
+ 1. (Optional) set preferred signer — `set_preferred_management_signer`.
33
+ 2. List current entries — `get_address_book_registry` (optionally filter by `chain_type` / `chain_id`).
34
+ 3. Add or remove — `add_to_address_book_registry` or `remove_from_address_book_registry`.
35
+ 4. Verify — `get_address_book_registry` with the same filters.
36
+
37
+ ## Validation rules enforced
38
+
39
+ - Query fields must match schema (`is_contract` only `"0"` or `"1"` when provided).
40
+ - `chainType` and `address` are required for add/remove.
41
+ - `chainType` is normalized to lowercase. Addresses are normalized per chain type before POST.
42
+
43
+ ## Signing behavior
44
+
45
+ `add_to_address_book_registry` and `remove_from_address_book_registry` sign and submit internally. Clients pass business arguments only; do not orchestrate signing manually.
46
+
47
+ Successful responses may include `selectedSigningKey` (the Ed25519 key used) and `signingMessage` (canonical JSON that was signed).
48
+
49
+ ## Client guidance
50
+
51
+ - Fetch registry state before add/remove to avoid duplicate entries or stale assumptions.
52
+ - Pass concrete `chainType` and `address` values from user selection or prior GET responses.
53
+ - Load `management-signer.md` if signed operations fail due to missing or unavailable local keys.
@@ -0,0 +1,59 @@
1
+ # Chain Registry
2
+
3
+ This document covers the chain (network) configuration registry managed through this server.
4
+
5
+ ## Purpose
6
+
7
+ The chain registry stores RPC endpoints, block explorers, and gas/fee defaults for EVM-compatible chains. The node uses these entries when resolving chain context for signing and transaction workflows.
8
+
9
+ Read operations are unsigned GETs. Add and remove operations sign and POST internally with Ed25519 management signing.
10
+
11
+ ## MCP tools
12
+
13
+ - `get_chain_registry`
14
+ - Get chain registry entries.
15
+ - Optional query: `chain_id`, `chainName` (case-insensitive name filter — preferred over guessing IDs).
16
+ - Call with no args to list all configured chains.
17
+ - Returns `chains` (array of chain configuration records).
18
+ - `add_to_chain_registry`
19
+ - Add chain details to the chain registry.
20
+ - Input: `chainName`, `chainId`, `rpcGateway`; optional `explorer`, `legacy`, `testnet`, gas/fee fields (see below).
21
+ - Signs and POSTs to `/postChainDetails`.
22
+ - Returns `message`, `selectedSigningKey`, and `signingMessage`.
23
+ - `remove_from_chain_registry`
24
+ - Remove chain details from the chain registry.
25
+ - Input: `chainId`.
26
+ - Signs and POSTs to `/removeChainDetails`.
27
+ - Returns `message`, `selectedSigningKey`, and `signingMessage`.
28
+
29
+ SDK-only helpers (`buildAddToChainRegistry`, `buildRemoveFromChainRegistry`, `resolveChainRegistryEntry`) are **not** registered as MCP tools.
30
+
31
+ ## Chain registry flow
32
+
33
+ 1. (Optional) set preferred signer — `set_preferred_management_signer`.
34
+ 2. List configured chains — `get_chain_registry` (optionally filter by `chain_id`).
35
+ 3. Add chain — `add_to_chain_registry` with required fields:
36
+ - `chainName`, `chainId`, `rpcGateway`
37
+ - optional: `explorer`, `legacy` (default `false`), `testnet` (default `false`)
38
+ - optional gas/fee tuning: `gasName`, `gasLimit`, `baseFee`, `priorityFee`, `baseFeeMultiplier` (min 100), `gasMultiplier`, `gasPrice`, `defaultGetSigFeeSpeed` (`slow`, `normal`, or `fast`)
39
+ 4. Remove chain — `remove_from_chain_registry` with `chainId`.
40
+ 5. Verify — `get_chain_registry`.
41
+
42
+ ## Validation rules enforced
43
+
44
+ - `chainName`, `chainId`, and `rpcGateway` are required on add.
45
+ - `chainId` must be a non-empty string or non-negative integer on add/remove.
46
+ - `baseFeeMultiplier`, when provided, must be ≥ 100.
47
+
48
+ ## Signing behavior
49
+
50
+ `add_to_chain_registry` and `remove_from_chain_registry` sign and submit internally. Clients pass business arguments only; do not orchestrate signing manually.
51
+
52
+ Successful responses may include `selectedSigningKey` (the Ed25519 key used) and `signingMessage` (canonical JSON that was signed).
53
+
54
+ ## Client guidance
55
+
56
+ - Fetch registry state before add/remove to avoid duplicate entries or stale assumptions.
57
+ - Pass concrete `chainId` and RPC values from user selection or prior GET responses.
58
+ - Configure chain registry entries before token or signing workflows that depend on RPC/gas defaults.
59
+ - Load `management-signer.md` if signed operations fail due to missing or unavailable local keys.
@@ -0,0 +1,63 @@
1
+ # Token Registry
2
+
3
+ This document covers the saved token registry managed through this server.
4
+
5
+ ## Purpose
6
+
7
+ The token registry stores saved token contract metadata (ERC-20, ERC-721, and Continuum token types) keyed by chain type and chain ID. The node uses these entries in MPC signing workflows.
8
+
9
+ Read operations are unsigned GETs. Add and remove operations sign and POST internally with Ed25519 management signing.
10
+
11
+ ## MCP tools
12
+
13
+ - `get_token_registry`
14
+ - Get token registry entries.
15
+ - Optional query: `chainType`, `chain_id`, `symbol` (case-insensitive symbol filter).
16
+ - Returns token lists keyed by chain type (array of token records).
17
+ - `add_to_token_registry`
18
+ - Add a token to the token registry.
19
+ - Input: `chainType`, `chainId`, `tokenType`, `contract`; optional `transferSig`, `transferNames`.
20
+ - Signs and POSTs to `/addToken`.
21
+ - Returns `message`, `selectedSigningKey`, and `signingMessage`.
22
+ - `remove_from_token_registry`
23
+ - Remove a token from the token registry.
24
+ - Input: `chainType`, `chainId`, `tokenType`, `contractAddress`; optional `tokenId`.
25
+ - Signs and POSTs to `/removeToken`.
26
+ - Returns `message`, `selectedSigningKey`, and `signingMessage`.
27
+
28
+ SDK-only helpers (`buildAddToTokenRegistry`, `buildRemoveFromTokenRegistry`) are **not** registered as MCP tools.
29
+
30
+ ## Token registry flow
31
+
32
+ 1. (Optional) set preferred signer — `set_preferred_management_signer`.
33
+ 2. List current tokens — `get_token_registry` (optionally filter by `chainType` / `chain_id`).
34
+ 3. Add token — `add_to_token_registry` with:
35
+ - `chainType` — use `ethereum` for EVM tokens (ERC-20, ERC-721, etc.); the MCP tool maps `evm` to `ethereum` before POST
36
+ - `chainId` — string or non-negative integer
37
+ - `tokenType` — `ERC20`, `ERC721`, `CTMERC20`, or `CTMRWA1`
38
+ - `contract` — at minimum `contractAddress`; optional `name`, `symbol`, `symbolURL`, `decimals`, `tokenURI`, `tokenId`, and passthrough fields
39
+ - optional `transferSig`, `transferNames`
40
+ 4. Remove token — `remove_from_token_registry` with matching `chainType`, `chainId`, `tokenType`, and `contractAddress`.
41
+ 5. Verify — `get_token_registry`.
42
+
43
+ ## Validation rules enforced
44
+
45
+ - `tokenType` must be one of: `ERC20`, `ERC721`, `CTMERC20`, `CTMRWA1`.
46
+ - `contract.contractAddress` is required on add.
47
+ - On remove, `tokenId` is **required** when `tokenType` is `ERC721`.
48
+ - The MCP `add_to_token_registry` / `remove_from_token_registry` tools map `chainType` `evm` to `ethereum` before calling the node.
49
+ - Ethereum contract addresses are normalized to lowercase `0x…` form when `chainType` is `ethereum`.
50
+
51
+ ## Signing behavior
52
+
53
+ `add_to_token_registry` and `remove_from_token_registry` sign and submit internally. Clients pass business arguments only; do not orchestrate signing manually.
54
+
55
+ Successful responses may include `selectedSigningKey` (the Ed25519 key used) and `signingMessage` (canonical JSON that was signed).
56
+
57
+ ## Client guidance
58
+
59
+ - Fetch registry state before add/remove to avoid duplicate entries or stale assumptions.
60
+ - Pass concrete `chainType`, `chainId`, and contract values from user selection or prior GET responses.
61
+ - For ERC-721 tokens, always include `tokenId` on remove (and in `contract` on add when applicable).
62
+ - Configure chain registry entries (`registry/networks.md`) before workflows that depend on chain configuration.
63
+ - Load `management-signer.md` if signed operations fail due to missing or unavailable local keys.