All URIs are relative to https://api.tzkt.io, except if the operation defines another base path.
Method | HTTP request | Description |
---|---|---|
constantsGet() | GET /v1/constants | Get global constants |
constantsGetByAddress() | GET /v1/constants/{address} | Get global constant by address |
constantsGetCount() | GET /v1/constants/count | Get global constants count |
constantsGet($address, $creation_level, $creation_time, $creator, $refs, $size, $select, $sort, $offset, $limit, $format): \Bzzhh\Tzkt\Model\Constant[]
Get global constants
Returns a list of global constants.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Bzzhh\Tzkt\Api\ConstantsApi(
// 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()
);
$address = new \Bzzhh\Tzkt\Model\BigMapsGetBigMapKeysHashParameter(); // BigMapsGetBigMapKeysHashParameter | Filters constants by global address (starts with `expr..`).
$creation_level = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters constants by creation level.
$creation_time = new \Bzzhh\Tzkt\Model\BigMapsGetBigMapKeysFirstTimeParameter(); // BigMapsGetBigMapKeysFirstTimeParameter | Filters constants by creation time.
$creator = new \Bzzhh\Tzkt\Model\AccountsGetDelegateParameter(); // AccountsGetDelegateParameter | Filters constants by creator.
$refs = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters constants by number of refs.
$size = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters constants by size in bytes.
$select = new \Bzzhh\Tzkt\Model\AccountsGetSelectParameter(); // AccountsGetSelectParameter | Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes.
$sort = new \Bzzhh\Tzkt\Model\AccountsGetSortParameter(); // AccountsGetSortParameter | Sorts delegators by specified field. Supported fields: `id` (default), `creationLevel`, `size`, `refs`.
$offset = new \Bzzhh\Tzkt\Model\AccountsGetOffsetParameter(); // AccountsGetOffsetParameter | Specifies which or how many items should be skipped
$limit = 100; // int | Maximum number of items to return
$format = 0; // int | Constant value format (`0` - micheline, `1` - michelson, `2` - bytes (base64))
try {
$result = $apiInstance->constantsGet($address, $creation_level, $creation_time, $creator, $refs, $size, $select, $sort, $offset, $limit, $format);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ConstantsApi->constantsGet: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
address | BigMapsGetBigMapKeysHashParameter | Filters constants by global address (starts with `expr..`). | [optional] |
creation_level | AccountsGetIdParameter | Filters constants by creation level. | [optional] |
creation_time | BigMapsGetBigMapKeysFirstTimeParameter | Filters constants by creation time. | [optional] |
creator | AccountsGetDelegateParameter | Filters constants by creator. | [optional] |
refs | AccountsGetIdParameter | Filters constants by number of refs. | [optional] |
size | AccountsGetIdParameter | Filters constants by size in bytes. | [optional] |
select | AccountsGetSelectParameter | Specify comma-separated list of fields to include into response or leave it undefined to return full object. If you select single field, response will be an array of values in both `.fields` and `.values` modes. | [optional] |
sort | AccountsGetSortParameter | Sorts delegators by specified field. Supported fields: `id` (default), `creationLevel`, `size`, `refs`. | [optional] |
offset | AccountsGetOffsetParameter | Specifies which or how many items should be skipped | [optional] |
limit | int | Maximum number of items to return | [optional] [default to 100] |
format | int | Constant value format (`0` - micheline, `1` - michelson, `2` - bytes (base64)) | [optional] [default to 0] |
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
constantsGetByAddress($address, $format): \Bzzhh\Tzkt\Model\Constant
Get global constant by address
Returns global constant with specified address (expression hash).
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Bzzhh\Tzkt\Api\ConstantsApi(
// 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()
);
$address = 'address_example'; // string | Global address (starts with `expr..`)
$format = 0; // int | Constant value format (`0` - micheline, `1` - michelson, `2` - bytes (base64))
try {
$result = $apiInstance->constantsGetByAddress($address, $format);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ConstantsApi->constantsGetByAddress: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
address | string | Global address (starts with `expr..`) | |
format | int | Constant value format (`0` - micheline, `1` - michelson, `2` - bytes (base64)) | [optional] [default to 0] |
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
constantsGetCount($refs): int
Get global constants count
Returns a number of global constants.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
$apiInstance = new Bzzhh\Tzkt\Api\ConstantsApi(
// 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()
);
$refs = new \Bzzhh\Tzkt\Model\AccountsGetIdParameter(); // AccountsGetIdParameter | Filters constants by number of refs.
try {
$result = $apiInstance->constantsGetCount($refs);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ConstantsApi->constantsGetCount: ', $e->getMessage(), PHP_EOL;
}
Name | Type | Description | Notes |
---|---|---|---|
refs | AccountsGetIdParameter | Filters constants by number of refs. | [optional] |
int
No authorization required
- Content-Type: Not defined
- Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]