This client enables to obtain statistical information from the subgraph.
Unlikely from the other SDK clients, StatisticsClient does not require signer or provider to be provided. We just need to create client object using relevant network data.
constructor(network: NetworkData)
A Signer or a Provider should be passed depending on the use case of this module:
Signer: when the user wants to use this model in order to send transactions caling the contract functions.
Provider: when the user wants to use this model in order to get information from the contracts or subgraph.
This function returns the statistical data of escrows.
Input parameters
interfaceIStatisticsFilter { from?:Date; to?:Date; first?:number; // (Optional) Number of transactions per page. Default is 10. skip?:number; // (Optional) Number of transactions to skip. Default is 0. orderDirection?:OrderDirection; // (Optional) Order of the results. Default is ASC.}
This function returns the statistical data of HMToken day by day.
Input parameters
interfaceIStatisticsFilter { from?:Date; to?:Date; first?:number; // (Optional) Number of transactions per page. Default is 10. skip?:number; // (Optional) Number of transactions to skip. Default is 0. orderDirection?:OrderDirection; // (Optional) Order of the results. Default is ASC.}
This function returns the statistical data of payments.
Input parameters
interfaceIStatisticsFilter { from?:Date; to?:Date; first?:number; // (Optional) Number of transactions per page. Default is 10. skip?:number; // (Optional) Number of transactions to skip. Default is 0. orderDirection?:OrderDirection; // (Optional) Order of the results. Default is ASC.}
This function returns the statistical data of workers.
Input parameters
interfaceIStatisticsFilter { from?:Date; to?:Date; first?:number; // (Optional) Number of transactions per page. Default is 10. skip?:number; // (Optional) Number of transactions to skip. Default is 0. orderDirection?:OrderDirection; // (Optional) Order of the results. Default is ASC.}