跳到主要内容

Producer API (1.0.0)

Download OpenAPI specification:Download

URL: https://eosnetwork.com License: MIT

eosio

pause

Pause producer node. Takes no arguments returns no values.

Authorizations:
None

Responses

Response samples

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

resume

Resume producer node. Takes no arguments returns no values.

Authorizations:
None

Responses

Response samples

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

paused

Retreives paused status for producer node. Takes no arguments returns no values.

Authorizations:
None

Responses

Response samples

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

get_runtime_options

Retreives run time options for producer node. Only incoming_defer_ratio is a floating point number the other return values are signed integers.

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,
  • "incoming_defer_ratio": "1.00000000000000000",
  • "greylist_limit": 1000
}

update_runtime_options

Update run time options for producer node. May post any of the runtime options in combination or along. Only incoming_defer_ratio is a floating point number the other values are signed integers.

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

incoming_defer_ratio
string

Incoming defer ration, 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,
  • "incoming_defer_ratio": "1.00000000000000000",
  • "greylist_limit": 1000
}

Response samples

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

get_greylist

Retreives the greylist for producer node.

Authorizations:
None

Responses

Response samples

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

add_greylist_accounts

Adds accounts to grey list 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

Retreives the white list and black list for producer node. A json object containing whitelist and blacklist information. actor_whitelist , actor_blacklist, contract_whitelist, contract_blacklist are represented by an array of Names. action_blacklist is an array of tuples consisting of Name and Action. key_blacklist is an array of Public Keys. Name is a string represeting a NamePrivileged or NameBasic or NameBid or NameCatchAll

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. At least one of actor_whitelist, actor_blacklist, contract_whitelist, contract_blacklist, action_blacklist, and key_blacklist is required. actor_whitelist , actor_blacklist, contract_whitelist, contract_blacklist take an array of Names. action_blacklist is an array of tuples consisting of Name and Action. key_blacklist is an array of Public Keys. Name is a string represeting a NamePrivileged or NameBasic or NameBid or NameCatchAll

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 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

Retreives 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

Retreives 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": true,
  • "exclude_unactivatable": false
}

Response samples

Content type
application/json
[
  • {
    }
]

get_account_ram_corrections

Retreives accounts with ram corrections.

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

lowest account key

upper_bound
int

highest account key

limit
int

number of rows to scans

reverse
boolean

direction of search

Responses

Request samples

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

Response samples

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

get_unapplied_transactions

Get Unapplied Transactions. No required parameters.

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

number of transactions to return, defaults to 4,294,967,295

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

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"
}