manifold/common/user.ts
mantikoros 4528615863
Private user (#32)
* PrivateUser

* createUser: create private user; detect multiple signups

* include user properties in private user

* script: create private users

* unsubscribing from market resolution emails

* track total deposits
2022-01-18 21:36:46 -06:00

27 lines
575 B
TypeScript

export type User = {
id: string
createdTime: number
name: string
username: string
avatarUrl?: string
balance: number
totalDeposits: number
totalPnLCached: number
creatorVolumeCached: number
}
export const STARTING_BALANCE = 1000
export const SUS_STARTING_BALANCE = 10 // for sus users, i.e. multiple sign ups for same person
export type PrivateUser = {
id: string // same as User.id
username: string // denormalized from User
email?: string
unsubscribedFromResolutionEmails?: boolean
initialDeviceToken?: string
initialIpAddress?: string
}