Skip to content
登录与注册

会话ID在线调用

POST chain_getKey (会话ID)

获取加密公钥

返回值

Session:后续连接回话ID

pubkey: 服务端为当前连接分配的通信公钥

示例代码
请求
{
"jsonrpc": "3.0",
"method": "chain_getKey",
"params": [],
"id": 1
}
响应
{
 "jsonrpc":  "3.0",
 "id":  1,
 "result": {
   "ret":  "0",
   "err":  "",
   "content": {
     "session":  "5cbb9dab5678e998670e9e61",
     //会话ID "pubkey":  "q\r\nHQIDAQAB\r\n" //公钥
  }
}
} 注: 后续通信可以选择用公钥进行加密通信

本页目录