UNPKG

@substrate/api-sidecar

Version:

REST service that makes it easy to interact with blockchain nodes built using Substrate's FRAME framework.

27 lines (26 loc) 881 B
import { RuntimeCodeService } from '../../services'; import AbstractController from '../AbstractController'; /** * Get the Wasm code blob of the Substrate runtime. * * Query: * - (Optional)`at`: Block at which to retrieve runtime version information at. Block * identifier, as the block height or block hash. Defaults to most recent block. * * Returns: * - `at`: Block number and hash at which the call was made. * - `code`: Runtime code Wasm blob. */ export default class RuntimeCodeController extends AbstractController<RuntimeCodeService> { static controllerName: string; static requiredPallets: never[]; constructor(api: string); protected initRoutes(): void; /** * Get the chain's latest metadata in a decoded, JSON format. * * @param _req Express Request * @param res Express Response */ private getCodeAtBlock; }