Skip to content

KEY-L-LC/theblockchainapi-java-wrapper

 
 

Repository files navigation

openapi-java-client

The Blockchain API

  • API version: null
    • Build date: 2022-03-15T12:06:18.396945-07:00[America/Los_Angeles]

About

Our vision is to make it super easy to interact with the decentralized web. We want you to be able to do this in any coding language and do it easily and quickly.

You're a key part of our vision. We love feature requests! <a href="#section/Feature-Requests">Make one!

How to Use the API

To use the API, you simply need to create an API key pair.

Doing so takes less than a minute. Simply go to <a target="_blank" href="https://dashboard.blockchainapi.com\">the dashboard, create an account, and generate a key pair. You can now use this pair to make API requests. You must create your first pair via the dashboard.

Feature Requests

Got a feature request? Submit it as an issue on <a target="_blank" href="https://github.com/BL0CK-X/the-blockchain-api/issues/new/choose\">our GitHub repo or email us.

Contact

Text / Call: +1 (415) 888 4745

Email us: [email protected]

Join our Discord

Follow us on Twitter

Star us on Github

Security

Common dogma is to never give out your seed phrase. We agree. It's a matter of security, and anyone who has your seed phrase can irreversibly empty your wallet.

When using an API endpoint that requires a seed phrase, we highly recommend that users use or create a wallet that they do not use as their primary wallet.

How you make this work depends on what you're doing. If you're minting an NFT for example, we recommend creating a new wallet and then transferring just enough SOL to that wallet to mint the NFT. This is possible on Solana because such transactions cost less than a penny. We will have more tutorials in the future that make it easier for you to be secure when using our API.

We have easy-to-use endpoints for <a href="#tag/Solana-Wallet/paths/1solana1wallet1secret_recovery_phrase/post">creating a new seed phrase and then <a href="#tag/Solana-Wallet/paths/1solana1wallet1public_key/post">deriving a public key to enable you to transfer to that new wallet.

Let's have a constructive dialog about this. Feel free to <a href="#section/Contact">contact us. I made a video discussing this matter <a target="_blank" href="https://youtu.be/m9unUb8Z9qU\">here.

Note: We have had a couple of individuals harrass and threaten us. These individuals did not try our API or speak to anyone who has used it. They simply saw that we require a seed phrase for certain endpoints and figured that the proper response was to attack us. (I explain why we do <a target="_blank" href="https://youtu.be/m9unUb8Z9qU\">here.) Such harrassment and threats are not only harmful, but they are also illegal, and we will report offenders. Do not harrass us. Rather, feel free to discuss your concerns with us and we will be more than happy to work with you to come up with a solution.

Pricing

Each user receives 100 free credits. Each user can call endpoints that cost 0 credits up to 50 requests/min before being rate-limited. Thereafter, they can upgrade to have a higher rate limit. The purpose of this is to act like a free trial -- not to function like a freemium model where one can stay on the free tier indefinitely.

You can learn more about our pricing <a href="https://dashboard.blockchainapi.com/billing\" target="_blank">here.

We frequently do custom plans. If our pricing doesn't work for you, <a href="#section/Contact">contact us.

If you have questions, concerns, feedback, or ideas, <a href="#section/Contact">contact us.

SDKs / API Wrappers

We have examples using both our <a href="https://github.com/BL0CK-X/the-blockchain-api/tree/main/examples\" target="_blank">Python wrapper and our JavaScript wrapper here.

We have built a custom <a href="https://github.com/BL0CK-X/the-blockchain-api-python-wrapper\" target="_blank">Python wrapper.

pip install theblockchainapi

We also have published a <a href="https://github.com/BL0CK-X/theblockchainapi-javascript-wrapper\" target="_blank">JavaScript Wrapper.

npm install theblockchainapi

We also have auto-generated wrappers for the following languages:

If you would like a different language as well, submit an issue <a href="https://github.com/BL0CK-X/theblockchainapi-wrappers/issues/new\" target="_blank">here.

If you run into any bugs with the wrappers, submit an issue <a href="https://github.com/BL0CK-X/theblockchainapi-wrappers/issues/new\" target="_blank">here.

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.7+
  2. Maven/Gradle

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>org.openapitools</groupId>
  <artifactId>openapi-java-client</artifactId>
  <version>null</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

compile "org.openapitools:openapi-java-client:null"

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/openapi-java-client-null.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.models.*;
import org.openapitools.client.api.EndpointApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://api.blockchainapi.com/v1");
    
    // Configure API key authorization: APIKeyID
    ApiKeyAuth APIKeyID = (ApiKeyAuth) defaultClient.getAuthentication("APIKeyID");
    APIKeyID.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APIKeyID.setApiKeyPrefix("Token");

    // Configure API key authorization: APISecretKey
    ApiKeyAuth APISecretKey = (ApiKeyAuth) defaultClient.getAuthentication("APISecretKey");
    APISecretKey.setApiKey("YOUR API KEY");
    // Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
    //APISecretKey.setApiKeyPrefix("Token");

    EndpointApi apiInstance = new EndpointApi(defaultClient);
    EndpointReference endpointReference = new EndpointReference(); // EndpointReference | 
    try {
      apiInstance.deleteEndpoint(endpointReference);
    } catch (ApiException e) {
      System.err.println("Exception when calling EndpointApi#deleteEndpoint");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
EndpointApi deleteEndpoint POST /endpoint/delete Delete an endpoint
EndpointApi getEndpoint POST /endpoint/metadata Get an endpoint's metadata
EndpointApi listEndpoints GET /endpoint/list List all endpoints
EndpointApi setEndpoint POST /endpoint Create / update an endpoint
FileApi uploadFile POST /file Upload a file
ProjectApi createProject POST /project Create a project
ProjectApi createProjectVersion POST /project/{project_id}/{version} Create a new project version
ProjectApi deleteProject DELETE /project/{project_id} Delete a project
ProjectApi deleteProjectVersion DELETE /project/{project_id}/{version} Delete a project version
ProjectApi getProject GET /project/{project_id} Get a project's metadata
ProjectApi getProjectDeploymentStatus POST /project/{project_id}/deploy/status Get deployment status
ProjectApi getProjectDeploymentURL POST /project/{project_id}/deploy/url Get the deployment URL
ProjectApi getProjectStats GET /project/{project_id}/stats Get a project's stats
ProjectApi listProjects GET /project/list List projects
ProjectApi updateProject POST /project/{project_id} Update a project
ProjectApi updateProjectDocumentation POST /project/{project_id}/{version}/documentation Update the project's documentation
SolanaAccountApi solanaGetAccount GET /solana/account/{network}/{public_key} Get the details of an account on Solana
SolanaAccountApi solanaGetAccountIsCandyMachine GET /solana/account/{network}/{public_key}/is_candy_machine Get if account is candy machine
SolanaAccountApi solanaGetAccountIsNFT GET /solana/account/{network}/{public_key}/is_nft Get if account is NFT
SolanaCandyMachineApi solanaCreateTestCandyMachine POST /solana/nft/candy_machine Create a test CM
SolanaCandyMachineApi solanaGetAllNFTsFromCandyMachine GET /solana/nft/candy_machine/{network}/{candy_machine_id}/nfts Get CM's NFTs
SolanaCandyMachineApi solanaGetCandyMachineMetadata POST /solana/nft/candy_machine/metadata Get a CM's metadata
SolanaCandyMachineApi solanaListAllCandyMachines GET /solana/nft/candy_machine/list List all CMs
SolanaCandyMachineApi solanaMintFromCandyMachine POST /solana/nft/candy_machine/mint Mint from a CM
SolanaCandyMachineApi solanaSearchCandyMachines POST /solana/nft/candy_machine/search Search CMs
SolanaNftApi solanaCreateNFT POST /solana/nft Create an NFT on Solana
SolanaNftApi solanaGetNFT GET /solana/nft/{network}/{mint_address} Get an NFT's metadata
SolanaNftApi solanaGetNFTMintFee GET /solana/nft/mint/fee Get the NFT mint fee
SolanaNftApi solanaGetNFTOwner GET /solana/nft/{network}/{mint_address}/owner Get owner of an NFT
SolanaNftApi solanaGetNFTsCandyMachineId POST /solana/nft/candy_machine_id Get the ID of the candy machine of an NFT
SolanaNftApi solanaSearchNFTs POST /solana/nft/search Search NFTs on Solana
SolanaNftMarketplacesApi solanaBuyNFT POST /solana/nft/marketplaces/{exchange}/buy/{network}/{mint_address} Buy
SolanaNftMarketplacesApi solanaDelistNFT POST /solana/nft/marketplaces/{exchange}/delist/{network}/{mint_address} Delist
SolanaNftMarketplacesApi solanaGetNFTListing GET /solana/nft/marketplaces/listing/{network}/{mint_address} Get NFT Listing
SolanaNftMarketplacesApi solanaGetNFTMarketplaceAnalytics POST /solana/nft/marketplaces/analytics Get NFT Analytics
SolanaNftMarketplacesApi solanaGetNFTMarketplaceMarketShare GET /solana/nft/marketplaces/analytics/market_share Get Marketplace Market Share
SolanaNftMarketplacesApi solanaGetNFTMarketplaceRecentTransactions GET /solana/nft/marketplaces/analytics/recent_transactions Get Recent NFT Transactions
SolanaNftMarketplacesApi solanaListNFT POST /solana/nft/marketplaces/{exchange}/list/{network}/{mint_address} List
SolanaSplTokenApi solanaGetSPLToken GET /solana/spl-token/{network}/{public_key} Get SPL token metadata
SolanaTransactionApi solanaGetTransaction GET /solana/transaction/{network}/{tx_signature} Get the details of a transaction made on Solana
SolanaWalletApi solanaDeriveAssociatedTokenAccountAddress GET /solana/wallet/{public_key}/associated_token_account/{mint_address} Derive an associated token account address
SolanaWalletApi solanaDerivePrivateKey POST /solana/wallet/private_key Derive private key
SolanaWalletApi solanaDerivePublicKey POST /solana/wallet/public_key Derive public key
SolanaWalletApi solanaGeneratePrivateKey POST /solana/wallet/generate/private_key Generate private key
SolanaWalletApi solanaGenerateSecretRecoveryPhrase POST /solana/wallet/generate/secret_recovery_phrase Generate secret phrase
SolanaWalletApi solanaGetAirdrop POST /solana/wallet/airdrop Get an airdrop on devnet
SolanaWalletApi solanaGetBalance POST /solana/wallet/balance Get wallet's balance in SOL or any SPL
SolanaWalletApi solanaGetNFTsBelongingToWallet GET /solana/wallet/{network}/{public_key}/nfts Get address's NFTs
SolanaWalletApi solanaGetTokensBelongingToWallet GET /solana/wallet/{network}/{public_key}/tokens Get address's tokens and respective balances
SolanaWalletApi solanaGetWalletTransactions GET /solana/wallet/{network}/{public_key}/transactions Get address's associated transaction signatures
SolanaWalletApi solanaTransfer POST /solana/wallet/transfer Transfer SOL, a token, or an NFT to another address

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

APIKeyID

  • Type: API key
  • API key parameter name: APIKeyID
  • Location: HTTP header

APISecretKey

  • Type: API key
  • API key parameter name: APISecretKey
  • Location: HTTP header

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.9%
  • Other 0.1%