zkverifyjs
Version:
Submit proofs to zkVerify and query proof state with ease using our npm package.
15 lines • 971 B
TypeScript
import { ApiPromise, WsProvider } from '@polkadot/api';
import { RuntimeSpec } from '../../../types.js';
import { RuntimeVersion } from '../../../enums.js';
/**
* Fetches the runtime spec from the chain.
* @param api - The ApiPromise instance.
* @returns The runtime spec.
*/
export declare function fetchRuntimeVersion(api: ApiPromise): RuntimeSpec;
export declare function fetchRuntimeVersionFromProvider(provider: WsProvider): Promise<RuntimeSpec>;
export declare function isVersionAtLeast(runtimeSpec: RuntimeSpec, targetVersion: RuntimeVersion): boolean;
export declare function isVersionBetween(runtimeSpec: RuntimeSpec, minVersion: RuntimeVersion, maxVersion: RuntimeVersion): boolean;
export declare function isVersionExactly(runtimeSpec: RuntimeSpec, targetVersion: RuntimeVersion): boolean;
export declare function requireVersionAtLeast(runtimeSpec: RuntimeSpec, targetVersion: RuntimeVersion, featureName: string): void;
//# sourceMappingURL=index.d.ts.map