list_wallets 查看钱包列表
post
v1/wallet/list_wallets
api:
http://127.0.0.1:8888/v1/wallet/list_wallets
params:
无
returns:
[
"testnet *"
]
testnet:钱包名称
create 创建钱包
post
v1/wallet/create
api:
http://127.0.0.1:8888/v1/wallet/create
params:
walletname:钱包名称
returns:
"PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx:钱包密码
open 打开钱包
post
v1/wallet/open
api:
http://127.0.0.1:8888/v1/wallet/open
params:
"testnet"
returns:
{}
成功打开后返回{}
unlock 解锁钱包
post
v1/wallet/unlock
api:
http://127.0.0.1:8888/v1/wallet/unlock
params:
["testnet", "PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
钱包名称
钱包密码
returns:
{}
成功解锁后返回{}
import_key 导入私钥到钱包
post
v1/wallet/import_key
api:
http://127.0.0.1:8888/v1/wallet/import_key
params:
["testcreate","5Jvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
钱包名称
私钥
returns:
{}
成功导入后返回{}
get_public_keys 获取所有钱包中的公钥
post
v1/wallet/get_public_keys
api:
http://127.0.0.1:8888/v1/wallet/get_public_keys
params:
无
returns:
[
"EOS57NgJAtkVZdFYGDc6GZmx2eNz5utBLVeM6pspVjhnH11aibUJi",
"EOS5roytgLL7BuhyKDbxHfxBzdENGioMEM6nhzPXQcaeAnYQf3Uge",
"EOS5u3yTpyS6Mjyy16RGsgbxV8WYZBoU8qtSZusJNMfkQndo2imTZ",
"EOS6VEdYvgvNyu2dAwjSszb6ty9jJHTbp9pvFdoEdxLtGfSLs7zY8",
"EOS8B27UNxvKZ1fSdumUhSfWGTthCsJrLLGLjDoa4vkYc3ohpPzaY"
]
list_keys 获取指定钱包中的公私钥对
post
v1/wallet/list_keys
api:
http://127.0.0.1:8888/v1/wallet/list_keys
params:
["testcreate", "PW5Kxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"]
钱包名称
钱包密码
returns:
["EOS6MRyAjQq8ud7hVNYcfnVPJqcVpscN5So8BhtHuGYqET5GDW5CV","5KQwrPbwdL6PhXujxW37FSSQZ1JiwsST4cqQzDeyXtP79zkvFD3"]
create_key 在指定钱包中创建公钥
post
v1/wallet/create_key
api:
http://127.0.0.1:8888/v1/wallet/create_key
params:
["testcreate", "K1"]
钱包名称
公钥类型
returns:
"EOS55xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
lock 锁定指定钱包
post
v1/wallet/lock
api:
http://127.0.0.1:8888/v1/wallet/lock
params:
"testcreate"
钱包名称
returns:
{}
lock_all 锁定所有钱包
post
v1/wallet/lock_all
api:
http://127.0.0.1:8888/v1/wallet/lock_all
params:
无
returns:
{}
set_timeout 设置钱包的锁定时间,单位为秒
post
v1/wallet/set_timeout
api:
http://127.0.0.1:8888/v1/wallet/set_timeout
params:
3600
returns:
{}
sign_transaction 签署交易
post
v1/wallet/sign_transaction
api:
http://127.0.0.1:8888/v1/wallet/sign_transaction
params:
[{
"ref_block_num": 13598552,
"ref_block_prefix": 822522680,
"expiration": "2018-09-08T09:31:47.500",
"actions": [{
"account": "eosio.token",
"name": "transfer",
"authorization": [{
"actor": "testnetyy111",
"permission": "active"
}],
"data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
}],
"signatures": []
},
["EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc"], "038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca"
]
ref_block_num:签署交易时最新区块编号
expiration:过期时间
account:合约名称
name:合约方法
actor:调用者
permission:使用的权限类型
data:交易数据的bin格式
EOS6Z7mUQeFC2cQTT3xMyZh2wsLQoHih1bTMgRhr3dbichprTi7Rc:公钥
038f4b0fc8ff18a4f0842a8f0564611f6e96e8535901dd45e43ac8691a1c4dca:chain_id
returns:
{
"expiration": "2018-09-08T09:31:47",
"ref_block_num": 32600,
"ref_block_prefix": 822522680,
"max_net_usage_words": 0,
"max_cpu_usage_ms": 0,
"delay_sec": 0,
"context_free_actions": [],
"actions": [
{
"account": "eosio.token",
"name": "transfer",
"authorization": [
{
"actor": "testnetyy111",
"permission": "active"
}
],
"data": "1042f03eab99b1ca1042c02dab99b1ca40420f000000000004454f5300000000086869207468657265"
}
],
"transaction_extensions": [],
"signatures": [
"SIG_K1_Kkujqvvxt89EG7cCAAk47KDm3TXQHfooSGPKivWPFTMaph5gnyKfUiLomzEzCwF3yttJ9yCQ82LVNUdrhrS3ssryaH1trZ"
],
"context_free_data": []
}
signatures:交易的签名。后面push_transaction的时候需要
文章来源地址https://www.toymoban.com/news/detail-717249.html
文章来源:https://www.toymoban.com/news/detail-717249.html
到了这里,关于EOS区块链keosd的RPC API的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!