@ixo/asks-mcp 2.0.0-dev.4 → 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.
- package/dist/asks-mcp.mjs +25 -16
- 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,18 +266904,26 @@ 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
|
-
if (available <= 0) return "You have
|
|
266914
|
-
|
|
266915
|
-
if (kyc?.status === "expired") return kycLine;
|
|
266923
|
+
if (available <= 0) return "You have nothing to cash out yet.";
|
|
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
|
-
if (!country || !/^[A-Z]{2}$/.test(country)) return [`You have $${available.toFixed(2)}
|
|
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}`);
|
|
266919
266928
|
if (info.status !== 200) return said3(info);
|
|
266920
266929
|
const methods = info.body.methods ?? [];
|
|
@@ -266923,7 +266932,7 @@ async function cashOut(deps, input) {
|
|
|
266923
266932
|
const chosen2 = methods.find((one) => one.method === input.method);
|
|
266924
266933
|
if (!chosen2)
|
|
266925
266934
|
return [
|
|
266926
|
-
`You have $${available.toFixed(2)}
|
|
266935
|
+
`You have $${available.toFixed(2)} to cash out. Ways to get paid in ${country}:`,
|
|
266927
266936
|
...methods.map((one) => `- ${WAYS[one.method] ?? one.method} (method "${one.method}"): $${one.minUsd} to $${one.maxUsd}`),
|
|
266928
266937
|
`Fee: ${fee?.bps ? `${fee.bps / 100}%` : "none"}${fee?.minUsd && Number(fee.minUsd) > 0 ? `, at least $${fee.minUsd}` : ""}.`,
|
|
266929
266938
|
kycLine,
|
|
@@ -266931,11 +266940,11 @@ async function cashOut(deps, input) {
|
|
|
266931
266940
|
].filter(Boolean).join("\n");
|
|
266932
266941
|
const amount3 = input.amount_usd?.trim().replace(/^\$/, "");
|
|
266933
266942
|
if (!amount3 || !/^\d+(\.\d{1,2})?$/.test(amount3)) return `How much do you want to cash out? You have $${available.toFixed(2)}; this way takes $${chosen2.minUsd} to $${chosen2.maxUsd}. (Then call cash_out with amount_usd, like "25".)`;
|
|
266934
|
-
if (Number(amount3) > available) return `You have $${available.toFixed(2)}
|
|
266943
|
+
if (Number(amount3) > available) return `You have $${available.toFixed(2)} to cash out, less than $${amount3}. Pick a smaller amount.`;
|
|
266935
266944
|
if (Number(amount3) < Number(chosen2.minUsd)) return `The smallest you can cash out this way is $${chosen2.minUsd}.`;
|
|
266936
266945
|
if (Number(amount3) > Number(chosen2.maxUsd)) return `The largest you can cash out this way is $${chosen2.maxUsd}.`;
|
|
266937
266946
|
const to = input.to?.trim();
|
|
266938
|
-
if (chosen2.fields.includes("address") && !(to && BASE_ADDRESS.test(to))) return "Which Base
|
|
266947
|
+
if (chosen2.fields.includes("address") && !(to && BASE_ADDRESS.test(to))) return "Which Base account should receive it? (Its address starts with 0x; then call cash_out with to.)";
|
|
266939
266948
|
const quote = await signedCall(deps, "quote", { method: chosen2.method, country, amountUsd: amount3 });
|
|
266940
266949
|
if (quote.status !== 201) return said3(quote);
|
|
266941
266950
|
const q = quote.body;
|
|
@@ -266979,7 +266988,7 @@ ${NAME_LINE}`;
|
|
|
266979
266988
|
case "cancelled":
|
|
266980
266989
|
return "This cash-out didn't go through, and nothing was taken.";
|
|
266981
266990
|
case "refunded":
|
|
266982
|
-
return "Your
|
|
266991
|
+
return "Your money was sent back to you.";
|
|
266983
266992
|
default:
|
|
266984
266993
|
return `State: ${v.state ?? "unknown"}.`;
|
|
266985
266994
|
}
|
|
@@ -266991,7 +267000,7 @@ var init_cashout = __esm({
|
|
|
266991
267000
|
init_accountProof();
|
|
266992
267001
|
init_inviteProof();
|
|
266993
267002
|
WAYS = {
|
|
266994
|
-
usdc_base: "
|
|
267003
|
+
usdc_base: "Digital dollars to your own Base account (any country)",
|
|
266995
267004
|
stripe_bank: "Bank account, through Stripe",
|
|
266996
267005
|
yellowcard_bank: "Bank account, through Yellow Card",
|
|
266997
267006
|
yellowcard_momo: "Mobile money, through Yellow Card"
|
|
@@ -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.
|
|
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: {
|
|
@@ -292588,8 +292597,8 @@ var TOOLS = {
|
|
|
292588
292597
|
annotations: { ...acts, idempotentHint: true }
|
|
292589
292598
|
},
|
|
292590
292599
|
cash_out: {
|
|
292591
|
-
title: "Cash out your
|
|
292592
|
-
description: `Turn
|
|
292600
|
+
title: "Cash out your earnings",
|
|
292601
|
+
description: `Turn what the person earned into money: digital dollars to your own Base account, or a bank account where offered. One step per call: it reads what they have available, their LinkedIn and identity check, then asks the country, the way to get paid, the amount and (for a Base account) the address, and shows the quote in plain words ("You'll receive $X (fee $0)"). With confirm: true it gives ONE link: the person opens it and confirms with one tap; that page checks their identity and they sign there. Limits and fees come from IXO's cash-out service, never from here. No LinkedIn: say connect_linkedin first. Signs no money and holds no key of theirs.`,
|
|
292593
292602
|
spends: false,
|
|
292594
292603
|
hosted: false,
|
|
292595
292604
|
annotations: acts
|
|
@@ -296164,7 +296173,7 @@ tx ${result.transactionHash}${leftWords}`);
|
|
|
296164
296173
|
country: external_exports.string().max(2).optional().describe("Where the person lives: two letters, like NG or DE."),
|
|
296165
296174
|
method: external_exports.string().max(40).optional().describe("The way to get paid, as cash_out listed it (like usdc_base)."),
|
|
296166
296175
|
amount_usd: external_exports.string().max(12).optional().describe('How much, in dollars, like "25" or "25.50".'),
|
|
296167
|
-
to: external_exports.string().max(64).optional().describe("
|
|
296176
|
+
to: external_exports.string().max(64).optional().describe("Base account only: the 0x\u2026 address that receives it."),
|
|
296168
296177
|
confirm: external_exports.boolean().optional().describe("true, after the person said yes to the quote: gives the one link to confirm.")
|
|
296169
296178
|
}
|
|
296170
296179
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ixo/asks-mcp",
|
|
3
|
-
"version": "2.0.0-dev.
|
|
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": {
|