Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
test
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
谢昇
test
Commits
880d890f
Commit
880d890f
authored
May 28, 2019
by
谢昇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update cli命令使用文档.md
parent
4cfd36ee
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
79 additions
and
16 deletions
+79
-16
cli命令使用文档.md
cli命令使用文档.md
+79
-16
No files found.
cli命令使用文档.md
View file @
880d890f
**版本:
V6.2.0**
**版本:
V6.2.0**
...
@@ -99,8 +99,8 @@ Available Commands:
...
@@ -99,8 +99,8 @@ Available Commands:
```
```
标签不可与已有标签重复;私钥不可与已有私钥重复。
标签不可与已有标签重复;私钥不可与已有私钥重复。
##
account list 本地钱包地址
余额列表显示
##
1.5 account list 本地钱包地址coins
余额列表显示
cli account list
`cli account list`
```
```
{
{
"wallets": [
"wallets": [
...
@@ -123,10 +123,12 @@ cli account list
...
@@ -123,10 +123,12 @@ cli account list
]
]
}
}
```
```
标签为node award的是数据库生成的空投地址,不会被钱包种子保存,操作中尽量不要使用该地址。
列表仅列出coins合约下钱包各地址的余额;
标签为
**node award**
的是6.1及前版本数据库生成的空投地址,不会被钱包种子保存,操作中尽量不要使用该地址。
6.
2版本后空投地址标签改为
**airdropaddr**
,由种子生成,可以恢复但不建议使用。
## account set_label 修改地址的标签名
##
1.6
account set_label 修改地址的标签名
cli account set_label -a 本钱包中的地址 -l 新标签名
`cli account set_label -a 本钱包中的地址 -l 新标签名`
```
```
{
{
"acc": {
"acc": {
...
@@ -137,35 +139,96 @@ cli account set_label -a 本钱包中的地址 -l 新标签名
...
@@ -137,35 +139,96 @@ cli account set_label -a 本钱包中的地址 -l 新标签名
"label": "ttt2"
"label": "ttt2"
}
}
```
```
新标签不可与已存在标签重复。
# block模块
# 2.block模块
`cli block -h`
```
```
Available Commands:
Available Commands:
add_callback add block sequence call back
get Get blocks between [start, end]
get Get blocks between [start, end]
hash Get hash of block at height
hash Get hash of block at height
headers Get block headers between [start, end]
headers Get block headers between [start, end]
last_callback_sequence last call back sequence by name
last_header View last block header
last_header View last block header
last_sequence View last block sequence
last_sequence View last block sequence
list_callback list block sequence call back
query_hashs Query block by hashs
query_hashs Query block by hashs
sequences Get block sequences between [start, end]
sequences Get block sequences between [start, end]
view View block info by block hash
view View block info by block hash
```
## 2.1 block add_callback 向指定地址推送消息
`cli block add_callback -e (数据,支持json和proto buff) -n 名称(string格式) -u(指定地址url,string格式)`
```
{
"isOK": true,
"msg": ""
}
```
```
对端返回ok后可记录对应sequence。
## block get 获取指定区块高度区间内的区块体信息
cli block get -s 起始查询高度 -e 结束查询高度 -d 是否选择显示详情(可选)
## 2.2 block get 获取指定区块高度区间内的区块体信息
`cli block get -s 起始查询高度 -e 结束查询高度 -d 是否选择显示详情(可选)`
```
{
"items": [
{
"block": {
"version": 0,
"parenthash": "0xfd57208afa1e8f6dc34f2800453cf427d071a03eb67c367b2ae7277f987ad7ee",
"txhash": "0x0a3d08e2d7cf824dd12116540e67b5315b2b678fd659d1f0539eb5d510cc24d8",
"statehash": "0x2c0b23d66dde05b7c268a293c5ba04858b79fbab0261f3fef9888929ff30b49b",
"height": 1,
"blocktime": 1526541151,
"txs": [
{
"execer": "ticket",
"payload": {
"miner": {
"bits": 520159231,
"reward": "1800000000",
"ticketId": "1M4ns1eGHdHak3SNc2UTQB75vnXyJQd91s:0xf5d9a5dd179739da8cfc5b296be665edd65e7bd1a15571dd1423ff4a14a41f07:0000002503",
"modify": "modify",
"privHash": null
},
"ty": 16
},
"rawpayload": "0x501022860108ffff83f8011080a4a7da061a70314d346e73316547486448616b33534e6332555451423735766e58794a51643931733a3078663564396135646431373937333964613863666335623239366265363635656464363565376264316131353537316464313432336666346131346134316630373a3030303030303235303322066d6f64696679",
"signature": {
"ty": 1,
"pubkey": "0x024eb415515013b42990c0454db7c5e8ff342dda947e7e4adbf310ee999557bf40",
"signature": "0x3044022045b2de43a363b495d2ce992a622f4f649b5ba3d62cee91cc4ebf51d69f8e626602204da1881e23cf41670f8ad051eedd5552660264a3ceab0d455f794dfcc7593561"
},
"fee": "0.0010",
"expire": 0,
"nonce": 1914288556955278013,
"to": "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp",
"from": "1M4ns1eGHdHak3SNc2UTQB75vnXyJQd91s",
"hash": "0x0a3d08e2d7cf824dd12116540e67b5315b2b678fd659d1f0539eb5d510cc24d8"
}
]
},
"receipts": null
}
]
}
```
※-d后为可选项,0/f/false为不显示,1/t/true为显示。不输入-d默认为不显示。
※-d后为可选项,0/f/false为不显示,1/t/true为显示。不输入-d默认为不显示。
## block hash 获取指定区块高度的区块哈希
##
2.3
block hash 获取指定区块高度的区块哈希
cli block hash -t 区块高度
`cli block hash -t 区块高度`
```
```
{
{
"hash": "0x09055102ecb36033adde0fc9c0d523500c1d81693e7ad12181cfc2497b407da9"
"hash": "0x09055102ecb36033adde0fc9c0d523500c1d81693e7ad12181cfc2497b407da9"
}
}
```
```
## block headers 获取指定区块高度区间内的区块头信息
##
2.4
block headers 获取指定区块高度区间内的区块头信息
cli block headers -s 起始查询高度 -e 结束查询高度
`cli block headers -s 起始查询高度 -e 结束查询高度`
```
```
{
{
"items": [
"items": [
...
@@ -194,10 +257,10 @@ cli block headers -s 起始查询高度 -e 结束查询高度
...
@@ -194,10 +257,10 @@ cli block headers -s 起始查询高度 -e 结束查询高度
]
]
}
}
```
```
※cli命令中有-d的可选参数项,但无实际作用
。可省略。
※cli命令中有-d的可选参数项,但无实际作用
,为了保持与bblock get结构一致,可省略。
## block last_header 获取本钱包当前已同步的最新区块的区块头信息
##
2.5
block last_header 获取本钱包当前已同步的最新区块的区块头信息
cli block last_header
`cli block last_header`
```
```
{
{
"version": 0,
"version": 0,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment