Skip to main content

Producer API (1.0.0)

Download OpenAPI specification:Download

URL: https://antelope.io License: MIT

Nodeos Producer API Specification. See developer documentation at https://docs.eosnetwork.com for information on enabling this plugin.

Protocol Version 3.2

The release tag for Leap binaries is also the protocol version

pause

Pause producer node. Takes no arguments and returns no values.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "result": "ok"
}

resume

Resume producer node. Takes no arguments and returns no values.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "result": "ok"
}

paused

Retrieves paused status for producer node. Takes no arguments and returns no values.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "code": 400,
  • "message": "Invalid Request",
  • "error": {
    }
}

get_runtime_options

Retrieves runtime options for producer node.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "max_transaction_time": 100,
  • "max_irreversible_block_age": -1,
  • "produce_time_offset_us": -100000,
  • "last_block_time_offset_us": -200000,
  • "max_scheduled_transaction_time_per_block_ms": 100,
  • "subjective_cpu_leeway_us": 10,
  • "incoming_defer_ratio": "1.00000000000000000",
  • "greylist_limit": 1000
}

update_runtime_options

Update runtime options for producer node. May post any of the runtime options in combination or alone.

Authorizations:
None
Request Body schema: application/json
max_transaction_time
integer

Max transaction time

max_irreversible_block_age
integer

Max irreversible block age

produce_time_offset_us
integer

Time offset

last_block_time_offset_us
integer

Last block time offset

max_scheduled_transaction_time_per_block_ms
integer

Max scheduled transaction time per block in ms

subjective_cpu_leeway_us
integer

in micro seconds

incoming_defer_ratio
string

Incoming defer ratio, parsed to double

greylist_limit
integer

limit on number of Names supported by greylist

Responses

Request samples

Content type
application/json
{
  • "max_transaction_time": 100,
  • "max_irreversible_block_age": -1,
  • "produce_time_offset_us": -100000,
  • "last_block_time_offset_us": -200000,
  • "max_scheduled_transaction_time_per_block_ms": 100,
  • "subjective_cpu_leeway_us": 10,
  • "incoming_defer_ratio": "1.00000000000000000",
  • "greylist_limit": 1000
}

Response samples

Content type
application/json
{
  • "result": "ok"
}

get_greylist

Retrieves the greylist for producer node.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "accounts": [
    ]
}

add_greylist_accounts

Adds accounts to greylist for producer node. At least one account is required.

Authorizations:
None
Request Body schema: application/json
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)

List of account names to add

Array
Any of
string (NamePrivileged) ^(eosio[\.][a-z1-5]{1,6})([a-j]{1})?$

String representation of privileged EOSIO name type

Responses

Request samples

Content type
application/json
{
  • "accounts": [
    ]
}

Response samples

Content type
application/json
{
  • "result": "ok"
}

remove_greylist_accounts

Removes accounts from greylist for producer node. At least one account is required.

Authorizations:
None
Request Body schema: application/json
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)

List of account names to remove

Array
Any of
string (NamePrivileged) ^(eosio[\.][a-z1-5]{1,6})([a-j]{1})?$

String representation of privileged EOSIO name type

Responses

Request samples

Content type
application/json
{
  • "accounts": [
    ]
}

Response samples

Content type
application/json
{
  • "result": "ok"
}

get_whitelist_blacklist

Retrieves the whitelist and blacklist for producer node. A JSON object containing whitelist and blacklist information.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "actor_whitelist": [
    ],
  • "actor_blacklist": [
    ],
  • "contract_whitelist": [
    ],
  • "contract_blacklist": [
    ],
  • "action_blacklist": [
    ],
  • "key_blacklist": [
    ]
}

set_whitelist_blacklist

Defines the whitelist and blacklist for a producer node. Takes a JSON object containing whitelist and blacklist information.

Authorizations:
None
Request Body schema: application/json
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
Array of NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
Array of (Name (NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string))) or CppSignature (string)[ items ]
key_blacklist
Array of strings (KeyType)
Items Enum: "uint64" "double"

Responses

Request samples

Content type
application/json
{
  • "actor_whitelist": [
    ],
  • "actor_blacklist": [
    ],
  • "contract_whitelist": [
    ],
  • "contract_blacklist": [
    ],
  • "action_blacklist": [
    ],
  • "key_blacklist": [
    ]
}

Response samples

Content type
application/json
{
  • "result": "ok"
}

create_snapshot

Creates a snapshot for producer node. Returns error when unable to create a snapshot.

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "head_block_id": "string",
  • "head_block_num": 5102,
  • "head_block_time": "2020-11-16T00:00:00.000",
  • "version": 6,
  • "snapshot_name": "/home/me/nodes/node-name/snapshots/snapshot-0000999f99999f9f999f99f99ff9999f999f9fff99ff99ffff9f9f9fff9f9999.bin"
}

get_integrity_hash

Retrieves the integrity hash for producer node

Authorizations:
None

Responses

Response samples

Content type
application/json
{
  • "head_block_id": "string",
  • "integrity_hash": "string"
}

schedule_protocol_feature_activations

Schedule protocol feature activation for producer node. Note some features may require pre-activation. Will return error for duplicate requests or when feature required pre-activation.

Authorizations:
None
Request Body schema: application/json
protocol_features_to_activate
Array of strings (Sha256)

List of protocol features to activate

Responses

Request samples

Content type
application/json
{
  • "protocol_features_to_activate": [
    ]
}

Response samples

Content type
application/json
{
  • "result": "ok"
}

get_supported_protocol_features

Retrieves supported protocol features for producer node. Pass filters in as part of the request body.

Authorizations:
None
Request Body schema: application/json
exclude_disabled
boolean

Exclude disabled protocol features

exclude_unactivatable
boolean

Exclude unactivatable protocol features

Responses

Request samples

Content type
application/json
{
  • "exclude_disabled": false,
  • "exclude_unactivatable": false
}

Response samples

Content type
application/json
[
  • {
    }
]

get_account_ram_corrections

Retrieves accounts with ram corrections.

Authorizations:
None
Request Body schema: application/json
lower_bound
integer

lowest account key

upper_bound
integer

highest account key

limit
integer

number of rows to scan

reverse
boolean

direction of search

Responses

Request samples

Content type
application/json
{
  • "lower_bound": 0,
  • "upper_bound": 0,
  • "limit": 10,
  • "reverse": false
}

Response samples

Content type
application/json
{
  • "rows": [
    ],
  • "more": [
    ]
}

get_unapplied_transactions

Get Unapplied Transactions. No required parameters.

Authorizations:
None
Request Body schema: application/json
limit
integer

limit number of transactions to return

lower_bound
string (Sha256) ^[0-9A-Fa-f]{64}$
time_limit_ms
integer

defaults to 10ms

Responses

Request samples

Content type
application/json
{
  • "limit": 2,
  • "lower_bound": "string",
  • "time_limit_ms": 10
}

Response samples

Content type
application/json
{
  • "size": 12428,
  • "incoming_size": 4475,
  • "trxs": [
    ],
  • "more": "string"
}