/* istanbul ignore file */ /* tslint:disable */ /* eslint-disable */ import type { CancelablePromise } from '../core/CancelablePromise'; import { request as __request } from '../core/request'; export class NodeRpcService { /** * Connect to the blockchain node through an RPC driver *
The number of credits consumed depends on the number of methods submitted in an API call:
* * 50 credits per debug*_/trace* method (for EVM-based blockchains)
* * 5 credits per eth_call method (for EVM-based blockchains)
* * 2 credits per any other RPC method
Connect directly to the blockchain node provided by Tatum.
*The POST method is used. The API endpoint URL acts as an HTTP-based RPC driver.
In the request body, provide valid Web3 RPC method content, for example:
*
* {
* "jsonrpc": "2.0",
* "id": 1,
* "method": "method_name",
* "params": []
* }
*
* For the blockchains using the JSON-RPC 2.0 specification, you can submit multiple RPC methods in one API call:
*
* [
* {
* "jsonrpc": "2.0",
* "id": 1,
* "method": "method_1_name",
* "params": []
* },
* {
* "jsonrpc": "2.0",
* "id": 2,
* "method": "method_2_name",
* "params": []
* },
* ...
* ]
*
* This API is supported for the following blockchains:
*2 credits per RPC method in an API call
*Connect directly to the blockchain node provided by Tatum.
*The PUT method is used. The API endpoint URL acts as an HTTP-based RPC driver.
In the request body, provide valid Web3 RPC method content, for example:
*
* {
* "jsonrpc": "2.0",
* "id": 1,
* "method": "method_name",
* "params": []
* }
*
* For the blockchains using the JSON-RPC 2.0 specification, you can submit multiple RPC methods in one API call:
*
* [
* {
* "jsonrpc": "2.0",
* "id": 1,
* "method": "method_1_name",
* "params": []
* },
* {
* "jsonrpc": "2.0",
* "id": 2,
* "method": "method_2_name",
* "params": []
* },
* ...
* ]
*
* This API is supported for the following blockchains:
* * * @param chain Blockchain to communicate with. * @param requestBody * @param xApiKey Tatum X-API-Key used for authorization. You can omit this path parameter and either use the X-Api-Key header, or the API key tied to your IP address without any header. * @param nodeType Type of the node to access for Algorand. * @param rpcPath Optional path of rpc call for non EVM nodes, e.g. Algorand or Stellar. * @returns any OK * @throws ApiError */ public static nodeJsonRpcPutDriver( chain: 'ALGO' | 'EGLD' | 'XLM', requestBody: any, xApiKey?: string, nodeType?: 'ALGOD' | 'INDEXER', rpcPath?: string, ): CancelablePromise2 credits per RPC method in an API call
*Connect directly to the blockchain node provided by Tatum.
*The GET method is used. The API endpoint URL acts as an HTTP-based RPC driver.
This API is supported for the following blockchains:
* * * @param chain Blockchain to communicate with. * @param xApiKey Tatum X-API-Key used for authorization. You can omit this path parameter and either use the X-Api-Key header, or the API key tied to your IP address without any header. * @param nodeType Type of the node to access for Algorand. * @param rpcPath Optional path of rpc call for non EVM nodes, e.g. Algorand or Stellar. * @returns any OK * @throws ApiError */ public static nodeJsonRpcGetDriver( chain: 'ALGO' | 'EGLD' | 'LISK' | 'XLM' | 'TEZOS' | 'TRON', xApiKey?: string, nodeType?: 'ALGOD' | 'INDEXER', rpcPath?: string, ): CancelablePromise