本文作者:陈进坚
个人博客:https://jian1098.github.io
CSDN博客:https://blog.csdn.net/c_jian
:https://www.jianshu.com/u/8ba9ac5706b6
联系方式:[email protected]
参考文档:https://dev.bitshares.works/en/master/api/wallet_api.html#
查询节点信息
参数:无
{"jsonrpc": "2.0", "method": "get_dynamic_global_properties", "params": [], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "2.1.0",
"head_block_number": 35028,
"head_block_id": "000088d4acd8537ebcd6237a20190f896d55cb6d",
"time": "2019-09-19T05:49:45",
"current_witness": "1.6.3",
"next_maintenance_time": "2019-09-20T00:00:00",
"last_budget_time": "2019-09-19T00:00:00",
"witness_budget": 0,
"accounts_registered_this_interval": 0,
"recently_missed_count": 925001,
"current_aslot": 3739147,
"recent_slots_filled": "340282366920938463463374607431768211455",
"dynamic_flags": 0,
"last_irreversible_block_num": 35018
}
}
通过区块id查询区块信息
参数:区块id
{"jsonrpc": "2.0", "method": "get_block", "params": [19868], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"previous": "00004d9b1abf0a3fa2103803ef1f9ff707e66f6b",
"timestamp": "2019-09-04T08:10:15",
"witness": "1.6.7",
"transaction_merkle_root": "2522020e5fdb3b6e8faa49e0339b536872a72166",
"extensions": [],
"witness_signature": "2067895022b1f0af047fa71d4e4ca869db1d5d36a20aa5cbd693d3270a80b8c96e7b9db23c135d465ba470383ed11ab3b860e8f83a381f9d34049edb3c117edb48",
"transactions": [
{
"ref_block_num": 19867,
"ref_block_prefix": 1057668890,
"expiration": "2019-09-04T08:10:40",
"operations": [
[
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "505970742877495025",
"message": "ac61bc16cfb0e9c0db19758388a51214"
},
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"1f79cdabf4b7b2122c6becbee4dc7a42e07c053aa446fafd015eb351e24ade2f7a17df96aae62b28d71e9c465f8a732ae9a1417899f81ca1b6caefd9685a9a8301"
],
"operation_results": [
[
0,
{}
]
]
}
],
"block_id": "00004d9ce5e26a550f16dc940d655962d9a897fc",
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"transaction_ids": [
"4b64a76707e698c726a186a9e15b644560ae9a4d"
]
}
}
通过账号查询交易历史
参数:账户名,最小编号,最大返回数量,最大编号。编号从 1 开始。
{"jsonrpc": "2.0", "method": "get_relative_account_history", "params": ["nathan",1,2,100], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"memo": "",
"description": "Transfer 1 BTS from nathan to alpha -- Unlock wallet to see memo. (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.52",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "505970742877495025",
"message": "ac61bc16cfb0e9c0db19758388a51214"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19868,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "",
"description": "Transfer 1.11111 BTS from nathan to alpha -- Unlock wallet to see memo. (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.51",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 111111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "11674897818616179291",
"message": "69cc001a11d3007923dc4d00d28cac1f"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19840,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
}
]
}
账户列表
参数:最顶层的账户名,获取数量
{"jsonrpc": "2.0", "method": "list_accounts", "params": ["nathan",10], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
[
"nathan",
"1.2.17"
],
[
"null-account",
"1.2.3"
],
[
"proxy-to-self",
"1.2.5"
],
[
"relaxed-committee-account",
"1.2.2"
],
[
"temp-account",
"1.2.4"
],
[
"witness-account",
"1.2.1"
]
]
}
查询账户余额
参数:账户名
{"jsonrpc": "2.0", "method": "list_account_balances", "params": ["nathan"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"amount": "999918734664049",
"asset_id": "1.3.0"
}
]
}
通过账户名查询账户id
参数:账户名
{"jsonrpc": "2.0", "method": "get_account_id", "params": ["nathan"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": "1.2.17"
}
通过账户id查询账户信息
参数:账户id
{"jsonrpc": "2.0", "method": "get_object", "params": ["1.2.6","1.3.0"], "id": 1}
或者用另一个端口的另一个方法:http://47.56.168.231:11011,可同时查询多个账户
{"id":1,"method":"call","params":[0,"get_accounts",[["1.2.6"]]]}
{
"id": 1,
"result": [
{
"id": "1.2.6",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.6",
"referrer": "1.2.6",
"lifetime_referrer": "1.2.6",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "init0",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.6",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
}
]
}
通过账户名查询账户信息
参数:账户名
{"jsonrpc": "2.0", "method": "get_account", "params": ["nathan"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.2.17",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.17",
"referrer": "1.2.17",
"lifetime_referrer": "1.2.17",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "nathan",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"statistics": "2.6.17",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.0",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
}
}
解锁钱包
参数:密码
{"jsonrpc": "2.0", "method": "unlock", "params": ["supersecret"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": null
}
转账
参数:源账户名,目的账户名,金额,币种,备注
{"jsonrpc": "2.0", "method": "transfer2", "params": ["nathan","alpha",10,"BTS","This is memo"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
"a31884057f4c20724acb54c6817b709892a89de5",
{
"ref_block_num": 35238,
"ref_block_prefix": 4037660452,
"expiration": "2019-09-19T06:07:45",
"operations": [
[
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1000000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "14845433245050049736",
"message": "199b07f4622468588c88c88d9a4349b8842c2efbe535d99b74eba99e70e225f5"
},
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"200ecd4ddb9a9563b54f34e68ac218404ad8006a0b6efb5d8c118bb768542c787a7c7fbefecd41422702d94ce0f4890afd60311a55fb717801aad647d1b7df8d23"
]
}
]
}
查询资产详情
参数:资产名
{"jsonrpc": "2.0", "method": "get_asset", "params": ["BTS"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
"max_supply": "1000000000000000",
"market_fee_percent": 0,
"max_market_fee": "1000000000000000",
"issuer_permissions": 0,
"flags": 0,
"core_exchange_rate": {
"base": {
"amount": 1,
"asset_id": "1.3.0"
},
"quote": {
"amount": 1,
"asset_id": "1.3.0"
}
},
"whitelist_authorities": [],
"blacklist_authorities": [],
"whitelist_markets": [],
"blacklist_markets": [],
"description": "",
"extensions": {}
},
"dynamic_asset_data_id": "2.3.0"
}
}
所有钱包列表
参数:无
{"jsonrpc": "2.0", "method": "list_my_accounts", "params": [], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.2.17",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.17",
"referrer": "1.2.17",
"lifetime_referrer": "1.2.17",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "nathan",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"statistics": "2.6.17",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.0",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.18",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.18",
"referrer": "1.2.18",
"lifetime_referrer": "1.2.18",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "alpha",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.18",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.1",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.19",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.19",
"referrer": "1.2.19",
"lifetime_referrer": "1.2.19",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com0",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5ZYQtrYUPk5ELqJfygsJHnTJ9wDQmFZK4UXH8d6Txqsjg9MdBc",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5arjFbgDWrqxhuqvvUGpLFCguse3ebKVC4XGcjUnDgdtNT22Dd",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS67M2hU4tdqD53DdiUxsNaPrRehq3q8zvgVuwfVy1umu7EDqQLU",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.19",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.2",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.20",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.20",
"referrer": "1.2.20",
"lifetime_referrer": "1.2.20",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com1",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7sKfFcj6KnKNnEeM7ojLXxJd9fhx9oDQduawBgTZsMicac1uqn",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5rtEW3HgzB6jRTj6gDMprBwdHRcTF13fsydDjKFLEp1xurW74Z",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7kz2cGTXaoDk49fUXr88urAuLEek9gjXrMQw5gkQ7seLD3MSpt",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.20",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.3",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.21",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.21",
"referrer": "1.2.21",
"lifetime_referrer": "1.2.21",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com2",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5yK72A2mSQdnfea7tZ3mbk8bMsg4NbH6nBVFDnAMywSCA6QXei",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS67QpKoWzsZCAEXNkWefxmmGerC2G8hdffQVUeDaf5BbDjDLWCK",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7r7hEmGLdgSuAb7UWZ27YfcFCj2xiUMeCewK5ZX7Xxa4pt9QAX",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.21",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.4",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.22",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.22",
"referrer": "1.2.22",
"lifetime_referrer": "1.2.22",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com3",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS4tVaEEqzfguMjddTEc2ax75b2qKFoVSvboUjnrtVQ3Y3etYKYy",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS8mPETTECzSvzSenVTqT8WM4zir7ggfVnEc2AfxxzB52AFeYoyX",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6jwUt27WTrrqQLqMvWHsD9HP83sqDhviuQKxAeD7HpoCjhXnds",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.22",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.5",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.23",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.23",
"referrer": "1.2.23",
"lifetime_referrer": "1.2.23",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com4",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7zNF1rh2quabV6z7hsfojz9328ZUfTBURMRSvReExnFZ1sYsDp",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7Fnb9TzMQXFsXegEk8rBzUPza8CUUXNFTVn1jWyWH6mX6TNNLv",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS6eXTWMGVRyo7V5y3wev6WP5ekH6ULekwByXJMT7wFNGtF8Yb7k",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.23",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.6",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.24",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.24",
"referrer": "1.2.24",
"lifetime_referrer": "1.2.24",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com5",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS6TcrQC2biZKGyx8DAZETh4zsLiLcSciLuMKYNimqx6WkT22KKA",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5jbkaqLgNvKZrDHAEAt3of9PmrU9UWyLKLP3arJFE34T4qvhbJ",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS4zLb7M2hAcPBdEiDJQdA5FgYRg1yZeLNTdoARPZ5tk8WJpGAz6",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.24",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.7",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
},
{
"id": "1.2.25",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.25",
"referrer": "1.2.25",
"lifetime_referrer": "1.2.25",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "com6",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS52ktNc48V9Rkw3cWU51hoMqHRRwk7mDHcrGTQAeRT9bMZzozWc",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5dFvUh87J3PFU5z9BmuF4AFaLXv8TiXB9Cjdy9taNrVpxYUq1c",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS5pLk575W7yRuHsUPEMvWqwUeKPhGPTanqEQRSzUHTTkD9FwNnp",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"statistics": "2.6.25",
"whitelisting_accounts": [],
"blacklisting_accounts": [],
"whitelisted_accounts": [],
"blacklisted_accounts": [],
"cashback_vb": "1.13.8",
"owner_special_authority": [
0,
{}
],
"active_special_authority": [
0,
{}
],
"top_n_control_flags": 0
}
]
}
见证人列表
参数:最顶层的账户名,最大数量
{"jsonrpc": "2.0", "method": "list_witnesses", "params": ["init0",10], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
[
"init0",
"1.6.1"
],
[
"init1",
"1.6.2"
],
[
"init10",
"1.6.11"
],
[
"init2",
"1.6.3"
],
[
"init3",
"1.6.4"
],
[
"init4",
"1.6.5"
],
[
"init5",
"1.6.6"
],
[
"init6",
"1.6.7"
],
[
"init7",
"1.6.8"
],
[
"init8",
"1.6.9"
]
]
}
通过用户名查询见证人详情
参数:见证人账号
{"jsonrpc": "2.0", "method": "get_witness", "params": ["init0"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.6.1",
"witness_account": "1.2.6",
"last_aslot": 3741892,
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"pay_vb": "1.13.11",
"vote_id": "1:0",
"total_votes": 0,
"url": "",
"total_missed": 0,
"last_confirmed_block_num": 37773
}
}
通过见证人id查询见证人详情
先查询见证人的普通账号id
{"jsonrpc": "2.0", "method": "get_object", "params": ["1.6.1"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.6.1",
"witness_account": "1.2.6",
"last_aslot": 4186995,
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"pay_vb": "1.13.11",
"vote_id": "1:0",
"total_votes": "999925340001863",
"url": "",
"total_missed": 1,
"last_confirmed_block_num": 482869
}
]
}
得到见证人对应的witness_account
,然后调用同一个方法,将witness_account
作为参数传入即可
{"jsonrpc": "2.0", "method": "get_object", "params": ["1.2.6"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.2.6",
"membership_expiration_date": "1969-12-31T23:59:59",
"registrar": "1.2.6",
"referrer": "1.2.6",
"lifetime_referrer": "1.2.6",
"network_fee_percentage": 2000,
"lifetime_referrer_fee_percentage": 8000,
"referrer_rewards_percentage": 0,
"name": "init0",
"top_n_control_flags": 0
}
]
}
得到账户名name
委员会成员列表
参数:最顶层的账户名,最大数量
{"jsonrpc": "2.0", "method": "list_committee_members", "params": ["init0",10], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
[
"init0",
"1.5.0"
],
[
"init1",
"1.5.1"
],
[
"init10",
"1.5.10"
],
[
"init2",
"1.5.2"
],
[
"init3",
"1.5.3"
],
[
"init4",
"1.5.4"
],
[
"init5",
"1.5.5"
],
[
"init6",
"1.5.6"
],
[
"init7",
"1.5.7"
],
[
"init8",
"1.5.8"
]
]
}
查询委员会账号详情
参数:委员会成员账号
{"jsonrpc": "2.0", "method": "get_committee_member", "params": ["init0"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.5.0",
"committee_member_account": "1.2.6",
"vote_id": "0:11",
"total_votes": 0,
"url": ""
}
}
通过交易id查询交易
链接:http://47.56.168.231/index/index/getTransaction?id=0dcdbe50a128deee41a18fe6788b5933a19211ba
参数:id = 交易id
返回:
{
"code":0,
"type":"transfer",
"from":"nathan",
"to":"alpha",
"amount":"10000000000",
"asset":"BTS",
"fee":2105468,
"fee_asset":"BTS",
"memo":"here is the cash",
"txid":"0dcdbe50a128deee41a18fe6788b5933a19211ba",
"timestamp":"2019-09-03T03:17:10",
"block":401
}
创建账户
获取助记词
参数:无
{"jsonrpc": "2.0", "method": "suggest_brain_key", "params": [], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"brain_priv_key": "IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES",
"wif_priv_key": "5JjmpBny2216AGBXu6jCV9f15aH27fRrczN466MPRv3DarZiVFK",
"pub_key": "BTS6UL7Q53kW15Tee78fLHZBcxN2Xzjf3bE8PGfYdA1pkZf5om7ks"
}
}
用助记词注册账号
参数:助记词,新账号名(8位以上字母开头,至少一个数字,特殊字符只能是-
),支付费用帐号,推荐人帐号,是否真实创建
例:创建账号test-123
,支付费用帐号和推荐人帐号是nathan
{"jsonrpc": "2.0", "method": "create_account_with_brain_key", "params": ["IMPLIAL BURLY THYMY CAVITY GUNSHOP STOPE JAPE PENDA TOMBLET COUPLET RECENSE LUE ROTAL CIPPUS PRIER CODICES","test-123","nathan","nathan",true], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"ref_block_num": 29651,
"ref_block_prefix": 2513231364,
"expiration": "2019-09-30T07:28:55",
"operations": [
[
5,
{
"fee": {
"amount": 514355,
"asset_id": "1.3.0"
},
"registrar": "1.2.17",
"referrer": "1.2.17",
"referrer_percent": 0,
"name": "test-123",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7kPRNM1yzvfKQBagMA6bQiwpAmaGBh6aP6mtr8h1YXX2nD3oWC",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS85y6zRw4KKxWbbPyEbGGSuBvwXDAMJPoSqRmQvcGDPU3WWGqnP",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7WX9CF4bbjkQHheLX4zMggYg6cXCJtPGT1it37dfGE8ctKKbC4",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"206100580ba6369cb9d20ed4e1f4c05e61be2d60ca6fef4108e540947c4cd262007d45e2a295bc1eb89790ccc7802457955a035826fc0efeb21f63909192f7d3bb"
]
}
}
账户
余额和资产列表
参数:账户名
{"jsonrpc": "2.0", "method": "list_account_balances", "params": ["nathan"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"amount": "999918734664049",
"asset_id": "1.3.0"
}
]
}
通过资产id查询资产信息
参数:资产id
{"jsonrpc": "2.0", "method": "get_asset", "params": ["1.3.0"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
"max_supply": "1000000000000000",
"market_fee_percent": 0,
"max_market_fee": "1000000000000000",
"issuer_permissions": 0,
"flags": 0,
"core_exchange_rate": {
"base": {
"amount": 1,
"asset_id": "1.3.0"
},
"quote": {
"amount": 1,
"asset_id": "1.3.0"
}
},
"whitelist_authorities": [],
"blacklist_authorities": [],
"whitelist_markets": [],
"blacklist_markets": [],
"description": "",
"extensions": {}
},
"dynamic_asset_data_id": "2.3.0"
}
}
转账
参数:源账户名,要发往的账户名,金额,币种,备注
{"jsonrpc": "2.0", "method": "transfer2", "params": ["nathan","alpha",10,"BTS","This is memo"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
"a31884057f4c20724acb54c6817b709892a89de5",
{
"ref_block_num": 35238,
"ref_block_prefix": 4037660452,
"expiration": "2019-09-19T06:07:45",
"operations": [
[
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1000000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "14845433245050049736",
"message": "199b07f4622468588c88c88d9a4349b8842c2efbe535d99b74eba99e70e225f5"
},
"extensions": []
}
]
],
"extensions": [],
"signatures": [
"200ecd4ddb9a9563b54f34e68ac218404ad8006a0b6efb5d8c118bb768542c787a7c7fbefecd41422702d94ce0f4890afd60311a55fb717801aad647d1b7df8d23"
]
}
]
}
近期活动
参数:账号名,获取数量
{"jsonrpc": "2.0", "method": "get_account_history", "params": ["nathan",10], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"memo": "",
"description": "Create Account 'test-123' (Fee: 5.14355 BTS)",
"op": {
"id": "1.11.54",
"op": [
5,
{
"fee": {
"amount": 514355,
"asset_id": "1.3.0"
},
"registrar": "1.2.17",
"referrer": "1.2.17",
"referrer_percent": 0,
"name": "test-123",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS7kPRNM1yzvfKQBagMA6bQiwpAmaGBh6aP6mtr8h1YXX2nD3oWC",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS85y6zRw4KKxWbbPyEbGGSuBvwXDAMJPoSqRmQvcGDPU3WWGqnP",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS7WX9CF4bbjkQHheLX4zMggYg6cXCJtPGT1it37dfGE8ctKKbC4",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"extensions": {}
}
],
"result": [
1,
"1.2.26"
],
"block_num": 226260,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "This is memo",
"description": "Transfer 10 BTS from nathan to alpha -- Memo: This is memo (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.53",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1000000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "14845433245050049736",
"message": "199b07f4622468588c88c88d9a4349b8842c2efbe535d99b74eba99e70e225f5"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 35239,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1231456",
"description": "Transfer 1 BTS from nathan to alpha -- Memo: 1231456 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.52",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "505970742877495025",
"message": "ac61bc16cfb0e9c0db19758388a51214"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19868,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "22222",
"description": "Transfer 1.11111 BTS from nathan to alpha -- Memo: 22222 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.51",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 111111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "11674897818616179291",
"message": "69cc001a11d3007923dc4d00d28cac1f"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 19840,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1111",
"description": "Transfer 1.11111 BTS from nathan to alpha -- Memo: 1111 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.50",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 111111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "9873457945687579511",
"message": "73a3be1a5879273ef17ef1704a09309a"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15444,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1111",
"description": "Transfer 1.10000 BTS from nathan to alpha -- Memo: 1111 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.49",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 110000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "578028314678850645",
"message": "c8813ee24bc9f75054379b6597ebd32f"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15421,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "1111",
"description": "Transfer 1 BTS from nathan to alpha -- Memo: 1111 (Fee: 20.89843 BTS)",
"op": {
"id": "1.11.48",
"op": [
0,
{
"fee": {
"amount": 2089843,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "1226546660888413102",
"message": "f5ca6ac11b5a35c4b38cba6a29e8dbb6"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15394,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "here is the cash",
"description": "Transfer 10.11111 BTS from nathan to alpha -- Memo: here is the cash (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.47",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1011111,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "18160081259166631953",
"message": "81cc43710b389adbd4d56c40c1428b1729e08edff97ad4786e20e2caa4f0fb19"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15267,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "here is the cash",
"description": "Transfer 10.11100 BTS from nathan to alpha -- Memo: here is the cash (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.46",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 1011100,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "7855845311644090944",
"message": "cbd9b0f5aa51d4a9fc1dc8f5338d16d3148fa68d9e917580cbe9d06e0df97f21"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 15247,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
},
{
"memo": "test transfer2",
"description": "Transfer 1 BTS from nathan to alpha -- Memo: test transfer2 (Fee: 21.05468 BTS)",
"op": {
"id": "1.11.45",
"op": [
0,
{
"fee": {
"amount": 2105468,
"asset_id": "1.3.0"
},
"from": "1.2.17",
"to": "1.2.18",
"amount": {
"amount": 100000,
"asset_id": "1.3.0"
},
"memo": {
"from": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"to": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"nonce": "7279384504810601963",
"message": "18df1913c8b10bb1e16722c6d170cbb5c865454db16e49a4eb9c9241840e77b9"
},
"extensions": []
}
],
"result": [
0,
{}
],
"block_num": 4344,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
}
}
]
}
查看指定类型的活动
参数:账户名,活动ID数组,开始下标,获取数量
{"jsonrpc": "2.0", "method": "get_account_history_by_operations", "params": ["nathan",[0,5],1,1], "id": 2}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"total_count": 3,
"result_count": 1,
"details": [
{
"memo": "",
"description": "Create Account 'alpha' (Fee: 2000.14062 BTS)",
"op": {
"id": "1.11.2",
"op": [
5,
{
"fee": {
"amount": 200014062,
"asset_id": "1.3.0"
},
"registrar": "1.2.17",
"referrer": "1.2.17",
"referrer_percent": 0,
"name": "alpha",
"owner": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"active": {
"weight_threshold": 1,
"account_auths": [],
"key_auths": [
[
"BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
1
]
],
"address_auths": []
},
"options": {
"memo_key": "BTS5VS9fuuzs5exawXmVxvM94fKjtJR6nRQQqbdStnXV8V4ihGExQ",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [],
"extensions": []
},
"extensions": {}
}
],
"result": [
1,
"1.2.18"
],
"block_num": 336,
"trx_in_block": 0,
"op_in_trx": 0,
"virtual_op": 0
},
"transaction_id": "0ab9dd21324f024194811d707dc33d2c82e061bf"
}
]
}
}
投票
投票给超级节点
需要支付费用,所有必须要有余额
参数:投票账号,超级节点账号,投票(true)或取消投票(false),是否广播交易
{"jsonrpc": "2.0", "method": "vote_for_witness", "params": ["nathan","init0",true,true], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"ref_block_num": 38663,
"ref_block_prefix": 336266918,
"expiration": "2019-10-08T10:04:55",
"operations": [
[
6,
{
"fee": {
"amount": 2008398,
"asset_id": "1.3.0"
},
"account": "1.2.17",
"new_options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"1:0",
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"1f64b5c1e6c61a56068fb32e280669f5c6d6a14f6b04cf6116a804c06dd86cfc0f335cb1ab8242daeadd0f88caa05f25a193ec7fa94ef3074d1afad2d6c368347c"
]
}
}
投票给理事会成员
需要支付费用,所有必须要有余额
参数:投票账号,理事会成员账号,投票(true)或取消投票(false),是否广播交易
{"jsonrpc": "2.0", "method": "vote_for_committee_member", "params": ["nathan","init0",true,true], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"ref_block_num": 38687,
"ref_block_prefix": 1350493683,
"expiration": "2019-10-08T10:06:55",
"operations": [
[
6,
{
"fee": {
"amount": 2008789,
"asset_id": "1.3.0"
},
"account": "1.2.17",
"new_options": {
"memo_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"voting_account": "1.2.5",
"num_witness": 0,
"num_committee": 0,
"votes": [
"1:0",
"0:11",
"0:23",
"0:24",
"0:25",
"0:26",
"0:27",
"0:28",
"0:29"
],
"extensions": []
},
"extensions": {}
}
]
],
"extensions": [],
"signatures": [
"1f108b1f4155b2f50f994cb4f9665435f198037969e5e8242bdfb8b688715b69a728fecdf6edc575e56aee7e2b1b745d3e2160ffb026dad3dbf7c498ef77b551b3"
]
}
}
资产
资产列表
参数:列表中第一个资产的符号(可以是空),获取数量(最大100)
{"jsonrpc": "2.0", "method": "list_assets", "params": ["",10], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": [
{
"id": "1.3.0",
"symbol": "BTS",
"precision": 5,
"issuer": "1.2.3",
"options": {
"max_supply": "1000000000000000",
"market_fee_percent": 0,
"max_market_fee": "1000000000000000",
"issuer_permissions": 0,
"flags": 0,
"core_exchange_rate": {
"base": {
"amount": 1,
"asset_id": "1.3.0"
},
"quote": {
"amount": 1,
"asset_id": "1.3.0"
}
},
"whitelist_authorities": [],
"blacklist_authorities": [],
"whitelist_markets": [],
"blacklist_markets": [],
"description": "",
"extensions": {}
},
"dynamic_asset_data_id": "2.3.0"
}
]
}
创建资产
暂无
查询见证人详情
参数:见证人账号
{"jsonrpc": "2.0", "method": "get_witness", "params": ["init0"], "id": 1}
返回:
{
"id": 1,
"jsonrpc": "2.0",
"result": {
"id": "1.6.1",
"witness_account": "1.2.6",
"last_aslot": 3741892,
"signing_key": "BTS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV",
"pay_vb": "1.13.11",
"vote_id": "1:0",
"total_votes": 0,
"url": "",
"total_missed": 0,
"last_confirmed_block_num": 37773
}
}
活动id对照表
ID | 活动命令 | 备注 |
---|---|---|
0 | transfer_operation | 转账 |
1 | limit_order_create_operation | |
2 | limit_order_cancel_operation | |
3 | call_order_update_operation | |
4 | fill_order_operation | |
5 | account_create_operation | 创建账户 |
6 | account_update_operation | 更新账户 |
7 | account_whitelist_operation | |
8 | account_upgrade_operation | 升级账号 |
9 | account_transfer_operation | |
10 | asset_create_operation | 创建资产 |
11 | asset_update_operation | |
12 | asset_update_bitasset_operation | |
13 | asset_update_feed_producers_operation | |
14 | asset_issue_operation | |
15 | asset_reserve_operation | |
16 | asset_fund_fee_pool_operation | |
17 | asset_settle_operation | |
18 | asset_global_settle_operation | |
19 | asset_publish_feed_operation | |
20 | witness_create_operation | 创建见证人 |
21 | witness_update_operation | |
22 | proposal_create_operation | |
23 | proposal_update_operation | |
24 | proposal_delete_operation | |
25 | withdraw_permission_create_operation | |
26 | withdraw_permission_update_operation | |
27 | withdraw_permission_claim_operation | |
28 | withdraw_permission_delete_operation | |
29 | committee_member_create_operation | 创建理事会成员 |
30 | committee_member_update_operation | |
31 | committee_member_update_global_paramet | |
32 | vesting_balance_create_operation | |
33 | vesting_balance_withdraw_operation | |
34 | worker_create_operation | |
35 | custom_operation | |
36 | assert_operation | |
37 | balance_claim_operation | 导入余额 |
38 | override_transfer_operation | |
39 | transfer_to_blind_operation | |
40 | blind_transfer_operation | |
41 | transfer_from_blind_operation | |
42 | asset_settle_cancel_operation | |
43 | asset_claim_fees_operation | |
44 | fba_distribute_operation | |
45 | bid_collateral_operation | |
46 | execute_bid_operation | |
47 | asset_claim_pool_operation | |
48 | asset_update_issuer_operation | |
49 | custom_authority_create_operation | |
50 | custom_authority_update_operation | |
51 | custom_authority_delete_operation |