cu8-lucky-draw-pool-engine
Version:
Lucky draw pool engine for luck based games
36 lines (31 loc) • 635 B
text/typescript
export enum PoolStatus {
ACTIVE = 'ACTIVE',
DISABLED = 'DISABLED',
}
export enum ERRORS {
ERR_DB_CONN = 'ERR_DB_CONN',
}
export type PoolConfig = {
minRate?: number;
maxRate?: number;
controlPoints?: [[number, number], [number, number]];
};
export interface IPool {
poolKey: string;
name: string;
initialAmount: number;
unclaimed: number;
period: string;
status: PoolStatus;
startTime: Date;
endTime: Date;
createdAt: Date;
disabledAt: Date;
config: PoolConfig;
data: { [key: string]: any };
}
export type Reward = {
poolKey: string;
poolName: string;
poolData: { [key: string]: any };
};