aboutsummaryrefslogtreecommitdiffstats
path: root/lib/types.ts
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2025-02-26 11:59:58 -0800
committerAdam Soltys <[email protected]>2025-02-26 11:59:58 -0800
commit1d541fd97210389f006e65d46ab783afbe82cea8 (patch)
tree66781ea2992fa99198ed1e450cdb9b68acfbc4d9 /lib/types.ts
parenta14b987a392bc700975b048f37838da08e4ed255 (diff)
downloadcoinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.tar.gz
coinos-server-1d541fd97210389f006e65d46ab783afbe82cea8.zip
payment types
Diffstat (limited to 'lib/types.ts')
-rw-r--r--lib/types.ts78
1 files changed, 78 insertions, 0 deletions
diff --git a/lib/types.ts b/lib/types.ts
new file mode 100644
index 00000000..e878dfb8
--- /dev/null
+++ b/lib/types.ts
@@ -0,0 +1,78 @@
+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;
+ hidepay: 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;
+}