Skip to main content

Producer API (1.0.0)

Download OpenAPI specification:Download

URL: https://wire.network License: MIT

pause

Pause producer node

Authorizations:
None
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

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

resume

Resume producer node

Authorizations:
None
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

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

paused

Retreives paused status for producer node

Authorizations:
None
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
true

get_runtime_options

Retreives run time options for producer node

Authorizations:
None
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "max_transaction_time": 200,
  • "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

Authorizations:
None
Request Body schema: application/json
required
object

Defines the run time options to set for the producer

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

Subjective CPU leeway

incoming_defer_ratio
integer

Incoming defer ration

Responses

Request samples

Content type
application/json
{
  • "options": {
    }
}

Response samples

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

get_greylist

Retreives the greylist for producer node

Authorizations:
None
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

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

add_greylist_accounts

Adds accounts to grey list for producer node

Authorizations:
None
Request Body schema: application/json
required
object
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) ^(sysio[\.][a-z1-5]{1,6})([a-j]{1})?$

String representation of privileged name type

Responses

Request samples

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

Response samples

Content type
application/json
null

remove_greylist_accounts

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

Authorizations:
None
Request Body schema: application/json
required
object
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) ^(sysio[\.][a-z1-5]{1,6})([a-j]{1})?$

String representation of privileged 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
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

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

set_whitelist_blacklist

Sets the white list and black list for producer node

Authorizations:
None
Request Body schema: application/json
required
object

Defines the actor whitelist and blacklist, the contract whitelist and blacklist, the action blacklist and key blacklist

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 NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name) [ items[^([a-z1-9]{1}[a-z1-9_]{0,30}[a-z1-9]{1})$] ]
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

Authorizations:
None

Responses

Request samples

curl -X POST "http://localhost:8887/v1/producer/create_snapshot" \
  -H "Content-Type: application/json" 

Response samples

Content type
application/json
null

schedule_snapshot

Submits a request to automatically generate snapshots according to a schedule specified with given parameters. If request body is empty, schedules immediate snapshot generation. Returns error when unable to accept schedule.

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

Generate snapshot every block_spacing blocks

start_block_num
integer

Block number at which schedule starts

end_block_num
integer

Block number at which schedule ends

snapshot_description
string

Description of the snapshot

Responses

Request samples

Content type
application/json
{
  • "block_spacing": 0,
  • "start_block_num": 5102,
  • "end_block_num": 15102,
  • "snapshot_description": "Daily snapshot"
}

Response samples

Content type
application/json
{
  • "snapshot_request_id": 0,
  • "block_spacing": 0,
  • "start_block_num": 5102,
  • "end_block_num": 15102,
  • "snapshot_description": "Daily snapshot"
}

get_snapshot_requests

Returns a list of scheduled snapshots.

Authorizations:
None

Responses

Response samples

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

unschedule_snapshot

Removes snapshot request identified by id. Returns error if referenced snapshot request does not exist.

Authorizations:
None
Request Body schema: application/json
required
snapshot_request_id
integer

snapshot id

Responses

Request samples

Content type
application/json
{
  • "snapshot_request_id": 0
}

Response samples

Content type
application/json
{
  • "snapshot_request_id": 0,
  • "block_spacing": 0,
  • "start_block_num": 5102,
  • "end_block_num": 15102,
  • "snapshot_description": "Daily snapshot"
}

get_integrity_hash

Retreives the integrity hash for producer node

Authorizations:
None
Request Body schema: application/json
object

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "head_block_id": "0005857b77cc98941c6caa90fa8a083d2b1f4416ac015a107e04ed06774cce94",
  • "integrity_hash": "ac2a27f3b40ff252c2450341d2e4f8dbc1f83949103b83d8569c4292b265b224"
}

schedule_protocol_feature_activations

Schedule protocol feature activation for producer node

Authorizations:
None
Request Body schema: application/json
required
object
protocol_features_to_activate
Array of strings (Sha256) [^[0-9A-Fa-f]{64}$]

List of protocol features to activate

Responses

Request samples

Content type
application/json
{
  • "schedule": {
    }
}

Response samples

Content type
application/json
null

get_supported_protocol_features

Retreives supported protocol features for producer node

Authorizations:
None
Request Body schema: application/json
required
object

Defines filters based on which to return the supported protocol features

exclude_disabled
boolean

Exclude disabled protocol features

exclude_unactivatable
boolean

Exclude unactivatable protocol features

Responses

Request samples

Content type
application/json
{
  • "params": {
    }
}

Response samples

Content type
application/json
[
  • "string"
]