@continuumdao/ctm-mpc-defi 0.2.52 → 0.2.53

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.
@@ -77,7 +77,7 @@ Forum KeyGen sign-in is EIP-712 multi-sign (no EVM tx). The ticket is stored on
77
77
 
78
78
  1. `get_forum_session({ address })`. If `found` is true, `ctm_continuum_dao_forum_me({ ticket })`. If `loggedIn` is true, reuse that ticket. Do **not** compose a sign-in request.
79
79
  2. If there is no session or `loggedIn` is false: `ctm_continuum_dao_forum_sign_in_eligible({ address })` — current `balanceOfNFT` on an owned or attached veCTM vs `veCtmThresholdPower` (200 veCTM). Governor `getVotes` and month-start `balanceOfNFTAt` do not count. Read `votingPower`, `threshold`, and `tokenId` from the result. If `eligible` is false, stop. Do **not** compose a multi-sign request.
80
- 3. `ctm_continuum_dao_build_forum_sign_in_multisign` uses the same gate and refuses ineligible addresses so other nodes never enter the sign loop. Ask the operator for a custom username (2–16 letters, numbers, `.` `_` `-`) and pass `username`. A KeyGen may choose a username the same way a wallet does. If they decline, call again with `useNodeKeyUsername: true` and `nodeKey`; the forum assigns the first 16 characters of the node key. Do not invent a username and do not skip the question. After Execute, the node stores the ticket. Call `get_forum_session` again, then `forum_reply` / `forum_react` / `forum_create_topic` / `forum_create_idea`.
80
+ 3. `ctm_continuum_dao_build_forum_sign_in_multisign` uses the same gate and refuses ineligible addresses so other nodes never enter the sign loop. Always pass `nodeKey` from this node. A custom username does not omit it; `useNodeKeyUsername` only chooses the display name. Ask the operator for a custom username (2–16 letters, numbers, `.` `_` `-`) and pass `username` together with `nodeKey`. If they decline, call again with `useNodeKeyUsername: true` and the same `nodeKey`; the forum assigns the first 16 characters of the node key as the username. Do not invent a username and do not skip the question. After Execute, the node stores the ticket and the forum stores the verified node key on that user (new or existing), which is required for MPA Wallet Chat. Call `get_forum_session` again, then `forum_reply` / `forum_react` / `forum_create_topic` / `forum_create_idea`.
81
81
  4. `ctm_continuum_dao_forum_sign_out({ address, ticket })` deletes the node ticket (web chat and Telegram webhook turns share that row). `clear_forum_session({ address })` is the same delete. No multi-sign.
82
82
 
83
83
  Forum sign-in and sign-out are **agent/MCP only**. There is no Sign in / Sign out control in the node-app Compose header.
@@ -187,7 +187,8 @@ var init_constants = __esm({
187
187
  [exports.CONTINUUM_DAO_LINEA_CHAIN_ID]: {
188
188
  ...UNSET,
189
189
  ctm: exports.CTM_TOKEN_ADDRESS,
190
- votingEscrow: exports.VOTING_ESCROW_LINEA_ADDRESS
190
+ votingEscrow: exports.VOTING_ESCROW_LINEA_ADDRESS,
191
+ governor: exports.CONTINUUM_DAO_LINEA_GOVERNOR_ADDRESS
191
192
  },
192
193
  [exports.CONTINUUM_DAO_LINEA_SEPOLIA_CHAIN_ID]: { ...UNSET },
193
194
  [exports.CONTINUUM_DAO_ETHEREUM_CHAIN_ID]: {
@@ -946,14 +947,19 @@ async function continuumDaoForumSignInEligible(args) {
946
947
  function assertForumSignInUsernameChoice(args) {
947
948
  const nodeKey = args.nodeKey?.trim() || "";
948
949
  const username = args.username?.trim() || "";
950
+ if (!nodeKey) {
951
+ throw new Error(
952
+ "KeyGen forum sign-in requires nodeKey from this node, including when the operator chose a custom username. useNodeKeyUsername only selects the username."
953
+ );
954
+ }
949
955
  if (username && !FORUM_USERNAME_RE.test(username)) {
950
956
  throw new Error(
951
- "Ask the operator for a forum username of 2\u201316 letters, numbers, periods, underscores, or hyphens. If they want the node-key name, call again with useNodeKeyUsername true and nodeKey set."
957
+ "Ask the operator for a forum username of 2\u201316 letters, numbers, periods, underscores, or hyphens. If they want the node-key name, call again with useNodeKeyUsername true and the same nodeKey."
952
958
  );
953
959
  }
954
- if (!username && !(args.useNodeKeyUsername && nodeKey)) {
960
+ if (!username && !args.useNodeKeyUsername) {
955
961
  throw new Error(
956
- "Ask the operator for a custom forum username (2\u201316 letters, numbers, . _ -). If they want the default, call again with useNodeKeyUsername true and nodeKey set. The username will be the first 16 characters of the node key."
962
+ "Ask the operator for a custom forum username (2\u201316 letters, numbers, . _ -). If they decline, call again with useNodeKeyUsername true and the same nodeKey. The username will be the first 16 characters of the node key. Always pass nodeKey."
957
963
  );
958
964
  }
959
965
  }