Skip to content

Latest commit

 

History

History
77 lines (53 loc) · 2.96 KB

SolanaTransactionApi.md

File metadata and controls

77 lines (53 loc) · 2.96 KB

OpenAPI\Client\SolanaTransactionApi

All URIs are relative to https://api.blockchainapi.com/v1.

Method HTTP request Description
solanaGetTransaction() GET /solana/transaction/{network}/{tx_signature} Get the details of a transaction made on Solana

solanaGetTransaction()

solanaGetTransaction($network, $tx_signature): \OpenAPI\Client\Model\Transaction

Get the details of a transaction made on Solana

<a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-transaction/get-transaction\" target="_blank">See examples (Python, JavaScript). Get the details of a transaction made on Solana. Cost: 0.25 Credit (<a href="#section/Pricing">See Pricing)

Example

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


// Configure API key authorization: APIKeyID
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('APIKeyID', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('APIKeyID', 'Bearer');

// Configure API key authorization: APISecretKey
$config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKey('APISecretKey', 'YOUR_API_KEY');
// Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
// $config = OpenAPI\Client\Configuration::getDefaultConfiguration()->setApiKeyPrefix('APISecretKey', 'Bearer');


$apiInstance = new OpenAPI\Client\Api\SolanaTransactionApi(
    // 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(),
    $config
);
$network = mainnet-beta; // string | The network ID (devnet, mainnet-beta)
$tx_signature = 5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W; // string | The transaction signature of the transaction

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

Parameters

Name Type Description Notes
network string The network ID (devnet, mainnet-beta)
tx_signature string The transaction signature of the transaction

Return type

\OpenAPI\Client\Model\Transaction

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

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