UNPKG

@rsksmart/rif-storage-pinning

Version:

Application for providing your storage space to other to use in exchange of RIF Tokens

21 lines (20 loc) 859 B
import { BlockHeader } from 'web3-eth'; import { ProviderManager } from './providers'; declare type GcHandlerOptions = { manager?: ProviderManager; }; /** * This is a closure that garbage-collects pins of expired Agreements. * * When first detects an Agreement to have no funds it saves the block number at what it was detected. * Then after number of blocks specified for confirmations it actualy unpins the data. * * This is in order to handle case when reorg happens and the DepositFunds event is emitted in the * confirmation range. * * @param options */ export declare function collectPinsClosure(options?: GcHandlerOptions): (block: BlockHeader) => Promise<void>; export declare function collectDirectAddresses(): () => Promise<void>; export default function (options?: GcHandlerOptions): (block: BlockHeader) => Promise<void>; export {};