Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update config desc/ 更新config解释 #145

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions docs/en/getting-started-remote.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ $ ./venus-wallet run --network=test
ScryptN = 262144
ScryptP = 1

[Strategy]
# Strategy level,0:Don't turn on strategy 1:Verify only the data type to be signed 2:Verify the data type to be signed, and verify the message type with the method policy configured
Level = 2
NodeURL = "/ip4/127.0.0.1/tcp/2345/http"
[SignFilter]
Expr = ""

[APIRegisterHub]
# The URL of the gateway. If not configured, the gateway will not be connected
Expand Down
36 changes: 36 additions & 0 deletions docs/zh/config-desc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 配置文件解析

- 默认文件位置 “~/.venus_wallet/config.toml” 钱包配置文件务必备份好
```toml
[API]
# 本地进程http监听地址
ListenAddress = "/ip4/0.0.0.0/tcp/5678/http"

[DB]
# 默认内嵌存储数据库数据文件
Conn = "~/.venus_wallet/keystore.sqlit"
Type = "sqlite"
DebugMode = true

# 用于远程主动请求wallet进行签名时,进行合法性验证
[JWT]
# JWT token hex,未配置情况下会随机生成
Token = "65794a68624763694f694a49557a49314e694973496e523563434936496b705856434a392e65794a42624778766479493657794a795a57466b4969776964334a70644755694c434a7a615764754969776959575274615734695858302e7133787a356f75634f6f543378774d5463743870574d42727668695f67697a4f7a365142674b2d6e4f7763"
# JWT secret hex,未配置情况下会随机生成
Secret = "7c40ce66a492e35ac828e8333a5703e38b23add87f29bd8fc7343989e08b3458"

[Factor]
# keystore私钥对称加密变量, 强烈建议不要随意修改这两个参数,后期考虑会从配置中删除
ScryptN = 262144
ScryptP = 1

[SignFilter]
Expr = "" # 不填写任何东西,表示不开启过滤功能;具体使用方式请参考 [订单过滤器]文档

[APIRegisterHub]
# gateway的URL,不配置则不连接gateway
RegisterAPI = ["/ip4/127.0.0.1/tcp/45132"]
# 用于访问gateway的token;其实是auth服务产生的token
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoidGVzdG1pbmVyIiwicGVybSI6ImFkbWluIiwiZXh0IjoiIn0.oakIfSg1Iiv1T2F1BtH1bsb_1GeXWuirdPSjvE5wQLs"
SupportAccounts = ["authTestUser"] # 建议不再使用此字段,后面会删除
```
2 changes: 0 additions & 2 deletions docs/zh/快速上手[本地].md
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,3 @@ locked success
2. **在执行导入或者创建私钥之前要先设置密码,不然执行会失败**

3. **程序重启后需要解锁钱包,不然会因为拿不到私钥导致签名失败,获取私钥失败也会报错**:\<address> is locked

## [更多钱包命令](./Commands.md)
66 changes: 15 additions & 51 deletions docs/zh/快速上手[远程].md
Original file line number Diff line number Diff line change
Expand Up @@ -32,85 +32,49 @@ $ ./venus-wallet run

# 测试网启动
# 地址t开头
$ ./venus-wallet run --network=test
```

### 4. 配置介绍
- 默认文件位置 “~/.venus_wallet/config.toml” 钱包配置文件务必备份好
```toml
[API]
# 本地进程http监听地址
ListenAddress = "/ip4/0.0.0.0/tcp/5678/http"

[DB]
# 默认内嵌存储数据库数据文件
Conn = "~/.venus_wallet/keystore.sqlit"
Type = "sqlite"
DebugMode = true

[JWT]
# JWT token hex,未配置情况下会随机生成
Token = "65794a68624763694f694a49557a49314e694973496e523563434936496b705856434a392e65794a42624778766479493657794a795a57466b4969776964334a70644755694c434a7a615764754969776959575274615734695858302e7133787a356f75634f6f543378774d5463743870574d42727668695f67697a4f7a365142674b2d6e4f7763"
# JWT secret hex,未配置情况下会随机生成
Secret = "7c40ce66a492e35ac828e8333a5703e38b23add87f29bd8fc7343989e08b3458"

[Factor]
# keystore私钥对称加密变量
ScryptN = 262144
ScryptP = 1

[Strategy]
# 策略等级,0:不开启策略化 1:只验证待签名数据类型 2:验证待签名数据类型,且验证配置了method策略的message类型
Level = 2
NodeURL = "/ip4/127.0.0.1/tcp/2345/http"

[APIRegisterHub]
# gateway的URL,不配置则不连接gateway
RegisterAPI = ["/ip4/127.0.0.1/tcp/45132"]
# gateway的token
Token = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoidGVzdG1pbmVyIiwicGVybSI6ImFkbWluIiwiZXh0IjoiIn0.oakIfSg1Iiv1T2F1BtH1bsb_1GeXWuirdPSjvE5wQLs"
SupportAccounts = ["testminer"]
$ ./venus-wallet --nettype=cali run
```

# CLI 操作指南
## 查看帮助

```shell script
$ ./venus-wallet -h


NAME:
venus-wallet - A new cli application
venus remote-wallet - ./venus-wallet

USAGE:
venus-wallet [global options] command [command options] [arguments...]
venus remote-wallet [global options] command [command options] [arguments...]

VERSION:
1.0.0'+gitc04f451.dirty'
1.11.0'+gitd4a853d'

COMMANDS:
run Start a venus wallet process
auth Manage RPC permissions
log Manage logging
strategy, st Manage logging
new Generate a new key of the given type
list, ls List wallet address
export export keys
import import keys
sign sign a message
del del a wallet and message
sign sign a hex-encoded message
del Del a wallet private key
set-password, setpwd Store a credential for a keystore file
unlock unlock the wallet and release private key
unlock Unlock the wallet private key, so that it can be used for signing
lock Restrict the use of secret keys after locking wallet
lockState, lockstate unlock the wallet and release private key
lock-state View the status of the key lock
support Add an account that can be signed with the private key
record manipulate sign record
help, h Shows a list of commands or help for one command

GLOBAL OPTIONS:
--help, -h show help (default: false)
--version, -v print the version (default: false)
--repo value (default: "~/.venus_wallet") [$VENUS_WALLET_PATH]
--nettype value should be one of mainnet, integrationnet,2k,cali,interop,force,butterfly (default: "mainnet") [$VENUS_ADDRESS_TYPE]
--help, -h show help
--version, -v print the version
```
- 这里的操作是扁平单层的,区别于Venus或者lotus的`./venus wallet list`等操作,Venus wallet 中只需要`./venus-wallet list`即可。
- 对于一些命令做了aliase处理,如`strategy`可以直接使用`st`代替。
- 对于一些命令做了aliase处理,如`set-password`可以直接使用`setpwd`代替。


## Venus wallet基础操作
Expand Down
Loading