import type { VetKey } from "@dfinity/vetkeys"; import { StealthCanisterClient } from "../ic/client.js"; import { TransportKeyPair } from "../ic/recipient.js"; import { ScannedAnnouncement } from "../types.js"; /** * Authorization payload used to request an encrypted view key from the key-manager canister. * * The `message` is the human-readable string to sign (EIP-191), while `canonicalMessage` * is the byte representation used by the canister. */ export interface AuthorizationPayload { /** Human-readable message to sign. */ message: string; /** Canonical byte message (as expected by the canister). */ canonicalMessage: Uint8Array; /** Authorization expiry in nanoseconds. */ expiryNs: bigint; /** Nonce (must be strictly increasing for the address). */ nonce: bigint; /** Ephemeral transport key pair used to decrypt the response. */ transport: TransportKeyPair; } /** * Create an authorization payload for requesting a VetKey. * * @param ttlSeconds - Authorization time-to-live in seconds (default: 60). * @returns Authorization payload plus an ephemeral transport keypair. */ export declare function createAuthorizationPayload(client: StealthCanisterClient, address: string, ttlSeconds?: number): Promise; /** * Request a VetKey from the key-manager canister and decrypt it locally. * * @param signature - Signature of `payload.message` (EIP-191). * @returns Decrypted VetKey used to scan/decrypt announcements. */ export declare function requestVetKey(client: StealthCanisterClient, address: string, payload: AuthorizationPayload, signature: Uint8Array): Promise; export interface ScanReceivingsParams { /** ICP stealth client. */ client: StealthCanisterClient; /** VetKey used to decrypt announcements. */ vetKey: VetKey; /** Page size for storage pagination (default: 100). */ pageSize?: number; /** Start cursor (announcement id). */ startAfter?: bigint; /** Storage tag used to filter announcements (default: `DEFAULT_ZSTORAGE_TAG`). */ tag?: string; } /** * Scan and decrypt received announcements from the storage canister. * * This function paginates through announcements, decrypts them using `vetKey`, * and decodes burn artifacts for each decrypted plaintext. * * @returns Decrypted announcements that successfully decode to burn artifacts. * @throws Error for non-recoverable decode failures. PoW recovery failures are ignored. */ export declare function scanReceivings(params: ScanReceivingsParams): Promise; //# sourceMappingURL=scanner.d.ts.map