Source code for credmark.cmf.types.rpc


from typing import List

from credmark.dto import DTO, DTOField, IterableListGenericDTO, PrivateAttr

__all__ = ['RpcBlockStartEndIntervalInput', 'RpcBlockWindowIntervalInput',
           'RpcBlockNumber', 'RpcBlockRangeOutput']


[docs]class RpcBlockStartEndIntervalInput(DTO): start: int end: int interval: int
[docs]class RpcBlockWindowIntervalInput(DTO): window: int interval: int
[docs]class RpcBlockNumber(DTO): blockNumber: int blockTimestamp: int sampleTimestamp: int
[docs]class RpcBlockRangeOutput(IterableListGenericDTO[RpcBlockNumber]): blockNumbers: List[RpcBlockNumber] = DTOField( default=[], description='List of block numbers') _iterator: str = PrivateAttr('blockNumbers')