import * as Hex from '../core/Hex.js'; import type { OneOf } from '../core/internal/types.js'; import type * as EntryPoint from './EntryPoint.js'; /** User Operation Gas type. */ export type UserOperationGas = OneOf<(entryPointVersion extends '0.6' ? V06 : never) | (entryPointVersion extends '0.7' ? V07 : never)>; /** RPC User Operation Gas on EntryPoint 0.6 */ export type Rpc = UserOperationGas; /** Type for User Operation Gas on EntryPoint 0.6 */ export type V06 = { callGasLimit: bigintType; preVerificationGas: bigintType; verificationGasLimit: bigintType; }; /** RPC User Operation Gas on EntryPoint 0.6 */ export type RpcV06 = V06; /** Type for User Operation Gas on EntryPoint 0.7 */ export type V07 = { callGasLimit: bigintType; paymasterVerificationGasLimit?: bigintType | undefined; paymasterPostOpGasLimit?: bigintType | undefined; preVerificationGas: bigintType; verificationGasLimit: bigintType; }; /** RPC User Operation Gas on EntryPoint 0.7 */ export type RpcV07 = V07; /** * Converts an {@link ox#UserOperationGas.Rpc} to an {@link ox#UserOperationGas.UserOperationGas}. * * @example * ```ts twoslash * import { UserOperationGas } from 'ox/erc4337' * * const userOperationGas = UserOperationGas.fromRpc({ * callGasLimit: '0x69420', * preVerificationGas: '0x69420', * verificationGasLimit: '0x69420', * }) * ``` * * @param rpc - The RPC user operation gas to convert. * @returns An instantiated {@link ox#UserOperationGas.UserOperationGas}. */ export declare function fromRpc(rpc: Rpc): UserOperationGas; /** * Converts a {@link ox#UserOperationGas.UserOperationGas} to a {@link ox#UserOperationGas.Rpc}. * * @example * ```ts twoslash * import { UserOperationGas } from 'ox/erc4337' * * const userOperationGas = UserOperationGas.toRpc({ * callGasLimit: 300_000n, * preVerificationGas: 100_000n, * verificationGasLimit: 100_000n, * }) * ``` * * @param userOperationGas - The user operation gas to convert. * @returns An RPC-formatted user operation gas. */ export declare function toRpc(userOperationGas: UserOperationGas): Rpc; //# sourceMappingURL=UserOperationGas.d.ts.map