@candledottv/cli 0.8.1 → 0.8.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/dist/index.js +27 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -20258,7 +20258,7 @@ async function resolveApiKey(deps, profile) {
|
|
|
20258
20258
|
}
|
|
20259
20259
|
|
|
20260
20260
|
// src/version.ts
|
|
20261
|
-
var CLI_VERSION = "0.8.
|
|
20261
|
+
var CLI_VERSION = "0.8.2";
|
|
20262
20262
|
|
|
20263
20263
|
// src/commands/auth.ts
|
|
20264
20264
|
var DEVICE_CODE_PATH = "/api/v1/agent/device/code";
|
|
@@ -25279,22 +25279,32 @@ async function walletsImport(args, ctx) {
|
|
|
25279
25279
|
}
|
|
25280
25280
|
async function verifyImportLanded(args) {
|
|
25281
25281
|
const { deps } = args.ctx;
|
|
25282
|
-
|
|
25283
|
-
|
|
25284
|
-
|
|
25285
|
-
|
|
25286
|
-
|
|
25287
|
-
|
|
25288
|
-
|
|
25289
|
-
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25282
|
+
let cursor = null;
|
|
25283
|
+
let account;
|
|
25284
|
+
for (let pageCount = 0;pageCount < 25; pageCount++) {
|
|
25285
|
+
const query = cursor === null ? "?limit=100" : `?limit=100&cursor=${encodeURIComponent(cursor)}`;
|
|
25286
|
+
const listed = await apiRequest(`/api/v1/agent/wallets${query}`, {
|
|
25287
|
+
method: "GET",
|
|
25288
|
+
auth: "key",
|
|
25289
|
+
credentials: { apiKey: args.apiKey },
|
|
25290
|
+
apiUrl: args.apiUrl,
|
|
25291
|
+
fetch: deps.fetch,
|
|
25292
|
+
env: deps.env
|
|
25293
|
+
});
|
|
25294
|
+
if (!listed.ok)
|
|
25295
|
+
return { status: "unchecked", ...account !== undefined ? { account } : {} };
|
|
25296
|
+
const body = listed.body;
|
|
25297
|
+
if (!Array.isArray(body.page))
|
|
25298
|
+
return { status: "unchecked", ...account !== undefined ? { account } : {} };
|
|
25299
|
+
account ??= body.page.find((row) => typeof row.userAddress === "string")?.userAddress;
|
|
25300
|
+
if (body.page.some((row) => row._id === args.id)) {
|
|
25301
|
+
return { status: "verified", ...account !== undefined ? { account } : {} };
|
|
25302
|
+
}
|
|
25303
|
+
if (body.isDone !== false || typeof body.continueCursor !== "string")
|
|
25304
|
+
break;
|
|
25305
|
+
cursor = body.continueCursor;
|
|
25306
|
+
}
|
|
25307
|
+
return { status: "missing", ...account !== undefined ? { account } : {} };
|
|
25298
25308
|
}
|
|
25299
25309
|
async function walletsRevoke(args, ctx) {
|
|
25300
25310
|
const { deps, apiUrl, json } = ctx;
|
package/package.json
CHANGED