polkadot-cli 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +57 -3
- package/dist/cli.mjs +2692 -2280
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -6,6 +6,21 @@ A command-line tool for interacting with Polkadot-ecosystem chains. Manage chain
|
|
|
6
6
|
|
|
7
7
|
Ships with Polkadot and all system parachains preconfigured with multiple fallback RPC endpoints. Add any Substrate-based chain by pointing to its RPC endpoint(s).
|
|
8
8
|
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- ✅ Same syntax as [polkadot-api](https://papi.how) (PAPI)
|
|
12
|
+
- ✅ Chain name prefix — `dot polkadot.query.System.Number`
|
|
13
|
+
- ✅ zsh, bash, and fish autocompletion
|
|
14
|
+
- ✅ Exposes all on-chain metadata documentation
|
|
15
|
+
- ✅ Encode, dry-run, and submit extrinsics
|
|
16
|
+
- ✅ Support for custom signed extensions
|
|
17
|
+
- ✅ Built with agent use in mind — pipe-safe JSON output (`--output json`)
|
|
18
|
+
- ✅ Fuzzy matching with typo suggestions
|
|
19
|
+
- ✅ Account management — BIP39 mnemonics, derivation paths, env-backed secrets, watch-only, dev accounts
|
|
20
|
+
- ✅ Named address resolution across all commands
|
|
21
|
+
- ✅ Runtime API calls — `dot apis.Core.version`
|
|
22
|
+
- ✅ Batteries included — all system parachains and testnets already setup to be used
|
|
23
|
+
|
|
9
24
|
### Preconfigured chains
|
|
10
25
|
|
|
11
26
|
| Network | Chain | Light client |
|
|
@@ -57,6 +72,7 @@ dot chain list
|
|
|
57
72
|
# Re-fetch metadata after a runtime upgrade
|
|
58
73
|
dot chain update # updates default chain
|
|
59
74
|
dot chain update kusama # updates a specific chain
|
|
75
|
+
dot chain update --all # updates all configured chains in parallel
|
|
60
76
|
|
|
61
77
|
# Set default chain
|
|
62
78
|
dot chain default kusama
|
|
@@ -333,6 +349,37 @@ The pallet listing view shows type information inline so you can understand item
|
|
|
333
349
|
|
|
334
350
|
Documentation from the runtime metadata is shown on an indented line below each item. The detail view (`dot inspect Balances.transfer_allow_death`) shows the full argument signature and complete documentation text. Use call inspection to discover argument names, types, and docs before constructing `dot tx` commands.
|
|
335
351
|
|
|
352
|
+
### Runtime APIs
|
|
353
|
+
|
|
354
|
+
Browse and call Substrate runtime APIs. These are top-level APIs exposed by the runtime (e.g. `Core`, `AccountNonceApi`, `TransactionPaymentApi`), accessed as `dot apis.ApiName.method`.
|
|
355
|
+
|
|
356
|
+
```bash
|
|
357
|
+
# List all runtime APIs with method counts
|
|
358
|
+
dot apis
|
|
359
|
+
|
|
360
|
+
# List methods in a specific API (with signatures)
|
|
361
|
+
dot apis.Core
|
|
362
|
+
|
|
363
|
+
# Call a runtime API method
|
|
364
|
+
dot apis.Core.version
|
|
365
|
+
|
|
366
|
+
# With chain prefix
|
|
367
|
+
dot polkadot.apis.Core.version
|
|
368
|
+
|
|
369
|
+
# Show method signature and docs
|
|
370
|
+
dot apis.Core.version --help
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
`api` is an alias for `apis`.
|
|
374
|
+
|
|
375
|
+
Runtime API info requires v15 metadata. If `dot apis` shows 0 APIs, update the cached metadata:
|
|
376
|
+
|
|
377
|
+
```bash
|
|
378
|
+
dot chain update # default chain
|
|
379
|
+
dot chain update people-paseo # specific chain
|
|
380
|
+
dot chain update --all # all configured chains
|
|
381
|
+
```
|
|
382
|
+
|
|
336
383
|
### Focused commands
|
|
337
384
|
|
|
338
385
|
Browse specific metadata categories directly without using `dot inspect`:
|
|
@@ -360,9 +407,13 @@ dot storage System.Account # storage detail
|
|
|
360
407
|
# List pallet constants (dual-purpose — also works as value lookup)
|
|
361
408
|
dot const Balances # list constants
|
|
362
409
|
dot const Balances.ExistentialDeposit # look up value
|
|
410
|
+
|
|
411
|
+
# List runtime APIs
|
|
412
|
+
dot apis # list all APIs
|
|
413
|
+
dot apis.Core # list methods in Core
|
|
363
414
|
```
|
|
364
415
|
|
|
365
|
-
Each command supports `--chain <name>`, `--rpc <url>`, and chain prefix syntax. Singular and plural forms are interchangeable (e.g. `dot call` = `dot calls`, `dot event` = `dot events`).
|
|
416
|
+
Each command supports `--chain <name>`, `--rpc <url>`, and chain prefix syntax. Singular and plural forms are interchangeable (e.g. `dot call` = `dot calls`, `dot event` = `dot events`, `dot api` = `dot apis`).
|
|
366
417
|
|
|
367
418
|
### Submit extrinsics
|
|
368
419
|
|
|
@@ -542,6 +593,7 @@ dot query.System.Account --help # storage type, key/value info, and qu
|
|
|
542
593
|
dot const.Balances.ExistentialDeposit --help # constant type and docs
|
|
543
594
|
dot events.Balances.Transfer --help # event fields and docs
|
|
544
595
|
dot errors.Balances.InsufficientBalance --help # error docs
|
|
596
|
+
dot apis.Core.version --help # runtime API method signature and docs
|
|
545
597
|
```
|
|
546
598
|
|
|
547
599
|
For `tx` commands, omitting both `--from` and `--encode` shows this same help output instead of an error:
|
|
@@ -595,13 +647,15 @@ Once installed, press Tab to complete:
|
|
|
595
647
|
dot qu<Tab> # → query
|
|
596
648
|
dot query.<Tab> # → query.System, query.Balances, ...
|
|
597
649
|
dot query.System.<Tab> # → query.System.Account, query.System.Number, ...
|
|
598
|
-
dot
|
|
650
|
+
dot apis.<Tab> # → apis.Core, apis.Metadata, ...
|
|
651
|
+
dot apis.Core.<Tab> # → apis.Core.version, ...
|
|
652
|
+
dot polkadot.<Tab> # → polkadot.query, polkadot.tx, ..., polkadot.apis
|
|
599
653
|
dot --chain <Tab> # → polkadot, paseo, ...
|
|
600
654
|
dot --from <Tab> # → alice, bob, ..., stored account names
|
|
601
655
|
dot chain <Tab> # → add, remove, update, list, default
|
|
602
656
|
```
|
|
603
657
|
|
|
604
|
-
Completions are context-aware: `query.` shows pallets with storage items, `tx.` shows pallets with calls, `events.` and `errors.` filter accordingly. Chain prefix paths like `polkadot.query.System.` work at any depth.
|
|
658
|
+
Completions are context-aware: `query.` shows pallets with storage items, `tx.` shows pallets with calls, `events.` and `errors.` filter accordingly, `apis.` shows runtime API names. Chain prefix paths like `polkadot.query.System.` work at any depth.
|
|
605
659
|
|
|
606
660
|
## How it compares
|
|
607
661
|
|