Skip to main content

List Inputs

Example Request

{
"jsonrpc": "2.0",
"method": "cartesi_listInputs",
"params": {
"application": "<name-or-address>",
"limit": 10,
"offset": 0
},
"id": 1
}

The cartesi_listInputs method returns a paginated list of inputs for a specific application.

Parameters

NameTypeRequiredDescription
applicationstringYesThe application's name or hex encoded address
epoch_indexstringNoFilter inputs by a specific epoch index (hex encoded)
senderstringNoFilter inputs by the sender's address (hex encoded)
limitnumberNoMaximum number of inputs to return (default: 50, minimum: 1)
offsetnumberNoStarting point for the list (default: 0, minimum: 0)

Response

{
"jsonrpc": "2.0",
"result": {
"data": [
{
"epoch_index": "0x1",
"index": "0x1",
"block_number": "0x1",
"raw_data": "0x48656c6c6f",
"decoded_data": {
"chain_id": "0x1",
"application_contract": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"sender": "0x71C7656EC7ab88b098defB751B7401B5f6d8976F",
"block_number": "0x1",
"block_timestamp": "0x1234567890",
"prev_randao": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"index": "0x1",
"payload": "0x48656c6c6f"
},
"status": "ACCEPTED",
"machine_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"outputs_hash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"transaction_reference": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-01T00:00:00Z"
}
],
"pagination": {
"total_count": 1,
"limit": 50,
"offset": 0
}
},
"id": 1
}

Response Fields

Data

NameTypeDescription
epoch_indexstringThe epoch index this input belongs to (hex encoded)
indexstringThe input index (hex encoded)
block_numberstringThe block number when the input was created (hex encoded)
raw_datastringThe raw input data in hexadecimal format
decoded_dataobjectThe decoded input data (null if not decodable)
statusstringCurrent status of the input
machine_hashstringThe machine hash after processing this input
outputs_hashstringThe outputs hash after processing this input
transaction_referencestringThe transaction reference
created_atstringTimestamp when the input was created
updated_atstringTimestamp when the input was last updated

Pagination

NameTypeDescription
total_countnumberTotal number of inputs available
limitnumberNumber of inputs returned in this response
offsetnumberStarting point of the returned inputs

Error Codes

CodeMessageDescription
-32602Invalid paramsInvalid parameter values
-32603Internal errorAn internal error occurred
-32000Application not foundThe specified application does not exist
We use cookies to ensure that we give you the best experience on our website. By using the website, you agree to the use of cookies.