manifold/common/txn.ts
2022-04-26 11:49:16 -04:00

20 lines
450 B
TypeScript

// A txn (pronounced "texan") respresents a payment between two ids on Manifold
// Shortened from "transaction" to distinguish from Firebase transactions (and save chars)
export type Txn = {
id: string
createdTime: number
fromId: string
fromType: source_type
toId: string
toType: source_type
amount: number
// Human-readable description
description?: string
}
export type source_type = 'user' | 'contract' | 'charity' | 'bank'