import { Observable } from 'rxjs'; import { IValidationRequest } from '../interfaces/validation-request.i'; import { TransferRequest } from '../transfer-request'; import { WatcherProxy } from '../interfaces/watcher-proxy.i'; import { ISingleValidationRequest } from '../interfaces/single-validation-request.i'; import { AddressValidation } from '../address-validation'; /** * @class Validator * @description This class encapsulate all the business logic for tracking transaction confirmation on different network * It manages watcher connection for the client and also format and filter watcher event so the client get only the information that is important to it */ export declare class Validator { private _watcherProxy; constructor(_watcherProxy: WatcherProxy); private uniformize; private accountSpecifcGuards; private getAddress; /** * * @param response * @description Get a key from transfer request payload */ private getKeyFromRequest; /** * * @param response * @description Get a key from single address validation request */ private getKeyFromSingleRequest; /** * * @param response * @description Get a key from watcher response */ private getKeyFromResponse; /** * @description Stream operator to match watcher response with resquest */ private isResponseEventMatchingRequest; /** * @description Stream operator to match watcher response with resquest */ private isResponseEventMatchingSingleRequest; /** * * @param request Description of a transaction to watch (Require the network, amount, address and from in case of account) * @param timeout Time (miliseconds) to wait before a request complete. Default 10 minutes * @returns {Observable} Returns a stream of AddressValidation which indicate if a payment is confirmed on the * request network * * @description This functions encapsulate the core logic related to watching a transaction on a blockchain. It returns a stream of event * describing the state of the transaction on the network. It is also responsible to manage the connection with the augmented node, meaning that * it establish the connection with the augmented node, will reconnect in case of premature deconnection and will properly unsubscribe to watcher * in case of error, timeout or when the stream is completed (The transaction is confirmed) */ validateSingleTransaction(request: ISingleValidationRequest, timeout?: number): Observable; /** * * @param request Description of a transfer request to watch (Require the network, amount, ticker, address and from in case of account for both source and destination ) * @param timeout Time (miliseconds) to wait before a request complete. Default 10 minutes * @returns {Observable} Returns a stream of TransferRequest which indicate if a transfer request is confirmed on the * source and destination network * * @description This functions encapsulate the core logic related to watching a transfer request. It returns a stream of event * describing the state of the transfer request on the both networks. It is also responsible to manage the connection with the augmented node, meaning that * it establish the connection with the augmented node, will reconnect in case of premature deconnection and will properly unsubcsribe to watcher * in case of error, timeout or when the stream is completed (The transfer request is completed) */ validate(request: IValidationRequest, timeout?: number): Observable; } //# sourceMappingURL=validator.d.ts.map