import { Address } from 'viem'; import { HexString } from '../binary.js'; import { CiphertextOf, EncryptionScheme, PlaintextOf, SupportedFheType } from '../encryption/encryption.js'; import { Handle } from '../handle.js'; import type { Secp256k1Keypair } from '../lite/ecies.js'; import type { BackoffConfig } from '../retry.js'; export type Reencryptor = (args: ReencryptFnArgs, backoffConfig?: Partial) => Promise>; export interface ReencryptorArgs { chainId: bigint; } export type ReencryptFnArgs = { handle: Handle; ciphertext?: CiphertextOf; }; export type SupportedEphemeralKeypairs = Secp256k1Keypair; export interface PubKeyEncodable { encodePublicKey(): Uint8Array; } export interface ReencryptEndpointRequest { userAddress: Address; handle: Handle; eip712Signature: HexString; ephemeralKeypair: EKP; }