Skip to main content

Compute

Table of contents

Functions

Functions

computeDrawResults

computeDrawResults(draw, picks, bitRangeSize, matchCardinality, prize, tiers): DrawResults

Parameters

NameType
drawDraw
picksPick[]
bitRangeSizenumber
matchCardinalitynumber
prizeBigNumber
tiersany[]

Returns

DrawResults

Defined in

compute/computeDrawResults.ts:10


computePickPrize

computePickPrize(pickHash, winningRandomNumber, bitRangeSize, matchCardinality, prize, tiers): PickPrize

Parameters

NameType
pickHashstring
winningRandomNumberBigNumber
bitRangeSizenumber
matchCardinalitynumber
prizeBigNumber
tiersany[]

Returns

PickPrize

Defined in

compute/computePickPrize.ts:8


computePicksPrizes

computePicksPrizes(picks, winningRandomNumber, bitRangeSize, matchCardinality, prize, tiers): PickPrize[]

Parameters

NameType
picksany[]
winningRandomNumberBigNumber
bitRangeSizenumber
matchCardinalitynumber
prizeBigNumber
tiersany[]

Returns

PickPrize[]

Defined in

compute/computePicksPrizes.ts:6


computePrizeAmount

computePrizeAmount(tierIndex, tierValue, bitRangeSize, prizeAmount): PickPrize

Parameters

NameType
tierIndexnumber
tierValueBigNumberish
bitRangeSizenumber
prizeAmountBigNumber

Returns

PickPrize

Defined in

compute/computePrizeAmount.ts:8


computePrizeDistributionFromTicketAverageTotalSupplies

computePrizeDistributionFromTicketAverageTotalSupplies(draw, prizeTier?, ticketPrimaryAverageTotalSupply?, ticketSecondaryListAverageTotalSupply?, decimals?): Promise<PrizeDistribution | undefined>

Parameters

NameTypeDefault value
drawDrawundefined
prizeTier?PrizeTierundefined
ticketPrimaryAverageTotalSupply?BigNumberishundefined
ticketSecondaryListAverageTotalSupply?BigNumberish[]undefined
decimalsBigNumberish18

Returns

Promise<PrizeDistribution | undefined>

Defined in

compute/computePrizeDistributionFromTicketAverageTotalSupplies.ts:12


computeUserPicks

computeUserPicks(totalNumberOfPicks, address, normalizedBalance): Pick[]

Parameters

NameType
totalNumberOfPicksBigNumberish
addressstring
normalizedBalanceBigNumber

Returns

Pick[]

Defined in

compute/computeUserPicks.ts:10


computeUserWinningPicksForRandomNumber

computeUserWinningPicksForRandomNumber(randomNumber, bitRangeSize, matchCardinality, numberOfPicks, prize, tiers, userAddress, userNormalizedBalance): DrawResults

Parameters

NameType
randomNumberBigNumberish
bitRangeSizenumber
matchCardinalitynumber
numberOfPicksBigNumberish
prizeBigNumberish
tiersany[]
userAddressstring
userNormalizedBalanceBigNumberish

Returns

DrawResults

Defined in

compute/computeUserWinningPicksForRandomNumber.ts:11


computeWinningPicks

computeWinningPicks(user, draws, prizeDistributions): DrawResults[]

Parameters

NameType
userUser
drawsDraw[]
prizeDistributionsPrizeDistribution[]

Returns

DrawResults[]

Defined in

compute/computeWinningPicks.ts:4 puteWinningPicks.ts#L4) ks.ts#L4)