import { IProvider, ISigner } from './altvm.js'; import type { ChainMetadataForAltVM } from './chain.js'; import { IRawHookArtifactManager } from './hook.js'; import { IRawIsmArtifactManager } from './ism.js'; import { IRawMailboxArtifactManager } from './mailbox.js'; import { MinimumRequiredGasByAction } from './mingas.js'; import { AnnotatedTx, TxReceipt } from './module.js'; import { ProtocolType } from './protocolType.js'; import { ITransactionSubmitter, JsonRpcSubmitterConfig, TransactionSubmitterConfig } from './submitter.js'; import { IRawFeeArtifactManager } from './fee.js'; import { IRawWarpArtifactManager } from './warp.js'; import { IRawValidatorAnnounceArtifactManager } from './validator-announce.js'; export type SignerConfig = Pick; /** * Interface describing the artifacts that should be implemented in a specific protocol * implementation */ export interface ProtocolProvider { createProvider(chainMetadata: ChainMetadataForAltVM): Promise; createSigner(chainMetadata: ChainMetadataForAltVM, config: SignerConfig): Promise>; createSubmitter(chainMetadata: ChainMetadataForAltVM, config: TConfig): Promise; /** * Creates an ISM artifact manager for reading and deploying ISM configurations. * This factory method enables the protocol-specific instantiation of artifact managers * that handle ISM operations using the Artifact API pattern. * * @param chainMetadata Chain metadata for the target chain * @returns A protocol-specific ISM artifact manager */ createIsmArtifactManager(chainMetadata: ChainMetadataForAltVM): IRawIsmArtifactManager; /** * Creates a Hook artifact manager for the protocol. * The artifact manager provides protocol-specific readers and writers * that handle Hook operations using the Artifact API pattern. * * @param chainMetadata Chain metadata for the target chain * @param context Optional deployment context (mailbox address, etc.) needed by some hook types * @returns A protocol-specific Hook artifact manager */ createHookArtifactManager(chainMetadata: ChainMetadataForAltVM, context?: { mailbox?: string; }): IRawHookArtifactManager; /** * Creates a Warp artifact manager for the protocol. * The artifact manager provides protocol-specific readers and writers * that handle warp token operations using the Artifact API pattern. * * @param chainMetadata Chain metadata for the target chain * @param context Optional deployment context (mailbox address, etc.) * @returns A protocol-specific Warp artifact manager */ createWarpArtifactManager(chainMetadata: ChainMetadataForAltVM, context?: { mailbox?: string; }): IRawWarpArtifactManager; /** * Creates a Mailbox artifact manager for the protocol. * The artifact manager provides protocol-specific readers and writers * that handle Mailbox operations using the Artifact API pattern. * * @param chainMetadata Chain metadata for the target chain * @returns A protocol-specific Mailbox artifact manager */ createMailboxArtifactManager(chainMetadata: ChainMetadataForAltVM): IRawMailboxArtifactManager; /** * Creates a Validator Announce artifact manager for the protocol. * The artifact manager provides protocol-specific readers and writers * that handle Validator Announce operations using the Artifact API pattern. * * Not all protocols support validator announce (e.g., Cosmos does not). * * @param chainMetadata Chain metadata for the target chain * @returns A protocol-specific Validator Announce artifact manager, or null if not supported */ createValidatorAnnounceArtifactManager(chainMetadata: ChainMetadataForAltVM): IRawValidatorAnnounceArtifactManager | null; /** * Creates a Fee artifact manager for the protocol. * The artifact manager provides protocol-specific readers and writers * that handle fee operations using the Artifact API pattern. * * Not all protocols support fee programs. * * @param chainMetadata Chain metadata for the target chain * @returns A protocol-specific Fee artifact manager, or null if not supported */ createFeeArtifactManager(chainMetadata: ChainMetadataForAltVM): IRawFeeArtifactManager | null; getMinGas(): MinimumRequiredGasByAction; } /** * Registry for managing protocol providers. */ export declare class ProtocolProviderRegistry { private protocols; hasProtocol(protocol: ProtocolType): boolean; listProtocols(): ProtocolType[]; registerProtocol(protocol: ProtocolType, factory: () => ProtocolProvider): void; getProtocolProvider(protocol: ProtocolType): ProtocolProvider; } /** * Register a protocol provider implementation. * * @param protocol The protocol type to register * @param factory Factory function that creates a ProtocolProvider instance */ export declare const registerProtocol: (protocol: ProtocolType, factory: () => ProtocolProvider) => void; /** * Get a protocol provider instance by protocol type. * * @param protocol The protocol type (e.g., ProtocolType.Ethereum, ProtocolType.Sealevel, ProtocolType.Radix) * @returns A new {@link ProtocolProvider} instance * @throws Error if the protocol is not registered */ export declare const getProtocolProvider: (protocol: ProtocolType) => ProtocolProvider; /** * Check if a protocol provider is registered. * * @param protocol The protocol type * @returns true if the protocol is registered */ export declare const hasProtocol: (protocol: ProtocolType) => boolean; /** * List all registered protocol provider types. * * @returns Array of protocol types */ export declare const listProtocols: () => ProtocolType[]; //# sourceMappingURL=protocol.d.ts.map