@tatumio/tatum
Version:
Tatum JS SDK
50 lines (49 loc) • 6.79 kB
TypeScript
import { JsonRpcResponse } from '../../../dto';
import { AddressAndFilterParam, AddressSubscribeResult, AddressUnsubscribeResult, BlockAddressDecodeResult, BlockHeaderParams, BlockHeaderResult, BlockHeaderVerboseResult, BlockHeadersParams, BlockHeadersResult, BlockchainAddressToScriptHashResult, BlockchainGetBalanceResult, BlockchainGetFirstUseResult, BlockchainHistoryResult, BlockchainMempoolResult, BlockchainUnspentOutputResult, CashAccountQueryNameParams, CashAccountQueryResult, HexHeightResult, RostrumRpcInterface, ScriptHashAndFilterParam, ServerVersionParams, TokenAddressGetBalanceParams, TokenAddressGetHistoryParams, TokenGenesisInfoResultBCH, TokenGenesisInfoResultNexa, TokenGetBalanceResult, TokenGetHistoryResult, TokenGetMempoolResult, TokenListUnspentResult, TokenNftListParams, TokenNftListResultBCH, TokenNftListResultNexa, TokenScripthashGetBalanceParams, TokenScripthashGetHistoryParams, TokenScripthashGetMempoolParams, TokenScripthashListUnspentParams, TokenTransactionGetHistoryParams, TokenTransactionGetHistoryResult, TransactionGetConfirmedBlockhashResult, TransactionGetMerkleParams, TransactionGetMerkleResult, TransactionGetParams, TransactionGetResult, TransactionIdFromPosParams, TransactionIdFromPosResult, UtxoGetParams, UtxoGetResult, VerboseTransactionResult } from '../../../dto/rpc/RostrumRpcSuite';
export declare abstract class AbstractRostrumRpc implements RostrumRpcInterface {
protected abstract rpcCall<T>(method: string, params?: unknown[]): Promise<T>;
blockchainAddressDecode(address: string): Promise<JsonRpcResponse<BlockAddressDecodeResult>>;
blockchainAddressGetBalance({ address, filter, }: AddressAndFilterParam): Promise<JsonRpcResponse<BlockchainGetBalanceResult>>;
blockchainAddressGetFirstUse({ address, filter, }: AddressAndFilterParam): Promise<JsonRpcResponse<BlockchainGetFirstUseResult>>;
blockchainAddressGetHistory({ address, filter, }: AddressAndFilterParam): Promise<JsonRpcResponse<BlockchainHistoryResult[]>>;
blockchainAddressGetMempool({ address, filter, }: AddressAndFilterParam): Promise<JsonRpcResponse<BlockchainMempoolResult[]>>;
blockchainAddressToScriptHash(address: string): Promise<JsonRpcResponse<BlockchainAddressToScriptHashResult>>;
blockchainListUnspent({ address, filter, }: AddressAndFilterParam): Promise<JsonRpcResponse<BlockchainUnspentOutputResult[]>>;
blockchainAddressSubscribe(address: string): Promise<JsonRpcResponse<AddressSubscribeResult>>;
blockchainAddressUnsubscribe(address: string): Promise<JsonRpcResponse<AddressUnsubscribeResult>>;
blockchainBlockGet(heightOrHash: string | number): Promise<JsonRpcResponse<string>>;
blockchainBlockHeader({ height, cp_height, }: BlockHeaderParams): Promise<JsonRpcResponse<BlockHeaderResult | string>>;
blockchainBlockHeaderVerbose(heightOrHash: string | number): Promise<JsonRpcResponse<BlockHeaderVerboseResult>>;
blockchainBlockHeaders({ start_height, count, cp_height, }: BlockHeadersParams): Promise<JsonRpcResponse<BlockHeadersResult>>;
blockchainEstimateFee(blocks: number): Promise<JsonRpcResponse<number>>;
blockchainHeadersSubscribe(): Promise<JsonRpcResponse<HexHeightResult>>;
blockchainHeadersTip(): Promise<JsonRpcResponse<HexHeightResult>>;
blockchainRelayFee(): Promise<JsonRpcResponse<number>>;
blockchainScriptHashGetBalance({ scripthash, filter, }: ScriptHashAndFilterParam): Promise<JsonRpcResponse<BlockchainGetBalanceResult>>;
blockchainScriptHashGetFirstUse({ scripthash, filter, }: ScriptHashAndFilterParam): Promise<JsonRpcResponse<BlockchainGetFirstUseResult>>;
blockchainScriptHashGetHistory({ scripthash, filter, }: ScriptHashAndFilterParam): Promise<JsonRpcResponse<BlockchainHistoryResult[]>>;
blockchainScriptHashGetMempool({ scripthash, filter, }: ScriptHashAndFilterParam): Promise<JsonRpcResponse<BlockchainMempoolResult[]>>;
blockchainScriptHashListUnspent({ scripthash, filter, }: ScriptHashAndFilterParam): Promise<JsonRpcResponse<BlockchainUnspentOutputResult[]>>;
blockchainScriptHashSubscribe(scripthash: string): Promise<JsonRpcResponse<AddressSubscribeResult>>;
blockchainScriptHashUnsubscribe(scripthash: string): Promise<JsonRpcResponse<AddressUnsubscribeResult>>;
blockchainTransactionBroadcast(raw_tx: string): Promise<JsonRpcResponse<string>>;
blockchainTransactionGet({ tx_hash, verbose, }: TransactionGetParams): Promise<JsonRpcResponse<TransactionGetResult | VerboseTransactionResult>>;
blockchainTransactionGetConfirmedBlockhash(tx_hash: string): Promise<JsonRpcResponse<TransactionGetConfirmedBlockhashResult>>;
blockchainTransactionGetMerkle({ tx_hash, height, }: TransactionGetMerkleParams): Promise<JsonRpcResponse<TransactionGetMerkleResult>>;
blockchainTransactionIdFromPos({ height, tx_pos, merkle, }: TransactionIdFromPosParams): Promise<JsonRpcResponse<TransactionIdFromPosResult>>;
blockchainUtxoGet(params: UtxoGetParams): Promise<JsonRpcResponse<UtxoGetResult>>;
tokenScripthashGetBalance({ scripthash, cursor, token, }: TokenScripthashGetBalanceParams): Promise<JsonRpcResponse<TokenGetBalanceResult>>;
tokenScripthashGetHistory({ scripthash, cursor, token, }: TokenScripthashGetHistoryParams): Promise<JsonRpcResponse<TokenGetHistoryResult>>;
tokenScripthashGetMempool({ scripthash, cursor, token, }: TokenScripthashGetMempoolParams): Promise<JsonRpcResponse<TokenGetMempoolResult>>;
tokenScripthashListUnspent({ scripthash, cursor, token, }: TokenScripthashListUnspentParams): Promise<JsonRpcResponse<TokenListUnspentResult>>;
tokenTransactionGetHistory({ token, cursor, commitment, }: TokenTransactionGetHistoryParams): Promise<JsonRpcResponse<TokenTransactionGetHistoryResult>>;
tokenAddressGetBalance({ address, cursor, token, }: TokenAddressGetBalanceParams): Promise<JsonRpcResponse<TokenGetBalanceResult>>;
tokenAddressGetHistory({ address, cursor, token, }: TokenAddressGetHistoryParams): Promise<JsonRpcResponse<TokenGetHistoryResult>>;
tokenAddressGetMempool({ address, cursor, token, }: TokenAddressGetBalanceParams): Promise<JsonRpcResponse<TokenGetMempoolResult>>;
tokenAddressListUnspent({ address, cursor, token, }: TokenAddressGetBalanceParams): Promise<JsonRpcResponse<TokenListUnspentResult>>;
tokenGenesisInfo(tokenId: string): Promise<JsonRpcResponse<TokenGenesisInfoResultBCH | TokenGenesisInfoResultNexa>>;
tokenNftList(params: TokenNftListParams): Promise<JsonRpcResponse<TokenNftListResultBCH | TokenNftListResultNexa>>;
serverVersion(params: ServerVersionParams): Promise<JsonRpcResponse<[string, string]>>;
cashAccountQueryName({ name, height, }: CashAccountQueryNameParams): Promise<JsonRpcResponse<CashAccountQueryResult>>;
serverBanner(): Promise<JsonRpcResponse<string>>;
}