/**
 * @purpose InstructionResult - Array-like wrapper for @solana/kit Instructions with legacy conversion
 *
 * Provides native @solana/kit Instruction[] compatibility with optional .toLegacy() conversion
 * for web3.js users.
 */
import type { Instruction, ReadonlyUint8Array } from '@solana/kit';
import { type PublicKeyConstructor } from './config';
/**
 * @solana/web3.js instruction format with PublicKey instances
 */
export interface LegacyInstruction<TPublicKey = any> {
    keys: Array<{
        pubkey: TPublicKey;
        isWritable: boolean;
        isSigner: boolean;
    }>;
    programId: TPublicKey;
    data: ReadonlyUint8Array | Uint8Array;
}
/**
 * InstructionResult - Wrapper for @solana/kit Instructions with legacy conversion
 *
 * Contains a plain Instruction[] array accessible via `.instructions`.
 * Supports iteration (`for...of`, spread) and `.toLegacy()` conversion for web3.js.
 *
 * @example
 * ```typescript
 * // Kit users - access instructions directly
 * const result = await createContract(params);
 * for (const ix of result) { ... }
 * // Or unwrap: result.instructions
 *
 * // Web3.js users - convert to legacy format
 * import { PublicKey } from '@solana/web3.js';
 * const legacyIxs = result.toLegacy(PublicKey);
 * // Or if PublicKey is configured in SDK:
 * setSdkConfig({ PublicKey });
 * const legacyIxs = result.toLegacy();
 * ```
 */
export declare class InstructionResult {
    readonly instructions: Instruction[];
    constructor(instructions: Instruction[]);
    /**
     * Convert to legacy web3.js instruction format
     *
     * @param PublicKey - Optional PublicKey constructor. If not provided,
     *                    uses the PublicKey from SDK config (set via setSdkConfig)
     * @returns Array of instructions in web3.js format
     * @throws Error if no PublicKey is available
     */
    toLegacy<TPublicKey = any>(PublicKey?: PublicKeyConstructor<TPublicKey>): LegacyInstruction<TPublicKey>[];
    get length(): number;
    [Symbol.iterator](): ArrayIterator<Instruction<string, readonly (import("@solana/kit").AccountMeta<string> | import("@solana/kit").AccountLookupMeta<string, string>)[]>>;
}
//# sourceMappingURL=instructionResult.d.ts.map