Update FAQ with key export instructions

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
This commit is contained in:
Stanislav Bogatyrev 2020-12-03 09:43:58 +03:00 committed by Stanislav Bogatyrev
parent 162481a47a
commit 88d0fbc873
2 changed files with 37 additions and 0 deletions

View file

@ -1,5 +1,42 @@
# F.A.Q, tips and tricks # F.A.Q, tips and tricks
### How to export private key from Neo wallet for NeoFS use?
Private key for usage with NeoFS tools can be extracted from Neo wallet in three
simple steps.
1. Get the key in WIF format
```
$ docker exec -it main_chain neo-go wallet export -w wallets/wallet.json -d NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx
Enter password >
KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr
```
2. Convert form WIF to HEX
```
$ neofs-cli util keyer KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr
PrivateKey 1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb
PublicKey 031a6c6fbbdf02ca351745fa86b9ba5a9452d785ac4f7fc2b7548ca2a46c4fcf4a
WIF KxDgvEKzgSBPPfuVfw67oPQBSjidEiqTHURKSDL1R7yGaGYAeYnr
Wallet3.0 NTrezR3C4X8aMLVg7vozt5wguyNfFhwuFx
ScriptHash3.0 12b97a2206ae4b10c7e0194b7b655c32cc912057
ScriptHash3.0BE 572091cc325c657b4b19e0c7104bae06227ab912
```
3. Dump into file in binary format
```
$ echo '1dd37fba80fec4e6a6f13fd708d8dcb3b29def768017052f6c930fa1c5d90bbb' | xxd -r -p > wallets/wallet.key
$ xxd wallets/wallet.key
00000000: 1dd3 7fba 80fe c4e6 a6f1 3fd7 08d8 dcb3 ..........?.....
00000010: b29d ef76 8017 052f 6c93 0fa1 c5d9 0bbb ...v.../l.......
```
Later this functionality will be included in `neofs-cli` directly.
### How to see what's inside running container if there's no shell? ### How to see what's inside running container if there's no shell?
You can run any program in container's namespace using `nsenter` utility. You can run any program in container's namespace using `nsenter` utility.