Skip to content

Latest commit

 

History

History
176 lines (130 loc) · 6.59 KB

SolanaAccountApi.md

File metadata and controls

176 lines (130 loc) · 6.59 KB

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 classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = SolanaAccountApi()
val network : kotlin.String = mainnet-beta // kotlin.String | The network ID (devnet, mainnet-beta)
val publicKey : kotlin.String = EEr5yQpNXf7Bru6Rt5podx56HGW9CEehXqgRGh2wa71w // kotlin.String | The public key of the account
try {
    val result : Account = apiInstance.solanaGetAccount(network, publicKey)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling SolanaAccountApi#solanaGetAccount")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SolanaAccountApi#solanaGetAccount")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
network kotlin.String The network ID (devnet, mainnet-beta)
publicKey kotlin.String The public key of the account

Return type

Account

Authorization

Configure APIKeyID: ApiClient.apiKey["APIKeyID"] = "" ApiClient.apiKeyPrefix["APIKeyID"] = "" Configure APISecretKey: ApiClient.apiKey["APISecretKey"] = "" ApiClient.apiKeyPrefix["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 classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = SolanaAccountApi()
val network : kotlin.String = mainnet-beta // kotlin.String | The network ID (devnet, mainnet-beta)
val publicKey : kotlin.String = EEr5yQpNXf7Bru6Rt5podx56HGW9CEehXqgRGh2wa71w // kotlin.String | The public key of the account
try {
    val result : AccountIsCandyMachine = apiInstance.solanaGetAccountIsCandyMachine(network, publicKey)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling SolanaAccountApi#solanaGetAccountIsCandyMachine")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SolanaAccountApi#solanaGetAccountIsCandyMachine")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
network kotlin.String The network ID (devnet, mainnet-beta)
publicKey kotlin.String The public key of the account

Return type

AccountIsCandyMachine

Authorization

Configure APIKeyID: ApiClient.apiKey["APIKeyID"] = "" ApiClient.apiKeyPrefix["APIKeyID"] = "" Configure APISecretKey: ApiClient.apiKey["APISecretKey"] = "" ApiClient.apiKeyPrefix["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 classes:
//import org.openapitools.client.infrastructure.*
//import org.openapitools.client.models.*

val apiInstance = SolanaAccountApi()
val network : kotlin.String = mainnet-beta // kotlin.String | The network ID (devnet, mainnet-beta)
val publicKey : kotlin.String = EEr5yQpNXf7Bru6Rt5podx56HGW9CEehXqgRGh2wa71w // kotlin.String | The public key of the account
try {
    val result : AccountIsNFT = apiInstance.solanaGetAccountIsNFT(network, publicKey)
    println(result)
} catch (e: ClientException) {
    println("4xx response calling SolanaAccountApi#solanaGetAccountIsNFT")
    e.printStackTrace()
} catch (e: ServerException) {
    println("5xx response calling SolanaAccountApi#solanaGetAccountIsNFT")
    e.printStackTrace()
}

Parameters

Name Type Description Notes
network kotlin.String The network ID (devnet, mainnet-beta)
publicKey kotlin.String The public key of the account

Return type

AccountIsNFT

Authorization

Configure APIKeyID: ApiClient.apiKey["APIKeyID"] = "" ApiClient.apiKeyPrefix["APIKeyID"] = "" Configure APISecretKey: ApiClient.apiKey["APISecretKey"] = "" ApiClient.apiKeyPrefix["APISecretKey"] = ""

HTTP request headers

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