Allow
Allow specifies supported Operation status, Operation types, and all possible error statuses. This Allow object is used by clients to validate the correctness of a Rosetta Server implementation. It is expected that these clients will error if they receive some response that contains any of the above information that is not specified here.
Properties
Name | Type | Description | Required |
---|---|---|---|
operation_statuses | []OperationStatus | All Operation.Status this implementation supports. Any status that is returned during parsing that is not listed here will cause client validation to error. | True |
operation_types | []String | All Operation.Type this implementation supports. Any type that is returned during parsing that is not listed here will cause client validation to error. | True |
errors | []Error | All Errors that this implementation could return. Any error that is returned during parsing that is not listed here will cause client validation to error. | True |
historical_balance_lookup | Boolean | Any Rosetta implementation that supports querying the balance of an account at any height in the past should set this to true. | True |
timestamp_start_index | Int64 (>= 0) | If populated, timestamp_start_index indicates the first block index where block timestamps are considered valid (i.e. all blocks less than timestamp_start_index could have invalid timestamps). This is useful when the genesis block (or blocks) of a network have timestamp 0. If not populated, block timestamps are assumed to be valid for all available blocks. | False |
call_methods | []String | All methods that are supported by the /call endpoint. Communicating which parameters should be provided to /call is the responsibility of the implementer (this is en lieu of defining an entire type system and requiring the implementer to define that in Allow). | True |
balance_exemptions | []BalanceExemption | BalanceExemptions is an array of BalanceExemption indicating which account balances could change without a corresponding Operation. BalanceExemptions should be used sparingly as they may introduce significant complexity for integrators that attempt to reconcile all account balance changes. If your implementation relies on any BalanceExemptions, you MUST implement historical balance lookup (the ability to query an account balance at any BlockIdentifier). | True |
mempool_coins | Boolean | Any Rosetta implementation that can update an AccountIdentifier's unspent coins based on the contents of the mempool should populate this field as true. If false, requests to /account/coins that set include_mempool as true will be automatically rejected. | True |
block_hash_case | Case | Case specifies the expected case for strings and hashes. | False |
transaction_hash_case | Case | Case specifies the expected case for strings and hashes. | False |
Example
{
"operation_statuses": [
{
"status": "SUCCESS",
"successful": true
}
],
"operation_types": [
"TRANSFER"
],
"errors": [
{
"code": 12,
"message": "Invalid account format",
"description": "This error is returned when the requested AccountIdentifier is improperly formatted.",
"retriable": true,
"details": {
"address": "0x1dcc4de8dec75d7aab85b567b6",
"error": "not base64"
}
}
],
"historical_balance_lookup": true,
"timestamp_start_index": 0,
"call_methods": [
"eth_call"
],
"balance_exemptions": [
{
"sub_account_address": "staking",
"currency": {
"symbol": "BTC",
"decimals": 8,
"metadata": {
"Issuer": "Satoshi"
}
},
"exemption_type": "greater_or_equal"
}
],
"mempool_coins": true,
"block_hash_case": "case_sensitive",
"transaction_hash_case": "case_sensitive"
}