{"version":3,"file":"helpers-ZShvV2Sa-CQzukyXc.d.cts","names":["Abi","Chain","EvmNetworkConfig","EvmProviderKeys","EvmContractDefinitionProviderKey","EVM_PROVIDER_ORDER_DEFAULT","isEvmProviderKey","EvmContractArtifacts","isEvmContractArtifacts","EvmCompatibleNetworkConfig","E","Omit","TypedEvmNetworkConfig","AbiItem","Array","WriteContractParameters","EvmAbiLoadResult","EvmProxyInfo","EvmTransactionData","a","c","d","f","i","l","n","o","p","r","s","t","u","a","WriteContractParameters","ExecutionConfig","ExecutionMethodDetail","FormFieldType","NetworkConfig","OperationResult","TransactionStatusUpdate","TxStatus","WriteCompletion","WriteExecutionResult","CapabilityExecutor","Promise","SignAndBroadcast","n","t"],"sources":["../../adapter-evm-core/dist/index-CmTidOM3.d.mts","../../adapter-evm-core/dist/helpers-ZShvV2Sa.d.mts"],"sourcesContent":["import { Abi, Chain } from \"viem\";\nimport { EvmNetworkConfig } from \"@openzeppelin/ui-types\";\n\n//#region src/types/providers.d.ts\n/**\n * EVM Contract Definition Provider keys and ordering\n * Avoid magic strings by using typed constants and a union type.\n */\ndeclare const EvmProviderKeys: {\n  readonly Etherscan: \"etherscan\";\n  readonly Sourcify: \"sourcify\";\n};\ntype EvmContractDefinitionProviderKey = (typeof EvmProviderKeys)[keyof typeof EvmProviderKeys];\ndeclare const EVM_PROVIDER_ORDER_DEFAULT: readonly EvmContractDefinitionProviderKey[];\ndeclare function isEvmProviderKey(value: unknown): value is EvmContractDefinitionProviderKey;\n//#endregion\n//#region src/types/artifacts.d.ts\ninterface EvmContractArtifacts {\n  /** The deployed contract address (required) */\n  contractAddress: string;\n  /** Optional manual ABI JSON string (for unverified contracts) */\n  contractDefinition?: string;\n  /** Optional proxy detection configuration */\n  __proxyDetectionOptions?: {\n    /** Skip automatic proxy detection */\n    skipProxyDetection?: boolean;\n  };\n  /** Optional forced provider for this load attempt (session-scoped override) */\n  __forcedProvider?: EvmContractDefinitionProviderKey;\n}\n/**\n * Type guard to check if an object matches EvmContractArtifacts structure\n */\ndeclare function isEvmContractArtifacts(obj: unknown): obj is EvmContractArtifacts;\n//#endregion\n//#region src/types/network.d.ts\n/**\n * Network configuration types for EVM-compatible networks\n */\n/**\n * Base interface for any EVM-compatible network configuration.\n * This allows core functions to work with both EVM and Polkadot (and future) adapters.\n * The ecosystem field is generic to allow strict typing while maintaining flexibility.\n *\n * @typeParam E - The ecosystem type, defaults to `string` for maximum flexibility.\n *                Adapters can use specific string literals (e.g., `'polkadot'`) for stricter typing.\n *\n * @remarks\n * Core functions don't actually use the `ecosystem` field at runtime - they rely on\n * `chainId`, `rpcUrl`, and other EVM-compatible fields. This type relaxation eliminates\n * the need for adapter wrapper functions that only exist to convert types.\n *\n * @example\n * ```typescript\n * // Flexible usage (defaults to string)\n * function processConfig(config: EvmCompatibleNetworkConfig) { ... }\n *\n * // Strict typing for specific adapters\n * type PolkadotConfig = EvmCompatibleNetworkConfig<'polkadot'>;\n * ```\n */\ninterface EvmCompatibleNetworkConfig<E extends string = string> extends Omit<EvmNetworkConfig, 'ecosystem'> {\n  /**\n   * Ecosystem identifier. Generic type parameter allows strict typing while\n   * maintaining flexibility. Defaults to `string` so core functions can accept\n   * configs from any EVM-compatible adapter (EVM, Polkadot, etc.).\n   */\n  ecosystem: E;\n  /**\n   * Viem Chain object for this EVM network.\n   * If provided, this will be used directly by Viem clients.\n   * If not provided, a fallback chain object will be created.\n   */\n  viemChain?: Chain;\n}\n/**\n * EVM-specific network configuration with strict `ecosystem: 'evm'` constraint\n * and strongly-typed viem `Chain` (narrowed from `unknown` in `EvmNetworkConfig`).\n *\n * Use this type in EVM-only contexts where you want strict ecosystem typing.\n * For function signatures that should accept configs from multiple adapters\n * (EVM, Polkadot, etc.), use `EvmCompatibleNetworkConfig` instead.\n */\ninterface TypedEvmNetworkConfig extends EvmNetworkConfig {\n  viemChain?: Chain;\n}\n//#endregion\n//#region src/types/abi.d.ts\n/**\n * EVM-specific ABI type definitions\n */\n/**\n * Represents an item in an Ethereum ABI\n */\ntype AbiItem = {\n  type: string;\n  name?: string;\n  inputs?: Array<{\n    name: string;\n    type: string;\n    internalType?: string;\n    indexed?: boolean;\n    components?: Array<{\n      name: string;\n      type: string;\n      internalType?: string;\n      indexed?: boolean;\n    }>;\n  }>;\n  stateMutability?: string;\n  anonymous?: boolean;\n  outputs?: Array<{\n    name: string;\n    type: string;\n    internalType?: string;\n    components?: Array<{\n      name: string;\n      type: string;\n      internalType?: string;\n    }>;\n  }>;\n};\n/**\n * Defines the structure for parameters required to execute a contract write operation via viem.\n */\ninterface WriteContractParameters {\n  address: `0x${string}`;\n  abi: Abi;\n  functionName: string;\n  args: unknown[];\n  value?: bigint;\n}\n//#endregion\n//#region src/types/index.d.ts\ntype EvmAbiLoadResult = {\n  abi: unknown[];\n  name?: string;\n  source?: string;\n};\ntype EvmProxyInfo = {\n  isProxy: boolean;\n  implementation?: string;\n  proxyType?: string;\n};\ntype EvmTransactionData = {\n  to: string;\n  data: string;\n  value?: bigint;\n};\n//#endregion\nexport { WriteContractParameters as a, EvmContractArtifacts as c, EvmContractDefinitionProviderKey as d, EvmProviderKeys as f, AbiItem as i, isEvmContractArtifacts as l, EvmProxyInfo as n, EvmCompatibleNetworkConfig as o, isEvmProviderKey as p, EvmTransactionData as r, TypedEvmNetworkConfig as s, EvmAbiLoadResult as t, EVM_PROVIDER_ORDER_DEFAULT as u };\n//# sourceMappingURL=index-CmTidOM3.d.mts.map","import { a as WriteContractParameters } from \"./index-CmTidOM3.mjs\";\nimport { ExecutionConfig, ExecutionMethodDetail, FormFieldType, NetworkConfig, OperationResult, TransactionStatusUpdate, TxStatus, WriteCompletion } from \"@openzeppelin/ui-types\";\n\n//#region src/shared/completion.d.ts\n\n/**\n * Executor-facing write result. Structurally extends {@link OperationResult} so\n * confirmed-path callers that only read `.id` remain valid.\n * `completion` is always set (default `'confirmed'` when both signals absent).\n */\ninterface WriteExecutionResult extends OperationResult {\n  readonly completion: WriteCompletion;\n}\n//#endregion\n//#region src/shared/executor.d.ts\n\n/**\n * Executor shape consumed by capability services: assembled calldata in, a\n * {@link WriteExecutionResult} out. Implemented by adapting the injected `signAndBroadcast`.\n */\ntype CapabilityExecutor = (txData: WriteContractParameters, executionConfig: ExecutionConfig, onStatusChange?: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string) => Promise<WriteExecutionResult>;\n//#endregion\n//#region src/capabilities/helpers.d.ts\n/**\n * The injected transaction-submission callback shared by every write-capable capability\n * factory (`createAccessControl`, `createIRS`, `createERC3643`, `createERC4626`, …). The\n * adapter runtime supplies this; capabilities never touch wallet/signing infrastructure\n * directly.\n *\n * ## Execution-contract conformance (FR-018 — CONFIRMED, research.md R6)\n *\n * This is the same injected-callback shape as `ExecutionCapability.signAndBroadcast`\n * (`@openzeppelin/ui-types`), whose optional `waitForTransactionConfirmation(txHash)` already\n * expresses the async submit-then-poll model the RI plugin needs. No new execution primitive\n * was added: the callback may submit and then poll internally before resolving the confirmed\n * hash, and the existing `EoaExecutionStrategy` / `RelayerExecutionStrategy` compose behind it\n * unchanged (the RI plugin's future strategy submits in-process and polls, then resolves here).\n * Capabilities stay strategy-agnostic and carry no Relayer-plugin-runtime coupling (FR-011).\n * Verified by `erc3643/__tests__/erc3643.execution-strategy.test.ts` (submit-then-poll) and\n * `erc3643.strategies.test.ts` (strategy-agnostic composition).\n */\ntype SignAndBroadcast = (transactionData: unknown, executionConfig: ExecutionConfig, onStatusChange: (status: TxStatus, details: TransactionStatusUpdate) => void, runtimeApiKey?: string) => Promise<{\n  txHash: string;\n  result?: unknown;\n}>;\n//#endregion\nexport { CapabilityExecutor as n, SignAndBroadcast as t };\n//# sourceMappingURL=helpers-ZShvV2Sa.d.mts.map"],"mappings":";;;;;;AAC0D;AAUzD;AAG2F;AAcvC;AAiCuB,cArD9DG,eA2EiB,EAAA;EA4Bd,SAcPY,SAAAA,EAAAA,WAAuB;;;KAjH5BX,gCAAAA,WAA2CD,8BAA8BA;;;UAKpEI,oBAAAA,CCwBoLqC;EAAO;;;;;;;;;;qBDbhLxC;;;;;iBAKJI,sBAAAA,uBAA6CD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAkDpDK,qBAAAA,SAA8BV;cAC1BD;;;;;;;;;;;;;;UAyCJc,uBAAAA;;OAEHf;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;KCtFF6C,gBAAAA,+CAA+DX,0CAA0CM,mBAAmBD,6DAA6DK"}