postman测试WEBASE-Front交易接口,返回"errorMessage": "user's privateKey is null"怎么解决呢?
256yangwei opened this issue · 1 comments
我在用WEBASE-Front交易测试交易,合约就是官网的helloworld,我想调用set接口更改字符串,我的请求接口和数据如下:
返回信息如下,提示"errorMessage": "user's privateKey is null"。
请问是如何才能测试成功呢。
PS:我自己现在的理解是交易的过程中可能需要一个用户的签名信息,附加到头信息或者啥地方。提示用户私钥为空,也不应该直接附加私钥信息在发送头或者request请求消息里吧?
由于图片不清晰,补充如下
请求方法post, http://ip:5002/WeBASE-Front/trans/handle
请求数据:
{
"user":"0x810158ce70541180cfe69b211d791b0a7c89fa0e",
"contractName":"HelloWorld",
"contractAddress":"0x35bcc6112699e60bcbe6af3c36cb67a4700009c0",
"funcName":"set",
"contractAbi":[{"constant":true,"inputs":[],"name":"get","outputs":[{"name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"n","type":"string"}],"name":"set","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"inputs":[],"payable":false,"stateMutability":"nonpayable","type":"constructor"}],
"funcParam":["Hi,Welcome!"],
"groupId" :"1",
"useCns": false
}
返回信息:
{
"code": 201015,
"data": null,
"errorMessage": "user's privateKey is null"
}
需要调用私钥管理/测试用户管理接口先创建一个私钥用户,然后再调用交易接口
具体创建私钥用户的方法可以参考WeBASE-Front的接口文档