CertiK Chain RESTful API (1.0)

A REST interface for state queries, transaction generation and broadcasting.

Authentication

kms

Security scheme type: HTTP
HTTP Authorization Scheme basic

Transactions

Search, encode, or broadcast transactions.

Get a Tx by hash

get /txs/{hash}
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/txs/{hash}

Retrieve a transaction using its hash.

path Parameters
hash
required
string
Example: BCBE20E8D46758B96AE5883B792858296AC06E51435490FBDCAE25A72B3CC76B

Tx hash

Responses

200

Tx with the provided hash

500

Internal Server Error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "hash": "D085138D913993919295FF4B0A9107F1F2CDE0D37A87CE0644E217CBF3B49656",
  • "height": 368,
  • "tx":
    {
    },
  • "result":
    {
    }
}

Search transactions

get /txs
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/txs

Search transactions by events.

query Parameters
message.action
string
Example: message.action=send

transaction events such as 'message.action=send' which results in the following endpoint: 'GET /txs?message.action=send'. note that each module documents its own events. look for xx_events.md in the corresponding certik-sdk/docs/spec directory

message.sender
string
Example: message.sender=certik16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv

transaction tags with sender: 'GET /txs?message.action=send&message.sender=certik16xyempempp92x9hyzz9wrgf94r6j9h5f06pxxv'

page
integer
Example: page=1

Page number

limit
integer
Example: limit=1

Maximum number of items per page

tx.minheight
integer
Example: tx.minheight=25

transactions on blocks with height greater or equal this value

tx.maxheight
integer
Example: tx.maxheight=800000

transactions on blocks with height less than or equal this value

Responses

200

All txs matching the provided events

400

Invalid search events

500

Internal Server Error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "total_count": 1,
  • "count": 1,
  • "page_number": 1,
  • "page_total": 1,
  • "limit": 30,
  • "txs":
    [
    ]
}

Broadcast a signed tx

post /txs
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/txs

Broadcast a signed tx to a full node

Request Body schema: application/json

The tx must be a signed StdTx. The supported broadcast modes include "block"(return after tx commit), "sync"(return afer CheckTx) and "async"(return right away).

tx
object (StdTx)
mode
string

Responses

200

Tx broadcasting result

500

Internal Server Error

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tx":
    {
    },
  • "mode": "block"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "check_tx":
    {
    },
  • "deliver_tx":
    {
    },
  • "hash": "EE5F3404034C524501629B56E0DDC38FAD651F04",
  • "height": 0
}

Encode a transaction to the Amino wire format

post /txs/encode
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/txs/encode

Encode a transaction (signed or not) from JSON to base64-encoded Amino serialized bytes

Request Body schema: application/json

The tx to encode

tx
object (StdTx)

Responses

200

The tx was successfully decoded and re-encoded

400

The tx was malformated

500

Server internal error

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tx":
    {
    }
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tx": "The base64-encoded Amino-serialized bytes for the tx"
}

Decode a transaction from the Amino wire format

post /txs/decode
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/txs/decode

Decode a transaction (signed or not) from base64-encoded Amino serialized bytes to JSON

Request Body schema: application/json

The tx to decode

tx
string

Responses

200

The tx was successfully decoded

400

The tx was malformated

500

Server internal error

Request samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "tx": "SvBiXe4KPqijYZoKFFHEzJ8c2HPAfv2EFUcIhx0yPagwEhTy0vPA+GGhCEslKXa4Af0uB+mfShoMCgVzdGFrZRIDMTAwEgQQwJoM"
}

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "msg":
    [
    ],
  • "fee":
    {
    },
  • "memo": "string",
  • "signature":
    {
    }
}

Tendermint RPC

Tendermint APIs, such as query blocks, transactions and validatorset

Syncing state of node

get /syncing
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/syncing

Get if the node is currently syning with other nodes

Responses

200

Node syncing status

500

Server internal error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "syncing": true
}

Get the latest block

get /blocks/latest
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/blocks/latest

Responses

200

The latest block

500

Server internal error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "block_meta":
    {
    },
  • "block":
    {
    }
}

Get a block at a certain height

get /blocks/{height}
http://certik-chain-load-balancer-1594258070.us-east-1.elb.amazonaws.com/blocks/{height}
path Parameters
height
required
number
Example: 1

Block height

Responses

200

The block at a specific height

400

Invalid height

404

Request block height doesn't

500

Server internal error

Response samples

Content type
application/json
Copy
Expand all Collapse all
{
  • "block_meta":
    {