nansen-cli 2.0.0 → 2.0.1

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 (46) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +37 -9
  3. package/docs/browser-login.md +13 -7
  4. package/package.json +1 -1
  5. package/scripts/postinstall.js +1 -1
  6. package/skills/nansen-agent-guide/SKILL.md +3 -3
  7. package/skills/nansen-alerts-webhook-listener/SKILL.md +1 -1
  8. package/skills/nansen-dca-tracker/SKILL.md +1 -1
  9. package/skills/nansen-defi-positions/SKILL.md +1 -1
  10. package/skills/nansen-exit-signals/SKILL.md +1 -1
  11. package/skills/nansen-fund-tracker/SKILL.md +1 -1
  12. package/skills/nansen-general-search/SKILL.md +1 -1
  13. package/skills/nansen-holder-analysis/SKILL.md +1 -1
  14. package/skills/nansen-limit-orders/SKILL.md +1 -1
  15. package/skills/nansen-perp-screener/SKILL.md +1 -1
  16. package/skills/nansen-perp-trader-profile/SKILL.md +1 -1
  17. package/skills/nansen-polymarket-deep-dive/SKILL.md +1 -1
  18. package/skills/nansen-polymarket-insider-scan/SKILL.md +1 -1
  19. package/skills/nansen-polymarket-trader-profile/SKILL.md +1 -1
  20. package/skills/nansen-portfolio-tracker/SKILL.md +1 -1
  21. package/skills/nansen-prediction-markets/SKILL.md +1 -1
  22. package/skills/nansen-sm-cross-chain-flows/SKILL.md +1 -1
  23. package/skills/nansen-smart-alerts/SKILL.md +1 -1
  24. package/skills/nansen-smart-money-alpha/SKILL.md +1 -1
  25. package/skills/nansen-smart-money-tracker/SKILL.md +1 -1
  26. package/skills/nansen-smart-money-trend/SKILL.md +1 -1
  27. package/skills/nansen-token-research/SKILL.md +1 -1
  28. package/skills/nansen-token-screener/SKILL.md +1 -1
  29. package/skills/nansen-token-transfer-analysis/SKILL.md +1 -1
  30. package/skills/nansen-trading/SKILL.md +1 -1
  31. package/skills/nansen-wallet-batch/SKILL.md +1 -1
  32. package/skills/nansen-wallet-clustering/SKILL.md +1 -1
  33. package/skills/nansen-wallet-deep-dive/SKILL.md +1 -1
  34. package/skills/nansen-wallet-keychain-migration/SKILL.md +1 -1
  35. package/skills/nansen-wallet-manager/SKILL.md +1 -1
  36. package/skills/nansen-wallet-profiler/SKILL.md +1 -1
  37. package/skills/nansen-web-fetcher/SKILL.md +1 -1
  38. package/skills/nansen-web-searcher/SKILL.md +1 -1
  39. package/src/auth-credentials.js +1 -1
  40. package/src/auth-device.js +1 -1
  41. package/src/auth-login.js +4 -5
  42. package/src/auth-state.js +2 -2
  43. package/src/auto-paginate.js +31 -15
  44. package/src/cli.js +13 -12
  45. package/src/limit-order.js +1 -1
  46. package/src/schema.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#723](https://github.com/nansen-ai/nansen-cli/pull/723) [`08f6867`](https://github.com/nansen-ai/nansen-cli/commit/08f68678df3b54f36ed4dbdf5a07bc1f0645aa48) Thanks [@hulk-linus](https://github.com/apps/hulk-linus)! - Clarify the native-lock error and document Alpine's missing musl prebuild for saved authentication.
8
+
9
+ - [#719](https://github.com/nansen-ai/nansen-cli/pull/719) [`7aeadd6`](https://github.com/nansen-ai/nansen-cli/commit/7aeadd68bfc01b5f9c5a43fab3301e820b9b27d8) Thanks [@hulk-linus](https://github.com/apps/hulk-linus)! - Explain the 2.0.0 `data.data` and descriptive-array row changes for table, CSV, and NDJSON output in the README, with a token screener before/after CSV example. Default JSON output is unchanged.
10
+
11
+ - [#717](https://github.com/nansen-ai/nansen-cli/pull/717) [`cbf3199`](https://github.com/nansen-ai/nansen-cli/commit/cbf319950569e9ba0cfcf0a15d4b756dc108f9be) Thanks [@hulk-linus](https://github.com/apps/hulk-linus)! - Ignore blank NANSEN_API_KEY values and use saved authentication.
12
+
13
+ - [#718](https://github.com/nansen-ai/nansen-cli/pull/718) [`f3cbb0f`](https://github.com/nansen-ai/nansen-cli/commit/f3cbb0f35a9cc5699b2bd4fda6f6d0a5d42c0863) Thanks [@hulk-linus](https://github.com/apps/hulk-linus)! - Fail browser login immediately without an interactive terminal and direct headless callers to API-key setup.
14
+
15
+ - [#720](https://github.com/nansen-ai/nansen-cli/pull/720) [`f9c7c0e`](https://github.com/nansen-ai/nansen-cli/commit/f9c7c0e16bfd71747f37856ede3b99ca09261626) Thanks [@hulk-linus](https://github.com/apps/hulk-linus)! - Keep CSV, table and NDJSON output from treating primitive or empty envelope arrays as rows.
16
+
3
17
  ## 2.0.0
4
18
 
5
19
  ### Major Changes
package/README.md CHANGED
@@ -20,13 +20,13 @@ Plain `nansen login` requests fresh browser approval and saves a session automat
20
20
 
21
21
  ```bash
22
22
  nansen login # approve the displayed code, account and CLI
23
- nansen login --no-browser # same approval from a remote terminal
23
+ nansen login --no-browser # approve on another device; same storage requirements
24
24
  nansen auth status # offline, cached/unverified credential selection
25
25
  nansen account # free live check, including with zero research credits
26
26
  nansen logout # clear saved API auth; preserve wallets and environment keys
27
27
  ```
28
28
 
29
- Browser login requires working native credential storage and enabled server admission. Normal-release acceptance is pending; no published browser cohort is established by this branch. See [storage, supported scope and recovery](docs/browser-login.md). Email/password and Google sign-in are supported by the device-flow contract. Apple device sign-in remains deferred.
29
+ Browser login is available in Nansen CLI 2.0.0 and enabled in production. Saved browser sessions are currently qualified on macOS arm64 in a local GUI Terminal with an unlocked login Keychain and local home directory. Other platforms and terminal environments still need qualification. See [storage, supported scope and recovery](docs/browser-login.md). Email/password and Google sign-in are supported by the device-flow contract. Apple device sign-in remains deferred.
30
30
 
31
31
  Existing API-key users can run commands directly with `NANSEN_API_KEY`. It overrides the saved session, even after successful browser login. To deliberately save an injected key, use explicit `nansen login --human`; without an environment key this prompts in a human terminal. `nansen login --api-key <key>` remains available but puts the key in shell history. Saved-auth mutations require the native lock binding. Get a conventional key at [agent setup](https://app.nansen.ai/auth/agent-setup); MCP installation exports a separate persistent API key; it does not export browser sessions.
32
32
 
@@ -93,13 +93,13 @@ Run `nansen schema --pretty` for the full subcommand and field reference.
93
93
 
94
94
  Browser login requests `nansen:api` for the same account/API permissions as a pasted API key, including smart-alert CRUD, public agent, portfolio, web, beta and existing trading API operations. The same endpoint ownership, plan, credit, quota, sanctions and geographic checks apply. Existing OAuth/MCP `nansen:read` grants keep their existing semantics. Wallet signing remains separate.
95
95
 
96
- Plain `nansen login` always starts fresh browser approval, whether no credential, an environment key, a saved key or a saved session exists. It preflights secure storage, shows a link/code, verifies the approved account through the free account endpoint, then replaces the single saved API credential. `nansen login --no-browser` runs the same flow in a remote terminal. Non-TTY login and `--json` emit NDJSON pending and terminal events; the private device code and tokens are never printed.
96
+ Plain `nansen login` always starts fresh browser approval, whether no credential, an environment key, a saved key or a saved session exists. It preflights secure storage, shows a link/code, verifies the approved account through the free account endpoint, then replaces the single saved API credential. `nansen login --no-browser` lets you approve on another device without opening a browser on the CLI machine. It does not remove the native-storage or supported-platform requirements. Browser login requires both stdin and stdout to be terminals; without either, it exits immediately with `NOT_A_TTY` and points to `nansen login --human` with `NANSEN_API_KEY` or `nansen login --api-key-stdin`. In a terminal, `--json` emits NDJSON pending and terminal events; the private device code and tokens are never printed.
97
97
 
98
98
  `NANSEN_API_KEY` still overrides the saved session. Login verifies the new account independently and explains this override. Failed approval or installation preserves the previous selection. `nansen auth status` is offline and labels saved metadata as cached/unverified; `nansen account` checks the effective credential live. `nansen logout` removes saved API authentication and attempts family retirement, preserving wallets and environment keys. Remote revocation and physical deletion failures are reported separately.
99
99
 
100
100
  This is a breaking change for scripts that used plain login to persist an environment key. Use explicit `nansen login --human` with that environment key, or `--api-key <key>` with its existing shell-history risk. Direct key-authenticated commands need no migration. Existing API-key x402 payment behavior is preserved and also applies to browser sessions: a supported HTTP 402 challenge can trigger wallet payment under the existing policy and spending limits. A paid retry does not change the saved credential or top up account credits. Invalid credentials never cause an account switch or payment; login verification remains free and never pays.
101
101
 
102
- No published cohort or normal-release acceptance is claimed. The proposed initial preview is local macOS arm64 with an unlocked Keychain. Linux remote-terminal qualification is pending; Windows is excluded from that first preview. See the [platform scope](docs/browser-login.md#preview-platform-scope). Selected browser sessions renew automatically near expiry. A lost refresh response without a complete stored replacement requires fresh login; the consumed credential is never retried. There is no browser-only research route allowlist. Public API permission parity does not grant internal service identity or wallet signing authority. Account admission and non-account API admission remain separately gated and default off. Public local/remote walkthroughs, ledger evidence and OS verification remain gates. Read [browser login custody, compatibility and release gates](docs/browser-login.md) before cohort use. Browser sessions do not add wallet-signing authority and cannot be exported as MCP API keys.
102
+ Browser login is enabled in production. Saved browser-session storage is [qualified on macOS arm64](docs/browser-login.md#preview-platform-scope); Linux qualification is pending, and Windows and SSH/background sessions are not qualified. Selected sessions renew automatically near expiry. If a refresh response is lost before a complete replacement is stored, follow the fresh-login guidance; the CLI never retries a consumed refresh credential. Browser sessions have the same account API permissions as API keys, subject to existing endpoint checks. They add no wallet-signing or internal-service authority and cannot be exported as MCP API keys. See [storage and recovery](docs/browser-login.md).
103
103
 
104
104
  ## MCP
105
105
 
@@ -453,11 +453,39 @@ inconsistent totals while pages are being fetched, later rows can be omitted. Co
453
453
 
454
454
  ## Output Format
455
455
 
456
- > **Compatibility note:** `--table`, `--format csv`, and `--stream` now render an
457
- > unambiguous descriptive top-level array (for example, `trades` or `holdings`)
458
- > as one row per item, even without `--paginate`. Older versions rendered the
459
- > enclosing response object as a single row. Envelopes with multiple candidate
460
- > data arrays remain unexpanded.
456
+ ### Migrating row output from 1.46.0 to 2.0.0
457
+
458
+ `--table`, `--format csv`, and `--stream` now render each item in a nested
459
+ `data.data` array as a separate row or NDJSON line, even without `--paginate`.
460
+ For example, if `nansen token screener --format csv` receives this response body:
461
+
462
+ ```json
463
+ {"data":{"data":[{"a":1},{"a":2}]}}
464
+ ```
465
+
466
+ The CSV output changes from one row containing the nested object as a JSON string:
467
+
468
+ ```csv
469
+ data
470
+ "{""data"":[{""a"":1},{""a"":2}]}"
471
+ ```
472
+
473
+ to two rows with the item field as the header:
474
+
475
+ ```csv
476
+ a
477
+ 1
478
+ 2
479
+ ```
480
+
481
+ `--table` makes the same one-to-two-row change. `--stream` changes from one
482
+ NDJSON line for the enclosing object to one line per item. A single unambiguous
483
+ descriptive top-level array, such as `trades` or `holdings`, also expands into
484
+ individual rows or lines. Older versions rendered its enclosing object as one
485
+ row or line. Envelopes with multiple candidate data arrays remain unexpanded.
486
+ Default JSON output still contains the complete response body.
487
+
488
+ ### Response envelope
461
489
 
462
490
  ```json
463
491
  { "success": true, "data": <api_response> }
@@ -1,14 +1,14 @@
1
1
  # Browser login
2
2
 
3
- Browser login saves a session after you approve the CLI in your browser. This source includes browser login, but normal-release acceptance is still pending. No published browser-login cohort is established by these docs. Existing direct API-key commands remain available.
3
+ Browser login saves a session after you approve the CLI in your browser. It is available in Nansen CLI 2.0.0 and enabled in production. Existing direct API-key commands remain available.
4
4
 
5
5
  ## Preview platform scope
6
6
 
7
- The proposed initial preview is limited to macOS arm64, a local Terminal in a GUI login session, an unlocked login Keychain and a local home directory. It remains subject to release approval. Background agents, SSH sessions and network or synchronized home directories are not qualified by a successful local Terminal login.
7
+ The initial preview is limited to macOS arm64, a local Terminal in a GUI login session, an unlocked login Keychain and a local home directory. Background agents, SSH sessions and network or synchronized home directories are not qualified by a successful local Terminal login.
8
8
 
9
9
  Linux live remote-login qualification is pending. Windows is excluded from the initial preview. The presence of an OS adapter or native prebuilt package does not establish support. Desktop prompt cancellation and OS login/reboot persistence remain unverified.
10
10
 
11
- Browser login requires enabled server access and working native credential storage. If the store is locked, unlock it and retry from the supported Terminal context. Repeating browser approval does not repair Keychain access. Missing native dependencies require reinstalling with optional dependencies enabled. There is no plaintext session-storage fallback.
11
+ Browser login requires enabled server access and working native credential storage. If the store is locked, unlock it and retry from the supported Terminal context. Repeating browser approval does not repair Keychain access. If optional dependencies were omitted, reinstall with them enabled. A platform without a compatible prebuild still cannot use saved authentication. There is no plaintext session-storage fallback.
12
12
 
13
13
  ## Commands and selection
14
14
 
@@ -22,11 +22,13 @@ nansen logout
22
22
 
23
23
  Plain `nansen login` always requests fresh browser approval, even when you already have a saved session or API key. Check the displayed code, account, client and requested access before approving. Visiting the link alone grants nothing. Email/password and Google are the documented sign-in methods; Apple device sign-in is not supported by this flow.
24
24
 
25
+ Browser login needs both stdin and stdout connected to a terminal. In CI or another headless environment, set `NANSEN_API_KEY` and run `nansen login --human`, or pipe a key to `nansen login --api-key-stdin`. Plain login and `--no-browser` fail immediately without a terminal rather than waiting for device approval.
26
+
25
27
  `--no-browser` runs the same flow without opening a browser automatically. You can approve on another device; the terminal needs no inbound callback and still needs usable native storage.
26
28
 
27
29
  Ordinary commands prefer an existing supported explicit credential override, then `NANSEN_API_KEY`, then the active saved credential. Plain login does not copy an environment key into config. The candidate browser session is checked independently before it replaces a saved credential. An environment key still takes precedence afterward; unset it to use the saved session.
28
30
 
29
- Explicit legacy key setup remains available through `nansen login --human` and `nansen login --api-key <key>`. Prefer the hidden prompt over placing secrets in shell arguments. Legacy setup retains option, environment, then hidden-prompt precedence. No new global key option or named profile is introduced.
31
+ Explicit legacy key setup remains available through `nansen login --human`, `nansen login --api-key-stdin` and `nansen login --api-key <key>`. Prefer the hidden prompt or stdin from a secret manager or protected file over placing secrets in shell arguments. Legacy setup retains option, environment, then hidden-prompt precedence. No new global key option or named profile is introduced.
30
32
 
31
33
  | Starting state | Plain login | Ordinary commands after success |
32
34
  | --- | --- | --- |
@@ -51,7 +53,7 @@ Only matching trusted Nansen API origins receive session credentials. Arbitrary
51
53
 
52
54
  ## Machine output
53
55
 
54
- `login --json` and non-TTY login emit NDJSON. There is one pending event and one terminal event on a normal approval attempt. Preflight failure emits only the terminal error. Human progress goes to stderr in machine mode.
56
+ `login --json` emits NDJSON when browser login runs in a terminal. There is one pending event and one terminal event on a normal approval attempt. Preflight failure emits only the terminal error. Human progress goes to stderr in machine mode. Without a terminal, browser login fails before pairing starts.
55
57
 
56
58
  ```json
57
59
  {"version":1,"event":"pending","verification_uri":"https://idp.nansen.ai/device?user_code=ABCD-EFGH","user_code":"ABCD-EFGH","expires_at":"2026-09-19T00:10:00.000Z"}
@@ -68,6 +70,10 @@ The CLI coordinates reads and writes across processes with native locking. Only
68
70
 
69
71
  Native lock and keyring bindings are optional package dependencies, but are required for saved-auth writes and browser-session storage. Help, offline diagnostics and direct environment/API-key requests do not open the browser-session store. macOS uses Keychain, Linux uses persistent Secret Service, and the Windows adapter uses Credential Manager. These implementations do not widen the preview platform scope above. Windows persistence may roam according to OS policy; device-local-only storage is not promised.
70
72
 
73
+ For `nansen-cli@2.0.0`, stock Alpine Linux on x64 cannot load native locking. Its musl install includes `fs-native-extensions@1.5.1`, but that package has no `linux-x64-musl` prebuild. `nansen login --human` and `nansen logout` return `AUTH_LOCK_UNAVAILABLE` even with optional dependencies enabled. The musl keyring binding loads, but this does not establish that a persistent Secret Service is available.
74
+
75
+ On Alpine, pass `NANSEN_API_KEY` in the environment for ordinary commands and do not rely on saved-auth writes or logout. Follow the offline recovery guidance below if you already have saved authentication to remove. Linux browser-login qualification remains pending regardless of binding availability.
76
+
71
77
  The session format uses chunked secure entries and a manifest. Incomplete, mixed or corrupt entries are rejected. Larger-than-supported sessions fail without replacing the previous credential. Do not manually modify these entries.
72
78
 
73
79
  Renewal upgrades authentication metadata to v2. Logout retains v2 metadata, so installing an older pre-v2 CLI after logout is not a supported in-place downgrade. Use a tested compatible recovery version. Never force a metadata version, delete journals or restore a superseded key to make an older binary run. Do not run older and newer auth writers concurrently.
@@ -94,7 +100,7 @@ A locked store can allow deselection while preventing physical deletion. Unlock
94
100
 
95
101
  ## Offline recovery without native locking
96
102
 
97
- Restore the native optional dependencies before modifying saved authentication. Environment/API-key requests, help and offline diagnostics remain usable without opening the browser-session store. Do not use an incompatible older CLI as a recovery shortcut. Platforms without a verified working native binding are outside the browser-login preview.
103
+ Restore a compatible native locking binding before modifying saved authentication. Reinstalling optional dependencies alone cannot add a missing platform prebuild. Environment/API-key requests, help and offline diagnostics remain usable without opening the browser-session store. Do not use an incompatible older CLI as a recovery shortcut. Platforms without a verified working native binding are outside the browser-login preview.
98
104
 
99
105
  For emergency removal of a **legacy saved API key only**, first stop every CLI/auth process, including older CLI versions. If any pending, corrupt or unrecognized auth-operations journal exists, stop and use a compatible recovery binary or support-assisted reconciliation instead. Back up config.json securely without displaying its contents. In `~/.nansen/config.json`, remove only `apiKey` and replace `auth` with `{"version":1,"selectionEpoch":"<fresh UUID>","active":{"kind":"none"}}`. If the existing auth version is 2, retain version 2 in this legacy-key-only tombstone; do not downgrade it. Generate the UUID with `node -e 'console.log(require("node:crypto").randomUUID())'`; it is not a secret. Preserve every other config field, file permissions and all wallet files. Do not modify a config whose `auth.active.kind` is `session`: restore native locking instead so its generation remains available for retirement. Do not delete `auth-operations`, lock files or OS credential entries. This offline edit removes saved-key selection only; it does not revoke an API key or remove an environment override. Once native support is restored, rerun `nansen logout` to drain pending cleanup. The packaged copy of this document is available under `docs/browser-login.md` in the installed package.
100
106
 
@@ -112,6 +118,6 @@ Set `DO_NOT_TRACK=1` or `NANSEN_NO_TELEMETRY=1` to disable telemetry. Login/logo
112
118
 
113
119
  ## Release status
114
120
 
115
- Browser-login publication and production access require separate release approval. The proposed platform scope above is not a normal-release support claim. Current source code or a passing test does not establish that browser login is enabled for your account. Use the documented API-key setup if browser access is unavailable.
121
+ Nansen CLI 2.0.0 was published on September 28, 2026, and browser login is enabled in production. The preview platform limits above still apply. Publication does not qualify additional operating systems or terminal environments. Use API-key commands outside that scope or when browser access is unavailable.
116
122
 
117
123
  Maintainers should use the [release checklist](https://github.com/nansen-ai/nansen-cli/blob/main/docs/releases/browser-login-checklist.md) in the repository. Internal validation captures, deployment inventories and incident records belong in access-controlled project records, not the public package.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nansen-cli",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "AI-agent CLI for Nansen API analytics, DEX swaps, and cross-chain trading",
5
5
  "main": "src/index.js",
6
6
  "type": "module",
@@ -131,7 +131,7 @@ async function testQuery() {
131
131
  if (selection.kind === "anonymous") {
132
132
  log();
133
133
  log(`Run ${CYAN}nansen login${RESET} for browser approval, or use NANSEN_API_KEY directly.`);
134
- log(`Browser login requires a supported OS credential store and enabled server admission. See docs/browser-login.md in this package.`);
134
+ log(`Browser login is enabled in production; saved sessions need a supported OS credential store. See docs/browser-login.md in this package.`);
135
135
  return;
136
136
  }
137
137
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -64,6 +64,6 @@ Cost: 5-50 credits per call
64
64
 
65
65
  ## Browser session scope
66
66
 
67
- Plain `nansen login` requests fresh browser approval; `--no-browser` prints the link/code for remote use. NANSEN_API_KEY overrides the single saved credential. Use `nansen auth status` for offline cached/unverified selection details and `nansen account` for a free live check. Explicit `login --human` or `login --api-key` retains legacy key setup. Selected browser sessions renew automatically; uncertain renewal requires fresh login without replay or fallback to another account/payment.
67
+ Plain `nansen login` requests fresh browser approval; `--no-browser` prints the link/code for approval on another device and keeps the same native-storage requirements. NANSEN_API_KEY overrides the single saved credential. Use `nansen auth status` for offline cached/unverified selection details and `nansen account` for a free live check. Explicit `login --human` or `login --api-key` retains legacy key setup. Selected browser sessions renew automatically; uncertain renewal requires fresh login without replay or fallback to another account/payment.
68
68
 
69
- Browser nansen:api grants have API-key-equivalent account permissions, subject to enabled admission and the same endpoint restrictions. Internal service identity and wallet signing are not granted. Browser sessions cannot authorize wallet signing or be exported as MCP keys. Normal-release acceptance and a published cohort remain pending.
69
+ Browser nansen:api grants have API-key-equivalent account permissions, subject to enabled admission and the same endpoint restrictions. Internal service identity and wallet signing are not granted. Browser sessions cannot authorize wallet signing or be exported as MCP keys. CLI 2.0.0 is published; the preview platform limits above still apply.
@@ -16,7 +16,7 @@ allowed-tools: Bash(nansen:*), Bash(node:*), Bash(npx:*), Bash(ngrok:*), Write
16
16
  ---
17
17
  ## Authentication
18
18
 
19
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
19
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
20
20
 
21
21
 
22
22
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -20,7 +20,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
20
20
 
21
21
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
22
22
 
23
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
23
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
24
24
 
25
25
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
26
26
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -17,7 +17,7 @@ allowed-tools: Bash(nansen:*)
17
17
  ---
18
18
  ## Authentication
19
19
 
20
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
20
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
21
21
 
22
22
 
23
23
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -19,7 +19,7 @@ Browser login requests `nansen:api` for API-key-equivalent account API permissio
19
19
 
20
20
  Before any research command or loop, require an explicitly selected API key or saved browser session. Run `nansen auth status` first. Its cached/unverified metadata does not prove credential validity or unlocked storage. Cached access-token expiry alone does not mean the session is unusable: the CLI normally renews a selected session automatically during an already-authorized research task, without another consent request or a separate account check. Stop on anonymous selection, invalid authentication state, blocked or uncertain renewal/cleanup, or an actual authentication failure, including rejected or expired refresh authority. Follow the CLI error guidance; use the free `nansen account` check when troubleshooting calls for it. Do not unset a failed key, erase a session or switch to anonymous access to retry.
21
21
 
22
- Use `nansen login` for fresh browser approval when server admission and the supported platform cohort are enabled, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser rollout acceptance is still pending.
22
+ Use `nansen login` for fresh browser approval within the documented platform scope, or configure a conventional API key. `NANSEN_API_KEY` overrides the saved session. OpenClaw's optional `primaryEnv` mapping preserves configured API-key injection; it is not a required-key gate or proof of authentication. Normal credits and entitlements apply. Login does not purchase credits. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
23
23
 
24
24
  API keys and browser sessions use the same automatic x402 payment behavior: a supported HTTP 402 challenge can spend funds from the configured wallet under existing wallet authorization, payment policy and spending limits. Each call, including calls in loops, can incur a payment. Authentication, authorization and session-renewal failures never trigger payment; login verification and `nansen account` never pay automatically. Anonymous x402 remains available as a separate paid workflow requiring explicit user intent and payment setup. Do not run this research workflow anonymously or switch to anonymous access after authentication fails.
25
25
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -15,7 +15,7 @@ allowed-tools: Bash(nansen:*)
15
15
  ---
16
16
  ## Authentication
17
17
 
18
- Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser rollout acceptance is still pending.
18
+ Nansen account API calls accept a selected `nansen:api` browser session or conventional API key with the same permissions. `NANSEN_API_KEY` takes precedence; optional `primaryEnv` preserves configured-key injection. Run `nansen auth status` for offline selection. Cached access expiry alone permits automatic renewal during an authorized task. Stop on anonymous selection, invalid state, blocked/uncertain renewal or actual auth failure; never drop a credential or fall back to anonymous x402 payment. Browser login does not grant wallet signing, privileged service identity or a persistent MCP integration key. Preserve all confirmation, signing, sanctions and geographic checks below. Browser login is available in CLI 2.0.0 within the [macOS arm64 preview scope](https://github.com/nansen-ai/nansen-cli/blob/main/docs/browser-login.md#preview-platform-scope).
19
19
 
20
20
 
21
21
 
@@ -46,7 +46,7 @@ export function readAuthConfig(env = process.env, devConfigPath = DEV_CONFIG) {
46
46
  }
47
47
  export function resolveCredential({ env = process.env, explicitKey, snapshot = readAuthConfig(env) } = {}) {
48
48
  if (explicitKey !== undefined) return explicitKey === null ? { kind: 'anonymous', source: null } : { kind: 'api-key', source: 'explicit', apiKey: explicitKey };
49
- if (env.NANSEN_API_KEY !== undefined) return { kind: 'api-key', source: 'env', apiKey: env.NANSEN_API_KEY };
49
+ if (typeof env.NANSEN_API_KEY === 'string' && env.NANSEN_API_KEY.trim()) return { kind: 'api-key', source: 'env', apiKey: env.NANSEN_API_KEY };
50
50
  if (snapshot.configError) return { kind: 'invalid', source: 'config', error: snapshot.configError };
51
51
  const { config } = snapshot;
52
52
  if (config.auth?.active?.kind === 'session') return { kind: 'session', source: 'session', ...config.auth.active, selectionEpoch: config.auth.selectionEpoch };
@@ -119,7 +119,7 @@ export function validateSession(bundle, now = Date.now(), { allowExpired = false
119
119
  const publicJwk = createPublicKey(createPrivateKey({ key: bundle.privateJwk, format: 'jwk' })).export({ format: 'jwk' });
120
120
  const jkt = createHash('sha256').update(JSON.stringify({ crv: publicJwk.crv, kty: publicJwk.kty, x: publicJwk.x, y: publicJwk.y })).digest('base64url');
121
121
  if (extra || !signature || h.alg !== 'ES256' || publicJwk.crv !== 'P-256' || claims.iss !== bundle.issuer || claims.aud !== bundle.audience || claims.scope !== 'nansen:api' || claims.cnf?.jkt !== jkt || !Number.isFinite(claims.exp) || !Number.isFinite(bundle.expiresAt) || bundle.expiresAt > claims.exp * 1000) throw new Error();
122
- if (claims.session_access_revocation_version !== 1) throw new AuthError('BROWSER_SESSION_SETUP_REQUIRED', 'The session lacks supported revocation coverage. Browser login may not be enabled for this cohort. Ask the operator to verify issuer SESSION_ACCESS_REVOCATION_ENABLED and API BROWSER_SESSION_ACCOUNT_ENABLED before retrying; repeated pairing will not repair server setup.');
122
+ if (claims.session_access_revocation_version !== 1) throw new AuthError('BROWSER_SESSION_SETUP_REQUIRED', "The session lacks supported revocation coverage. Run nansen login again. If this persists, ask support to check the session issuer's API audience and revocation claim.");
123
123
  if (!Number.isFinite(claims.iat) || !Number.isFinite(claims.nbf) || claims.exp <= claims.iat || typeof claims.sub !== 'string' || !claims.sub || (bundle.accountId !== undefined && claims.sub !== bundle.accountId)) throw new Error();
124
124
  if (claims.exp - claims.iat > 3600) throw lifetimeError();
125
125
  if (claims.nbf > now / 1000 + 60) throw new AuthError('SESSION_CLOCK_SKEW', 'Session time is ahead of the local clock. Synchronize system time and check issuer clock configuration before retrying login.');
package/src/auth-login.js CHANGED
@@ -54,11 +54,10 @@ export async function browserLogin({ flags = {}, env = process.env, isTTY = proc
54
54
  cleanup.push(...result.cleanup);
55
55
  try { cleanup.push(...await state.finish(attempt)); } catch { cleanup.push({ local: 'incomplete', remote: 'unconfirmed' }); }
56
56
  attempt = null;
57
- const override = env.NANSEN_API_KEY !== undefined;
58
- const overrideMessage = override && !env.NANSEN_API_KEY.trim()
59
- ? 'NANSEN_API_KEY is blank. Commands will fail until you unset it or supply a valid environment key.'
60
- : 'Commands still use NANSEN_API_KEY. Unset it to use this session.';
61
- progress(override ? `Browser session saved for ${bundle.accountId}. ${overrideMessage}` : `Browser session saved for ${bundle.accountId}.`);
57
+ const override = Boolean(env.NANSEN_API_KEY?.trim());
58
+ progress(override
59
+ ? `Browser session saved for ${bundle.accountId}. Commands still use NANSEN_API_KEY. Unset it to use this session.`
60
+ : `Browser session saved for ${bundle.accountId}.`);
62
61
  for (const message of cleanupMessage(cleanup)) progress(message);
63
62
  emit('saved', { account_id: bundle.accountId, effective_source: override ? 'env' : 'session', cleanup });
64
63
  } catch (error) {
package/src/auth-state.js CHANGED
@@ -78,7 +78,7 @@ async function waitTurn(previous, signal) {
78
78
  }
79
79
  async function loadLocks() {
80
80
  try { return (await import('fs-native-extensions')).default; }
81
- catch { throw new AuthError('AUTH_LOCK_UNAVAILABLE', 'Native authentication locking is unavailable. Reinstall nansen-cli with optional dependencies to save or remove authentication. Legacy key setup and logout also require this binding. Environment API keys still work. For offline saved-key removal, stop every CLI/auth process, then follow docs/browser-login.md#offline-recovery-without-native-locking. Do not delete auth journals or wallet files.'); }
81
+ catch { throw new AuthError('AUTH_LOCK_UNAVAILABLE', 'Native authentication locking is unavailable. Reinstall nansen-cli with optional dependencies; if they are installed, this platform may lack a compatible fs-native-extensions prebuild. Legacy key setup and logout require this binding. Environment API keys still work. For offline saved-key removal, stop every CLI/auth process, then follow docs/browser-login.md#offline-recovery-without-native-locking. Do not delete auth journals or wallet files.'); }
82
82
  }
83
83
  export function createAuthState({ directory = authDirectory(), store = createAuthStore({ directory }), retire = retireSession, refresh = refreshSession, now = Date.now, barrier = async () => {}, locks = loadLocks, waitMs = 15000, operationMs = 60000 } = {}) {
84
84
  let operationSignal;
@@ -250,7 +250,7 @@ export function createAuthState({ directory = authDirectory(), store = createAut
250
250
  }
251
251
  const blockedReason = error => ({ SESSION_REFRESH_REJECTED: 'rejected', BROWSER_SESSION_SETUP_REQUIRED: 'setup', SESSION_CLOCK_SKEW: 'clock', SESSION_EXPIRED: 'expired', SESSION_REFRESH_PROTOCOL_ERROR: 'protocol' }[error.code] || 'uncertain');
252
252
  function renewalError(reason) {
253
- if (reason === 'setup') return new AuthError('BROWSER_SESSION_SETUP_REQUIRED', 'The renewed session has incompatible issuer setup. Ask the operator to verify the supported 3600-second lifetime, SESSION_ACCESS_REVOCATION_ENABLED and BROWSER_SESSION_ACCOUNT_ENABLED. Renewal may have consumed the credential; do not retry it. Pair again only after server setup is repaired.');
253
+ if (reason === 'setup') return new AuthError('BROWSER_SESSION_SETUP_REQUIRED', 'The renewed session has incompatible issuer setup. Ask support to check the supported 3600-second lifetime and revocation coverage. Renewal may have consumed the credential; do not retry it. Run nansen login after the issuer is fixed.');
254
254
  if (reason === 'clock') return new AuthError('SESSION_CLOCK_SKEW', 'The renewed session is ahead of the local clock. Synchronize system time, then run nansen login. The possibly consumed refresh credential will not be retried.');
255
255
  if (reason === 'expired') return new AuthError('SESSION_EXPIRED', 'The renewed access token was already expired. Check system time and issuer configuration, then run nansen login. The possibly consumed refresh credential will not be retried.');
256
256
  if (reason === 'retry_exhausted') return new AuthError('SESSION_REFRESH_RETRY_EXHAUSTED', 'Session renewal repeatedly failed before rotation. Check connectivity, system time and issuer availability, then run nansen login. Automatic renewal is stopped for this session.');
@@ -16,14 +16,23 @@ export const DEFAULT_MAX_PAGES = 10;
16
16
  // unbounded memory and billed API work from a long-running agent.
17
17
  export const MAX_PAGES_LIMIT = 1000;
18
18
 
19
+ function hasObjectRows(rows) {
20
+ return rows.every(row => row !== null && typeof row === 'object' && !Array.isArray(row));
21
+ }
22
+
19
23
  // Shared by collectPages and cli.js's formatTable/formatCsv/formatStream so
20
24
  // pagination and output formatting recognise the same row shapes.
21
- export function locateRows(page, { descriptive = false } = {}) {
25
+ export function locateRows(page, { descriptive = false, descriptiveKey, allowEmptyDescriptive = false } = {}) {
22
26
  if (page?.success === false) return null;
23
- if (Array.isArray(page)) return { rows: page, rebuild: rows => ({ data: rows }) };
24
- if (Array.isArray(page?.data)) return { rows: page.data, rebuild: rows => ({ ...page, data: rows }) };
25
- if (Array.isArray(page?.results)) return { rows: page.results, rebuild: rows => ({ ...page, results: rows }) };
26
- if (Array.isArray(page?.data?.data)) {
27
+ if (descriptiveKey) {
28
+ const rows = page?.[descriptiveKey];
29
+ if (!Array.isArray(rows) || !hasObjectRows(rows)) return null;
30
+ return { rows, key: descriptiveKey, rebuild: mergedRows => ({ ...page, [descriptiveKey]: mergedRows }) };
31
+ }
32
+ if (Array.isArray(page) && hasObjectRows(page)) return { rows: page, rebuild: rows => ({ data: rows }) };
33
+ if (Array.isArray(page?.data) && hasObjectRows(page.data)) return { rows: page.data, rebuild: rows => ({ ...page, data: rows }) };
34
+ if (Array.isArray(page?.results) && hasObjectRows(page.results)) return { rows: page.results, rebuild: rows => ({ ...page, results: rows }) };
35
+ if (Array.isArray(page?.data?.data) && hasObjectRows(page.data.data)) {
27
36
  return {
28
37
  rows: page.data.data,
29
38
  rebuild: rows => {
@@ -35,7 +44,7 @@ export function locateRows(page, { descriptive = false } = {}) {
35
44
  },
36
45
  };
37
46
  }
38
- if (Array.isArray(page?.data?.results)) {
47
+ if (Array.isArray(page?.data?.results) && hasObjectRows(page.data.results)) {
39
48
  return {
40
49
  rows: page.data.results,
41
50
  rebuild: rows => {
@@ -47,15 +56,18 @@ export function locateRows(page, { descriptive = false } = {}) {
47
56
  }
48
57
 
49
58
  // Older endpoints use a descriptive top-level key (`trades`, `holdings`,
50
- // `balances`, etc.) rather than `data`. A single array is unambiguous; do
51
- // not count pagination metadata as rows or guess when an envelope contains
52
- // several independent data arrays.
59
+ // `balances`, etc.) rather than `data`. Only a populated array of objects
60
+ // can identify rows here. Empty or primitive arrays may be envelope fields.
53
61
  if (descriptive && page && typeof page === 'object') {
54
- const arrays = Object.entries(page)
55
- .filter(([key, value]) => key !== 'pagination' && Array.isArray(value));
56
- if (arrays.length === 1) {
57
- const [key, rows] = arrays[0];
58
- return { rows, rebuild: mergedRows => ({ ...page, [key]: mergedRows }) };
62
+ const fields = Object.entries(page).filter(([key]) => key !== 'pagination' && key !== 'success');
63
+ const arrays = fields.filter(([, value]) => Array.isArray(value) && value.length > 0 && hasObjectRows(value));
64
+ // Pagination can recognize an empty first page only when the array is
65
+ // the entire payload apart from status and pagination metadata.
66
+ const emptyOnly = allowEmptyDescriptive && fields.length === 1
67
+ && Array.isArray(fields[0][1]) && fields[0][1].length === 0;
68
+ if (arrays.length === 1 || (arrays.length === 0 && emptyOnly)) {
69
+ const [key, rows] = arrays[0] || fields[0];
70
+ return { rows, key, rebuild: mergedRows => ({ ...page, [key]: mergedRows }) };
59
71
  }
60
72
  }
61
73
  return null;
@@ -139,7 +151,11 @@ export async function collectPages(fetchPage, pagination, { maxPages = DEFAULT_M
139
151
  const res = await fetchPage({ ...pagination, page });
140
152
  pagesFetched++;
141
153
  if (res?.success === false) throw failedPageError(res, page);
142
- const located = locateRows(res, { descriptive: true });
154
+ const located = locateRows(res, {
155
+ descriptive: true,
156
+ descriptiveKey: first?.key,
157
+ allowEmptyDescriptive: first === undefined,
158
+ });
143
159
  if (first === undefined) {
144
160
  if (!located) return res;
145
161
  first = located;
package/src/cli.js CHANGED
@@ -463,7 +463,7 @@ export function formatTable(data) {
463
463
  let records = located?.rows || [];
464
464
  if (!located && typeof data === 'object' && data !== null) {
465
465
  // Single object - convert to array
466
- records = [data];
466
+ records = [Array.isArray(data) ? { data } : data];
467
467
  }
468
468
 
469
469
  if (records.length === 0) {
@@ -527,7 +527,7 @@ export function formatCsv(data) {
527
527
  const located = locateRows(data, { descriptive: true });
528
528
  let records = located?.rows || [];
529
529
  if (!located && typeof data === 'object' && data !== null) {
530
- records = [data];
530
+ records = [Array.isArray(data) ? { data } : data];
531
531
  }
532
532
 
533
533
  if (records.length === 0) return '';
@@ -570,7 +570,7 @@ export function formatOutput(data, { pretty = false, table = false, csv = false
570
570
  if (data.success === false) {
571
571
  return { type: 'error', text: formatErrorText(data, { csv }) };
572
572
  }
573
- const body = data.data || data;
573
+ const body = Array.isArray(data.data) ? data : data.data || data;
574
574
  return csv
575
575
  ? { type: 'csv', text: formatCsv(body) }
576
576
  : { type: 'table', text: formatTable(body) };
@@ -1129,7 +1129,7 @@ AUTHENTICATION:
1129
1129
  Authentication failures never trigger payment; login verification and nansen account never auto-pay.
1130
1130
  Browser sessions renew automatically; uncertain renewal requires fresh login.
1131
1131
  Browser nansen:api sessions have API-key-equivalent account permissions; wallet signing is separate.
1132
- Browser login needs native storage and enabled server admission; release gates remain open.
1132
+ Browser login is enabled in production; saved sessions need native storage (see docs/browser-login.md).
1133
1133
  Public API endpoints keep their usual account, plan and credit checks; MCP key export is separate.
1134
1134
 
1135
1135
  TRADING:
@@ -1513,6 +1513,9 @@ export function buildCommands(deps = {}) {
1513
1513
  if (flags['api-key']) throw new CommandError('--api-key requires a value.', 'MISSING_PARAM');
1514
1514
  if ('api-key' in options && typeof options['api-key'] !== 'string') throw new CommandError('--api-key must be a single key string.', 'INVALID_PARAMS');
1515
1515
  if (!fromStdin && !flags.human && options['api-key'] === undefined) {
1516
+ if (!stdinTTY || !stdoutTTY) {
1517
+ throw new CommandError('Browser login requires an interactive terminal. In a headless environment, set NANSEN_API_KEY and run nansen login --human, or pipe a key to nansen login --api-key-stdin.', 'NOT_A_TTY');
1518
+ }
1516
1519
  return browserLoginFn({ flags, env, isTTY: stdoutTTY, log, errorOutput, state: authState });
1517
1520
  }
1518
1521
  if (flags['no-browser']) throw new CommandError('--no-browser cannot be combined with legacy key setup.', 'INVALID_PARAMS');
@@ -1598,12 +1601,10 @@ export function buildCommands(deps = {}) {
1598
1601
  } finally { await authState.finish(attempt); }
1599
1602
  const blankEnvKey = env.NANSEN_API_KEY !== undefined && !env.NANSEN_API_KEY.trim();
1600
1603
  if (fromStdin && flags.json) {
1601
- log(JSON.stringify({ event: 'saved', effective_source: env.NANSEN_API_KEY !== undefined ? 'env' : 'config', environment_key_blank: blankEnvKey, cleanup }));
1604
+ log(JSON.stringify({ event: 'saved', effective_source: blankEnvKey || env.NANSEN_API_KEY === undefined ? 'config' : 'env', environment_key_blank: blankEnvKey, cleanup }));
1602
1605
  return;
1603
1606
  }
1604
- if (env.NANSEN_API_KEY !== undefined) log(blankEnvKey
1605
- ? 'NANSEN_API_KEY is blank. Commands will fail until you unset it or supply a valid environment key.'
1606
- : 'Commands still use NANSEN_API_KEY. Unset it to use the saved credential.');
1607
+ if (env.NANSEN_API_KEY?.trim()) log('Commands still use NANSEN_API_KEY. Unset it to use the saved credential.');
1607
1608
 
1608
1609
  log(`✓ Saved to ${getConfigFileFn()}\n`);
1609
1610
  // Verification responses may reflect the submitted key. Stdin login
@@ -1614,7 +1615,7 @@ export function buildCommands(deps = {}) {
1614
1615
  if (!fromStdin && accountInfo?.credits_remaining !== undefined) {
1615
1616
  log(`Credits remaining: ${accountInfo.credits_remaining}`);
1616
1617
  }
1617
- log(blankEnvKey ? '\nUnset NANSEN_API_KEY to use the saved credential, then try:' : '\nYou can now use the Nansen CLI. Try:');
1618
+ log('\nYou can now use the Nansen CLI. Try:');
1618
1619
  log(' nansen research token screener --chain solana --pretty');
1619
1620
  },
1620
1621
 
@@ -1623,7 +1624,7 @@ export function buildCommands(deps = {}) {
1623
1624
  if (result.cleanup.some(item => item.local === 'incomplete')) log('Saved authentication selection cleared; secure-store deletion incomplete.');
1624
1625
  else log(result.removed ? 'Local credentials removed.' : 'No saved credentials found.');
1625
1626
  for (const message of cleanupMessage(result.cleanup)) log(message);
1626
- if (env.NANSEN_API_KEY !== undefined) log('Warning: NANSEN_API_KEY remains active. Run: unset NANSEN_API_KEY');
1627
+ if (env.NANSEN_API_KEY?.trim()) log('Warning: NANSEN_API_KEY remains active. Run: unset NANSEN_API_KEY');
1627
1628
  },
1628
1629
 
1629
1630
  'help': async (_args, _apiInstance, _flags, _options) => {
@@ -2522,8 +2523,8 @@ export async function runCLI(rawArgs, deps = {}) {
2522
2523
  const inputInteractiveDeps = {
2523
2524
  ...deps,
2524
2525
  isTTY: isInputTTY,
2525
- stdoutTTY: isTTY,
2526
- stdinTTY: isInputTTY,
2526
+ stdoutTTY: isTTY === true,
2527
+ stdinTTY: isInputTTY === true,
2527
2528
  promptFn: deps.promptFn ?? prompt,
2528
2529
  confirmationPromptFn: deps.confirmationPromptFn ?? promptForConfirmation,
2529
2530
  confirmationLog: deps.confirmationLog ?? errorOutput,
@@ -111,7 +111,7 @@ async function loFetch(method, endpoint, { token, body, query } = {}) {
111
111
  if (token) {
112
112
  headers['Authorization'] = `Bearer ${token}`;
113
113
  }
114
- if (process.env.NANSEN_API_KEY) {
114
+ if (process.env.NANSEN_API_KEY?.trim()) {
115
115
  headers['X-API-Key'] = process.env.NANSEN_API_KEY;
116
116
  }
117
117
 
package/src/schema.json CHANGED
@@ -2690,7 +2690,7 @@
2690
2690
  }
2691
2691
  },
2692
2692
  "login": {
2693
- "description": "Fresh browser approval in every starting state for API-key-equivalent account API permissions (nansen:api). Wallet signing and MCP key export remain separate. Plain login never persists NANSEN_API_KEY; it still overrides commands. Selected sessions renew automatically; uncertain renewal requires fresh login. Native custody and enabled server admission required; release acceptance pending.",
2693
+ "description": "Fresh browser approval in every starting state for API-key-equivalent account API permissions (nansen:api). Wallet signing and MCP key export remain separate. Plain login never persists NANSEN_API_KEY; it still overrides commands. Selected sessions renew automatically; uncertain renewal requires fresh login. Browser login is enabled in production; saved sessions need native storage (see docs/browser-login.md).",
2694
2694
  "options": {
2695
2695
  "no-browser": {
2696
2696
  "type": "boolean",
@@ -2698,7 +2698,7 @@
2698
2698
  },
2699
2699
  "json": {
2700
2700
  "type": "boolean",
2701
- "description": "Browser login: NDJSON pending and one terminal event; automatic in non-TTY. With --api-key-stdin: one saved event with effective_source, environment_key_blank and cleanup."
2701
+ "description": "Browser login: NDJSON pending and one terminal event with an interactive terminal; non-TTY exits with a JSON error envelope whose code is NOT_A_TTY. With --api-key-stdin: one saved event with effective_source, environment_key_blank and cleanup."
2702
2702
  },
2703
2703
  "human": {
2704
2704
  "type": "boolean",