Skip to content

symbol-blockchain-community/symbol-rest-client-php

Repository files navigation

OpenAPIClient-php

OpenAPI Specification of catapult-rest

Installation & Usage

Requirements

PHP 7.4 and later. Should also work with PHP 8.0.

Composer

To install the bindings via Composer, add the following to composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
    }
  ],
  "require": {
    "GIT_USER_ID/GIT_REPO_ID": "*@dev"
  }
}

Then run composer install

Manual Installation

Download the files and include autoload.php:

<?php
require_once('/path/to/OpenAPIClient-php/vendor/autoload.php');

Getting Started

Please follow the installation procedure and then run the following:

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




$apiInstance = new SymbolRestClient\Api\AccountRoutesApi(
    // 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()
);
$account_id = 'account_id_example'; // string | Account public key or address encoded using a 32-character set.

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

API Endpoints

All URIs are relative to http://localhost:3000

Class Method HTTP request Description
AccountRoutesApi getAccountInfo GET /accounts/{accountId} Get account information
AccountRoutesApi getAccountInfoMerkle GET /accounts/{accountId}/merkle Get account merkle information
AccountRoutesApi getAccountsInfo POST /accounts Get accounts information
AccountRoutesApi searchAccounts GET /accounts Search accounts
BlockRoutesApi getBlockByHeight GET /blocks/{height} Get block information
BlockRoutesApi getMerkleReceipts GET /blocks/{height}/statements/{hash}/merkle Get the merkle path for a given a receipt statement hash and block
BlockRoutesApi getMerkleTransaction GET /blocks/{height}/transactions/{hash}/merkle Get the merkle path for a given a transaction and block
BlockRoutesApi searchBlocks GET /blocks Search blocks
ChainRoutesApi getChainInfo GET /chain/info Get the current information of the chain
FinalizationRoutesApi getFinalizationProofAtEpoch GET /finalization/proof/epoch/{epoch} Get finalization proof
FinalizationRoutesApi getFinalizationProofAtHeight GET /finalization/proof/height/{height} Get finalization proof
HashLockRoutesApi getHashLock GET /lock/hash/{hash} Get hash lock information
HashLockRoutesApi getHashLockMerkle GET /lock/hash/{hash}/merkle Get hash lock merkle information
HashLockRoutesApi searchHashLock GET /lock/hash Search hash lock entries
MetadataRoutesApi getMetadata GET /metadata/{compositeHash} Get metadata information
MetadataRoutesApi getMetadataMerkle GET /metadata/{compositeHash}/merkle Get metadata merkle information
MetadataRoutesApi searchMetadataEntries GET /metadata Search metadata entries
MosaicRoutesApi getMosaic GET /mosaics/{mosaicId} Get mosaic information
MosaicRoutesApi getMosaicMerkle GET /mosaics/{mosaicId}/merkle Get mosaic merkle information
MosaicRoutesApi getMosaics POST /mosaics Get mosaics information for an array of mosaics
MosaicRoutesApi searchMosaics GET /mosaics Search mosaics
MultisigRoutesApi getAccountMultisig GET /account/{address}/multisig Get multisig account information
MultisigRoutesApi getAccountMultisigGraph GET /account/{address}/multisig/graph Get multisig account graph information
MultisigRoutesApi getAccountMultisigMerkle GET /account/{address}/multisig/merkle Get multisig account merkle information
NamespaceRoutesApi getAccountsNames POST /namespaces/account/names Get readable names for a set of accountIds
NamespaceRoutesApi getMosaicsNames POST /namespaces/mosaic/names Get readable names for a set of mosaics
NamespaceRoutesApi getNamespace GET /namespaces/{namespaceId} Get namespace information
NamespaceRoutesApi getNamespaceMerkle GET /namespaces/{namespaceId}/merkle Get namespace merkle information
NamespaceRoutesApi getNamespacesNames POST /namespaces/names Get readable names for a set of namespaces
NamespaceRoutesApi searchNamespaces GET /namespaces Search namespaces
NetworkRoutesApi getNetworkProperties GET /network/properties Get the network properties
NetworkRoutesApi getNetworkType GET /network Get the current network type of the chain
NetworkRoutesApi getRentalFees GET /network/fees/rental Get rental fees information
NetworkRoutesApi getTransactionFees GET /network/fees/transaction Get transaction fees information
NodeRoutesApi getNodeHealth GET /node/health Get the node health information
NodeRoutesApi getNodeInfo GET /node/info Get the node information
NodeRoutesApi getNodePeers GET /node/peers Get peers information
NodeRoutesApi getNodeStorage GET /node/storage Get the storage information of the node
NodeRoutesApi getNodeTime GET /node/time Get the node time
NodeRoutesApi getServerInfo GET /node/server Get the version of the running REST component
NodeRoutesApi getUnlockedAccount GET /node/unlockedaccount Get the unlocked harvesting account public keys.
ReceiptRoutesApi searchAddressResolutionStatements GET /statements/resolutions/address Get receipts address resolution statements
ReceiptRoutesApi searchMosaicResolutionStatements GET /statements/resolutions/mosaic Get receipts mosaic resolution statements
ReceiptRoutesApi searchReceipts GET /statements/transaction Search transaction statements
RestrictionAccountRoutesApi getAccountRestrictions GET /restrictions/account/{address} Get the account restrictions
RestrictionAccountRoutesApi getAccountRestrictionsMerkle GET /restrictions/account/{address}/merkle Get the account restrictions merkle
RestrictionAccountRoutesApi searchAccountRestrictions GET /restrictions/account Search account restrictions
RestrictionMosaicRoutesApi getMosaicRestrictions GET /restrictions/mosaic/{compositeHash} Get the mosaic restrictions
RestrictionMosaicRoutesApi getMosaicRestrictionsMerkle GET /restrictions/mosaic/{compositeHash}/merkle Get the mosaic restrictions merkle
RestrictionMosaicRoutesApi searchMosaicRestrictions GET /restrictions/mosaic Search mosaic restrictions
SecretLockRoutesApi getSecretLock GET /lock/secret/{compositeHash} Get secret lock information
SecretLockRoutesApi getSecretLockMerkle GET /lock/secret/{compositeHash}/merkle Get secret lock merkle information
SecretLockRoutesApi searchSecretLock GET /lock/secret Search secret lock entries
TransactionRoutesApi announceCosignatureTransaction PUT /transactions/cosignature Announce a cosignature transaction
TransactionRoutesApi announcePartialTransaction PUT /transactions/partial Announce an aggregate bonded transaction
TransactionRoutesApi announceTransaction PUT /transactions Announce a new transaction
TransactionRoutesApi getConfirmedTransaction GET /transactions/confirmed/{transactionId} Get confirmed transaction information
TransactionRoutesApi getConfirmedTransactions POST /transactions/confirmed Get confirmed trasactions information
TransactionRoutesApi getPartialTransaction GET /transactions/partial/{transactionId} Get partial transaction information
TransactionRoutesApi getPartialTransactions POST /transactions/partial Get partial trasactions information
TransactionRoutesApi getUnconfirmedTransaction GET /transactions/unconfirmed/{transactionId} Get unconfirmed transaction information
TransactionRoutesApi getUnconfirmedTransactions POST /transactions/unconfirmed Get unconfirmed trasactions information
TransactionRoutesApi searchConfirmedTransactions GET /transactions/confirmed Search confirmed transactions
TransactionRoutesApi searchPartialTransactions GET /transactions/partial Search partial transactions
TransactionRoutesApi searchUnconfirmedTransactions GET /transactions/unconfirmed Search unconfirmed transactions
TransactionStatusRoutesApi getTransactionStatus GET /transactionStatus/{hash} Get transaction status
TransactionStatusRoutesApi getTransactionStatuses POST /transactionStatus Get transaction statuses

Models

Authorization

Endpoints do not require authorization.

Tests

To run the tests, use:

composer install
vendor/bin/phpunit

Author

About this package

This PHP package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.4
  • Build package: org.openapitools.codegen.languages.PhpClientCodegen

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages