@ixo/asks-mcp 2.0.0-dev.5 → 2.0.0-dev.6

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.
Files changed (2) hide show
  1. package/dist/asks-mcp.mjs +15 -6
  2. package/package.json +1 -1
package/dist/asks-mcp.mjs CHANGED
@@ -264720,7 +264720,7 @@ var init_inviteMessages = __esm({
264720
264720
  return rest;
264721
264721
  };
264722
264722
  linkedinMessage = (act, signer2, now3 = Date.now(), digest2 = "") => `linkedin:${act}:${signer2}:${now3}:${digest2}`;
264723
- CASHOUT_ACTS = ["quote", "draft", "status"];
264723
+ CASHOUT_ACTS = ["quote", "draft", "status", "kyc"];
264724
264724
  cashoutMessage = (act, signer2, now3 = Date.now(), digest2 = "") => `cashout:${act}:${signer2}:${now3}:${digest2}`;
264725
264725
  ROOM_ACTS = ["mine", "read", "send", "bring", "export"];
264726
264726
  roomBody = (body) => {
@@ -266883,7 +266883,8 @@ var init_takeBack = __esm({
266883
266883
  var cashout_exports = {};
266884
266884
  __export(cashout_exports, {
266885
266885
  cashOut: () => cashOut,
266886
- cashOutStatus: () => cashOutStatus
266886
+ cashOutStatus: () => cashOutStatus,
266887
+ identityLine: () => identityLine
266887
266888
  });
266888
266889
  async function call2(deps, path, body) {
266889
266890
  try {
@@ -266903,16 +266904,24 @@ async function signedCall(deps, act, fields) {
266903
266904
  const message = await cashoutWords(act, deps.signer.address, full);
266904
266905
  return call2(deps, `/api/cashout/${act}`, { address: deps.signer.address, ...full, proof: { kind: "adr36", message, ...await signWords(deps.signer.mnemonic, message) } });
266905
266906
  }
266907
+ async function identityLine(deps) {
266908
+ const answer = await signedCall(deps, "kyc", {});
266909
+ const status = answer.status === 200 ? answer.body.status : "unknown";
266910
+ if (status === "verified") return "Your identity check is done.";
266911
+ if (status === "in_review") return "Your identity check is being reviewed.";
266912
+ const info = await call2(deps, "/api/cashout/info");
266913
+ const kycUrl = typeof info.body.kycUrl === "string" ? info.body.kycUrl : `${deps.site.replace(/\/+$/, "")}/me/identity`;
266914
+ return `Do your identity check first: ${kycUrl}`;
266915
+ }
266906
266916
  async function cashOut(deps, input) {
266907
266917
  const person = deps.signer.principal ?? deps.signer.address;
266908
- const [ready, payBase] = await Promise.all([signedCall(deps, "status", {}), deps.payBase(person)]);
266918
+ const [ready, payBase, kycLine] = await Promise.all([signedCall(deps, "status", {}), deps.payBase(person), identityLine(deps)]);
266909
266919
  if (ready.status !== 200) return said3(ready);
266910
266920
  const kyc = ready.body.kyc;
266911
266921
  if (!ready.body.linkedin) return "Cash-out needs your LinkedIn connected first. Next: connect_linkedin (about a minute), then cash_out again.";
266912
266922
  const available = payBase / 1e6;
266913
266923
  if (available <= 0) return "You have nothing to cash out yet.";
266914
- const kycLine = kyc?.status === "verified" ? "" : kyc?.status === "expired" ? `Your identity check has expired. Renew it first: ${deps.site.replace(/\/+$/, "")}/me/identity` : `Cash-out needs an identity check. If you haven't done it yet, do it first: ${deps.site.replace(/\/+$/, "")}/me/identity`;
266915
- if (kyc?.status === "expired") return kycLine;
266924
+ if (kyc?.status === "expired") return `Your identity check has expired. Renew it first: ${deps.site.replace(/\/+$/, "")}/me/identity`;
266916
266925
  const country = input.country?.trim().toUpperCase();
266917
266926
  if (!country || !/^[A-Z]{2}$/.test(country)) return [`You have $${available.toFixed(2)} to cash out.`, kycLine, 'Which country are you in? (Ask the person; then call cash_out with country, like "NG" or "DE".)'].filter(Boolean).join("\n");
266918
266927
  const info = await call2(deps, `/api/cashout/info?country=${country}`);
@@ -292365,7 +292374,7 @@ import { randomBytes as randomBytes7 } from "node:crypto";
292365
292374
  // package.json
292366
292375
  var package_default = {
292367
292376
  name: "@ixo/asks-mcp",
292368
- version: "2.0.0-dev.5",
292377
+ version: "2.0.0-dev.6",
292369
292378
  description: "The Openhands Network MCP server: read the board, answer asks, post work and get paid on the ixo chain, with a key of its own on your machine.",
292370
292379
  license: "Apache-2.0",
292371
292380
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ixo/asks-mcp",
3
- "version": "2.0.0-dev.5",
3
+ "version": "2.0.0-dev.6",
4
4
  "description": "The Openhands Network MCP server: read the board, answer asks, post work and get paid on the ixo chain, with a key of its own on your machine.",
5
5
  "license": "Apache-2.0",
6
6
  "repository": {