@substrate/api-sidecar
Version:
REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.
28 lines (27 loc) • 1.19 kB
TypeScript
import { NodeTransactionPoolService } from '../../../services';
import AbstractController from '../../AbstractController';
/**
* GET pending extrinsics from the Substrate node.
*
* Returns:
* - `pool`: array of
* - `hash`: H256 hash of the extrinsic.
* - `encodedExtrinsic`: Scale encoded extrinsic.
* - `tip`: Tip included into the extrinsic. Available when the `includeFee` query param is set to true.
* - `priority`: Priority of the transaction. Calculated by tip * (max_block_{weight|length} / bounded_{weight|length}).
* Available when the `includeFee` query param is set to true.
* - `partialFee`: PartialFee for a transaction. Available when the `includeFee` query param is set to true.
*/
export default class RcNodeTransactionPoolController extends AbstractController<NodeTransactionPoolService> {
static controllerName: string;
static requiredPallets: never[];
constructor(_api: string);
protected initRoutes(): void;
/**
* GET pending extrinsics from the Substrate node.
*
* @param req Express Request, accepts the query param `includeFee`
* @param res Express Response
*/
private getNodeTransactionPool;
}