-
Notifications
You must be signed in to change notification settings - Fork 255
Interface Contract
linj edited this page Nov 23, 2022
·
1 revision
- All RPC interfaces are HTTP protocols.
- All the data transmitted by the message are in JSON format.
- The RPC interfaces of this system are all POST method requests.
Request message structure:
{
"jsonrpc":"2.0",
"id":int32,
"method":"Chain33.Method",
"params":[]
}
Description of each parameter:
Parameter | Type | If Necessary | Description |
---|---|---|---|
id | int32 | yes | interface id temporarily out of use |
method | string | yes | requested method name of RPC |
params | array | no | additional parameter, default to null |
Response message structure:
{
"id":int32,
"result":{},
"error":null
}
Description of each parameter:
Parameter | Type | Description |
---|---|---|
id | int32 | correspond to the request id |
result | string or json | returned data ,different format returned by different methods,pure string or data in json format |
error | string | fill in error information on error, empty when there is no error |
hello world