Skip to content

Latest commit

 

History

History
66 lines (44 loc) · 2.5 KB

SolanaTransactionApi.md

File metadata and controls

66 lines (44 loc) · 2.5 KB

theblockchainapi.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

Transaction solanaGetTransaction(network, txSignature)

Get the details of a transaction made on Solana

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

Example

import theblockchainapi from 'theblockchainapi';
let defaultClient = theblockchainapi.ApiClient.instance;
// Configure API key authorization: APIKeyID
let APIKeyID = defaultClient.authentications['APIKeyID'];
APIKeyID.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APIKeyID.apiKeyPrefix = 'Token';
// Configure API key authorization: APISecretKey
let APISecretKey = defaultClient.authentications['APISecretKey'];
APISecretKey.apiKey = 'YOUR API KEY';
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//APISecretKey.apiKeyPrefix = 'Token';

let apiInstance = new theblockchainapi.SolanaTransactionApi();
let network = mainnet-beta; // String | The network ID (devnet, mainnet-beta)
let txSignature = 5wHu1qwD7q5ifaN5nwdcDqNFo53GJqa7nLp2BeeEpcHCusb4GzARz4GjgzsEHMkBMgCJMGa6GSQ1VG96Exv8kt2W; // String | The transaction signature of the transaction
apiInstance.solanaGetTransaction(network, txSignature).then((data) => {
  console.log('API called successfully. Returned data: ' + data);
}, (error) => {
  console.error(error);
});

Parameters

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

Return type

Transaction

Authorization

APIKeyID, APISecretKey

HTTP request headers

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