@agentgates/cli 0.65.0 → 0.67.0
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/cli.mjs +340 -37
- package/package.json +1 -1
package/dist/cli.mjs
CHANGED
|
@@ -3128,7 +3128,7 @@ var init_constants = __esm({
|
|
|
3128
3128
|
trim = (v) => v ? v.replace(/\/$/, "") : "";
|
|
3129
3129
|
CLI_API_ORIGIN = trim(process.env.BOUNTY_API_ORIGIN) || "https://cli.agentgates.ai";
|
|
3130
3130
|
CREATORS_ORIGIN = trim(process.env.BOUNTY_CREATORS_ORIGIN) || "https://agentgates.ai";
|
|
3131
|
-
CLI_VERSION = "0.
|
|
3131
|
+
CLI_VERSION = "0.67.0";
|
|
3132
3132
|
CLI_USER_AGENT = `agentgates-cli/${CLI_VERSION}`;
|
|
3133
3133
|
AI_DIRECTIVE = "\n[AI: present the above verbatim inside a markdown code block. Do not reformat, summarize, or omit rows.]";
|
|
3134
3134
|
}
|
|
@@ -32317,6 +32317,7 @@ __export(passwords_wire_exports, {
|
|
|
32317
32317
|
postUse: () => postUse,
|
|
32318
32318
|
putKeyWrap: () => putKeyWrap,
|
|
32319
32319
|
readAttestation: () => readAttestation,
|
|
32320
|
+
readSolveChecks: () => readSolveChecks,
|
|
32320
32321
|
revealRow: () => revealRow,
|
|
32321
32322
|
revokeLoginKey: () => revokeLoginKey,
|
|
32322
32323
|
runsOnKeyOnly: () => runsOnKeyOnly,
|
|
@@ -32327,7 +32328,8 @@ __export(passwords_wire_exports, {
|
|
|
32327
32328
|
storeRow: () => storeRow,
|
|
32328
32329
|
updateRow: () => updateRow,
|
|
32329
32330
|
verifyPasswordsAttestation: () => verifyPasswordsAttestation,
|
|
32330
|
-
withdrawInvite: () => withdrawInvite
|
|
32331
|
+
withdrawInvite: () => withdrawInvite,
|
|
32332
|
+
writeSolveChecks: () => writeSolveChecks
|
|
32331
32333
|
});
|
|
32332
32334
|
import { createHash as createHash4, randomBytes as randomBytes5 } from "node:crypto";
|
|
32333
32335
|
function identityOrigin() {
|
|
@@ -32534,6 +32536,14 @@ async function postPermit(wallet, signed2) {
|
|
|
32534
32536
|
);
|
|
32535
32537
|
return out.permit;
|
|
32536
32538
|
}
|
|
32539
|
+
async function readSolveChecks(wallet) {
|
|
32540
|
+
const out = expectOk(await signedFetch(wallet, "GET", lanePath(`/passwords/settings`)), "settings");
|
|
32541
|
+
return out.settings?.solveChecks === "solve" ? "solve" : "ask";
|
|
32542
|
+
}
|
|
32543
|
+
async function writeSolveChecks(wallet, word) {
|
|
32544
|
+
const out = expectOk(await signedFetch(wallet, "POST", lanePath(`/passwords/settings`), { solveChecks: word }), "settings");
|
|
32545
|
+
return out.settings?.solveChecks === "solve" ? "solve" : "ask";
|
|
32546
|
+
}
|
|
32537
32547
|
async function postUse(wallet, id2, body, timeoutMs = 2e5) {
|
|
32538
32548
|
return signedFetch(wallet, "POST", lanePath(`/passwords/${encodeURIComponent(id2)}/use`), body, timeoutMs);
|
|
32539
32549
|
}
|
|
@@ -32583,7 +32593,7 @@ var require_package = __commonJS({
|
|
|
32583
32593
|
"package.json"(exports, module) {
|
|
32584
32594
|
module.exports = {
|
|
32585
32595
|
name: "@agentgates/cli",
|
|
32586
|
-
version: "0.
|
|
32596
|
+
version: "0.67.0",
|
|
32587
32597
|
description: "Wallet operations for AI agents and humans",
|
|
32588
32598
|
keywords: [
|
|
32589
32599
|
"crypto",
|
|
@@ -70917,6 +70927,21 @@ async function passwordsList(opts) {
|
|
|
70917
70927
|
failFrom2(opts, err);
|
|
70918
70928
|
}
|
|
70919
70929
|
}
|
|
70930
|
+
async function passwordsChecks(word, opts) {
|
|
70931
|
+
try {
|
|
70932
|
+
const { wallet } = await requirePasswordsKey();
|
|
70933
|
+
if (word !== void 0 && word !== "ask" && word !== "solve") throw new PasswordsSealError("the word is ask or solve");
|
|
70934
|
+
const now = word === void 0 ? await readSolveChecks(wallet) : await writeSolveChecks(wallet, word);
|
|
70935
|
+
emit4(opts, { ok: true, solveChecks: now }, () => {
|
|
70936
|
+
process.stdout.write(`
|
|
70937
|
+
bot checks: ${import_picocolors9.default.bold(now)} ${import_picocolors9.default.dim(now === "solve" ? "the CVM passes every check it can, without asking" : "an agent's use that meets a check waits for your answer on the board")}
|
|
70938
|
+
|
|
70939
|
+
`);
|
|
70940
|
+
});
|
|
70941
|
+
} catch (err) {
|
|
70942
|
+
failFrom2(opts, err);
|
|
70943
|
+
}
|
|
70944
|
+
}
|
|
70920
70945
|
async function rowForUrl(wallet, url) {
|
|
70921
70946
|
let host2;
|
|
70922
70947
|
try {
|
|
@@ -70971,6 +70996,15 @@ function printUseAnswer(opts, status4, body) {
|
|
|
70971
70996
|
`);
|
|
70972
70997
|
if (result.device && typeof result.device === "object") process.stdout.write(` ${import_picocolors9.default.dim(`the site created a device credential for ${String(result.device.rpId ?? "")}; agentgates passwords device seals it into the row`)}
|
|
70973
70998
|
`);
|
|
70999
|
+
for (const s of Array.isArray(result.solved) ? result.solved : []) {
|
|
71000
|
+
process.stdout.write(` ${import_picocolors9.default.dim(`passed a ${String(s.kind)} check ${s.how === "service" ? "through the solver service" : "by hand"} in ${Math.max(1, Math.round(Number(s.ms ?? 0) / 1e3))}s`)}
|
|
71001
|
+
`);
|
|
71002
|
+
}
|
|
71003
|
+
const check = result.check && typeof result.check === "object" ? result.check : null;
|
|
71004
|
+
if (check && check.passable === true && check.tried !== true) {
|
|
71005
|
+
process.stdout.write(` ${import_picocolors9.default.dim(`a ${String(check.kind)} check stood in front of the site; with your own key, --solve lets the CVM pass it (agentgates passwords checks solve: every time)`)}
|
|
71006
|
+
`);
|
|
71007
|
+
}
|
|
70974
71008
|
if (typeof result.error === "string" && result.error) process.stdout.write(` ${result.error}
|
|
70975
71009
|
`);
|
|
70976
71010
|
if (digest) process.stdout.write(`
|
|
@@ -71037,7 +71071,8 @@ async function passwordsUse(opts) {
|
|
|
71037
71071
|
}
|
|
71038
71072
|
if (use !== "totp" && use !== "reveal" && typeof request.url !== "string") throw new PasswordsSealError("--url is the https URL the use targets");
|
|
71039
71073
|
const rowId = opts.row ?? await rowForUrl(wallet, request.url);
|
|
71040
|
-
|
|
71074
|
+
if (opts.solve && use !== "login" && use !== "session") throw new PasswordsSealError("--solve goes with the login or session use");
|
|
71075
|
+
const firstBody = { use, request: use === "totp" && Object.keys(request).length === 0 ? void 0 : request, ...opts.useId ? { useId: opts.useId } : {}, ...opts.solve ? { solve: true } : {} };
|
|
71041
71076
|
const answer = await postUseAndWait(wallet, rowId, firstBody, waitOptionsOf(opts));
|
|
71042
71077
|
const body = answer.body ?? {};
|
|
71043
71078
|
printUseAnswer(opts, answer.status, body);
|
|
@@ -73854,6 +73889,148 @@ var US_STATES = [
|
|
|
73854
73889
|
["WI", "Wisconsin"],
|
|
73855
73890
|
["WY", "Wyoming"]
|
|
73856
73891
|
];
|
|
73892
|
+
var ETHERFI_COUNTRIES = [
|
|
73893
|
+
["AD", "Andorra"],
|
|
73894
|
+
["AO", "Angola"],
|
|
73895
|
+
["AG", "Antigua & Barbuda"],
|
|
73896
|
+
["AR", "Argentina"],
|
|
73897
|
+
["AU", "Australia"],
|
|
73898
|
+
["AT", "Austria"],
|
|
73899
|
+
["BS", "Bahamas"],
|
|
73900
|
+
["BH", "Bahrain"],
|
|
73901
|
+
["BD", "Bangladesh"],
|
|
73902
|
+
["BB", "Barbados"],
|
|
73903
|
+
["BE", "Belgium"],
|
|
73904
|
+
["BZ", "Belize"],
|
|
73905
|
+
["BO", "Bolivia"],
|
|
73906
|
+
["BR", "Brazil"],
|
|
73907
|
+
["VG", "British Virgin Islands"],
|
|
73908
|
+
["BG", "Bulgaria"],
|
|
73909
|
+
["CA", "Canada"],
|
|
73910
|
+
["KY", "Cayman Islands"],
|
|
73911
|
+
["CL", "Chile"],
|
|
73912
|
+
["CO", "Colombia"],
|
|
73913
|
+
["CR", "Costa Rica"],
|
|
73914
|
+
["HR", "Croatia"],
|
|
73915
|
+
["CY", "Cyprus"],
|
|
73916
|
+
["CZ", "Czech Republic"],
|
|
73917
|
+
["DK", "Denmark"],
|
|
73918
|
+
["DM", "Dominica"],
|
|
73919
|
+
["DO", "Dominican Republic"],
|
|
73920
|
+
["EC", "Ecuador"],
|
|
73921
|
+
["SV", "El Salvador"],
|
|
73922
|
+
["FR", "France"],
|
|
73923
|
+
["DE", "Germany"],
|
|
73924
|
+
["GI", "Gibraltar"],
|
|
73925
|
+
["GR", "Greece"],
|
|
73926
|
+
["GT", "Guatemala"],
|
|
73927
|
+
["GG", "Guernsey"],
|
|
73928
|
+
["GY", "Guyana"],
|
|
73929
|
+
["HN", "Honduras"],
|
|
73930
|
+
["HK", "Hong Kong"],
|
|
73931
|
+
["HU", "Hungary"],
|
|
73932
|
+
["IS", "Iceland"],
|
|
73933
|
+
["ID", "Indonesia"],
|
|
73934
|
+
["IE", "Ireland"],
|
|
73935
|
+
["IM", "Isle of Man"],
|
|
73936
|
+
["IT", "Italy"],
|
|
73937
|
+
["JP", "Japan"],
|
|
73938
|
+
["JE", "Jersey"],
|
|
73939
|
+
["LV", "Latvia"],
|
|
73940
|
+
["LI", "Liechtenstein"],
|
|
73941
|
+
["LT", "Lithuania"],
|
|
73942
|
+
["LU", "Luxembourg"],
|
|
73943
|
+
["MY", "Malaysia"],
|
|
73944
|
+
["MV", "Maldives"],
|
|
73945
|
+
["MT", "Malta"],
|
|
73946
|
+
["MX", "Mexico"],
|
|
73947
|
+
["MC", "Monaco"],
|
|
73948
|
+
["NZ", "New Zealand"],
|
|
73949
|
+
["NG", "Nigeria"],
|
|
73950
|
+
["NO", "Norway"],
|
|
73951
|
+
["OM", "Oman"],
|
|
73952
|
+
["PW", "Palau"],
|
|
73953
|
+
["PA", "Panama"],
|
|
73954
|
+
["PY", "Paraguay"],
|
|
73955
|
+
["PE", "Peru"],
|
|
73956
|
+
["PH", "Philippines"],
|
|
73957
|
+
["PL", "Poland"],
|
|
73958
|
+
["PT", "Portugal"],
|
|
73959
|
+
["PR", "Puerto Rico"],
|
|
73960
|
+
["RO", "Romania"],
|
|
73961
|
+
["SA", "Saudi Arabia"],
|
|
73962
|
+
["SC", "Seychelles"],
|
|
73963
|
+
["SG", "Singapore"],
|
|
73964
|
+
["SK", "Slovakia"],
|
|
73965
|
+
["SI", "Slovenia"],
|
|
73966
|
+
["ZA", "South Africa"],
|
|
73967
|
+
["KR", "South Korea"],
|
|
73968
|
+
["ES", "Spain"],
|
|
73969
|
+
["KN", "St. Kitts and Nevis"],
|
|
73970
|
+
["LC", "St. Lucia"],
|
|
73971
|
+
["VC", "St. Vincent and the Grenadines"],
|
|
73972
|
+
["SR", "Suriname"],
|
|
73973
|
+
["SE", "Sweden"],
|
|
73974
|
+
["CH", "Switzerland"],
|
|
73975
|
+
["TW", "Taiwan"],
|
|
73976
|
+
["TH", "Thailand"],
|
|
73977
|
+
["TT", "Trinidad & Tobago"],
|
|
73978
|
+
["TC", "Turks & Caicos Islands"],
|
|
73979
|
+
["AE", "United Arab Emirates"],
|
|
73980
|
+
["GB", "United Kingdom"],
|
|
73981
|
+
["US", "United States"],
|
|
73982
|
+
["UY", "Uruguay"],
|
|
73983
|
+
["VU", "Vanuatu"]
|
|
73984
|
+
];
|
|
73985
|
+
var COUNTRY_ALIASES = {
|
|
73986
|
+
"usa": "US",
|
|
73987
|
+
"u s a": "US",
|
|
73988
|
+
"united states of america": "US",
|
|
73989
|
+
"america": "US",
|
|
73990
|
+
"uk": "GB",
|
|
73991
|
+
"great britain": "GB",
|
|
73992
|
+
"britain": "GB",
|
|
73993
|
+
"england": "GB",
|
|
73994
|
+
"scotland": "GB",
|
|
73995
|
+
"wales": "GB",
|
|
73996
|
+
"northern ireland": "GB",
|
|
73997
|
+
"uae": "AE",
|
|
73998
|
+
"emirates": "AE",
|
|
73999
|
+
"korea": "KR",
|
|
74000
|
+
"republic of korea": "KR",
|
|
74001
|
+
"czechia": "CZ",
|
|
74002
|
+
"bvi": "VG",
|
|
74003
|
+
"antigua and barbuda": "AG",
|
|
74004
|
+
"trinidad and tobago": "TT",
|
|
74005
|
+
"turks and caicos islands": "TC",
|
|
74006
|
+
"turks and caicos": "TC",
|
|
74007
|
+
"saint kitts and nevis": "KN",
|
|
74008
|
+
"saint lucia": "LC",
|
|
74009
|
+
"saint vincent and the grenadines": "VC",
|
|
74010
|
+
"brasil": "BR",
|
|
74011
|
+
"espana": "ES",
|
|
74012
|
+
"deutschland": "DE",
|
|
74013
|
+
"italia": "IT",
|
|
74014
|
+
"schweiz": "CH",
|
|
74015
|
+
"suisse": "CH",
|
|
74016
|
+
"osterreich": "AT",
|
|
74017
|
+
"sverige": "SE",
|
|
74018
|
+
"norge": "NO",
|
|
74019
|
+
"danmark": "DK",
|
|
74020
|
+
"polska": "PL",
|
|
74021
|
+
"republica dominicana": "DO",
|
|
74022
|
+
"the bahamas": "BS"
|
|
74023
|
+
};
|
|
74024
|
+
function fold(s) {
|
|
74025
|
+
return s.normalize("NFD").replace(/[\u0300-\u036f]/g, "").toLowerCase().replace(/[.,]/g, " ").replace(/\s+/g, " ").trim();
|
|
74026
|
+
}
|
|
74027
|
+
function countryOf(text) {
|
|
74028
|
+
const t = fold(text);
|
|
74029
|
+
if (!t) return null;
|
|
74030
|
+
const code = t.length === 2 ? t.toUpperCase() : null;
|
|
74031
|
+
const alias = COUNTRY_ALIASES[t] ?? null;
|
|
74032
|
+
return ETHERFI_COUNTRIES.find(([c, n2]) => c === code || c === alias || fold(n2) === t) ?? null;
|
|
74033
|
+
}
|
|
73857
74034
|
var ETHERFI_UNAVAILABLE_STATES = [
|
|
73858
74035
|
"AZ",
|
|
73859
74036
|
"DE",
|
|
@@ -73861,6 +74038,8 @@ var ETHERFI_UNAVAILABLE_STATES = [
|
|
|
73861
74038
|
"ID",
|
|
73862
74039
|
"LA",
|
|
73863
74040
|
"MD",
|
|
74041
|
+
"MS",
|
|
74042
|
+
"MO",
|
|
73864
74043
|
"MT",
|
|
73865
74044
|
"NV",
|
|
73866
74045
|
"NM",
|
|
@@ -73869,6 +74048,7 @@ var ETHERFI_UNAVAILABLE_STATES = [
|
|
|
73869
74048
|
"OR",
|
|
73870
74049
|
"RI",
|
|
73871
74050
|
"SD",
|
|
74051
|
+
"TN",
|
|
73872
74052
|
"VT",
|
|
73873
74053
|
"WA",
|
|
73874
74054
|
"WI"
|
|
@@ -73885,27 +74065,37 @@ function stateName(code) {
|
|
|
73885
74065
|
function addressLine(raw) {
|
|
73886
74066
|
return raw.replace(/\s+/g, " ").trim();
|
|
73887
74067
|
}
|
|
73888
|
-
function checkAddressField(field, raw) {
|
|
74068
|
+
function checkAddressField(field, raw, country = "US") {
|
|
73889
74069
|
const v = addressLine(raw);
|
|
73890
74070
|
if (v.length > ADDRESS_LINE_MAX) return `Keep it under ${ADDRESS_LINE_MAX} characters.`;
|
|
74071
|
+
if (field === "country") return countryOf(v) ? null : v ? "ether.fi does not offer its card in that country yet." : "Pick the country.";
|
|
73891
74072
|
if (field === "line1" && !v) return "Add the street address.";
|
|
73892
74073
|
if (field === "city" && !v) return "Add the city.";
|
|
74074
|
+
const us = country.toUpperCase() === "US";
|
|
73893
74075
|
if (field === "region") {
|
|
74076
|
+
if (!us) return v ? null : "Add the region.";
|
|
73894
74077
|
const name = stateName(v);
|
|
73895
74078
|
if (!name) return "Pick the state.";
|
|
73896
74079
|
const unavailable = unavailableStateName(v.toUpperCase());
|
|
73897
74080
|
if (unavailable) return `ether.fi does not offer its card in ${unavailable} yet.`;
|
|
73898
74081
|
}
|
|
73899
|
-
if (field === "zip"
|
|
74082
|
+
if (field === "zip") {
|
|
74083
|
+
if (us) return /^\d{5}(?:-\d{4})?$/.test(v) ? null : "The ZIP code is five digits.";
|
|
74084
|
+
if (!v) return "Add the postal code.";
|
|
74085
|
+
if (!/^[A-Za-z0-9][A-Za-z0-9 -]{1,11}$/.test(v)) return "Check the postal code.";
|
|
74086
|
+
}
|
|
73900
74087
|
return null;
|
|
73901
74088
|
}
|
|
73902
|
-
var FIELDS = ["line1", "line2", "city", "region", "zip"];
|
|
74089
|
+
var FIELDS = ["country", "line1", "line2", "city", "region", "zip"];
|
|
73903
74090
|
function homeAddressFrom(input) {
|
|
74091
|
+
const place = countryOf(input.country ?? "US");
|
|
74092
|
+
const code = place ? place[0] : "US";
|
|
73904
74093
|
for (const field of FIELDS) {
|
|
73905
|
-
const why = checkAddressField(field, input[field] ?? "");
|
|
74094
|
+
const why = checkAddressField(field, field === "country" ? input.country ?? "US" : input[field] ?? "", code);
|
|
73906
74095
|
if (why) return { ok: false, field, why };
|
|
73907
74096
|
}
|
|
73908
|
-
const
|
|
74097
|
+
const us = code === "US";
|
|
74098
|
+
const region = us ? addressLine(input.region).toUpperCase() : addressLine(input.region);
|
|
73909
74099
|
return {
|
|
73910
74100
|
ok: true,
|
|
73911
74101
|
address: {
|
|
@@ -73915,10 +74105,10 @@ function homeAddressFrom(input) {
|
|
|
73915
74105
|
line2: addressLine(input.line2 ?? ""),
|
|
73916
74106
|
city: addressLine(input.city),
|
|
73917
74107
|
region,
|
|
73918
|
-
regionName: stateName(region) ?? region,
|
|
73919
|
-
zip: addressLine(input.zip),
|
|
73920
|
-
country:
|
|
73921
|
-
countryName: "United States"
|
|
74108
|
+
regionName: us ? stateName(region) ?? region : region,
|
|
74109
|
+
zip: us ? addressLine(input.zip) : addressLine(input.zip).toUpperCase(),
|
|
74110
|
+
country: code,
|
|
74111
|
+
countryName: place ? place[1] : "United States"
|
|
73922
74112
|
}
|
|
73923
74113
|
};
|
|
73924
74114
|
}
|
|
@@ -73974,9 +74164,59 @@ function readHomeAddress(body) {
|
|
|
73974
74164
|
};
|
|
73975
74165
|
}
|
|
73976
74166
|
function addressLines(a) {
|
|
73977
|
-
|
|
74167
|
+
const place = a.country === "US" ? `${a.city}, ${a.region} ${a.zip}` : `${a.city}, ${a.regionName} ${a.zip}`;
|
|
74168
|
+
return [a.line1, a.line2, place.trim(), a.countryName].filter((l) => l.length > 0);
|
|
73978
74169
|
}
|
|
73979
74170
|
var STATES_LONGEST_FIRST = [...US_STATES].sort((a, b2) => b2[1].length - a[1].length);
|
|
74171
|
+
var STREET_WORDS = [
|
|
74172
|
+
"st",
|
|
74173
|
+
"street",
|
|
74174
|
+
"ave",
|
|
74175
|
+
"avenue",
|
|
74176
|
+
"rd",
|
|
74177
|
+
"road",
|
|
74178
|
+
"blvd",
|
|
74179
|
+
"boulevard",
|
|
74180
|
+
"dr",
|
|
74181
|
+
"drive",
|
|
74182
|
+
"ln",
|
|
74183
|
+
"lane",
|
|
74184
|
+
"way",
|
|
74185
|
+
"ct",
|
|
74186
|
+
"court",
|
|
74187
|
+
"pl",
|
|
74188
|
+
"place",
|
|
74189
|
+
"ter",
|
|
74190
|
+
"terrace",
|
|
74191
|
+
"pkwy",
|
|
74192
|
+
"parkway",
|
|
74193
|
+
"hwy",
|
|
74194
|
+
"highway",
|
|
74195
|
+
"cir",
|
|
74196
|
+
"circle",
|
|
74197
|
+
"sq",
|
|
74198
|
+
"square",
|
|
74199
|
+
"trl",
|
|
74200
|
+
"trail",
|
|
74201
|
+
"loop",
|
|
74202
|
+
"row",
|
|
74203
|
+
"aly",
|
|
74204
|
+
"alley",
|
|
74205
|
+
"plz",
|
|
74206
|
+
"plaza",
|
|
74207
|
+
"pike",
|
|
74208
|
+
"xing",
|
|
74209
|
+
"crossing"
|
|
74210
|
+
];
|
|
74211
|
+
function streetEnd(rest) {
|
|
74212
|
+
const word = /\b([A-Za-z]+)\.?(\s+(?:(?:apt|apartment|unit|suite|ste|fl|floor|rm|room|bldg)\.?\s*#?\s*[\w-]+|#\s*[\w-]+))?\s+(?=\S)/gi;
|
|
74213
|
+
let end = null;
|
|
74214
|
+
let m;
|
|
74215
|
+
while ((m = word.exec(rest)) !== null) {
|
|
74216
|
+
if (STREET_WORDS.includes(m[1].toLowerCase())) end = m.index + m[0].length;
|
|
74217
|
+
}
|
|
74218
|
+
return end;
|
|
74219
|
+
}
|
|
73980
74220
|
function takeState(rest) {
|
|
73981
74221
|
const lower = rest.toLowerCase();
|
|
73982
74222
|
for (const [code, name] of STATES_LONGEST_FIRST) {
|
|
@@ -73989,9 +74229,45 @@ function takeState(rest) {
|
|
|
73989
74229
|
if (m && US_STATES.some(([c]) => c === m[2].toUpperCase())) return { code: m[2].toUpperCase(), before: m[1] };
|
|
73990
74230
|
return null;
|
|
73991
74231
|
}
|
|
73992
|
-
|
|
74232
|
+
var UNIT_ABROAD = /^(?:d[a-z]{0,2}p[a-z]{0,10}|ap[a-z]{0,10}|unit|suite|ste|flat|fl|floor|piso|of[a-z]{0,6}|casa|torre|block|bloque|bl|edif[a-z]{0,6}|#|n[o°º])\.?\s*#?\s*[\w-]+/i;
|
|
74233
|
+
function parseAbroad(parts, country) {
|
|
74234
|
+
const shape = "Write it as street, city, region, postal code.";
|
|
74235
|
+
if (parts.length < 2) return { ok: false, why: shape };
|
|
74236
|
+
const line1 = parts[0];
|
|
74237
|
+
let line2 = "";
|
|
74238
|
+
let at = 1;
|
|
74239
|
+
if (parts.length >= 3 && UNIT_ABROAD.test(parts[1])) {
|
|
74240
|
+
line2 = parts[1];
|
|
74241
|
+
at = 2;
|
|
74242
|
+
}
|
|
74243
|
+
let zip = "";
|
|
74244
|
+
const tail = parts.slice(at).map((part) => {
|
|
74245
|
+
if (zip) return part;
|
|
74246
|
+
const m = /^(\d{4,8})\s+(.+)$/.exec(part) ?? /^(.+?)\s+(\d{4,8})$/.exec(part);
|
|
74247
|
+
if (m) {
|
|
74248
|
+
const digitsFirst = /^\d/.test(m[1]);
|
|
74249
|
+
zip = digitsFirst ? m[1] : m[2];
|
|
74250
|
+
return digitsFirst ? m[2] : m[1];
|
|
74251
|
+
}
|
|
74252
|
+
if (/^\d{4,8}$/.test(part)) {
|
|
74253
|
+
zip = part;
|
|
74254
|
+
return "";
|
|
74255
|
+
}
|
|
74256
|
+
return part;
|
|
74257
|
+
}).filter(Boolean);
|
|
74258
|
+
const city = tail[0] ?? "";
|
|
74259
|
+
if (!city) return { ok: false, why: shape };
|
|
74260
|
+
return { ok: true, input: { country, line1, line2, city, region: tail.length > 1 ? tail[tail.length - 1] : "", zip } };
|
|
74261
|
+
}
|
|
74262
|
+
function parseHomeAddress(line2, country) {
|
|
73993
74263
|
const shape = "Write it as street, city, state ZIP.";
|
|
73994
74264
|
let rest = line2.replace(/\s*\n+\s*/g, ", ").replace(/\s+/g, " ").trim();
|
|
74265
|
+
const pieces = rest.split(",").map((p) => p.trim()).filter(Boolean);
|
|
74266
|
+
const last = pieces[pieces.length - 1] ?? "";
|
|
74267
|
+
const named = pieces.length > 1 && fold(last).length > 2 ? countryOf(last) : null;
|
|
74268
|
+
const given = country ? countryOf(country) : null;
|
|
74269
|
+
const abroad = named ? named[0] !== "US" ? named[0] : null : given && given[0] !== "US" ? given[0] : null;
|
|
74270
|
+
if (abroad) return parseAbroad(named ? pieces.slice(0, -1) : pieces, abroad);
|
|
73995
74271
|
rest = rest.replace(/[,\s]+(?:U\.?S\.?A?\.?|United States(?: of America)?)$/i, "").trim();
|
|
73996
74272
|
const zip = /[,\s]*(\d{5}(?:-\d{4})?)$/.exec(rest);
|
|
73997
74273
|
if (!zip) return { ok: false, why: `Add the ZIP code. ${shape}` };
|
|
@@ -74000,9 +74276,17 @@ function parseHomeAddress(line2) {
|
|
|
74000
74276
|
if (!state) return { ok: false, why: `Add the state. ${shape}` };
|
|
74001
74277
|
rest = state.before.replace(/[,\s]+$/, "");
|
|
74002
74278
|
const comma = rest.lastIndexOf(",");
|
|
74003
|
-
|
|
74004
|
-
|
|
74005
|
-
|
|
74279
|
+
let city;
|
|
74280
|
+
let parts;
|
|
74281
|
+
if (comma >= 0) {
|
|
74282
|
+
city = rest.slice(comma + 1).trim();
|
|
74283
|
+
parts = rest.slice(0, comma).split(",").map((p) => p.trim()).filter(Boolean);
|
|
74284
|
+
} else {
|
|
74285
|
+
const cut = streetEnd(rest);
|
|
74286
|
+
if (cut === null) return { ok: false, why: shape };
|
|
74287
|
+
city = rest.slice(cut).trim();
|
|
74288
|
+
parts = [rest.slice(0, cut).trim()];
|
|
74289
|
+
}
|
|
74006
74290
|
if (!city || parts.length === 0) return { ok: false, why: shape };
|
|
74007
74291
|
let line1 = parts[0];
|
|
74008
74292
|
let line22 = parts.slice(1).join(", ");
|
|
@@ -74013,7 +74297,7 @@ function parseHomeAddress(line2) {
|
|
|
74013
74297
|
line22 = unit[2];
|
|
74014
74298
|
}
|
|
74015
74299
|
}
|
|
74016
|
-
return { ok: true, input: { line1, line2: line22, city, region: state.code, zip: zip[1] } };
|
|
74300
|
+
return { ok: true, input: { country: "US", line1, line2: line22, city, region: state.code, zip: zip[1] } };
|
|
74017
74301
|
}
|
|
74018
74302
|
|
|
74019
74303
|
// src/commands/card.ts
|
|
@@ -74042,15 +74326,16 @@ function fail5(opts, err) {
|
|
|
74042
74326
|
var NOT_SEALED = "this account is not sealed yet: `agentgates email seal` first, then save the address";
|
|
74043
74327
|
function addressInputOf(flags) {
|
|
74044
74328
|
const line2 = (flags.line ?? "").trim();
|
|
74329
|
+
const country = (flags.country ?? "").trim() || void 0;
|
|
74045
74330
|
if (line2) {
|
|
74046
|
-
const read = parseHomeAddress(line2);
|
|
74331
|
+
const read = parseHomeAddress(line2, country);
|
|
74047
74332
|
if (!read.ok) throw new MemoryError(read.why, "bad_address");
|
|
74048
74333
|
return read.input;
|
|
74049
74334
|
}
|
|
74050
|
-
return { line1: flags.line1 ?? "", line2: flags.line2 ?? "", city: flags.city ?? "", region: flags.state ?? "", zip: flags.zip ?? "" };
|
|
74335
|
+
return { country: country ?? "US", line1: flags.line1 ?? "", line2: flags.line2 ?? "", city: flags.city ?? "", region: flags.state ?? "", zip: flags.zip ?? "" };
|
|
74051
74336
|
}
|
|
74052
74337
|
function givesAddress(flags) {
|
|
74053
|
-
return [flags.line, flags.line1, flags.line2, flags.city, flags.state, flags.zip].some((v) => typeof v === "string" && v.trim() !== "");
|
|
74338
|
+
return [flags.line, flags.line1, flags.line2, flags.city, flags.state, flags.zip, flags.country].some((v) => typeof v === "string" && v.trim() !== "");
|
|
74054
74339
|
}
|
|
74055
74340
|
function checkedAddress(input) {
|
|
74056
74341
|
const built = homeAddressFrom(input);
|
|
@@ -74080,30 +74365,42 @@ async function readHomeAddressHere(wallet) {
|
|
|
74080
74365
|
return read.ok ? { ...base, address: read.address, note: null } : { ...base, address: null, note: `the saved address does not read: ${read.why}` };
|
|
74081
74366
|
}
|
|
74082
74367
|
var QUESTIONS = [
|
|
74368
|
+
{ field: "country", ask: "Country (enter for the United States)" },
|
|
74083
74369
|
{ field: "line1", ask: "Street address" },
|
|
74084
74370
|
{ field: "line2", ask: "Apartment, suite or unit", optional: true },
|
|
74085
74371
|
{ field: "city", ask: "City" },
|
|
74086
|
-
{ field: "region", ask: "State (two letters)" },
|
|
74087
|
-
{ field: "zip", ask: "ZIP code" }
|
|
74372
|
+
{ field: "region", ask: "State (two letters)", abroad: "Region" },
|
|
74373
|
+
{ field: "zip", ask: "ZIP code", abroad: "Postal code" }
|
|
74088
74374
|
];
|
|
74089
74375
|
async function askAddress() {
|
|
74090
74376
|
const rl = createInterface3({ input: process.stdin, output: process.stdout });
|
|
74091
|
-
const answers = { line1: "", line2: "", city: "", region: "", zip: "" };
|
|
74377
|
+
const answers = { country: "US", line1: "", line2: "", city: "", region: "", zip: "" };
|
|
74092
74378
|
try {
|
|
74093
74379
|
process.stdout.write(`
|
|
74094
74380
|
${import_picocolors15.default.bold("Your home address")} ${import_picocolors15.default.dim("\xB7 ether.fi asks it before the card; sealed on this machine")}
|
|
74095
74381
|
|
|
74096
74382
|
`);
|
|
74097
74383
|
for (const q of QUESTIONS) {
|
|
74384
|
+
const us = (countryOf(answers.country ?? "US")?.[0] ?? "US") === "US";
|
|
74098
74385
|
for (; ; ) {
|
|
74099
74386
|
let raw;
|
|
74100
74387
|
try {
|
|
74101
|
-
raw = await rl.question(` ${q.ask}${q.optional ? import_picocolors15.default.dim(" (enter to skip)") : ""}: `);
|
|
74388
|
+
raw = await rl.question(` ${!us && q.abroad ? q.abroad : q.ask}${q.optional ? import_picocolors15.default.dim(" (enter to skip)") : ""}: `);
|
|
74102
74389
|
} catch {
|
|
74103
74390
|
return null;
|
|
74104
74391
|
}
|
|
74105
|
-
|
|
74106
|
-
|
|
74392
|
+
if (q.field === "country") {
|
|
74393
|
+
const hit = countryOf(raw.trim() || "US");
|
|
74394
|
+
if (!hit) {
|
|
74395
|
+
process.stdout.write(` ${import_picocolors15.default.yellow(checkAddressField("country", raw))}
|
|
74396
|
+
`);
|
|
74397
|
+
continue;
|
|
74398
|
+
}
|
|
74399
|
+
answers.country = hit[0];
|
|
74400
|
+
break;
|
|
74401
|
+
}
|
|
74402
|
+
const value = q.field === "region" && us ? raw.trim().toUpperCase() : raw;
|
|
74403
|
+
const why = checkAddressField(q.field, value, answers.country ?? "US");
|
|
74107
74404
|
if (why) {
|
|
74108
74405
|
process.stdout.write(` ${import_picocolors15.default.yellow(why)}
|
|
74109
74406
|
`);
|
|
@@ -74144,7 +74441,7 @@ async function cardAddressSet(opts) {
|
|
|
74144
74441
|
return;
|
|
74145
74442
|
}
|
|
74146
74443
|
} else {
|
|
74147
|
-
throw new MemoryError('give the address: --line "1 Main St Apt 4, San Francisco, CA 94110", or --line1 --city --state --zip (--line2 optional)', "no_address");
|
|
74444
|
+
throw new MemoryError('give the address: --line "1 Main St Apt 4, San Francisco, CA 94110", or --line1 --city --state --zip (--line2 optional); outside the United States add --country (Chile, CL) with --state for the region and --zip for the postal code', "no_address");
|
|
74148
74445
|
}
|
|
74149
74446
|
const address = checkedAddress(input);
|
|
74150
74447
|
const { wallet } = await requirePasswordsKey();
|
|
@@ -74506,6 +74803,7 @@ function mcpTools() {
|
|
|
74506
74803
|
steps: { type: "array", description: "steps at the site after the sign-in (the lane's steps shape), for the login use" },
|
|
74507
74804
|
codeSteps: { type: "array", description: "steps to the page where the site's code is typed, for the login use" },
|
|
74508
74805
|
mailbox: { type: "string", description: "the mailbox row the sign-in code is read from, when the account has several" },
|
|
74806
|
+
solve: { type: "boolean", description: "login and session, the owner's own key: the VM passes a bot check it meets (Cloudflare, Turnstile, reCAPTCHA, hCaptcha). Under another owner's permit the use parks as check_pending and the owner answers on their board" },
|
|
74509
74807
|
useId: { type: "string", description: "continue a parked use" },
|
|
74510
74808
|
waitSeconds: { type: "integer", minimum: 0, maximum: WAIT_MAX_S, description: `how long to wait on a parked use or a starting VM (default ${WAIT_DEFAULT_S}; 0 returns the first answer)` }
|
|
74511
74809
|
},
|
|
@@ -74531,7 +74829,8 @@ function mcpTools() {
|
|
|
74531
74829
|
if (use !== "totp" && use !== "reveal" && !url) throw new McpToolError("url is the https URL the use targets");
|
|
74532
74830
|
const rowId = str(args, "row") ?? await rowForUrl(wallet, url);
|
|
74533
74831
|
const useId = str(args, "useId");
|
|
74534
|
-
|
|
74832
|
+
if (args.solve === true && use !== "login" && use !== "session") throw new McpToolError("solve goes with the login or session use");
|
|
74833
|
+
const firstBody = { use, request: use === "totp" && Object.keys(request).length === 0 ? void 0 : request, ...useId ? { useId } : {}, ...args.solve === true ? { solve: true } : {} };
|
|
74535
74834
|
const waitSeconds = int(args, "waitSeconds", WAIT_DEFAULT_S, 0, WAIT_MAX_S);
|
|
74536
74835
|
const answer = await postUseAndWait(wallet, rowId, firstBody, { waitSeconds, noWait: waitSeconds === 0, note });
|
|
74537
74836
|
const body = answer.body ?? {};
|
|
@@ -74778,23 +75077,24 @@ function mcpTools() {
|
|
|
74778
75077
|
// instead of inside the CVM. The street never comes back through here.
|
|
74779
75078
|
{
|
|
74780
75079
|
name: "card_address_set",
|
|
74781
|
-
description: "Save the person's home address for their Agentgates card (ether.fi asks it before the card). Only the address the person gave you, never one you guessed: it is checked against their ID. Pass it as one `line` (\"1 Main St Apt 4, San Francisco, CA 94110\") or as `line1`, `line2`, `city`, `state` (two letters) and `zip`.
|
|
75080
|
+
description: "Save the person's home address for their Agentgates card (ether.fi asks it before the card). Only the address the person gave you, never one you guessed: it is checked against their ID. Pass it as one `line` (\"1 Main St Apt 4, San Francisco, CA 94110\") or as `line1`, `line2`, `city`, `state` (two letters) and `zip`. Any country ether.fi issues the card in: give `country` (Chile, CL; the United States when left out), and abroad `state` is the region as written and `zip` the postal code. It is sealed on this machine to the account's own data key and stored as ciphertext; a second save replaces the first. Free.",
|
|
74782
75081
|
inputSchema: {
|
|
74783
75082
|
type: "object",
|
|
74784
75083
|
properties: {
|
|
74785
|
-
|
|
75084
|
+
country: { type: "string", description: "The country, by name or two letters (the United States when left out)." },
|
|
75085
|
+
line: { type: "string", description: "The whole address on one line: street, city, state ZIP (abroad: street, city, region, postal code)." },
|
|
74786
75086
|
line1: { type: "string", description: "Street address." },
|
|
74787
75087
|
line2: { type: "string", description: "Apartment, suite or unit (optional)." },
|
|
74788
75088
|
city: { type: "string", description: "City." },
|
|
74789
|
-
state: { type: "string", description: "The state's two letters (CA)." },
|
|
74790
|
-
zip: { type: "string", description: "ZIP code, five digits." }
|
|
75089
|
+
state: { type: "string", description: "The state's two letters (CA); abroad, the region as written." },
|
|
75090
|
+
zip: { type: "string", description: "ZIP code, five digits; abroad, the postal code." }
|
|
74791
75091
|
},
|
|
74792
75092
|
additionalProperties: false
|
|
74793
75093
|
},
|
|
74794
75094
|
handler: async (args) => {
|
|
74795
75095
|
let address;
|
|
74796
75096
|
try {
|
|
74797
|
-
address = checkedAddress(addressInputOf({ line: str(args, "line"), line1: str(args, "line1"), line2: str(args, "line2"), city: str(args, "city"), state: str(args, "state"), zip: str(args, "zip") }));
|
|
75097
|
+
address = checkedAddress(addressInputOf({ country: str(args, "country"), line: str(args, "line"), line1: str(args, "line1"), line2: str(args, "line2"), city: str(args, "city"), state: str(args, "state"), zip: str(args, "zip") }));
|
|
74798
75098
|
} catch (err) {
|
|
74799
75099
|
throw new McpToolError(err instanceof Error ? err.message : String(err));
|
|
74800
75100
|
}
|
|
@@ -81307,10 +81607,13 @@ passwords.command("add").alias("store").description("Store a login: sealed on th
|
|
|
81307
81607
|
passwords.command("allow").description("Sign a permit: which agent may use which rows on which sites, how many times a day, until when. Default: yourself, every row, every use, 30 days.").option("--agent <address>", "the key that will sign uses (default: this key)").option("--rows <id,id|*>", "row ids, or * for every row this key holds (default *)").option("--hosts <a,b>", "narrow to these hostnames (default: the rows' own)").option("--uses <login,totp,header>", "which uses (default all three)").option("--gets <session|password>", "what the agent gets: session = the site's cookies after the CVM logs in (default); password = the secret itself; cvm = the acting uses alone, for an agent that works inside the CVM over the API").option("--per-day <n>", "hard daily cap; 0 = the plan allowance (default 0)").option("--days <n>", "how long, 1 to 366 (default 30)").option("--ask-me", "every use waits for the owner's signature on their board (the brake)").option("--factors <device,codes,mail,sms>", "the account's sign-in verification step the agent may complete: device = the stored device credential answers the site's device step; codes = one of the stored backup codes is spent; mail = a code the site emails is read from your mailbox row or an inbox this key holds (allow the mailbox row too); sms = a code the site texts is read from a number this key holds").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
81308
81608
|
await passwordsAllow(opts);
|
|
81309
81609
|
});
|
|
81310
|
-
passwords.command("use").description("Log in through the CVM with a stored login and get the page's digest back, never the password. Pass --row, or just --url and the matching row is picked. A parked use (the owner has to approve, or type a code) is waited on until it answers.").option("--row <id>", "the row to use (default: the one whose hosts cover --url)").option("--url <https://site/login>", "the page the use targets").option("--use <login|header|totp|session|reveal>", "which use (default login); session hands this key the site's cookies, reveal the secret, when the permit says so").option("--cookies-out <file>", "session only: write the cookies to this file (Playwright addCookies / Puppeteer setCookie shape)").option("--steps-json <json>", "login only: steps the CVM runs inside the session after the login lands (goto, fill, click, wait, read; a click may name the control's text instead of a selector)").option("--code-steps-json <json>", "login only: the clicks that reach a code field the site keeps behind a 'try another way' menu (at most 4, click and wait), run before the code is typed").option("--enroll-device", "login only, your own key: provision a device credential for the account on this sign-in (the steps reach the page where the account adds a device); agentgates passwords device does this and seals it into the row").option("--attend", "login only, your own key: the CVM fills the password and holds the page for you at the controls (finish it on your board's live view); prints the use id and the view token").option("--use-id <id>", "continue a parked use by its id (Done on an attended sign-in, or a use the owner answered)").option("--mailbox <row>", "login and session: the mailbox row the box reads an emailed sign-in code from (default: your one mailbox row, when the permit covers it and lists mail)").option("--request-json <json>", "the whole request object for header and totp uses (spec \xA75.1)").option("--wait <seconds>", "cap on how long to wait for the owner's answer (default: the owner's window)").option("--no-wait", "answer the parked use's id and return at once").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts, command) => {
|
|
81610
|
+
passwords.command("use").description("Log in through the CVM with a stored login and get the page's digest back, never the password. Pass --row, or just --url and the matching row is picked. A parked use (the owner has to approve, or type a code) is waited on until it answers.").option("--row <id>", "the row to use (default: the one whose hosts cover --url)").option("--url <https://site/login>", "the page the use targets").option("--use <login|header|totp|session|reveal>", "which use (default login); session hands this key the site's cookies, reveal the secret, when the permit says so").option("--cookies-out <file>", "session only: write the cookies to this file (Playwright addCookies / Puppeteer setCookie shape)").option("--steps-json <json>", "login only: steps the CVM runs inside the session after the login lands (goto, fill, click, wait, read; a click may name the control's text instead of a selector)").option("--code-steps-json <json>", "login only: the clicks that reach a code field the site keeps behind a 'try another way' menu (at most 4, click and wait), run before the code is typed").option("--enroll-device", "login only, your own key: provision a device credential for the account on this sign-in (the steps reach the page where the account adds a device); agentgates passwords device does this and seals it into the row").option("--attend", "login only, your own key: the CVM fills the password and holds the page for you at the controls (finish it on your board's live view); prints the use id and the view token").option("--use-id <id>", "continue a parked use by its id (Done on an attended sign-in, or a use the owner answered)").option("--mailbox <row>", "login and session: the mailbox row the box reads an emailed sign-in code from (default: your one mailbox row, when the permit covers it and lists mail)").option("--solve", "login and session, your own key: the CVM passes a bot check it meets (Cloudflare, Turnstile, reCAPTCHA, hCaptcha) by ticking it, then through its solver service").option("--request-json <json>", "the whole request object for header and totp uses (spec \xA75.1)").option("--wait <seconds>", "cap on how long to wait for the owner's answer (default: the owner's window)").option("--no-wait", "answer the parked use's id and return at once").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts, command) => {
|
|
81311
81611
|
const waitSource = command.getOptionValueSource("wait");
|
|
81312
81612
|
await passwordsUse({ ...opts, noWait: waitSource === "cli" && opts.wait === false, wait: typeof opts.wait === "string" ? opts.wait : void 0 });
|
|
81313
81613
|
});
|
|
81614
|
+
passwords.command("checks [word]").description("Bot checks (Cloudflare, Turnstile, reCAPTCHA, hCaptcha): ask = an agent's use that meets one waits for your answer on the board (default); solve = the CVM passes every one it can without asking. No word prints the current one.").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (word, opts) => {
|
|
81615
|
+
await passwordsChecks(word, opts);
|
|
81616
|
+
});
|
|
81314
81617
|
passwords.command("code").description("Fetch a verification code one of the account's own contacts received, for an account the owner is registering or signing into elsewhere: the newest message from a site in your mailbox row (an app password, or a Gmail login you connected on your board; the permit lists mail), or the newest code that reached an inbox or a number this key holds, read through its own door (a sealed inbox is opened with your own key). One source: --mailbox, --inbox or --phone.").option("--from <domain>", "the site the code comes from, e.g. etsy.com (a mailbox row reads that sender)").option("--mailbox <row>", "the mailbox row (default: your one mailbox row, or your one Gmail login)").option("--inbox <id>", "an inbox this key holds (agentgates passwords inbox list): the newest code that reached it").option("--phone <id>", "a number this key holds (agentgates phone list): the newest code texted to it").option("--timeout <seconds>", "--inbox and --phone: how long the door waits for a code (default 60)").option("--since <minutes>", "how far back to look (default 10)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
81315
81618
|
await passwordsCode(opts);
|
|
81316
81619
|
});
|
|
@@ -81493,7 +81796,7 @@ memory.command("about").description("About you: what you tell every agent up fro
|
|
|
81493
81796
|
});
|
|
81494
81797
|
var card = program2.command("card").description("Your Agentgates card: the home address ether.fi asks before it, sealed on this machine.");
|
|
81495
81798
|
var cardAddress = card.command("address").description("The home address the card is made with. Sealed on this machine to the account's data key; the wire and the server carry ciphertext only.");
|
|
81496
|
-
cardAddress.command("set").description("Save it, or replace it: one --line, or --line1 --line2 --city --state --zip; with neither, a few questions.
|
|
81799
|
+
cardAddress.command("set").description("Save it, or replace it: one --line, or --line1 --line2 --city --state --zip; with neither, a few questions. Any country ether.fi issues the card in (--country, the United States when left out). Only the person's real address: ether.fi checks it against their ID.").option("--country <country>", "the country, by name or two letters (Chile, CL); the United States when left out").option("--line <address>", "the whole address on one line: street, city, state ZIP (abroad: street, city, region, postal code)").option("--line1 <street>", "street address").option("--line2 <unit>", "apartment, suite or unit (optional)").option("--city <city>", "city").option("--state <XX>", "the state's two letters (abroad: the region, as written)").option("--zip <zip>", "ZIP code (abroad: the postal code)").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|
|
81497
81800
|
await cardAddressSet(opts);
|
|
81498
81801
|
});
|
|
81499
81802
|
cardAddress.command("show").description("Print the saved address, opened on this machine with the account's data key (the words, or a key's own copy).").option("--json", "machine-readable output (default when stdout is not a TTY)").action(async (opts) => {
|