/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { SignatureId } from '../models/SignatureId'; import type { SolanaBlock } from '../models/SolanaBlock'; import type { SolanaBroadcastConfirm } from '../models/SolanaBroadcastConfirm'; import type { SolanaTransactionHashWithConfirm } from '../models/SolanaTransactionHashWithConfirm'; import type { SolanaTx } from '../models/SolanaTx'; import type { TransactionHash } from '../models/TransactionHash'; import type { TransferSolanaBlockchain } from '../models/TransferSolanaBlockchain'; import type { TransferSolanaBlockchainKMS } from '../models/TransferSolanaBlockchainKMS'; import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class SolanaService { /** * Generate Solana wallet *
Generate Solana private key and account address.
* * @returns any OK * @throws ApiError */ public static solanaGenerateWallet(): CancelablePromise<{ /** * Generated account address. */ address?: string; /** * Generated private key for account. */ privateKey?: string; }> { return __request({ method: 'GET', path: `/v3/solana/wallet`, errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 500: `Internal server error. There was an error on the server during the processing of the request.`, }, }); } /** * @deprecated * JSON RPC HTTP driver *2 credits per API call
*This endpoint is deprecated. Use the HTTP-based JSON RPC driver instead.
Use this endpoint URL as a http-based JSON RPC driver to connect directly to the Solana node provided by Tatum. * To learn more about Solana JSON RPC, visit the Solana developer's guide.
* * @param xApiKey Tatum X-API-Key used for authorization. * @param requestBody * @returns any OK * @throws ApiError */ public static solanaWeb3Driver( xApiKey: string, requestBody: any, ): CancelablePromiseGet Solana current block number. This is the number of the latest block in the blockchain.
* @returns number OK * @throws ApiError */ public static solanaGetCurrentBlock(): CancelablePromiseGet Solana block by block hash or block number.
* You can find full data description here - https://docs.solana.com/developing/clients/jsonrpc-api#getblock
*
Get Solana account balance in SOL. This method does not prints any balance of the SPL or NFT tokens on the account.
* @param address Account address you want to get balance of * @returns any OK * @throws ApiError */ public static solanaGetBalance( address: string, ): CancelablePromise<{ /** * Balance in SOL */ balance?: string; }> { return __request({ method: 'GET', path: `/v3/solana/account/balance/${address}`, errors: { 400: `Bad Request. Validation failed for the given object in the HTTP Body or Request parameters.`, 401: `Unauthorized. Not valid or inactive subscription key present in the HTTP Header.`, 500: `Internal server error. There was an error on the server during the processing of the request.`, }, }); } /** * Get Solana Transaction *Get Solana transaction by transaction hash.
* You can find full data description here - https://docs.solana.com/developing/clients/jsonrpc-api#gettransaction
*
Send SOL from account to account.
* This operation needs the private key of the blockchain address. Every time the funds are transferred, the transaction must be signed with the corresponding private key.
* No one should ever send it's own private keys to the internet because there is a strong possibility of stealing keys and loss of funds. In this method, it is possible to enter privateKey
* or signatureId. PrivateKey should be used only for quick development on testnet versions of blockchain when there is no risk of losing funds. In production,
* Tatum KMS should be used for the highest security standards, and signatureId should be present in the request.
* Alternatively, using the Tatum client library for supported languages.
*
Broadcast signed custom transactions to Solana blockchain and waits for transaction confirmation depending on the commitment given. More information about commitment levels here
* * @param requestBody * @returns SolanaTransactionHashWithConfirm OK * @throws ApiError */ public static solanaBroadcastConfirm( requestBody: SolanaBroadcastConfirm, ): CancelablePromise