import { ChainName, HyperlaneCore, IsmType, MerkleTreeHookConfig, MultisigIsmConfig, getValidatorFromStorageLocation } from '@hyperlane-xyz/sdk'; import { Address, Checkpoint, MerkleProof, S3CheckpointWithId, SignatureLike, WithAddress } from '@hyperlane-xyz/utils'; import { type MetadataBuilder, type MetadataContext, type MultisigMetadataBuildResult, type ValidatorInfo } from './types.js'; interface MessageIdMultisigMetadata { type: typeof IsmType.MESSAGE_ID_MULTISIG; signatures: SignatureLike[]; checkpoint: Omit; } interface MerkleRootMultisigMetadata extends Omit { type: typeof IsmType.MERKLE_ROOT_MULTISIG; proof: MerkleProof; } export type MultisigMetadata = MessageIdMultisigMetadata | MerkleRootMultisigMetadata; type CheckpointValidator = Awaited>; export declare class MultisigMetadataBuilder implements MetadataBuilder { protected readonly core: HyperlaneCore; protected readonly logger: import("pino").pino.Logger; protected validatorCache: Record>; constructor(core: HyperlaneCore, logger?: import("pino").pino.Logger); /** * Get human-readable alias for a validator address from defaultMultisigConfigs */ protected getValidatorAlias(validatorAddress: Address, chain: ChainName): string | undefined; protected getAnnouncedStorageLocations(originChain: ChainName, validators: string[]): Promise; protected checkpointValidators(originChain: ChainName, validators: string[]): Promise<(CheckpointValidator | undefined)[]>; /** * Shared helper to fetch checkpoints from validators. * Returns the raw results from mapAllSettled for both getS3Checkpoints and getValidatorInfos to use. */ protected fetchValidatorCheckpoints(validators: Address[], match: { origin: number; merkleTree: Address; messageId: string; index: number; }): Promise<{ originChain: ChainName; fulfilled: Map; rejected: Map; }>; /** * Helper to check if a checkpoint matches the expected values. */ protected checkpointMatches(checkpoint: S3CheckpointWithId, match: { origin: number; merkleTree: Address; messageId: string; index: number; }): boolean; getS3Checkpoints(validators: Address[], match: { origin: number; merkleTree: Address; messageId: string; index: number; }): Promise; /** * Get detailed status for each validator including signature status. * Returns ValidatorInfo for each validator with 'signed', 'pending', or 'error' status. */ getValidatorInfos(validators: Address[], match: { origin: number; merkleTree: Address; messageId: string; index: number; }): Promise<{ validatorInfos: ValidatorInfo[]; checkpoint?: Checkpoint; }>; build(context: MetadataContext, WithAddress>): Promise; protected static encodeSimplePrefix(metadata: MessageIdMultisigMetadata): string; static decodeSimplePrefix(metadata: string): { signatureOffset: number; type: IsmType; checkpoint: { root: string; index: number; merkle_tree_hook_address: string; }; }; static encodeProofPrefix(metadata: MerkleRootMultisigMetadata): string; static decodeProofPrefix(metadata: string): { signatureOffset: number; type: IsmType; checkpoint: { root: string; index: number; merkle_tree_hook_address: string; }; proof: MerkleProof; }; static encode(metadata: MultisigMetadata): string; static signatureAt(metadata: string, offset: number, index: number): SignatureLike | undefined; static decode(metadata: string, type: typeof IsmType.MERKLE_ROOT_MULTISIG | typeof IsmType.MESSAGE_ID_MULTISIG | typeof IsmType.STORAGE_MERKLE_ROOT_MULTISIG | typeof IsmType.STORAGE_MESSAGE_ID_MULTISIG): MultisigMetadata; } export {}; //# sourceMappingURL=multisig.d.ts.map