@junobuild/admin
Version:
A library for interfacing with admin features of Juno
25 lines (24 loc) • 1.17 kB
TypeScript
import { type JunoPackage } from '@junobuild/config';
import type { BuildType } from '../types/build.types';
/**
* Extracts the build type from a provided Juno package or falls back to a deprecated detection method.
*
* @param {Object} params
* @param {JunoPackage | undefined} params.junoPackage - The parsed Juno package metadata.
* @param {Uint8Array} params.wasm - The WASM binary to inspect if no package is provided.
* @returns {Promise<BuildType | undefined>} The build type (`'stock'` or `'extended'`) or `undefined` if undetermined.
*/
export declare const extractBuildType: ({ junoPackage, wasm }: {
junoPackage: JunoPackage | undefined;
wasm: Uint8Array;
}) => Promise<BuildType | undefined>;
/**
* Reads and parses the Juno package from the custom section of a WASM binary.
*
* @param {Object} params
* @param {Uint8Array} params.wasm - The WASM binary containing the embedded custom section.
* @returns {Promise<JunoPackage | undefined>} The parsed Juno package if present and valid, otherwise `undefined`.
*/
export declare const readCustomSectionJunoPackage: ({ wasm }: {
wasm: Uint8Array;
}) => Promise<JunoPackage | undefined>;