/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import { mempoolMempool } from "../funcs/mempoolMempool.js";
import { mempoolMempoolTransaction } from "../funcs/mempoolMempoolTransaction.js";
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
import * as models from "../models/index.js";
import { unwrapAsync } from "../types/fp.js";
export class Mempool extends ClientSDK {
/**
* Get All Mempool Transactions
*
* @remarks
* Get all Transaction Identifiers in the mempool
*/
async mempool(
request: models.NetworkRequest,
options?: RequestOptions,
): Promise<models.MempoolResponse> {
return unwrapAsync(mempoolMempool(
this,
request,
options,
));
}
/**
* Get a Mempool Transaction
*
* @remarks
* Get a transaction in the mempool by its Transaction Identifier. This is a separate request than fetching a block transaction (/block/transaction) because some blockchain nodes need to know that a transaction query is for something in the mempool instead of a transaction in a block. Transactions may not be fully parsable until they are in a block (ex: may not be possible to determine the fee to pay before a transaction is executed). On this endpoint, it is ok that returned transactions are only estimates of what may actually be included in a block.
*/
async mempoolTransaction(
request: models.MempoolTransactionRequest,
options?: RequestOptions,
): Promise<models.MempoolTransactionResponse> {
return unwrapAsync(mempoolMempoolTransaction(
this,
request,
options,
));
}
}