Emmanuel Odeke
|
f52d92a40e
|
modules/coin/rest: implemented CreateRole
* Note: Role must be a hex string, as enforced in tests/rest/cli.sh
```shell
$ curl -X POST http://localhost:8998/build/create_role --data \
'{
"role":"DEADBEEF", "seq": 1,
"min_sigs": 1,
"signers": [{
"addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9", "app": "role"
}]
}'
```
```HTTP
HTTP/1.1 200 OK
Content-Type: application/json
Date: Tue, 08 Aug 2017 19:15:13 GMT
Content-Length: 387
{
"type": "chain/tx",
"data": {
"chain_id": "test_chain_id",
"expires_at": 0,
"tx": {
"type": "role/create",
"data": {
"role": "DEADBEEF",
"min_sigs": 1,
"signers": [
{
"chain": "",
"app": "role",
"addr": "4FF759D47C81754D8F553DCCAC8651D0AF74C7F9"
}
]
}
}
}
}
```
Updates #200
|
2017-08-18 22:32:04 +01:00 |