import { A as AbiEntry } from './types-Dtu4IsSh.js'; import '@parity/result'; import '@parity/product-sdk-signer'; import '@parity/product-sdk-tx'; import 'polkadot-api'; import '@parity/product-sdk-errors'; /** ABI + PolkaVM bytecode pair emitted by `cargo pvm-contract build`. */ interface PvmContractArtifacts { abi: AbiEntry[]; bytecode: Uint8Array; } /** * Parse an in-memory cargo-pvm-contract ABI artifact. * * Accepts the shapes the toolchain may produce or that products may pass: * - parsed JSON array — `AbiEntry[]` * - parsed JSON object with an `abi` property — `{ abi: AbiEntry[] }` * - JSON string of either of the above * - `Uint8Array` containing UTF-8 JSON of either of the above * * @throws if the input cannot be coerced to a non-empty `AbiEntry[]`. */ declare function parsePvmContractAbi(source: unknown): AbiEntry[]; /** * Read a cargo-pvm-contract ABI file from disk and parse it. * * Node-only. For browser/in-memory inputs use {@link parsePvmContractAbi}. */ declare function loadPvmContractAbi(path: string): Promise; /** * Read the `.polkavm` bytecode artifact produced by `cargo pvm-contract build`. * * Returned bytes are ready to hand to `Revive.instantiate_with_code` (or to * any future deploy helper layered on top of it). Use this when you already * have an ABI in hand (e.g. inline or fetched separately) and only need the * PolkaVM blob — otherwise prefer {@link loadPvmContractArtifacts}. * * Node-only. */ declare function loadPvmContractCode(path: string): Promise; /** * Read both the `.abi.json` and `.polkavm` artifacts produced by * `cargo pvm-contract build` for a given base path. * * `basePath` is the path prefix shared by both files — typically * `target/.release`. The function reads `${basePath}.abi.json` and * `${basePath}.polkavm`. * * Node-only. */ declare function loadPvmContractArtifacts(basePath: string): Promise; export { type PvmContractArtifacts, loadPvmContractAbi, loadPvmContractArtifacts, loadPvmContractCode, parsePvmContractAbi };