@continuumdao/ctm-mpc-defi 0.2.16 → 0.2.17

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.
@@ -14,7 +14,10 @@ Before creating, call `get_multi_sign_gas_options({ chainId })` when gas prefere
14
14
 
15
15
  ### After submit (`{ requestId }`)
16
16
 
17
- 1. `wait_for_sign_request_ready` (if needed)
18
- 2. `sign_request_agree` (multi-agree)
19
- 3. `trigger_sign_result`
20
- 4. `broadcast_sign_result`
17
+ Stop here unless the user asks to continue. **Do not** call `wait_for_sign_request_ready` — Join agreement (`sign_request_agree` on peers) may take **days**.
18
+
19
+ When proceeding (user request or workflow, after quorum):
20
+
21
+ 1. `sign_request_agree` (multi-party Join)
22
+ 2. `trigger_sign_result` (originator Get Sig)
23
+ 3. `broadcast_sign_result`
@@ -0,0 +1,63 @@
1
+ ---
2
+ name: circle-cctp
3
+ description: Circle CCTP V2 cross-chain native USDC via Forwarding Service and Continuum MPC multisign.
4
+ ---
5
+
6
+ # Circle CCTP (MCP)
7
+
8
+ Cross-chain **native USDC** via Circle **CCTP V2** and the **Forwarding Service**. The MPC wallet signs **one source-chain batch** (`USDC.approve` + `TokenMessengerV2.depositForBurnWithHook` with `cctp-forward` hook data). Circle attests and submits the **destination mint** — no second sign request, no destination native gas from the KeyGen address.
9
+
10
+ ## Before any transfer
11
+
12
+ 1. `load_defi_protocol({ protocolId: "circle-cctp" })`
13
+ 2. `get_defi_protocol_skill`
14
+ 3. `get_chain_registry` — source chain needs `rpcGateway`
15
+ 4. `get_token_registry` — locate USDC on source chain
16
+
17
+ ## Tool flow
18
+
19
+ | Step | Tool | Creates sign request? |
20
+ |------|------|------------------------|
21
+ | 1. Routes | `ctm_cctp_fetch_supported_routes` | No |
22
+ | 2. Fees | `ctm_cctp_fetch_burn_fees` | No — **required before build** |
23
+ | 3. Balance | `ctm_cctp_fetch_usdc_balance` | No — pre-check USDC ≥ transfer + maxFee |
24
+ | 4. Submit | `ctm_cctp_build_burn_multisign` | Yes → `{ requestId, fees }` |
25
+ | 5. (optional) Status | `ctm_cctp_fetch_transfer_status` | No — after source burn Execute |
26
+
27
+ After `{ requestId }`: `sign_request_agree` → `trigger_sign_result` → `broadcast_sign_result`. **Do not** retry build on success. Fees refresh again at **trigger** on the node app.
28
+
29
+ ## `ctm_cctp_fetch_burn_fees`
30
+
31
+ | Field | Required | Notes |
32
+ |-------|----------|-------|
33
+ | `sourceChainId` | yes | EIP-155 id where burn executes |
34
+ | `destChainId` | yes | EIP-155 destination (mint chain) |
35
+ | `transferAmountHuman` | no | USDC recipient receives (6 decimals); include for `totalBurn` / `totalBurnHuman` |
36
+ | `feeTier` | no | `low` \| `med` (default) \| `high` |
37
+
38
+ Returns `fees` object plus top-level fee fields: `maxFeeHuman`, `forwardFeeLowHuman` / `Med` / `High`, optional `totalBurnHuman`, and `feeSummary`. Pass the full output as `feeSnapshot` to build and balance tools.
39
+
40
+ ## `ctm_cctp_fetch_usdc_balance`
41
+
42
+ Optional `transferAmountHuman` + `feeSnapshot` (from fetch_burn_fees) returns `requiredTotalBurnHuman`, `sufficientForTransfer`, and `feeSummary`.
43
+
44
+ ## `ctm_cctp_build_burn_multisign`
45
+
46
+ | Field | Required | Notes |
47
+ |-------|----------|-------|
48
+ | `keyGenId` | yes | MPC KeyGen |
49
+ | `chainId` | yes | **Source** chain (same as fee quote) |
50
+ | `destChainId` | yes | Destination chain |
51
+ | `purposeText` | yes | Human-readable purpose |
52
+ | `transferAmountHuman` | yes | Same as fee quote |
53
+ | `mintRecipient` | no | Destination address; default executor |
54
+ | `feeSnapshot` | no | Pass `ctm_cctp_fetch_burn_fees` output |
55
+ | `useCustomGas` | no | Chain registry custom gas |
56
+
57
+ Returns `{ requestId, fees }` — `fees` echoes the proposed Forwarding Service max fee and total burn.
58
+
59
+ ## Important
60
+
61
+ - **chainId** on build = **source** chain, not destination.
62
+ - Manual `receiveMessage` on destination is **out of scope** — Forwarding Service only.
63
+ - Solana/non-EVM recipients: follow Circle docs for `mintRecipient` encoding; UI v1 is EVM-only.