@parity/dotns-cli 0.6.8 → 0.7.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.
Files changed (3) hide show
  1. package/README.md +102 -21
  2. package/dist/cli.js +19326 -17089
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -86,7 +86,6 @@ existing keystores.
86
86
  | `DOTNS_RPC` | Asset Hub RPC endpoint |
87
87
  | `DOTNS_MNEMONIC` | BIP39 mnemonic phrase |
88
88
  | `DOTNS_KEY_URI` | Substrate key URI |
89
- | `DOTNS_MIN_BALANCE_PAS` | Minimum balance in PAS |
90
89
 
91
90
  Select an environment with either an environment variable or a per-command option:
92
91
 
@@ -112,29 +111,29 @@ dotns account whitelist 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY --env p
112
111
  All registration commands require authentication.
113
112
 
114
113
  ```bash
115
- # Register a base domain
116
- dotns --password test-password register domain --account default --name coolname42
114
+ # Register a NoStatus name (stem ≥ 9, open to all)
115
+ dotns --password test-password register domain --account default --name coolwebsite
117
116
 
118
- # Register a name that requires PoP Lite
119
- dotns --password test-password register domain --account default --name alice99
117
+ # Register a name that requires PoP Lite (stem 6-8 + 2-digit suffix)
118
+ dotns --password test-password register domain --account default --name premium12
120
119
 
121
- # Register a name that requires PoP Full
120
+ # Register a name that requires PoP Full (stem 6-8, no suffix)
122
121
  dotns --password test-password register domain --account default --name premium
123
122
 
124
- # Governance registration (≤5 chars, reserved names)
123
+ # Governance registration (stem 5, reserved names)
125
124
  dotns --password test-password register domain --account default --name short --governance
126
125
 
127
126
  # Register for another owner
128
- dotns --password test-password register domain --account default --name coolname42 --owner 0x000000000000000000000000000000000000dEaD
127
+ dotns --password test-password register domain --account default --name coolwebsite --owner 0x000000000000000000000000000000000000dEaD
129
128
 
130
129
  # Register and transfer
131
- dotns --password test-password register domain --account default --name coolname42 --transfer --to 0x000000000000000000000000000000000000dEaD
130
+ dotns --password test-password register domain --account default --name coolwebsite --transfer --to 0x000000000000000000000000000000000000dEaD
132
131
 
133
132
  # With reverse record
134
- dotns --password test-password register domain --account default --name coolname42 --reverse
133
+ dotns --password test-password register domain --account default --name coolwebsite --reverse
135
134
 
136
135
  # Auto-retry on failure, resuming from the cached commitment (here, up to 3 times)
137
- dotns --password test-password register domain --account default --name coolname42 --retry 3
136
+ dotns --password test-password register domain --account default --name coolwebsite --retry 3
138
137
  ```
139
138
 
140
139
  ### Resume and manage commitments
@@ -263,8 +262,10 @@ echo "https://alice.dev" | dotns --password test-password text set alice url --a
263
262
 
264
263
  The CLI reads PoP status directly from the personhood precompile at
265
264
  `0x000000000000000000000000000000000a010000` using the `bytes32("dotns")`
266
- context. Returned tiers are `none`, `lite`, or `full`; DotNS does not set this
267
- status.
265
+ context. Returned tiers are `none`, `lite`, `full`, or `reserved`; DotNS does
266
+ not set this status. `pop info` also reports whether the account is whitelisted
267
+ for governance-reserved registrations (independent of the PoP tier) and any
268
+ names pending settlement into the Label Store (run `store sync` to settle them).
268
269
 
269
270
  ```bash
270
271
  # Check PoP status from the personhood precompile
@@ -273,7 +274,7 @@ dotns pop status --password test-password --account default
273
274
  dotns pop --mnemonic "bottom drive obey lake curtain smoke basket hold race lonely fit walk" status
274
275
  dotns pop --key-uri //Alice status
275
276
 
276
- # View account info
277
+ # Full info: status, whitelist eligibility, and pending names
277
278
  dotns pop --password test-password --account default info
278
279
  dotns pop --mnemonic "bottom drive obey lake curtain smoke basket hold race lonely fit walk" info
279
280
  dotns pop --key-uri //Alice info
@@ -445,8 +446,10 @@ dotns --password test-password store get mykey --account default
445
446
  dotns --password test-password store set mykey "my value" --account default
446
447
  dotns --password test-password store delete mykey --account default
447
448
 
448
- # List the .dot names in your Label Store, and cached CIDs
449
+ # List the .dot names in your Label Store (second-level names only by default;
450
+ # add --all to include subdomains), and cached CIDs
449
451
  dotns --password test-password store names --account default
452
+ dotns --password test-password store names --all --account default
450
453
  dotns --password test-password store cids --account default
451
454
 
452
455
  # Settle any pending names from the PoP controller into your Label Store
@@ -456,14 +459,92 @@ dotns --password test-password store sync --account default
456
459
  dotns --password test-password store info --json --account default
457
460
  ```
458
461
 
462
+ ### Delegate
463
+
464
+ Grant another account control of your names. Per-name delegation surrenders full
465
+ control of a single name; record delegation lets an operator edit records across
466
+ all your names. Operators may be an EVM address, SS58 address, or `.dot` label.
467
+
468
+ ```bash
469
+ # Delegate full control of one name
470
+ dotns --password test-password delegate set coolname42 alice --account default
471
+
472
+ # Revoke the delegate on a name
473
+ dotns --password test-password delegate revoke coolname42 --account default
474
+
475
+ # Show the current delegate for a name (no auth)
476
+ dotns delegate status coolname42
477
+
478
+ # Let an operator edit records on all your names
479
+ dotns --password test-password delegate records alice --account default
480
+
481
+ # Revoke record-editing access
482
+ dotns --password test-password delegate records alice --revoke --account default
483
+
484
+ # Show whether an operator may edit your records (no auth)
485
+ dotns delegate records-status alice
486
+ ```
487
+
488
+ ### Set Primary Name
489
+
490
+ Set the primary (reverse) name resolvers return for your account. You can only
491
+ set a name you own; there is no on-chain "clear" beyond pointing it at a
492
+ different name or transferring the current one away.
493
+
494
+ ```bash
495
+ # Set one of your names as the primary
496
+ dotns --password test-password primary set coolname42 --account default
497
+
498
+ # Show the primary name for an account (defaults to your own, no auth)
499
+ dotns primary status
500
+ dotns primary status 5GrwvaEF5zXb26Fz9rcQpDWS57CtERHpNehXCPcNoHGKutQY
501
+ ```
502
+
503
+ ### Escrow
504
+
505
+ Names registered without PoP verification (NoStatus) hold a refundable deposit
506
+ in escrow. Release a name to start its cooldown, withdraw the deposit onto the
507
+ pull-payment ledger, then claim your balance.
508
+
509
+ ```bash
510
+ # Show the escrow position for a name (no auth)
511
+ dotns escrow status coolwebsite
512
+
513
+ # List all your positions and the total locked
514
+ dotns --password test-password escrow positions --account default
515
+
516
+ # Show your claimable pull-payment balance
517
+ dotns --password test-password escrow balance --account default
518
+
519
+ # Release a name to start its refund cooldown
520
+ dotns --password test-password escrow release coolwebsite --account default
521
+
522
+ # After cooldown, move the released deposit onto the pull-payment ledger
523
+ dotns --password test-password escrow withdraw coolwebsite --account default
524
+
525
+ # Drain the pull-payment ledger
526
+ dotns --password test-password escrow claim-withdrawal --account default
527
+
528
+ # List entries in the time-locked refund ledger
529
+ dotns --password test-password escrow refunds list --account default
530
+
531
+ # Claim a refund entry (or several) once its cooldown elapses
532
+ dotns --password test-password escrow refunds claim <entryId> --account default
533
+ dotns --password test-password escrow refunds claim-batch <id1> <id2> --account default
534
+ ```
535
+
459
536
  ## Domain Classification
460
537
 
461
- | Type | Length | Requirements |
462
- | -------- | -------------------- | ----------------- |
463
- | Reserved | 5 chars or less | Governance only |
464
- | PoP Full | 6-8 chars | Full verification |
465
- | PoP Lite | 6-8 chars + 2 digits | Lite verification |
466
- | NoStatus | 9+ chars + 2 digits | Open registration |
538
+ A name's tier is decided by its **stem length** — the label length excluding an
539
+ optional trailing digit suffix. The suffix must be either absent or exactly two
540
+ digits; any other trailing-digit count is rejected.
541
+
542
+ | Type | Stem length | Digit suffix | Requirement |
543
+ | -------- | ----------- | ------------ | ----------------- |
544
+ | Reserved | ≤ 5 | none or 2 | Governance only |
545
+ | PoP Full | 6–8 | none | Full verification |
546
+ | PoP Lite | 6–8 | exactly 2 | Lite verification |
547
+ | NoStatus | ≥ 9 | none or 2 | Open to all |
467
548
 
468
549
  ## Transfer Recipients
469
550