issuetoken
功能:发行新通证
参数:<Name>,通证名
[Genesis Block Description],通证描述信息
[Initial Supply], 发行数额
[Logo],通证图标
[Address],通证存放地址
返回结果:返回该通证创始块上链交易请求requestid
备注:发行通证即将通证创始块信息发送上链。应用程序可通过RestAPI接口GetOnchainState查询创始块上链状态。
调用样例:
{
"method":"issuetoken",
"params":[
"NewToken",
"NewToken...",
"200000000"
],
"id":11222
}
返回结果样例:
{
"result": {
"requestid": "28eh4gAeQv8uDou4qh7Zj3bRaR3G"
},
"error": null,
"id": 11222
}
queryfundblock
功能:查询Token创始块的超块链三元组地址
参数:<requested>, 创始块上链交易查询标识
返回结果:返回Token创始块的超块链三元组地址
调用样例:
{
"method":"queryfundblock",
"params":["28eh4gAeQv8uDou4qh7Zj3bRaR3G"],
"id":16
}
返回结果样例:
{
"result": {
"hyperblockId": 993,
"chainNum": 1,
"localblockId": 1
},
"error": null,
"id": 16
}
gettokeninfo
功能:获取指定Token的描述信息
参数:[hyperblockId, localchainId, localblockId],Token创始块超块链三元组地址
返回结果:Token创始块元信息
调用样例:
{
"method":"gettokeninfo",
"params":[
"993",
"1",
"1"
],
"id":16
}
返回结果样例:
{
"result": {
"name": "NewToken",
"message": "Hello NewToken...",
"logo": "",
"supply": 200000000,
"address": "1Kh9uYqFnUjSa9r7x746m2GfxBDpW3havT"
},
"error": null,
"id": 16
}
importtoken
功能:导入超块链上Token信息到本地节点
参数:[hyperblockId, localchainId, localblockId],Token创始块超块链三元组地址
返回结果:导入成功返回Token创始块元信息
调用样例:
{
"method":"importtoken",
"params":[
"993",
"1",
"1"
],
"id":16
}
返回结果样例:
{
"result": {
"name": "NewToken",
"message": "Hello NewToken...",
"logo": "",
"supply": 200000000,
"address": "1Kh9uYqFnUjSa9r7x746m2GfxBDpW3havT"
},
"error": null,
"id": 16
}
starttoken
功能:在节点本地开启指定的Token相关功能
参数:[[name | [hyperblockId, localchainId, localblockId]],Token名或者创始块超块链三元组地址
返回结果:token功能开启状态信息
调用样例:
{
"method":"starttoken",
"params":[],
"id":16
}
返回结果样例:
{
"result": null,
"error": {
"code": -2,
"message": "Already started: ledger"
},
"id": 16
}