EOS区块链keosd的RPC API

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的时候需要
相关推荐
哈利巴多先生1 小时前
HTTP,续~
网络·网络协议·http
白了个白i1 小时前
http的访问过程或者访问页面会发生什么
网络·网络协议·http
qq_372006862 小时前
浏览器http缓存问题
网络协议·http·缓存
dingzd953 小时前
走进 Web3:探索分布式网络的未来
web3·去中心化·区块链·互联网
科技小E3 小时前
国标GB28181设备管理软件EasyGBS:P2P远程访问故障排查指南(设备端)
网络协议·智能路由器·音视频·p2p
Roun34 小时前
元宇宙中的去中心化应用:Web3的未来角色
web3·去中心化·区块链
hgdlip5 小时前
手机IP地址:定义、查看与切换方法
网络协议·tcp/ip·智能手机
dengjiayue9 小时前
tcp 的重传,流量控制,拥塞控制
网络协议·tcp/ip
TianXuan_Chain14 小时前
web3跨链预言机协议-BandProtocol
web3·区块链·预言机
Aileen_0v014 小时前
【AI驱动的数据结构:包装类的艺术与科学】
linux·数据结构·人工智能·笔记·网络协议·tcp/ip·whisper