Creates a new wallet or restores the old one. ## Request Structure `JSON object:` ```JSON { "method": "wallet", "subcommand": ["new"], "arguments": { "w": "wallet_name", "sign": "sign_type", "restore | restore_legacy": "hex_value | restore_string", "force": "null", "password": "password" }, "id": "1" } ``` `Parameters:` **`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 a 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. ### Curl Example `Request:` ```actionscript curl --unix-socket /opt/cellframe-node/var/run/node_cli -X POST http://localhost/connect -d ' { "method": "wallet", "subcommand": ["new"], "arguments": { "w": "testwallet", "sign": "sig_dil", "password": "1234" }, "id": "1" }' ``` `Response:` ```json { "type": 2, "result": [ [ { "Wallet name": "testwallet", "Sign type": "sig_dil", "Status": "successfully created" } ] ], "id": 1 } ```