Skip to content

Latest commit

 

History

History
186 lines (126 loc) · 6.43 KB

HashLockRoutesApi.md

File metadata and controls

186 lines (126 loc) · 6.43 KB

SymbolRestClient\HashLockRoutesApi

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

Method HTTP request Description
getHashLock() GET /lock/hash/{hash} Get hash lock information
getHashLockMerkle() GET /lock/hash/{hash}/merkle Get hash lock merkle information
searchHashLock() GET /lock/hash Search hash lock entries

getHashLock()

getHashLock($hash): \SymbolRestClient\Model\HashLockInfoDTO

Get hash lock information

Gets the hash lock for a given hash.

Example

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



$apiInstance = new SymbolRestClient\Api\HashLockRoutesApi(
    // 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()
);
$hash = 'hash_example'; // string | Filter by hash.

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

Parameters

Name Type Description Notes
hash string Filter by hash.

Return type

\SymbolRestClient\Model\HashLockInfoDTO

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]

getHashLockMerkle()

getHashLockMerkle($hash): \SymbolRestClient\Model\MerkleStateInfoDTO

Get hash lock merkle information

Gets the hash lock merkle for a given hash.

Example

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



$apiInstance = new SymbolRestClient\Api\HashLockRoutesApi(
    // 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()
);
$hash = 'hash_example'; // string | Filter by hash.

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

Parameters

Name Type Description Notes
hash string Filter by hash.

Return type

\SymbolRestClient\Model\MerkleStateInfoDTO

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]

searchHashLock()

searchHashLock($address, $page_size, $page_number, $offset, $order): \SymbolRestClient\Model\HashLockPage

Search hash lock entries

Returns an array of hash locks.

Example

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



$apiInstance = new SymbolRestClient\Api\HashLockRoutesApi(
    // 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 | Filter by address involved in the transaction. An account's address is considered to be involved in the transaction when the account is the sender, recipient, or it is required to cosign the transaction. This filter cannot be combined with ``recipientAddress`` and ``signerPublicKey`` query params.
$page_size = 10; // int | Select the number of entries to return.
$page_number = 1; // int | Filter by page number.
$offset = 'offset_example'; // string | Entry id at which to start pagination. If the ordering parameter is set to -id, the elements returned precede the identifier. Otherwise, newer elements with respect to the id are returned.
$order = new \SymbolRestClient\Model\Order(); // Order | Sort responses in ascending or descending order based on the collection property set on the param ``orderBy``. If the request does not specify ``orderBy``, REST returns the collection ordered by id.

try {
    $result = $apiInstance->searchHashLock($address, $page_size, $page_number, $offset, $order);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling HashLockRoutesApi->searchHashLock: ', $e->getMessage(), PHP_EOL;
}

Parameters

Name Type Description Notes
address string Filter by address involved in the transaction. An account's address is considered to be involved in the transaction when the account is the sender, recipient, or it is required to cosign the transaction. This filter cannot be combined with ``recipientAddress`` and ``signerPublicKey`` query params. [optional]
page_size int Select the number of entries to return. [optional] [default to 10]
page_number int Filter by page number. [optional] [default to 1]
offset string Entry id at which to start pagination. If the ordering parameter is set to -id, the elements returned precede the identifier. Otherwise, newer elements with respect to the id are returned. [optional]
order Order Sort responses in ascending or descending order based on the collection property set on the param ``orderBy``. If the request does not specify ``orderBy``, REST returns the collection ordered by id. [optional]

Return type

\SymbolRestClient\Model\HashLockPage

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]