AI agent documentation index: llms.txt. Raw markdown for any page is available by appending .md to the URL. Full content snapshot: llms-full.txt.
llms.txt — complete Cartesi documentation index. Append .md to any page URL for raw Markdown (e.g. /cartesi-rollups/2.0/development/building-an-application.md).
Skip to main content

List Withdrawals

Example Request

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

The cartesi_listWithdrawals method returns a paginated list of emergency withdrawals observed on-chain for a specific application. Each entry corresponds to a Withdrawal event emitted by the application's withdraw() function after foreclosure.

Parameters

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

Response

{
"jsonrpc": "2.0",
"result": {
"data": [
{
"account_index": "0x0",
"account": "0xe803000000000000bd8eba8bf9e56ad92f4c4fc89d6cb8890253574900000000",
"output": "0x10321e8b...",
"block_number": "0xaac079",
"transaction_hash": "0xfe6c84b741624b237b6d09a9f71a174e81a59e5eedb7893a77f238b45e833656",
"log_index": "0x2b7",
"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

See the Withdrawal type.

NameTypeDescription
account_indexstringThe account index in the accounts drive (hex encoded)
accountstringThe account as encoded in the accounts drive (hex)
outputstringThe withdrawal output (hex encoded)
block_numberstringThe block number of the Withdrawal event (hex encoded)
transaction_hashstringThe transaction hash of the withdrawal
log_indexstringThe log index within the block (hex encoded)
created_atstringTimestamp when the withdrawal was recorded
updated_atstringTimestamp when the withdrawal was last updated

Pagination

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

Error Codes

CodeMessageDescription
-32602Invalid paramsInvalid parameter values
-32000Application not foundThe specified application does not exist
-32603Internal errorAn internal error occurred
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.