@continuumdao/ctm-mpc-defi 0.2.60 → 0.2.62
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/agent/catalog.cjs +67 -17
- package/dist/agent/catalog.cjs.map +1 -1
- package/dist/agent/catalog.d.ts +134 -7
- package/dist/agent/catalog.js +66 -18
- package/dist/agent/catalog.js.map +1 -1
- package/dist/agent/skills/railgun/SKILL.md +14 -5
- package/dist/protocols/evm/railgun/index.cjs +1341 -167
- package/dist/protocols/evm/railgun/index.cjs.map +1 -1
- package/dist/protocols/evm/railgun/index.d.ts +139 -4
- package/dist/protocols/evm/railgun/index.js +1317 -170
- package/dist/protocols/evm/railgun/index.js.map +1 -1
- package/package.json +4 -2
package/dist/agent/catalog.cjs
CHANGED
|
@@ -4600,7 +4600,8 @@ var mcpRailgunFetchPrivateBalancesOutputSchema = zod.z.object({
|
|
|
4600
4600
|
scanned: zod.z.boolean(),
|
|
4601
4601
|
scanStatus: zod.z.enum(["scanning", "ready", "empty", "error", "unscanned"]),
|
|
4602
4602
|
balances: zod.z.array(mcpRailgunPrivateBalanceSchema),
|
|
4603
|
-
notes: zod.z.string()
|
|
4603
|
+
notes: zod.z.string(),
|
|
4604
|
+
shieldSignature: zod.z.string().optional()
|
|
4604
4605
|
}).strict();
|
|
4605
4606
|
var mcpRailgunEnsureWalletInputSchema = zod.z.object({
|
|
4606
4607
|
keyGenId: zod.z.string().min(1),
|
|
@@ -4608,40 +4609,66 @@ var mcpRailgunEnsureWalletInputSchema = zod.z.object({
|
|
|
4608
4609
|
}).strict();
|
|
4609
4610
|
var mcpRailgunEnsureWalletOutputSchema = zod.z.object({
|
|
4610
4611
|
railgunAddress: zod.z.string(),
|
|
4611
|
-
created: zod.z.boolean()
|
|
4612
|
+
created: zod.z.boolean(),
|
|
4613
|
+
shieldSignature: zod.z.string().optional()
|
|
4612
4614
|
}).strict();
|
|
4613
4615
|
var mcpRailgunShieldInputSchema = mcpMultisignInput({
|
|
4614
4616
|
tokenAddress: evmAddressSchema.describe("ERC-20 contract to shield"),
|
|
4615
4617
|
amountWei: zod.z.string().min(1).describe("Amount in wei"),
|
|
4616
4618
|
railgunAddress: zod.z.string().min(1).describe("Recipient 0zk address"),
|
|
4617
|
-
shieldSignature: zod.z.string().min(1).optional().describe("
|
|
4619
|
+
shieldSignature: zod.z.string().min(1).optional().describe("Stored Railgun shield key. Omit this. The server reads it from the KeyGen.")
|
|
4618
4620
|
});
|
|
4619
4621
|
var mcpRailgunPrivateTransferInputSchema = zod.z.object({
|
|
4620
4622
|
keyGenId: zod.z.string().min(1),
|
|
4621
4623
|
chainId: agentEvmChainIdSchema,
|
|
4622
4624
|
tokenAddress: evmAddressSchema,
|
|
4623
4625
|
amountWei: zod.z.string().min(1),
|
|
4624
|
-
recipientAddress: zod.z.string().min(1).describe("Recipient 0zk address"),
|
|
4625
|
-
|
|
4626
|
+
recipientAddress: zod.z.string().min(1).optional().describe("Recipient 0zk address. Omit when toContactName is set."),
|
|
4627
|
+
toContactName: zod.z.string().min(1).optional().describe("Address-book contact name. Uses that contact\u2019s saved 0zk address, not their Ethereum address."),
|
|
4628
|
+
memoText: zod.z.string().optional(),
|
|
4629
|
+
purpose: zod.z.string().max(256).optional().describe("Purpose shown on Join, Execute, and History. Same field as a normal sign request.")
|
|
4626
4630
|
}).strict();
|
|
4627
4631
|
var mcpRailgunUnshieldInputSchema = zod.z.object({
|
|
4628
4632
|
keyGenId: zod.z.string().min(1),
|
|
4629
4633
|
chainId: agentEvmChainIdSchema,
|
|
4630
4634
|
tokenAddress: evmAddressSchema,
|
|
4631
4635
|
amountWei: zod.z.string().min(1),
|
|
4632
|
-
recipientAddress: evmAddressSchema.optional().describe("Public recipient. Defaults to this KeyGen Ethereum address.")
|
|
4636
|
+
recipientAddress: evmAddressSchema.optional().describe("Public recipient. Defaults to this KeyGen Ethereum address."),
|
|
4637
|
+
purpose: zod.z.string().max(256).optional().describe("Purpose shown on Join, Execute, and History. Same field as a normal sign request.")
|
|
4633
4638
|
}).strict();
|
|
4634
4639
|
var mcpRailgunAgreeSpendInputSchema = zod.z.object({
|
|
4635
4640
|
keyGenId: zod.z.string().min(1),
|
|
4636
|
-
spendId: zod.z.string().min(1)
|
|
4641
|
+
spendId: zod.z.string().min(1),
|
|
4642
|
+
thoughts: zod.z.string().max(256).optional().describe("Optional comment stored for this node, the same thoughts field as sign_request_agree.")
|
|
4643
|
+
}).strict();
|
|
4644
|
+
var mcpRailgunFeeQuoteInputSchema = zod.z.object({
|
|
4645
|
+
keyGenId: zod.z.string().min(1),
|
|
4646
|
+
chainId: agentEvmChainIdSchema,
|
|
4647
|
+
kind: zod.z.enum(["shield", "transfer", "unshield"]),
|
|
4648
|
+
tokenAddress: evmAddressSchema,
|
|
4649
|
+
amountWei: zod.z.string().min(1).describe("Amount in wei. Use 0 to read the percentage and broadcaster fee before an amount is chosen."),
|
|
4650
|
+
recipientAddress: zod.z.string().optional().describe("0zk address for a private transfer, or a public address for an unshield."),
|
|
4651
|
+
memoText: zod.z.string().optional()
|
|
4652
|
+
}).strict();
|
|
4653
|
+
var mcpRailgunFeeQuoteSchema = zod.z.object({
|
|
4654
|
+
kind: zod.z.enum(["shield", "transfer", "unshield"]),
|
|
4655
|
+
amountWei: zod.z.string(),
|
|
4656
|
+
protocolFeeBasisPoints: zod.z.string(),
|
|
4657
|
+
protocolFeeWei: zod.z.string(),
|
|
4658
|
+
receivedWei: zod.z.string(),
|
|
4659
|
+
broadcasterFeeWei: zod.z.string(),
|
|
4660
|
+
broadcasterTokenAddress: zod.z.string(),
|
|
4661
|
+
totalDebitWei: zod.z.string(),
|
|
4662
|
+
broadcasterError: zod.z.string().optional()
|
|
4637
4663
|
}).strict();
|
|
4638
4664
|
var mcpRailgunPrivateActionOutputSchema = zod.z.object({
|
|
4639
|
-
status: zod.z.enum(["pending", "
|
|
4665
|
+
status: zod.z.enum(["pending", "ready", "executing", "executed", "failed"]),
|
|
4640
4666
|
spendId: zod.z.string(),
|
|
4641
4667
|
approvals: zod.z.number().int().nonnegative(),
|
|
4642
4668
|
quorum: zod.z.number().int().positive(),
|
|
4643
4669
|
txHash: zod.z.string().optional(),
|
|
4644
|
-
error: zod.z.string().optional()
|
|
4670
|
+
error: zod.z.string().optional(),
|
|
4671
|
+
fee: mcpRailgunFeeQuoteSchema.optional()
|
|
4645
4672
|
}).strict();
|
|
4646
4673
|
var mcpSkyFetchSusdsRateInputSchema = zod.z.object({
|
|
4647
4674
|
rpcUrl: zod.z.string().min(1).optional().describe("Server-filled from chain registry. Agents should omit.")
|
|
@@ -8006,7 +8033,7 @@ var MCP_PROTOCOL_TOOL_DEFINITIONS = [
|
|
|
8006
8033
|
actionId: "railgun.shield",
|
|
8007
8034
|
protocolId: "railgun",
|
|
8008
8035
|
chainCategory: "evm",
|
|
8009
|
-
description: "Shield an ERC-20 into a Railgun 0zk address.
|
|
8036
|
+
description: "Shield an ERC-20 into a Railgun 0zk address. Call ctm_railgun_fee_quote first and tell the user the Railgun fee taken from the amount. purposeText is the Purpose shown on the sign request. If this KeyGen already has a shield key, this builds the approve-and-shield transaction. Otherwise it returns a personal_sign. After that request is signed, the shield key is stored on the KeyGen. Call this tool again without shieldSignature. The result includes railgunFee.",
|
|
8010
8037
|
prerequisites: ["keyGen", "executorAddress", "RPC URL", "0zk recipient"],
|
|
8011
8038
|
handler: { importPath: "protocols/evm/railgun", exportName: "buildEvmMultisignBodyRailgunShield" },
|
|
8012
8039
|
inputZod: mcpRailgunShieldInputSchema
|
|
@@ -11058,7 +11085,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
11058
11085
|
actionId: "railgun.ensure-wallet",
|
|
11059
11086
|
protocolId: "railgun",
|
|
11060
11087
|
chainCategory: "evm",
|
|
11061
|
-
description: "Create the Railgun wallet on this KeyGen if it does not exist yet, and return its 0zk address. The spending key is split across the KeyGen nodes. No node receives a key it can spend alone. Does not return a mnemonic. Use this from the node agent and from Telegram before shield, unshield, or private transfer.",
|
|
11088
|
+
description: "Create the Railgun wallet on this KeyGen if it does not exist yet, and return its 0zk address. Returns shieldSignature when this KeyGen already has a shield key. The spending key is split across the KeyGen nodes. No node receives a key it can spend alone. Does not return a mnemonic. Use this from the node agent and from Telegram before shield, unshield, or private transfer.",
|
|
11062
11089
|
prerequisites: ["keyGenId"],
|
|
11063
11090
|
followUp: ["ctm_railgun_fetch_private_balances", "ctm_railgun_build_shield_multisign"],
|
|
11064
11091
|
handler: { importPath: "protocols/evm/railgun", exportName: "railgunFetchPrivateBalancesSummary" },
|
|
@@ -11070,7 +11097,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
11070
11097
|
actionId: "railgun.fetch-private-balances",
|
|
11071
11098
|
protocolId: "railgun",
|
|
11072
11099
|
chainCategory: "evm",
|
|
11073
|
-
description: "Shielded balances stored on the KeyGen record for this chain. Scans on the node when no scan is stored, or when refresh is true, then writes the result back to the KeyGen. Does not return a mnemonic or viewing key. Works from the node agent and from Telegram.",
|
|
11100
|
+
description: "Shielded balances stored on the KeyGen record for this chain. Returns shieldSignature when this KeyGen already has a shield key. Scans on the node when no scan is stored, or when refresh is true, then writes the result back to the KeyGen. Does not return a mnemonic or viewing key. Works from the node agent and from Telegram.",
|
|
11074
11101
|
prerequisites: ["keyGenId", "chainId", "ctm_railgun_ensure_wallet"],
|
|
11075
11102
|
followUp: ["ctm_railgun_private_transfer", "ctm_railgun_unshield"],
|
|
11076
11103
|
handler: { importPath: "protocols/evm/railgun", exportName: "railgunFetchPrivateBalancesSummary" },
|
|
@@ -11082,8 +11109,8 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
11082
11109
|
actionId: "railgun.private-transfer",
|
|
11083
11110
|
protocolId: "railgun",
|
|
11084
11111
|
chainCategory: "evm",
|
|
11085
|
-
description: "
|
|
11086
|
-
prerequisites: ["keyGenId", "chainId", "0zk recipient", "ctm_railgun_ensure_wallet"],
|
|
11112
|
+
description: "Propose a private Railgun transfer. This node signs it with its management key, then agrees its share. Call ctm_railgun_fee_quote first and tell the user the broadcaster fee. Pass toContactName to use that contact\u2019s saved 0zk address, or recipientAddress as a 0zk address. Do not pass the contact\u2019s Ethereum address. purpose is shown on Join the same way as a normal sign request. The other nodes accept on Join and can attach thoughts. The originator executes with broadcast_sign_result and the RailgunSpend request id. There is no Get Sig. Do not pass a mnemonic. The result includes fee.",
|
|
11113
|
+
prerequisites: ["keyGenId", "chainId", "0zk recipient or toContactName", "ctm_railgun_ensure_wallet"],
|
|
11087
11114
|
followUp: ["ctm_railgun_fetch_private_balances"],
|
|
11088
11115
|
handler: { importPath: "protocols/evm/railgun", exportName: "railgunPrivateTransfer" },
|
|
11089
11116
|
inputZod: mcpRailgunPrivateTransferInputSchema,
|
|
@@ -11094,7 +11121,7 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
11094
11121
|
actionId: "railgun.unshield",
|
|
11095
11122
|
protocolId: "railgun",
|
|
11096
11123
|
chainCategory: "evm",
|
|
11097
|
-
description: "Start an unshield to a public address. It stays pending until the
|
|
11124
|
+
description: "Start an unshield to a public address. This node signs it with its management key, then agrees its share. Call ctm_railgun_fee_quote first and tell the user the Railgun fee and the broadcaster fee. purpose is shown on Join the same way as a normal sign request. It stays pending until the other nodes accept on Join. They can attach thoughts with sign_request_agree. Recipient defaults to the KeyGen Ethereum address. The originator executes with broadcast_sign_result. There is no Get Sig. Do not pass a mnemonic. The result includes fee.",
|
|
11098
11125
|
prerequisites: ["keyGenId", "chainId", "ctm_railgun_ensure_wallet"],
|
|
11099
11126
|
followUp: ["ctm_railgun_fetch_private_balances"],
|
|
11100
11127
|
handler: { importPath: "protocols/evm/railgun", exportName: "railgunUnshield" },
|
|
@@ -11106,12 +11133,24 @@ var CORE_MCP_TOOL_DEFINITIONS = [
|
|
|
11106
11133
|
actionId: "railgun.agree-spend",
|
|
11107
11134
|
protocolId: "railgun",
|
|
11108
11135
|
chainCategory: "evm",
|
|
11109
|
-
description: "Agree this node\u2019s Railgun spending share for a pending spendId. Read the pending spend
|
|
11136
|
+
description: "Agree this node\u2019s Railgun spending share for a pending spendId. thoughts is optional and is stored on the spend, the same way as sign_request_agree. Read the pending spend, including its purpose, before agreeing. One share cannot spend the 0zk wallet.",
|
|
11110
11137
|
prerequisites: ["keyGenId", "spendId"],
|
|
11111
11138
|
followUp: ["ctm_railgun_fetch_private_balances"],
|
|
11112
11139
|
handler: { importPath: "protocols/evm/railgun", exportName: "railgunFetchPrivateBalancesSummary" },
|
|
11113
11140
|
inputZod: mcpRailgunAgreeSpendInputSchema,
|
|
11114
11141
|
outputZod: mcpRailgunPrivateActionOutputSchema
|
|
11142
|
+
}),
|
|
11143
|
+
defineMcpTool({
|
|
11144
|
+
name: "ctm_railgun_fee_quote",
|
|
11145
|
+
actionId: "railgun.fee-quote",
|
|
11146
|
+
protocolId: "railgun",
|
|
11147
|
+
chainCategory: "evm",
|
|
11148
|
+
description: "Quote the fee taken before a shield, private transfer, or unshield. Shield and unshield include the live Railgun basis points taken from the amount. Private transfer has no protocol fee. Unshield and private transfer also include the broadcaster fee, which is extra and comes out of the private balance. Tell the user these amounts before calling the shield, transfer, or unshield tool. broadcasterError is set when that fee cannot be estimated; the protocol numbers are still returned.",
|
|
11149
|
+
prerequisites: ["keyGenId", "chainId", "tokenAddress", "kind"],
|
|
11150
|
+
followUp: ["ctm_railgun_build_shield_multisign", "ctm_railgun_private_transfer", "ctm_railgun_unshield"],
|
|
11151
|
+
handler: { importPath: "protocols/evm/railgun", exportName: "railgunFetchPrivateBalancesSummary" },
|
|
11152
|
+
inputZod: mcpRailgunFeeQuoteInputSchema,
|
|
11153
|
+
outputZod: mcpRailgunFeeQuoteSchema
|
|
11115
11154
|
})
|
|
11116
11155
|
];
|
|
11117
11156
|
var MCP_TOOL_DEFINITIONS = [
|
|
@@ -11426,7 +11465,16 @@ var railgunProtocolModule = {
|
|
|
11426
11465
|
params: {
|
|
11427
11466
|
tokenAddress: { type: "string", required: true, description: "Shielded ERC-20" },
|
|
11428
11467
|
amountWei: { type: "string", required: true, description: "Amount in wei" },
|
|
11429
|
-
recipientAddress: {
|
|
11468
|
+
recipientAddress: {
|
|
11469
|
+
type: "string",
|
|
11470
|
+
required: false,
|
|
11471
|
+
description: "Recipient 0zk address. Omit when toContactName is set."
|
|
11472
|
+
},
|
|
11473
|
+
toContactName: {
|
|
11474
|
+
type: "string",
|
|
11475
|
+
required: false,
|
|
11476
|
+
description: "Address-book contact name. Uses that contact\u2019s saved 0zk address, not their Ethereum address."
|
|
11477
|
+
}
|
|
11430
11478
|
}
|
|
11431
11479
|
},
|
|
11432
11480
|
{
|
|
@@ -15828,6 +15876,8 @@ exports.mcpPredictionMarketRowSchema = mcpPredictionMarketRowSchema;
|
|
|
15828
15876
|
exports.mcpRailgunAgreeSpendInputSchema = mcpRailgunAgreeSpendInputSchema;
|
|
15829
15877
|
exports.mcpRailgunEnsureWalletInputSchema = mcpRailgunEnsureWalletInputSchema;
|
|
15830
15878
|
exports.mcpRailgunEnsureWalletOutputSchema = mcpRailgunEnsureWalletOutputSchema;
|
|
15879
|
+
exports.mcpRailgunFeeQuoteInputSchema = mcpRailgunFeeQuoteInputSchema;
|
|
15880
|
+
exports.mcpRailgunFeeQuoteSchema = mcpRailgunFeeQuoteSchema;
|
|
15831
15881
|
exports.mcpRailgunFetchPopularAssetsInputSchema = mcpRailgunFetchPopularAssetsInputSchema;
|
|
15832
15882
|
exports.mcpRailgunFetchPopularAssetsOutputSchema = mcpRailgunFetchPopularAssetsOutputSchema;
|
|
15833
15883
|
exports.mcpRailgunFetchPrivateBalancesInputSchema = mcpRailgunFetchPrivateBalancesInputSchema;
|