Skip to main content

TickList

@pegasys-fi/v3-sdk / Exports / TickList

Class: TickList

Utility methods for interacting with sorted lists of ticks

Table of contents

Constructors

Methods

Constructors

constructor

Private new TickList()

Cannot be constructed

Defined in

utils/tickList.ts:18

Methods

binarySearch

Static Private binarySearch(ticks, tick): number

Finds the largest tick in the list of ticks that is less than or equal to tick

Parameters

NameTypeDescription
ticksreadonly Tick[]list of ticks
ticknumbertick to find the largest tick that is less than or equal to tick

Returns

number

Defined in

utils/tickList.ts:62


getTick

Static getTick(ticks, index): Tick

Parameters

NameType
ticksreadonly Tick[]
indexnumber

Returns

Tick

Defined in

utils/tickList.ts:50


isAtOrAboveLargest

Static isAtOrAboveLargest(ticks, tick): boolean

Parameters

NameType
ticksreadonly Tick[]
ticknumber

Returns

boolean

Defined in

utils/tickList.ts:45


isBelowSmallest

Static isBelowSmallest(ticks, tick): boolean

Parameters

NameType
ticksreadonly Tick[]
ticknumber

Returns

boolean

Defined in

utils/tickList.ts:40


nextInitializedTick

Static nextInitializedTick(ticks, tick, lte): Tick

Parameters

NameType
ticksreadonly Tick[]
ticknumber
lteboolean

Returns

Tick

Defined in

utils/tickList.ts:83


nextInitializedTickWithinOneWord

Static nextInitializedTickWithinOneWord(ticks, tick, lte, tickSpacing): [number, boolean]

Parameters

NameType
ticksreadonly Tick[]
ticknumber
lteboolean
tickSpacingnumber

Returns

[number, boolean]

Defined in

utils/tickList.ts:101


validateList

Static validateList(ticks, tickSpacing): void

Parameters

NameType
ticksTick[]
tickSpacingnumber

Returns

void

Defined in

utils/tickList.ts:20