import { BigNumber , Endianness } from '@pigi/core-utils' ; import { Bucket , IteratorOptions , KeyValueStore , RangeIterator , V , } from './db.interface' ; /**
 * Represents a range of values. Note start & end are big numbers!
 */ export interface RangeEntry { start : BigNumber ; end : BigNumber ; value : V ; } /**
 * Represents a key value store which uses ranges as keys
 */ export interface RangeStore { readonly db : KeyValueStore ; readonly prefix : Buffer ; readonly keyLength : number ; readonly endianness : Endianness ; param start param end returns hasDataInRange ( start , end ) : Promise < boolean > ; param start param end returns get ( start , end ) : Promise < RangeEntry [ ] > ; param start param end param value put ( start , end , value ) : Promise < void > ; param start param end returns del ( start , end ) : Promise < RangeEntry [ ] > ; param options returns iterator ( options ? ) : RangeIterator ; } export interface RangeBucket extends RangeStore { param prefix returns bucket ( prefix ) : Bucket ; param prefix returns rangeBucket ( prefix ) : RangeBucket ; }