import { Reader } from 'ckb-js-toolkit' ; export interface HashMethod { update ( data ) : HashMethod ; digest ( data ? ) : string | Uint8Array ; digest ( encoding ) : string | Uint8Array ; } export abstract class Hasher { constructor ( protected h ) { } abstract update ( data ) ; abstract digest ( ) ; abstract reset ( ) ; protected setH ( h ) { this . h = h ; } hash ( data ) { return this . update ( data ) . digest ( ) ; } }