mirror of
https://github.com/sonr-io/sonr.git
synced 2026-09-16 23:16:25 +00:00
69 lines
3.9 KiB
Plaintext
69 lines
3.9 KiB
Plaintext
---
|
|
title: snrd keys add
|
|
description: Derive a new private key and encrypt to disk.
|
|
---
|
|
|
|
## Usage
|
|
|
|
```shell
|
|
snrd keys add <name> [flags]
|
|
```
|
|
|
|
## Flags
|
|
|
|
<TypeTable
|
|
type={{
|
|
"account": { type: "integer", description: "Account number for HD derivation (less than equal 2147483647)" },
|
|
"coin-type": { type: "integer", default: "60", description: "coin type number for HD derivation" },
|
|
"dry-run": { type: "string", description: "action, but don't add key to local keystore" },
|
|
"hd-path": { type: "string", description: "Manual HD Path derivation (overrides BIP44 config)" },
|
|
"help": { type: "string", description: "for add" },
|
|
"index": { type: "integer", description: "Address index number for HD derivation (less than equal 2147483647)" },
|
|
"interactive": { type: "string", description: "prompt user for BIP39 passphrase and mnemonic" },
|
|
"key-type": { type: "string", default: "eth_secp256k1", description: "Key signing algorithm to generate keys for" },
|
|
"ledger": { type: "string", description: "a local reference to a private key on a Ledger device" },
|
|
"multisig": { type: "string", description: "List of key names stored in keyring to construct a public legacy multisig key" },
|
|
"multisig-threshold": { type: "integer", default: "1", description: "K out of N required signatures. For use in conjunction with --multisig" },
|
|
"no-backup": { type: "string", description: "print out seed phrase (if others are watching the terminal)" },
|
|
"nosort": { type: "string", description: "passed to --multisig are taken in the order they're supplied" },
|
|
"pubkey": { type: "string", description: "Parse a public key in JSON format and saves key info to <name> file." },
|
|
"pubkey-base64": { type: "string", description: "Parse a public key in base64 format and saves key info." },
|
|
"recover": { type: "string", description: "seed phrase to recover existing key instead of creating" },
|
|
"source": { type: "string", description: "Import mnemonic from a file (only usable when recover or interactive is passed)" },
|
|
}}
|
|
/>
|
|
|
|
## Global Flags
|
|
|
|
<TypeTable
|
|
type={{
|
|
"broadcast-mode": { type: "string", default: "sync", description: "Transaction broadcasting mode (sync|async)" },
|
|
"chain-id": { type: "string", description: "Specify Chain ID for sending Tx" },
|
|
"fees": { type: "string", description: "Fees to pay along with transaction; eg: 10aatom" },
|
|
"from": { type: "string", description: "Name or address of private key with which to sign" },
|
|
"gas-adjustment": { type: "float", default: "1", description: "adjustment factor to be multiplied against the estimate returned by the tx simulation; if the gas limit is set manually this flag is ignored" },
|
|
"gas-prices": { type: "string", description: "Gas prices to determine the transaction fee (e.g. 10aatom)" },
|
|
"home": { type: "string", default: "/Users/prad/.sonr", description: "The application home directory" },
|
|
"keyring-backend": { type: "string", default: "os", description: "Select keyring's backend (os|file|test)" },
|
|
"keyring-dir": { type: "string", description: "The client Keyring directory; if omitted, the default 'home' directory will be used" },
|
|
"log_format": { type: "string", default: "plain", description: "The logging format (json|plain)" },
|
|
"log_level": { type: "string", default: "info", description: "The logging level (trace|debug|info|warn|error|fatal|panic|disabled or '*:<level>,<key>:<level>')" },
|
|
"log_no_color": { type: "string", description: "colored logs" },
|
|
"node": { type: "string", default: "tcp://localhost:26657", description: "<host>:<port> to tendermint rpc interface for this chain" },
|
|
"output": { type: "string", default: "text", description: "Output format (text|json)" },
|
|
"trace": { type: "string", description: "out full stack trace on errors" },
|
|
}}
|
|
/>
|
|
|
|
## Examples
|
|
|
|
### Add new key
|
|
|
|
```shell
|
|
snrd keys add alice
|
|
```
|
|
|
|
## See Also
|
|
|
|
- [snrd keys](./snrd_keys) - Parent command
|