1
0
Fork 0
forked from lthn/blockchain
blockchain/utils/sdk/client/php/docs/Api/InfoApi.md
Snider c67fda3cfb Add generated PHP client SDK for blockchain API
Introduces a new PHP client SDK generated via OpenAPI for the Lethean blockchain, including source code, models, API classes, documentation, tests, and configuration files. Updates Makefile to support PHP SDK generation and modifies php.json package configuration.
2025-10-19 15:09:11 +01:00

3.3 KiB
Generated

lthn\InfoApi

All URIs are relative to http://127.0.0.1:36943, except if the operation defines another base path.

Method HTTP request Description
getInfo() GET /info Get detailed information about the blockchain and daemon state
version() GET /info/version Get API version

getInfo()

getInfo($flags): \lthn\lthn\InfoModel

Get detailed information about the blockchain and daemon state

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new lthn\Api\InfoApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);
$flags = 'flags_example'; // string | Possible values: net_time_delta_median, current_network_hashrate_50, current_network_hashrate_350, seconds_for_10_blocks, seconds_for_30_blocks, transactions_daily_stat, last_pos_timestamp, last_pow_timestamp, total_coins, last_block_size, tx_count_in_last_block, pos_sequence_factor, pow_sequence_factor, pos_difficulty, performance, outs_stat, expirations_median.

try {
    $result = $apiInstance->getInfo($flags);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->getInfo: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
flags string Possible values: net_time_delta_median, current_network_hashrate_50, current_network_hashrate_350, seconds_for_10_blocks, seconds_for_30_blocks, transactions_daily_stat, last_pos_timestamp, last_pow_timestamp, total_coins, last_block_size, tx_count_in_last_block, pos_sequence_factor, pow_sequence_factor, pos_difficulty, performance, outs_stat, expirations_median. [optional]

Return type

\lthn\lthn\InfoModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]

version()

version(): \lthn\lthn\VersionModel

Get API version

Returns the current version of the API.

Example

<?php
require_once(__DIR__ . '/vendor/autoload.php');



$apiInstance = new lthn\Api\InfoApi(
    // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
    // This is optional, `GuzzleHttp\Client` will be used as default.
    new GuzzleHttp\Client()
);

try {
    $result = $apiInstance->version();
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling InfoApi->version: ', $e->getMessage(), PHP_EOL;
}

Parameters

This endpoint does not need any parameter.

Return type

\lthn\lthn\VersionModel

Authorization

No authorization required

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

[Back to top] [Back to API list] [Back to Model list] [Back to README]