aboutsummaryrefslogtreecommitdiffstats
path: root/lib/types.ts
blob: 802fe99567e31965e9fa6e9fbb981c02aa089215 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
export interface User {
  about: string;
  admin: string;
  anon: string;
  autowithdraw: string;
  balance: string;
  banner: string;
  currencies: string;
  currency: string;
  destination: string;
  display: string;
  email: string;
  fiat: string;
  followers: string;
  follows: string;
  haspin: string;
  hasprinter: string;
  id: string;
  index: string;
  keys: string;
  language: string;
  linked: string;
  locktime: string;
  memoPrompt: string;
  nip5: string;
  notify: string;
  npub: string;
  nsec: string;
  nwc: string;
  payments: string;
  picture: string;
  profile: string;
  prompt: string;
  pubkey: string;
  push: string;
  reserve: string;
  seed: string;
  shopifyStore: string;
  shopifyToken: string;
  theme: string;
  threshold: string;
  twofa: string;
  username: string;
  verified: string;
}

export enum PaymentType {
  internal = "internal",
  bitcoin = "bitcoin",
  lightning = "lightning",
  fund = "fund",
  liquid = "liquid",
  ecash = "ecash",
  reconcile = "reconcile",
  bolt12 = "bolt12",
}

export interface Payment {
  id: string;
  aid: string;
  amount: number;
  fee: number;
  hash: string;
  hex?: string;
  ourfee: number;
  memo?: string;
  iid: string;
  uid: string;
  confirmed: boolean;
  rate: number;
  currency: string;
  type: PaymentType;
  ref: string;
  tip?: number;
  created: number;
  user?: User;
}