@secondlayer/cli 13.0.2 → 13.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -5
- package/dist/cli.js +4 -3
- package/dist/cli.js.map +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -14,12 +14,12 @@ secondlayer --version
|
|
|
14
14
|
|
|
15
15
|
Default API is `http://127.0.0.1:3800`. Override with `SL_API_URL`.
|
|
16
16
|
|
|
17
|
-
Writes against a published bind use `INSTANCE_TOKEN` from `secondlayer init
|
|
18
|
-
|
|
17
|
+
Writes against a published bind use `INSTANCE_TOKEN` from `secondlayer init`.
|
|
18
|
+
Loopback reads need no token. `SL_API_KEY` is a legacy alias of `INSTANCE_TOKEN`.
|
|
19
19
|
|
|
20
20
|
```bash
|
|
21
21
|
export SL_API_URL=http://127.0.0.1:3800
|
|
22
|
-
export
|
|
22
|
+
export INSTANCE_TOKEN=<from secondlayer init>
|
|
23
23
|
```
|
|
24
24
|
|
|
25
25
|
## Quickstart
|
|
@@ -126,7 +126,7 @@ points at.
|
|
|
126
126
|
| Command | What it does |
|
|
127
127
|
|---|---|
|
|
128
128
|
| `secondlayer index ft-transfers` / `nft-transfers` / `events --event-type <t>` / `contract-calls` | Decoded Index layer. Anonymous reads OK |
|
|
129
|
-
| `secondlayer streams tip` / `events` / `consume` / `reorgs` / `canonical <h>` / `dumps` | Raw chain event firehose. **Requires `
|
|
129
|
+
| `secondlayer streams tip` / `events` / `consume` / `reorgs` / `canonical <h>` / `dumps` | Raw chain event firehose. **Requires `INSTANCE_TOKEN` past loopback** |
|
|
130
130
|
|
|
131
131
|
Reads emit JSON to stdout (`--json` accepted across all read commands); `-o/--output` is a file path, not a format.
|
|
132
132
|
|
|
@@ -168,7 +168,8 @@ operates on both kinds.
|
|
|
168
168
|
|
|
169
169
|
| Var | Purpose |
|
|
170
170
|
|---|---|
|
|
171
|
-
| `
|
|
171
|
+
| `INSTANCE_TOKEN` | From `secondlayer init` for writes. Loopback reads need no token |
|
|
172
|
+
| `SL_API_KEY` | Legacy alias of `INSTANCE_TOKEN` |
|
|
172
173
|
| `SL_API_URL` | Instance API. Default `http://127.0.0.1:3800` |
|
|
173
174
|
| `SL_PLATFORM_API_URL` | Alias of `SL_API_URL` |
|
|
174
175
|
| `STACKS_NETWORK` | Default network (also via `--network <local\|testnet\|mainnet>`) |
|
package/dist/cli.js
CHANGED
|
@@ -36098,7 +36098,7 @@ var {
|
|
|
36098
36098
|
// package.json
|
|
36099
36099
|
var package_default = {
|
|
36100
36100
|
name: "@secondlayer/cli",
|
|
36101
|
-
version: "13.0.
|
|
36101
|
+
version: "13.0.3",
|
|
36102
36102
|
description: "Run a Stacks index on your own hardware — set it up, restore verified history, and keep it current.",
|
|
36103
36103
|
repository: {
|
|
36104
36104
|
type: "git",
|
|
@@ -41657,11 +41657,12 @@ function registerStartCommand(program2) {
|
|
|
41657
41657
|
success(`config ok (${parsed.config.NETWORK}, ${parsed.config.NODE_MODE})`);
|
|
41658
41658
|
console.log(cmd);
|
|
41659
41659
|
note(" console UI (optional): add --profile console, then `secondlayer console`");
|
|
41660
|
+
note(" /extended view (optional): set EXTENDED_VIEW=1, then curl http://127.0.0.1:3999/extended/v1/status");
|
|
41660
41661
|
});
|
|
41661
41662
|
}
|
|
41662
41663
|
// src/cli.ts
|
|
41663
41664
|
var { version } = package_default;
|
|
41664
|
-
program.name("secondlayer").alias("sl").description("Secondlayer CLI — run a Stacks index on your own hardware").version(version).option("--network <network>", "Override network (local, testnet, mainnet)").option("--api-key <key>", "
|
|
41665
|
+
program.name("secondlayer").alias("sl").description("Secondlayer CLI — run a Stacks index on your own hardware").version(version).option("--network <network>", "Override network (local, testnet, mainnet)").option("--api-key <key>", "Instance or archive credential (overrides INSTANCE_TOKEN)").option("--api-url <url>", "API endpoint (overrides SL_API_URL)").showSuggestionAfterError(true).showHelpAfterError("(run `secondlayer --help` to see available commands)");
|
|
41665
41666
|
program.hook("preAction", (thisCommand) => {
|
|
41666
41667
|
const { network, apiKey, apiUrl } = thisCommand.opts();
|
|
41667
41668
|
if (network)
|
|
@@ -41717,5 +41718,5 @@ program.commandsGroup("Archive:");
|
|
|
41717
41718
|
registerCreditsCommand(program);
|
|
41718
41719
|
program.parse();
|
|
41719
41720
|
|
|
41720
|
-
//# debugId=
|
|
41721
|
+
//# debugId=90E04792038F19D064756E2164756E21
|
|
41721
41722
|
//# sourceMappingURL=cli.js.map
|