Commit graph

32 commits

Author SHA1 Message Date
Leonard Lyubich
dab33e0f9b [#652] Update Neo Go to v0.95.3
Add `keys.NEP2ScryptParams()` to `keys.NEP2Decrypt` call arguments.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-29 13:44:59 +03:00
Leonard Lyubich
56d4410913 [#638] Update to Go 1.16
Changes:

  * replace `iotuil` elements with the ones from `os` package;
  * replace `os.Filemode` with `fs.FileMode`;
  * use `signal.NotifyContext` instead of `NewGracefulContext` (removed).

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-29 13:44:59 +03:00
tivizi
1f461baf0b [#626] The default config file location
Signed-off-by: Tivizi Jing <tivizi@163.com>
2021-06-25 11:16:17 +03:00
tivizi
2da5a309f7 [#626] Support default config file
Signed-off-by: Tivizi Jing <tivizi@163.com>
2021-06-25 11:16:17 +03:00
Pavel Karpy
87ce64fbbb [#624] cli/root: Delete version command and add corresponding flag
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-06-23 10:08:40 +03:00
Leonard Lyubich
adbbad0beb [#607] network: Do not work with Address pointers
`network.Address` structure in most cases created once and used read-only.

Replace `AddressFromString` function with `Address.FromString` method with
the same purpose and implementation. Make all libraries to work with value.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-18 18:09:50 +03:00
Leonard Lyubich
47fe8911a3 [#607] network: Rename Address.HostAddrString method to HostAddr
Return tyype is clear from the method's signature and docs, there is no
point in reflecting it in the name.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-18 18:09:50 +03:00
Leonard Lyubich
35f81729e4 [#607] network: Do not return error from Address.HostAddrString method
Panic if internal `manet.DialArgs` call returns error since this is
unexpected according to `AddressFromString` implementation.

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-06-18 18:09:50 +03:00
Evgenii Stratonikov
c172fcc11f [#610] neofs-cli: replace --key flag with --wif
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-17 10:36:35 +03:00
Evgenii Stratonikov
ad90b07ed5 [#610] neofs-cli: add --binary-key flag
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-17 10:36:35 +03:00
Evgenii Stratonikov
1b14b25e6c [#610] neofs-cli: add --wallet flag
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-17 10:36:35 +03:00
Evgenii Stratonikov
2b5998b820 [#610] neofs-cli: add --generate-key flag
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-17 10:36:35 +03:00
Evgenii Stratonikov
fcdef227e4 [#562] cmd/neofs-cli: use NEP-6 wallet for keys
Encrypted NEP-2 is still supported.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-06-15 14:49:59 +03:00
Pavel Karpy
3e0eccb548 [#549] cli: Add TLS support to control service
Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
2021-05-27 17:07:04 +03:00
Alex Vanin
16f13bc0a5 [#522] Use HostAddrString as RPC endpoint instead of IPAddrString
To enable TLS support we can't operate with IP addresses directly.
Certificates are issued with host names so it is required to
pass them into RPC client. DNS resolving should be done by transport
layer and not be a part of node. Therefore `IPAddrString` usage is
removed from code.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2021-05-18 12:07:00 +03:00
Evgenii Stratonikov
60d74bce67 [#466] cli: support NEP-2 and NEP-6 key formats
NEP-2 is contains WIF encrypted with password.
NEP-6 is format used for neo-go wallets.

Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
2021-04-23 10:11:47 +03:00
Leonard Lyubich
383d2494eb [#425] Adapt the Client's refactoring to the interface
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-17 15:00:37 +03:00
Leonard Lyubich
6204ca8308 [#425] cli: Support latest changes from API library
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2021-03-17 15:00:37 +03:00
Leonard Lyubich
51b85b0a73 [#278] cli: Support request X-Headers
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
2020-12-24 15:03:02 +03:00
Alex Vanin
e47c866d6a [#169] Add --ttl argument in CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-16 12:50:21 +03:00
Alex Vanin
49da96d006 [#146] Set stdout as default output for CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-11-05 18:37:24 +03:00
Alex Vanin
c0a4343282 [#25] Use api-go stringers and parsers for ID types in CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-17 13:16:59 +03:00
Alex Vanin
d83411016a [#25] Use printVerbose wrapper for one-line messages
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-15 10:25:41 +03:00
Alex Vanin
a9d296faa8 [#87] Use viper to configure key and endpoint in CLI
With viper we can set up key and endpoint with config
and environmental variables with `NEOFS_CLI` prefix.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
69dd95d748 [#78] Generate random key in CLI with --key new argument
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
c2083d773c [#76] Add owner argument for accounting.balance command
With `--owner` argument user can look for balances of other
nodes by knowing their owner ID which is NEO3 compatible
address.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
945bb723ed [#76] Do not print error message twice in CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
80cd4039a8 [#76] Implement accounting.balance command in CLI
It prints result as a float type value. With verbose flag
it prints decimal precision and value.

Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
84928527d7 [#87] Add verbose global flag in CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
cb1ca511cb [#77] Add endpoint global argument in CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Alex Vanin
fc700cbbdc [#78] Add private key global argument in CLI
Signed-off-by: Alex Vanin <alexey@nspcc.ru>
2020-10-13 14:02:48 +03:00
Stanislav Bogatyrev
246a15de35 cli: Add empty neofs-cli app structure
In the following release `neofs-cli` will be used to directly manage NeoFS Node.
All required definitions and interfaces are also moving from `neofs-api` to
`neofs-node` repository, so it's more convinient to have `neofs-cli` here.

Signed-off-by: Stanislav Bogatyrev <stanislav@nspcc.ru>
2020-10-02 11:25:35 +03:00