manifold/common/txn.ts

20 lines
450 B
TypeScript
Raw Normal View History

2022-04-21 11:09:31 +00:00
// 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
2022-04-26 15:49:16 +00:00
fromType: source_type
2022-04-21 11:09:31 +00:00
toId: string
2022-04-26 15:49:16 +00:00
toType: source_type
2022-04-21 11:09:31 +00:00
amount: number
// Human-readable description
description?: string
}
2022-04-26 15:49:16 +00:00
export type source_type = 'user' | 'contract' | 'charity' | 'bank'