Skip to main content

Chain API (1.0.0)

Download OpenAPI specification:Download

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

Nodeop Chain API Specification. See developer documentation at https://docs.wire.network/docs/api-reference/tooling/nodeop/plugins/chain-plugin for information on enabling this plugin.

get_account

Returns an object containing various details about a specific account on the blockchain.

Request Body schema: application/json

JSON Object with single member "account_name"

required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
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
{
  • "account_name": "string"
}

Response samples

Content type
application/json
{
  • "account_name": "sysio.token",
  • "head_block_num": 181701,
  • "head_block_time": "2025-02-07T18:50:13.000",
  • "privileged": false,
  • "last_code_update": "2025-02-06T17:24:01.000",
  • "created": "2025-02-06T17:24:00.500",
  • "ram_quota": -1,
  • "net_weight": -1,
  • "cpu_weight": -1,
  • "net_limit": {
    },
  • "cpu_limit": {
    },
  • "ram_usage": 504,
  • "permissions": [
    ],
  • "subjective_cpu_bill_limit": {
    }
}

get_block

Returns an object containing various details about a specific block on the blockchain.

Request Body schema: application/json
block_num_or_id
required
string

Provide a block number or a block id

Responses

Request samples

Content type
application/json
{
  • "block_num": 234
}

Response samples

Content type
application/json
{
  • "timestamp": "2025-02-06T17:25:42.000",
  • "producer": "sysio",
  • "confirmed": 0,
  • "previous": "000000e989ae687b45c95ef25ee42efe8b283690e97ca9694b78e0a0d7d2dcff",
  • "transaction_mroot": "0000000000000000000000000000000000000000000000000000000000000000",
  • "action_mroot": "7957f5ea86130b6c2f8e442f3a549ebfe744c788ed9d77108738350bd31b2327",
  • "schedule_version": 0,
  • "new_producers": null,
  • "producer_signature": "SIG_K1_KbMeciZ5vQ9BDLHusX9Mj9YWUBmGKxg5k8s5jnML3o9ftac55vk7p3oZYABQjeZMBb983gPYyKQvoc18sExP9EftRJQX6z",
  • "transactions": [ ],
  • "id": "000000eaa7707d77cec76eda35a3a66c69273bd706d25cd950aa9811a6752152",
  • "block_num": 234,
  • "ref_block_prefix": 3664693198
}

get_block_info

Similar to get_block but returns a fixed-size smaller subset of the block data.

Request Body schema: application/json
block_num
required
integer

Provide a block number

Responses

Request samples

Content type
application/json
{
  • "block_num": 99
}

Response samples

Content type
application/json
{
  • "block_num": 100,
  • "ref_block_num": 100,
  • "id": "0000006460e32d086102050bea6aa3667c6b028661ee3f670558177e3eb9cf89",
  • "timestamp": "2025-01-16T16:56:08.500",
  • "producer": "sysio",
  • "confirmed": 0,
  • "previous": "0000006324658a5bc110b5bb80796788a49ba0a804726b3ea11ef7533fae4dbf",
  • "transaction_mroot": "164293eb9dd5882dd90be18656c59bb82f0e68fe84db0bb7556a975da9a65903",
  • "action_mroot": "f5cc39656758f5b86445ffb7234d1141292ffc2084cf158c590a8185d580a52d",
  • "schedule_version": 0,
  • "producer_signature": "SIG_K1_K4YWvzXWoAz3yTXg9Kh7rQTiHGqGZkG4cvbbdVLTTWhEFYgiDVb72gHRbz7ZfxsozBe9uGdH7WHp5hdxy8zVUNRYR45Vb7",
  • "ref_block_prefix": 184877665
}

get_info

Returns an object containing various details about the blockchain.

Responses

Request samples

curl -X POST "http://localhost:8080/v1/chain/get_info"

Response samples

Content type
application/json
{
  • "server_version": "8903fb39",
  • "chain_id": "b6de5b756bf858001a6c321b228cdb378dba0c6eebe9822af92e5478d75f26a8",
  • "head_block_num": 177352,
  • "last_irreversible_block_num": 177351,
  • "last_irreversible_block_id": "0002b4c7e186506709284e7698d02cc071130b67504e8ad1a7fbe5fa6d8e9708",
  • "head_block_id": "0002b4c836b29fb762ca922b8b885bf12a5f02991989e47020cd98af8252fb11",
  • "head_block_time": "2025-02-07T18:13:58.500",
  • "head_block_producer": "sysio",
  • "virtual_block_cpu_limit": 100000000,
  • "virtual_block_net_limit": 1048576000,
  • "block_cpu_limit": 99900,
  • "block_net_limit": 1048576,
  • "server_version_string": "v3.1.6",
  • "fork_db_head_block_num": 177352,
  • "fork_db_head_block_id": "0002b4c836b29fb762ca922b8b885bf12a5f02991989e47020cd98af8252fb11",
  • "server_full_version_string": "v3.1.6-8903fb39ab64c984aa2489b5546316a4ce4128d1",
  • "total_cpu_weight": 0,
  • "total_net_weight": 0,
  • "earliest_available_block_num": 1,
  • "last_irreversible_block_time": "2025-02-07T18:13:58.000"
}

push_transaction

Attempts to apply a single transaction to the blockchain.

Request Body schema: application/json
signatures
Array of strings (Signature) [^SIG_([RK]1|WA)_[1-9A-HJ-NP-Za-km-z]+$]

array of signatures required to authorize transaction

compression
boolean

Compression used, usually false

packed_context_free_data
string

json to hex

packed_trx
string

Transaction object json to hex

Responses

Request samples

Content type
application/json
{
  • "signatures": [
    ],
  • "compression": false,
  • "packed_context_free_data": "",
  • "packed_trx": "abcdef1234..."
}

Response samples

Content type
application/json
null

send_transaction

Similar to push_transaction, but uses a separate code path.

Request Body schema: application/json
signatures
Array of strings (Signature) [^SIG_([RK]1|WA)_[1-9A-HJ-NP-Za-km-z]+$]
compression
boolean
packed_context_free_data
string
packed_trx
string

Responses

Request samples

Content type
application/json
{
  • "signatures": [
    ],
  • "compression": false,
  • "packed_context_free_data": "",
  • "packed_trx": "1234abcd..."
}

Response samples

Content type
application/json
null

push_transactions

This method expects an array of transaction objects, applying each to the blockchain.

Request Body schema: application/json
Array
object (Transaction)

Responses

Request samples

Content type
application/json
[
  • {
    }
]

Response samples

Content type
application/json
null

get_block_header_state

Retrieves the block header state.

Request Body schema: application/json
block_num_or_id
required
string

Provide a block_number or a block_id

Responses

Request samples

Content type
application/json
{
  • "block_num_or_id": "234"
}

Response samples

Content type
application/json
{ }

get_abi

Retrieves the ABI for a contract based on its account name.

Request Body schema: application/json
required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
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
{
  • "account_name": "sysio.token"
}

Response samples

Content type
application/json
{
  • "account_name": "sysio.token",
  • "abi": {
    }
}

get_currency_balance

Retrieves the current balance of a specific account and token symbol.

Request Body schema: application/json
required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
required
object (Account) >= 18 properties
symbol
required
string (Symbol) ^([0-9]{1,32}.[0-9]{4} [A-Z]{1,7})$

A string representation of a SYSIO symbol, composed of a float with a precision of 4, and a symbol composed of capital letters between 1-7 letters separated by a space, example 1.0000 ABC.

Responses

Request samples

Content type
application/json
{
  • "code": "sysio.token",
  • "account": "sysio",
  • "symbol": "SYS"
}

Response samples

Content type
application/json
[
  • "75496.0000 SYS"
]

get_currency_stats

Retrieves currency stats

Request Body schema: application/json
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
symbol
string (Symbol) ^([0-9]{1,32}.[0-9]{4} [A-Z]{1,7})$

A string representation of a SYSIO symbol, composed of a float with a precision of 4, and a symbol composed of capital letters between 1-7 letters separated by a space, example 1.0000 ABC.

Responses

Request samples

Content type
application/json
{
  • "code": "sysio.token",
  • "symbol": "SYS"
}

Response samples

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

get_required_keys

Returns the required keys needed to sign a transaction.

Request Body schema: application/json
required
object (Transaction) >= 8 properties
available_keys
required
Array of strings (PublicKey) [^(SYS|PUB_([RK]1|WA)_)[1-9A-HJ-NP-Za-km-z]+$]

Responses

Request samples

Content type
application/json
{
  • "transaction": {
    },
  • "available_keys": [
    ]
}

Response samples

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

get_producers

Retrieves a list of producers.

Request Body schema: application/json
required
limit
required
integer <int32>

Total number of producers to retrieve.

lower_bound
required
integer <int32>

Pagination lower bound.

json
required
boolean

Return result in JSON format.

Responses

Request samples

Content type
application/json
{
  • "limit": 10,
  • "lower_bound": 0,
  • "json": true
}

Response samples

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

get_producer_schedule

Retrieves the current producer schedule from the blockchain, which includes the list of active producers and their respective rotation schedule.

Responses

Response samples

Content type
application/json
{
  • "active": {
    },
  • "pending": {
    },
  • "proposed": {
    }
}

get_raw_code_and_abi

Retrieves raw code and ABI for a contract based on the specified account name.

Request Body schema: application/json
required
account_name
required
string

Name of the account whose code/ABI should be retrieved.

Responses

Request samples

Content type
application/json
{
  • "account_name": "sysio.token"
}

Response samples

Content type
application/json
{
  • "account_name": "sysio.token",
  • "wasm": "AGFzbQEAAAABggEWYAAAYAF+...50AAAAAACQTcYDaTY0AAAOY3VycmVuY3lfc3RhdHMAAAAAAA==",
  • "abi": "DnN5c2lvOjphYmkvMS4y...AAA=="
}

get_scheduled_transactions

Retrieves the scheduled transactions

Request Body schema: application/json
lower_bound
string (DateTimeSeconds) ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}...

Date/time string in the format YYYY-MM-DDTHH:MM:SS.sss

limit
integer

The maximum number of transactions to return

json
required
boolean

true/false whether the packed transaction is converted to JSON

Responses

Request samples

Content type
application/json
{
  • "lower_bound": "2025-12-31T12:34:56.789",
  • "limit": 10,
  • "json": false
}

Response samples

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

get_table_by_scope

Retrieves table scope for a given contract and table name.

Request Body schema: application/json
code
required
string

name of the contract to return table data for

table
string

Filter results by table

lower_bound
string

Filters results to return the first element that is not less than provided value in set

upper_bound
string

Filters results to return the first element that is greater than provided value in set

limit
integer <int32>
Default: 10

Limit number of results returned.

reverse
boolean
Default: false

Reverse the order of returned results

show_payer
boolean
Default: false

Show RAM payer

Responses

Request samples

Content type
application/json
{
  • "code": "sysio.token",
  • "table": "accounts",
  • "lower_bound": "",
  • "upper_bound": "",
  • "limit": 10,
  • "reverse": false,
  • "show_payer": false
}

Response samples

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

get_table_rows

Returns rows from the specified table.

Request Body schema: application/json
code
required
string
table
required
string
scope
required
string
index_position
string

e.g. "primary", "secondary", etc.

key_type
string
encode_type
string
lower_bound
string
upper_bound
string
limit
integer
Default: 10
reverse
boolean
Default: false
show_payer
boolean
Default: false
json
boolean
Default: false

Responses

Request samples

Content type
application/json
{
  • "code": "sysio.token",
  • "table": "accounts",
  • "scope": "sysio",
  • "index_position": "primary",
  • "key_type": "name",
  • "encode_type": "dec",
  • "lower_bound": "",
  • "upper_bound": "",
  • "limit": 10,
  • "reverse": false,
  • "show_payer": "false,",
  • "json": true
}

Response samples

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

abi_json_to_bin

Returns serialized action data.

Request Body schema: application/json
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
args
object

The action parameters to be serialized

Responses

Request samples

Content type
application/json
{
  • "code": "sysio.token",
  • "action": "transfer",
  • "args": {
    }
}

Response samples

Content type
application/json
{
  • "binargs": "0000000000000e3d0000000000855c34a08601000000000004535953000000000d54657374207472616e73666572"
}

abi_bin_to_json

Returns deserialized action data.

Request Body schema: application/json
required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
binargs
required
string^(0[xX])?[0-9a-fA-F]*$

Responses

Request samples

Content type
application/json
{
  • "code": "sysio.token",
  • "action": "transfer",
  • "binargs": "0000000000000e3d0000000000855c34a08601000000000004535953000000000d54657374207472616e73666572"
}

Response samples

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

get_code

Returns an object containing the smart contract WASM code.

Request Body schema: application/json
required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
code_as_wasm
required
integer
Default: 1

This must be 1 (true)

Responses

Request samples

Content type
application/json
{
  • "account_name": "sysio.token",
  • "code_as_wasm": 1
}

Response samples

Content type
application/json
{
  • "name": "string",
  • "code_hash": "string",
  • "wast": "string",
  • "wasm": "string",
  • "abi": {
    }
}

get_code_hash

Retrieves the code hash for a smart contract deployed on the blockchain. Once you have the code hash of a contract, you can compare it with a known or expected value to ensure that the contract code has not been modified or tampered with.

Request Body schema: application/json
account_name
string

The name of the account for which you want to retrieve the code hash. It represents the account that owns the smart contract code.

Responses

Request samples

Content type
application/json
{
  • "account_name": "sysio.token"
}

Response samples

Content type
application/json
{
  • "account_name": "sysio.token",
  • "code_hash": "7a7fd56e9d291824db8f1d2abbadb5d25c10dd6048e3cba224ff0b94aaa467f3"
}

get_raw_abi

Returns an object containing the smart contract abi.

Request Body schema: application/json
required
NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string) (Name)
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
{
  • "account_name": "sysio.token"
}

Response samples

Content type
application/json
{
  • "account_name": "sysio.token",
  • "code_hash": "7a7fd56e9d291824db8f1d2abbadb5d25c10dd6048e3cba224ff0b94aaa467f3",
  • "abi_hash": "523465f934cd5bf5efd706b5cfb06be8fd5e85e19edda6fa4a2f24551a60b848",
  • "abi": "DnN5c2lvOjphYmkvMS4yAAgHYWNjb3VudA...AOY3VycmVuY3lfc3RhdHMAAAAAAA==="
}

get_activated_protocol_features

Retrieves the activated protocol features for producer node

Request Body schema: application/json
required
object

Defines filters

search_by_block_num
required
boolean
reverse
required
boolean
lower_bound
integer
upper_bound
integer
limit
integer

default is 10

Responses

Request samples

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

Response samples

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

get_accounts_by_authorizers

Find all account permission authorities that match provided accounts and keys

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

List of authorizing accounts and/or actor/permissions

keys
Array of strings (PublicKey) [^(SYS|PUB_([RK]1|WA)_)[1-9A-HJ-NP-Za-km-z]+$]

List of authorizing keys

Responses

Request samples

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

Response samples

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

get_transaction_status

Attempts to get current blockchain state and, if available, transaction information given the transaction id. For query to work, the transaction finality status feature must be enabled by configuring the chain plugin with the config option --transaction-finality-status-max-storage-size-gb in nodeop.

Request Body schema: application/json
id
required
string

The transaction ID of the transaction to retrieve the status for.

Responses

Request samples

Content type
application/json
{
  • "id": "02ca32345cc025052c8fe119516aa6086e14a333eddc4433283ecf50374e2b06"
}

Response samples

Content type
application/json
{
  • "state": "string",
  • "block_number": 0,
  • "block_id": "string",
  • "block_timestamp": "string",
  • "expiration": "string",
  • "head_number": 0,
  • "head_id": "string",
  • "head_timestamp": "string",
  • "irreversible_number": 0,
  • "irreversible_id": "string",
  • "irreversible_timestamp": "string",
  • "last_tracked_block_id": "string"
}

send_transaction2

Attempts to apply a transaction to the blockchain specified in JSON format. It supports returning the full trace of a failed transaction and automatic nodeop-mediated retry if it is enabled on the node. When transaction retry is enabled on an API node, it will monitor incoming API transactions and ensure they are resubmitted additional times into the P2P network until they expire or are included in a block. Warning, full failure traces are now returned by default instead of exceptions. Be careful to not confuse a returned trace as an indication of speculative execution success. Verify 'receipt' and 'except' fields of the returned trace.

Request Body schema: application/json
return_failure_trace
boolean

If true, then embed transaction exceptions into the returned transaction trace.

retry_trx
boolean

If true, requests to retry transaction until gets in a block of given height, see retry_trx_num_blocks as well, or it is irreversible or expires.

retry_trx_num_blocks
integer

If retry_trx is true, requests to retry transaction until in a block of given height, or lib if not specified.

object

Responses

Request samples

Content type
application/json
{
  • "return_failure_trace": true,
  • "retry_trx": true,
  • "retry_trx_num_blocks": 0,
  • "transaction": {
    }
}

Response samples

Content type
application/json
null

compute_transaction

Executes specified transaction and creates a transaction trace, including resource usage, and then reverts all state changes but not contribute to the subjective billing for the account. If the transaction has signatures, they are processed, but any failures are ignored. Transactions which fail always include the transaction failure trace. Warning, users with exposed nodes who have enabled the compute_transaction endpoint should implement some throttling to protect from Denial of Service attacks.

Request Body schema: application/json
signatures
Array of strings (Signature) [^SIG_([RK]1|WA)_[1-9A-HJ-NP-Za-km-z]+$]

array of signatures required to authorize transaction

compression
boolean

Compression used, usually false

packed_context_free_data
string

JSON to hex

packed_trx
string

Transaction object, JSON to hex

Responses

Request samples

Content type
application/json
{
  • "signatures": [
    ],
  • "compression": true,
  • "packed_context_free_data": "string",
  • "packed_trx": "string"
}

Response samples

Content type
application/json
null

get_transaction_id

Retrieves the transaction ID (also known as the transaction hash) of a specified transaction on the blockchain.

Request Body schema: application/json
>= 8 properties
expiration
required
string (DateTime) ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}...

Date/time string in the format YYYY-MM-DDTHH:MM:SS

ref_block_num
required
integer
ref_block_prefix
required
integer

32-bit portion of block ID

required
WholeNumber (string) or WholeNumber (integer) (WholeNumber)

A whole number

required
WholeNumber (string) or WholeNumber (integer) (WholeNumber)

A whole number

delay_sec
required
integer
required
Array of objects (Action) [ items >= 5 properties ]
required
Array of objects (Action) [ items >= 5 properties ]
Array of integers or strings (Extension) [ items ]

Responses

Request samples

Content type
application/json
{
  • "expiration": "string",
  • "ref_block_num": 0,
  • "ref_block_prefix": 0,
  • "max_net_usage_words": "string",
  • "max_cpu_usage_ms": "string",
  • "delay_sec": 0,
  • "context_free_actions": [
    ],
  • "actions": [
    ],
  • "transaction_extensions": [
    ]
}

Response samples

Content type
application/json
"string"

send_read_only_transaction

Sends a read-only transaction in JSON format to the blockchain. This transaction is not intended for inclusion in the blockchain. When a user sends a transaction, which modifies the blockchain state, the connected node will fail the transaction.

Request Body schema: application/json
object
compression
boolean

Compression used, usually false

packed_context_free_data
string

JSON to hex

packed_trx
string

Transaction object JSON to hex

Responses

Request samples

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

Response samples

Content type
application/json
null

push_block

Sends a block to the blockchain.

Request Body schema: application/json
>= 9 properties
timestamp
required
string (DateTimeSeconds) ^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}...

Date/time string in the format YYYY-MM-DDTHH:MM:SS.sss

required
EmptyString (string) or (Name (NamePrivileged (string) or NameBasic (string) or NameBid (string) or NameCatchAll (string)))
confirmed
required
integer

number of prior blocks confirmed by this block producer in current schedule

previous
required
string (Sha256) ^[0-9A-Fa-f]{64}$
transaction_mroot
required
string (Sha256) ^[0-9A-Fa-f]{64}$
action_mroot
required
string (Sha256) ^[0-9A-Fa-f]{64}$
schedule_version
required
integer

number of times producer schedule has changed since genesis

required
object (ProducerSchedule)

A JSON object that encapsulates the list of the producers schedule and its version.

Array of integers or strings (Extension)
new_protocol_features
Array of objects

list of new protocol features

producer_signature
required
string (Signature) ^SIG_([RK]1|WA)_[1-9A-HJ-NP-Za-km-z]+$

Base58 encoded cryptographic signature

Array of objects (TransactionReceipt) [ items >= 4 properties ]

list of valid transaction receipts included in block

Array of integers or strings (Extension)
id
string (Sha256) ^[0-9A-Fa-f]{64}$
block_num
integer

height of this block in the chain

ref_block_prefix
integer

32-bit portion of block ID

Responses

Request samples

Content type
application/json
{
  • "timestamp": "string",
  • "producer": "string",
  • "confirmed": 0,
  • "previous": "string",
  • "transaction_mroot": "string",
  • "action_mroot": "string",
  • "schedule_version": 0,
  • "new_producers": {
    },
  • "header_extensions": [
    ],
  • "new_protocol_features": [
    ],
  • "producer_signature": "string",
  • "transactions": [
    ],
  • "block_extensions": [
    ],
  • "id": "string",
  • "block_num": 0,
  • "ref_block_prefix": 0
}

Response samples

Content type
application/json
null