@parity/dotns-cli 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +41 -22
  2. package/dist/cli.js +315 -205
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -59,19 +59,37 @@ export DOTNS_KEYSTORE_PASSWORD=test-password
59
59
  # Then simply use --account
60
60
  dotns register domain --account karim --name coolname42
61
61
  dotns content set dotns bafybei... --account karim
62
- dotns pop set lite --account karim
62
+ dotns pop status --account karim
63
63
  ```
64
64
 
65
65
  ## Environment Variables
66
66
 
67
- | Variable | Description |
68
- | ------------------------- | -------------------------- |
69
- | `DOTNS_KEYSTORE_PATH` | Path to keystore directory |
70
- | `DOTNS_KEYSTORE_PASSWORD` | Keystore password |
71
- | `DOTNS_RPC` | Asset Hub RPC endpoint |
72
- | `DOTNS_MNEMONIC` | BIP39 mnemonic phrase |
73
- | `DOTNS_KEY_URI` | Substrate key URI |
74
- | `DOTNS_MIN_BALANCE_PAS` | Minimum balance in PAS |
67
+ | Variable | Description |
68
+ | ------------------------- | -------------------------------------------------- |
69
+ | `DOTNS_ENV` | DotNS environment (`paseo-v2`; default `paseo-v2`) |
70
+ | `DOTNS_KEYSTORE_PATH` | Path to keystore directory |
71
+ | `DOTNS_KEYSTORE_PASSWORD` | Keystore password |
72
+ | `DOTNS_RPC` | Asset Hub RPC endpoint |
73
+ | `DOTNS_MNEMONIC` | BIP39 mnemonic phrase |
74
+ | `DOTNS_KEY_URI` | Substrate key URI |
75
+ | `DOTNS_MIN_BALANCE_PAS` | Minimum balance in PAS |
76
+
77
+ Select an environment with either an environment variable or a per-command option:
78
+
79
+ ```bash
80
+ # Default: Paseo V2
81
+ dotns account is-whitelisted 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
82
+
83
+ # Explicitly use Paseo V2 for this shell
84
+ export DOTNS_ENV=paseo-v2
85
+ dotns account is-whitelisted 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
86
+
87
+ # Or override for a single command
88
+ dotns --env paseo-v2 account is-whitelisted 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
89
+ dotns account whitelist 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY --env paseo-v2 --key-uri //Alice
90
+ ```
91
+
92
+ `--rpc` still overrides the endpoint URL, but it does not change the selected DotNS contract addresses. Use `--env`/`DOTNS_ENV` to select the DotNS deployment.
75
93
 
76
94
  ## Commands
77
95
 
@@ -83,11 +101,11 @@ All registration commands require authentication.
83
101
  # Register a base domain
84
102
  dotns --password test-password register domain --account default --name coolname42
85
103
 
86
- # With PoP Lite status
87
- dotns --password test-password register domain --account default --name alice99 --status lite
104
+ # Register a name that requires PoP Lite
105
+ dotns --password test-password register domain --account default --name alice99
88
106
 
89
- # With PoP Full status
90
- dotns --password test-password register domain --account default --name premium --status full
107
+ # Register a name that requires PoP Full
108
+ dotns --password test-password register domain --account default --name premium
91
109
 
92
110
  # Governance registration (≤5 chars, reserved names)
93
111
  dotns --password test-password register domain --account default --name short --governance
@@ -182,16 +200,17 @@ echo "https://alice.dev" | dotns --password test-password text set alice url --a
182
200
 
183
201
  ### Proof of Personhood
184
202
 
185
- ```bash
186
- # Set PoP status with keystore
187
- dotns pop --password test-password --account default set lite
188
- dotns pop set full --password test-password --account default
189
-
190
- # Set PoP status with mnemonic
191
- dotns pop --mnemonic "bottom drive obey lake curtain smoke basket hold race lonely fit walk" set lite
203
+ The CLI reads PoP status directly from the personhood precompile at
204
+ `0x000000000000000000000000000000000a010000` using the `bytes32("dotns")`
205
+ context. Returned tiers are `none`, `lite`, or `full`; DotNS does not set this
206
+ status.
192
207
 
193
- # Set PoP status with key-uri
194
- dotns pop --key-uri //Alice set lite
208
+ ```bash
209
+ # Check PoP status from the personhood precompile
210
+ dotns pop --password test-password --account default status
211
+ dotns pop status --password test-password --account default
212
+ dotns pop --mnemonic "bottom drive obey lake curtain smoke basket hold race lonely fit walk" status
213
+ dotns pop --key-uri //Alice status
195
214
 
196
215
  # View account info
197
216
  dotns pop --password test-password --account default info