import { IDeviceRepository } from '../../domain/repositories/device-repository';
import { IWalletRepository } from '../../domain/repositories/wallet-repository';
import { IAddressRepository } from '../../domain/repositories/address-repository';
import { ITokenRepository } from '../../domain/repositories/token-repository';
import { INetworkRepository } from '../../domain/repositories/network-repository';
import { IDomainEventPublisher } from '../ports/domain-event-publisher';
import { INotificationGateway } from '../ports/notification-gateway';
export interface TransactionNotification {
    type: 'transaction.created' | 'transaction.updated';
    transaction: {
        id: string;
        hash: string;
        status: string;
        block: number | null;
        networkId: string;
        timestamp: Date;
        from: string | null;
        to: string | null;
        interactedWith: string | null;
        value: string;
        fee: string | null;
        method: string;
    };
}
export interface PushRecipientContext {
    deviceId: string;
    isSender: boolean;
    isReceiver: boolean;
    counterpartyAddress: string | null;
}
export interface TransactionPushNotification extends TransactionNotification {
    fromAddress: string | null;
    toAddress: string | null;
    recipient: PushRecipientContext;
    amount: {
        raw: string;
        formatted: string;
        symbol: string;
    };
}
/**
 * Listens to transaction lifecycle events and notifies the active devices
 * linked to the wallets that own the addresses involved in the transaction.
 *
 * Business rules enforced here:
 *   - Only addresses that are actually linked to a wallet are considered.
 *   - Only devices linked to those wallets are considered.
 *   - Only devices whose status is 'active' are notified via WebSocket.
 *   - Push notifications are sent to devices whose status is 'active' or
 *     'background'.
 *   - The gateway decides whether the device is currently connected; this
 *     service only asks the gateway to deliver the message.
 */
export declare class TransactionNotificationService {
    private readonly eventPublisher;
    private readonly addressRepository;
    private readonly walletRepository;
    private readonly deviceRepository;
    private readonly tokenRepository;
    private readonly networkRepository;
    private readonly notificationGateway;
    private readonly pushGateway?;
    constructor(eventPublisher: IDomainEventPublisher, addressRepository: IAddressRepository, walletRepository: IWalletRepository, deviceRepository: IDeviceRepository, tokenRepository: ITokenRepository, networkRepository: INetworkRepository, notificationGateway: INotificationGateway, pushGateway?: INotificationGateway | undefined);
    start(): void;
    private notify;
    private collectAddressIds;
    private buildAddressMap;
    private resolveAddress;
    private buildRecipientMap;
    private resolveCounterpartyAddress;
    private extractAddressFromData;
    private resolveAmount;
    private extractTokenTransferValue;
    private resolveActiveDeviceIds;
    private resolvePushEnabledDeviceIds;
    private resolveDevicesByStatus;
}
//# sourceMappingURL=transaction-notification.service.d.ts.map