From cad3a9269e3f5c4eeb597fdf1633d027f1b78cec Mon Sep 17 00:00:00 2001 From: Elvin Date: Mon, 10 Jul 2023 11:45:28 +0800 Subject: [PATCH] update config desc --- docs/en/getting-started-remote.md | 6 +- docs/zh/config-desc.md | 36 ++++++++++ ...\346\211\213[\346\234\254\345\234\260].md" | 2 - ...\346\211\213[\350\277\234\347\250\213].md" | 66 +++++-------------- 4 files changed, 53 insertions(+), 57 deletions(-) create mode 100644 docs/zh/config-desc.md diff --git a/docs/en/getting-started-remote.md b/docs/en/getting-started-remote.md index fde64a9..9c157ac 100644 --- a/docs/en/getting-started-remote.md +++ b/docs/en/getting-started-remote.md @@ -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 diff --git a/docs/zh/config-desc.md b/docs/zh/config-desc.md new file mode 100644 index 0000000..380dafe --- /dev/null +++ b/docs/zh/config-desc.md @@ -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"] # 建议不再使用此字段,后面会删除 +``` \ No newline at end of file diff --git "a/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\346\234\254\345\234\260].md" "b/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\346\234\254\345\234\260].md" index ee37fd6..ae9d171 100644 --- "a/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\346\234\254\345\234\260].md" +++ "b/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\346\234\254\345\234\260].md" @@ -49,5 +49,3 @@ locked success 2. **在执行导入或者创建私钥之前要先设置密码,不然执行会失败** 3. **程序重启后需要解锁钱包,不然会因为拿不到私钥导致签名失败,获取私钥失败也会报错**:\
is locked - -## [更多钱包命令](./Commands.md) diff --git "a/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\350\277\234\347\250\213].md" "b/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\350\277\234\347\250\213].md" index c8e1d7b..19aa7d4 100644 --- "a/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\350\277\234\347\250\213].md" +++ "b/docs/zh/\345\277\253\351\200\237\344\270\212\346\211\213[\350\277\234\347\250\213].md" @@ -32,44 +32,7 @@ $ ./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 操作指南 @@ -77,40 +40,41 @@ $ ./venus-wallet run --network=test ```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基础操作