@cnvlabskoxyz/celina-mcp 1.0.1 → 1.0.2
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/build/server/instructions.js +1 -1
- package/build/server/version.d.ts +1 -1
- package/build/server/version.js +1 -1
- package/build/services/staking-write.service.d.ts +4 -1
- package/build/services/staking-write.service.js +2 -2
- package/build/services/staking-write.service.js.map +1 -1
- package/build/tools/create-runtime.js +1 -1
- package/package.json +2 -2
|
@@ -13,7 +13,7 @@ Guidelines:
|
|
|
13
13
|
- Celo Accounts: get_celo_account_registration before locking CELO. Unregistered addresses must call execute_register_celo_account or prepare_register_celo_account first.
|
|
14
14
|
- Governance writes: execute_lock_celo, execute_unlock_celo, execute_relock_celo, execute_withdraw_celo, execute_upvote, execute_vote, execute_dequeue_proposals_if_ready, execute_revoke_governance_votes, execute_revoke_governance_upvote (humanness-gated). Discover: get_queued_proposals (Queue), get_votable_proposals (Referendum), or get_actionable_governance_proposals (both). When get_queued_proposals / get_actionable_governance_proposals report dequeueReady=true, do not upvote proposals with upvoteable=false — call execute_dequeue_proposals_if_ready first (moves them to Approval); vote later in Referendum. Read CGP content with get_proposal_details(proposal_id) before or after acting. Queue flow: get_queued_proposals -> (if dequeueReady: execute_dequeue_proposals_if_ready) else execute_upvote -> get_governance_votes. Referendum flow: get_votable_proposals -> execute_vote -> get_governance_votes. Revoke referendum votes is bulk-only (clears all active referendum votes). Revoke upvote: execute_revoke_governance_upvote. To change a referendum vote, use execute_vote again instead of revoke.
|
|
15
15
|
- Staking writes: get_stake_eligibility before execute_stake (checks Election.canReceiveVotes, locked balance, account registration). If canStake is false, read reasons — do not execute (common failure: "Group cannot receive votes" when a group like cLabs is at capacity; pick another group via get_validator_groups). execute_stake, execute_activate_stake, execute_unstake, execute_delegate_power, execute_undelegate_power (humanness-gated).
|
|
16
|
-
- Governance delegation (LockedGold voting power, not validator staking): when the user asks who to delegate to, call get_governance_delegates — do not web-scrape Celo Mondo. Pick a delegatee address from results, then get_delegation_info and get_locked_celo_balance, then execute_delegate_power with delegatee and percent (1–100). Any address can receive delegation; the Mondo list is curated off-chain.
|
|
16
|
+
- Governance delegation (LockedGold voting power, not validator staking): when the user asks who to delegate to, call get_governance_delegates — do not web-scrape Celo Mondo. Pick a delegatee address from results, then get_delegation_info and get_locked_celo_balance, then execute_delegate_power with delegatee and percent (1–100). Any address can receive delegation; the Mondo list is curated off-chain. To remove one delegatee, call execute_undelegate_power with all: true and omit percent. percent is percentage points of total voting power to subtract and cannot exceed that delegatee's fractionPercent from get_delegation_info. 100 only works when that delegatee holds 100%. One delegatee per call; another share is a second call.
|
|
17
17
|
- GoodDollar wallet-link: get_gooddollar_face_verification_link (first-time verify this signer wallet; omit callback_url — defaults to https://usecelina.xyz/gooddollar/verify/callback; do not ask the user for a callback URL), execute_connect_gooddollar_identity (link a secondary wallet to an existing verified root), execute_disconnect_gooddollar_identity. Connect requires CELO_PRIVATE_KEY to be the whitelisted GoodDollar root; pass the wallet to link as connected_account. If already verified on wallet A and MCP signer is wallet B, do not face-verify B — switch CELO_PRIVATE_KEY to wallet A and connect B.
|
|
18
18
|
- Session wallet (local stdio with CELO_PRIVATE_KEY): call get_wallet_address when you need the signer address as data. For "my" balances and reads, omit address / wallet_address / from on wallet-scoped tools — they default to the configured signer. Never derive addresses from shell commands or read .env. On hosted read-only (no key), pass explicit addresses.
|
|
19
19
|
- Dual wallets (CELO_PRIVATE_KEY + SELF_AGENT_PRIVATE_KEY): these are two independently keyed wallets. Pass signer: "celo" | "self_agent" on any tool that accepts it (send_token, estimate_send, execute_register_celo_account, governance/staking executes, GoodDollar connect/disconnect) to choose which one acts. Call get_wallet_address with no signer to see both addresses at once (wallets.celo / wallets.self_agent); pass signer explicitly to look up one side.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CELINA_MCP_VERSION = "1.0.
|
|
1
|
+
export declare const CELINA_MCP_VERSION = "1.0.2";
|
package/build/server/version.js
CHANGED
|
@@ -38,7 +38,10 @@ export declare class StakingWriteService {
|
|
|
38
38
|
from: `0x${string}`;
|
|
39
39
|
humanness: import("@cnvlabskoxyz/celina-sdk").HumannessCheckResult;
|
|
40
40
|
}>;
|
|
41
|
-
undelegatePower(delegatee: `0x${string}`,
|
|
41
|
+
undelegatePower(delegatee: `0x${string}`, request: {
|
|
42
|
+
percent?: number;
|
|
43
|
+
all?: boolean;
|
|
44
|
+
}, signer?: SignerKind): Promise<{
|
|
42
45
|
stepHashes: `0x${string}`[];
|
|
43
46
|
hash: `0x${string}`;
|
|
44
47
|
status: "success" | "reverted";
|
|
@@ -35,8 +35,8 @@ export class StakingWriteService {
|
|
|
35
35
|
delegatePower(delegatee, percent, signer) {
|
|
36
36
|
return this.executeHumannessGated(signer, (from) => this.sdk.staking.prepareDelegatePower(from, delegatee, percent));
|
|
37
37
|
}
|
|
38
|
-
undelegatePower(delegatee,
|
|
39
|
-
return this.executeHumannessGated(signer, (from) => this.sdk.staking.prepareUndelegatePower(from, delegatee,
|
|
38
|
+
undelegatePower(delegatee, request, signer) {
|
|
39
|
+
return this.executeHumannessGated(signer, (from) => this.sdk.staking.prepareUndelegatePower(from, delegatee, request));
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
42
|
//# sourceMappingURL=staking-write.service.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"staking-write.service.js","sourceRoot":"","sources":["../../src/services/staking-write.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIjE,MAAM,OAAO,mBAAmB;IAEX;IACA;IAFnB,YACmB,aAAgC,EAChC,GAAiB;QADjB,kBAAa,GAAb,aAAa,CAAmB;QAChC,QAAG,GAAH,GAAG,CAAc;IACjC,CAAC;IAEI,KAAK,CAAC,qBAAqB,CACjC,MAA8B,EAC9B,OAAqG;QAErG,MAAM,OAAO,GA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,YAAY,EAAE,MAAM,CAAC,CAC5D,CAAC;IACJ,CAAC;IAED,aAAa,CAAC,SAAwB,EAAE,OAAe,EAAE,MAAmB;QAC1E,OAAO,IAAI,CAAC,qBAAqB,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,EAAE,CACjD,IAAI,CAAC,GAAG,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,EAAE,SAAS,EAAE,OAAO,CAAC,CAChE,CAAC;IACJ,CAAC;IAED,eAAe,
|
|
1
|
+
{"version":3,"file":"staking-write.service.js","sourceRoot":"","sources":["../../src/services/staking-write.service.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,GAEhB,MAAM,0BAA0B,CAAC;AAElC,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AAIjE,MAAM,OAAO,mBAAmB;IAEX;IACA;IAFnB,YACmB,aAAgC,EAChC,GAAiB;QADjB,kBAAa,GAAb,aAAa,CAAmB;QAChC,QAAG,GAAH,GAAG,CAAc;IACjC,CAAC;IAEI,KAAK,CAAC,qBAAqB,CACjC,MAA8B,EAC9B,OAAqG;QAErG,MAAM,OAAO,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,MAAM,CAAC,CAAC;QACtD,MAAM,IAAI,GAAG,OAAO,CAAC,cAAc,CAAC;QACpC,IAAI,CAAC,IAAI,EAAE,CAAC;YACV,MAAM,IAAI,KAAK,CAAC,0CAA0C,CAAC,CAAC;QAC9D,CAAC;QAED,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,GAAG,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC;QAChE,eAAe,CAAC,SAAS,CAAC,CAAC;QAE3B,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;QACrC,MAAM,MAAM,GAAG,MAAM,mBAAmB,CAAC,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC,CAAC;QAErF,OA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AAC;IACJ,CAAC;CACF"}
|
|
@@ -76,7 +76,7 @@ export function createMcpRuntime(ctx) {
|
|
|
76
76
|
activateStake: (groupAddress, signer) => ctx.stakingWrite.activateStake(groupAddress, signer),
|
|
77
77
|
unstake: (groupAddress, amount, signer) => ctx.stakingWrite.unstake(groupAddress, amount, signer),
|
|
78
78
|
delegatePower: (delegatee, percent, signer) => ctx.stakingWrite.delegatePower(delegatee, percent, signer),
|
|
79
|
-
undelegatePower: (delegatee,
|
|
79
|
+
undelegatePower: (delegatee, request, signer) => ctx.stakingWrite.undelegatePower(delegatee, request, signer),
|
|
80
80
|
},
|
|
81
81
|
accountWrite: {
|
|
82
82
|
registerAccount: (signer) => ctx.accountWrite.registerAccount(signer),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cnvlabskoxyz/celina-mcp",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.2",
|
|
4
4
|
"description": "Celina — MCP server for Celo mainnet. Balances, transfers, DeFi, Self Agent ID, and chain reads for LLM agents.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "build/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"homepage": "https://github.com/andrewkimjoseph/celina-mcp#readme",
|
|
73
73
|
"dependencies": {
|
|
74
74
|
"@a2a-js/sdk": "^0.3.13",
|
|
75
|
-
"@cnvlabskoxyz/celina-sdk": "1.0.
|
|
75
|
+
"@cnvlabskoxyz/celina-sdk": "1.0.1",
|
|
76
76
|
"@modelcontextprotocol/sdk": "^1.22.0",
|
|
77
77
|
"dotenv": "^17.4.2",
|
|
78
78
|
"ox": "^0.11.3",
|