Creates a new wallet or restores the old one. `Command syntax:` ```actionscript wallet new -w <wallet_name> [-sign <sign_type>] [-restore <hex_value> | -restore_legacy <restore_string>] [-force] [-password <password>] ``` `Options:` ```actionscript -w - name of the wallet -sign - type of signature (optional) -restore | restore_legacy - hash for wallet restoration | hash for wallet restoration in case if wallet was created long time ago and now its hash isn't supported (optional) -force - forces the wallet creation/restoration command even if a wallet with the same name is already in the "var/lib/wallet" folder (optional) -password - wallet password,if you restore a wallet - the password must match the previous one (optional) ``` **`restore`** hash can be acquired using your `seed phrase` in the following way: - take your seed phrase - join all 24 words together in one unit of text without spaces between words - add a password to the end of the text if your wallet is protected - generate a hash from the resulting text using `sha256` - use the generated hash with `-restore` parameter after the `0x` prefix You can convert a `SEED phrase` into the required hash using the `SHA256` algorithm in the terminal in Linux, macOS, or using one of the web resources that provide such functionality. ### CLI Example `Command:` ```actionscript cellframe-node-cli wallet new -w personalwallet -sign sig_dil -restore 0x1234 -password 1234 ``` `Response:` ``` Wallet: personalwallet (type=sig_dil) successfully created new address ptV4n68gTebdUTcbju6cWY9EmUT4L1acBeJic79L8QQXu5SF22crZqqz9G5M18hhqoU7VLUvQm5cu6CJBGZXHyQ3Atzf4sxw2xieywcf ``` Additional examples. Command to restore a wallet: ```bash cellframe-node-cli wallet new -w <wallet_name> -sign sig_dil -restore <hash> -force ``` Command to restore a wallet with password: ```bash cellframe-node-cli wallet new -w <wallet_name> -sign sig_dil -restore <hash> -password <password> -force ``` Parameter `-force` is necessary for restoration. Before interacting with a protected wallet, it needs to be activated with command: ```bash cellframe-node-cli wallet activate -w <wallet_name> -password <password> ``` After successful creation or restoration of a wallet, its address and balance can be checked with the following command: ```bash cellframe-node-cli wallet info -net Backbone -w <wallet_name> ``` ### JSON-RPC Example ![[JSON-RPC Request - WALLET NEW]]