Skip to content

Latest commit

 

History

History
182 lines (124 loc) · 7.04 KB

SolanaAccountApi.md

File metadata and controls

182 lines (124 loc) · 7.04 KB

theblockchainapi.SolanaAccountApi

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

Method HTTP request Description
solanaGetAccount GET /solana/account/{network}/{public_key} Get the details of an account on Solana
solanaGetAccountIsCandyMachine GET /solana/account/{network}/{public_key}/is_candy_machine Get if account is candy machine
solanaGetAccountIsNFT GET /solana/account/{network}/{public_key}/is_nft Get if account is NFT

solanaGetAccount

Account solanaGetAccount(network, publicKey)

Get the details of an account on Solana

<a href=&quot;https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-account/get-account\" target=&quot;_blank&quot;>See examples (Python, JavaScript)</a>. Get the details of an account on Solana. Learn more about accounts <a href=&quot;https://docs.solana.com/developing/programming-model/accounts\" target=&quot;_blank&quot;>here</a>. `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.SolanaAccountApi();
let network = mainnet-beta; // String | The network ID (devnet, mainnet-beta)
let publicKey = EEr5yQpNXf7Bru6Rt5podx56HGW9CEehXqgRGh2wa71w; // String | The public key of the account
apiInstance.solanaGetAccount(network, publicKey).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)
publicKey String The public key of the account

Return type

Account

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

solanaGetAccountIsCandyMachine

AccountIsCandyMachine solanaGetAccountIsCandyMachine(network, publicKey)

Get if account is candy machine

<a href=&quot;https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-account/get-is-candy-machine\" target=&quot;_blank&quot;>See examples (Python, JavaScript)</a>. Determine whether or not a public key address corresponds to a candy machine ID or candy machine configuration. `Cost: 1 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.SolanaAccountApi();
let network = mainnet-beta; // String | The network ID (devnet, mainnet-beta)
let publicKey = EEr5yQpNXf7Bru6Rt5podx56HGW9CEehXqgRGh2wa71w; // String | The public key of the account
apiInstance.solanaGetAccountIsCandyMachine(network, publicKey).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)
publicKey String The public key of the account

Return type

AccountIsCandyMachine

Authorization

APIKeyID, APISecretKey

HTTP request headers

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

solanaGetAccountIsNFT

AccountIsNFT solanaGetAccountIsNFT(network, publicKey)

Get if account is NFT

<a href=&quot;https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples/solana-account/get-is-nft\" target=&quot;_blank&quot;>See examples (Python, JavaScript)</a>. Determine whether or not a public key is an NFT `mint address` `Cost: 0.5 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.SolanaAccountApi();
let network = mainnet-beta; // String | The network ID (devnet, mainnet-beta)
let publicKey = EEr5yQpNXf7Bru6Rt5podx56HGW9CEehXqgRGh2wa71w; // String | The public key of the account
apiInstance.solanaGetAccountIsNFT(network, publicKey).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)
publicKey String The public key of the account

Return type

AccountIsNFT

Authorization

APIKeyID, APISecretKey

HTTP request headers

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