@openora/core 0.4.1-canary.95 → 0.4.1-canary.97

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/contracts/adapters/audit.d.ts +1 -1
  3. package/dist/contracts/adapters/audit.d.ts.map +1 -1
  4. package/dist/contracts/adapters/audit.js.map +1 -1
  5. package/dist/contracts/adapters/payment.d.ts +20 -0
  6. package/dist/contracts/adapters/payment.d.ts.map +1 -1
  7. package/dist/contracts/adapters/payment.js.map +1 -1
  8. package/dist/testing/real-infra.d.ts.map +1 -1
  9. package/dist/testing/real-infra.js +4 -1
  10. package/dist/testing/real-infra.js.map +1 -1
  11. package/dist/wallet/__tests__/wallet-currency-code.test.js +30 -1
  12. package/dist/wallet/__tests__/wallet-currency-code.test.js.map +1 -1
  13. package/dist/wallet/__tests__/wallet-withdrawal-address.router.int.test.d.ts +2 -0
  14. package/dist/wallet/__tests__/wallet-withdrawal-address.router.int.test.d.ts.map +1 -0
  15. package/dist/wallet/__tests__/wallet-withdrawal-address.router.int.test.js +170 -0
  16. package/dist/wallet/__tests__/wallet-withdrawal-address.router.int.test.js.map +1 -0
  17. package/dist/wallet/__tests__/wallet.rate-limit.int.test.js +26 -2
  18. package/dist/wallet/__tests__/wallet.rate-limit.int.test.js.map +1 -1
  19. package/dist/wallet/__tests__/wallet.service.int.test.js +158 -2
  20. package/dist/wallet/__tests__/wallet.service.int.test.js.map +1 -1
  21. package/dist/wallet/contract/index.d.ts +50 -0
  22. package/dist/wallet/contract/index.d.ts.map +1 -1
  23. package/dist/wallet/contract/index.js +43 -1
  24. package/dist/wallet/contract/index.js.map +1 -1
  25. package/dist/wallet/drizzle/migrations/0011_motionless_infant_terrible.sql +12 -0
  26. package/dist/wallet/drizzle/migrations/0012_empty_deadpool.sql +2 -0
  27. package/dist/wallet/drizzle/migrations/0013_tidy_timeslip.sql +1 -0
  28. package/dist/wallet/drizzle/migrations/meta/0011_snapshot.json +1677 -0
  29. package/dist/wallet/drizzle/migrations/meta/0012_snapshot.json +1689 -0
  30. package/dist/wallet/drizzle/migrations/meta/0013_snapshot.json +1695 -0
  31. package/dist/wallet/drizzle/migrations/meta/_journal.json +21 -0
  32. package/dist/wallet/router/index.d.ts +28 -0
  33. package/dist/wallet/router/index.d.ts.map +1 -1
  34. package/dist/wallet/router/index.js +9 -1
  35. package/dist/wallet/router/index.js.map +1 -1
  36. package/dist/wallet/schema/index.d.ts +178 -0
  37. package/dist/wallet/schema/index.d.ts.map +1 -1
  38. package/dist/wallet/schema/index.js +27 -0
  39. package/dist/wallet/schema/index.js.map +1 -1
  40. package/dist/wallet/service/wallet.service.d.ts +33 -2
  41. package/dist/wallet/service/wallet.service.d.ts.map +1 -1
  42. package/dist/wallet/service/wallet.service.js +176 -1
  43. package/dist/wallet/service/wallet.service.js.map +1 -1
  44. package/package.json +1 -1
@@ -0,0 +1,1677 @@
1
+ {
2
+ "id": "8696e94a-a770-4864-a602-d2beb8a514b8",
3
+ "prevId": "2d4930dd-4e83-4bdf-898d-4faa12878e94",
4
+ "version": "7",
5
+ "dialect": "postgresql",
6
+ "tables": {
7
+ "public.auto_withdrawal_rule": {
8
+ "name": "auto_withdrawal_rule",
9
+ "schema": "",
10
+ "columns": {
11
+ "id": {
12
+ "name": "id",
13
+ "type": "uuid",
14
+ "primaryKey": true,
15
+ "notNull": true,
16
+ "default": "gen_random_uuid()"
17
+ },
18
+ "user_id": {
19
+ "name": "user_id",
20
+ "type": "uuid",
21
+ "primaryKey": false,
22
+ "notNull": true
23
+ },
24
+ "threshold": {
25
+ "name": "threshold",
26
+ "type": "numeric(38, 18)",
27
+ "primaryKey": false,
28
+ "notNull": true
29
+ },
30
+ "reason": {
31
+ "name": "reason",
32
+ "type": "text",
33
+ "primaryKey": false,
34
+ "notNull": true
35
+ },
36
+ "created_by": {
37
+ "name": "created_by",
38
+ "type": "uuid",
39
+ "primaryKey": false,
40
+ "notNull": true
41
+ },
42
+ "created_at": {
43
+ "name": "created_at",
44
+ "type": "timestamp with time zone",
45
+ "primaryKey": false,
46
+ "notNull": true,
47
+ "default": "now()"
48
+ },
49
+ "updated_at": {
50
+ "name": "updated_at",
51
+ "type": "timestamp with time zone",
52
+ "primaryKey": false,
53
+ "notNull": true
54
+ }
55
+ },
56
+ "indexes": {},
57
+ "foreignKeys": {},
58
+ "compositePrimaryKeys": {},
59
+ "uniqueConstraints": {
60
+ "auto_withdrawal_rule_user_id_unique": {
61
+ "name": "auto_withdrawal_rule_user_id_unique",
62
+ "nullsNotDistinct": false,
63
+ "columns": ["user_id"]
64
+ }
65
+ },
66
+ "policies": {},
67
+ "checkConstraints": {},
68
+ "isRLSEnabled": false
69
+ },
70
+ "public.wallet": {
71
+ "name": "wallet",
72
+ "schema": "",
73
+ "columns": {
74
+ "id": {
75
+ "name": "id",
76
+ "type": "uuid",
77
+ "primaryKey": true,
78
+ "notNull": true,
79
+ "default": "gen_random_uuid()"
80
+ },
81
+ "user_id": {
82
+ "name": "user_id",
83
+ "type": "uuid",
84
+ "primaryKey": false,
85
+ "notNull": true
86
+ },
87
+ "currency": {
88
+ "name": "currency",
89
+ "type": "text",
90
+ "primaryKey": false,
91
+ "notNull": true,
92
+ "default": "'USD'"
93
+ },
94
+ "updated_at": {
95
+ "name": "updated_at",
96
+ "type": "timestamp with time zone",
97
+ "primaryKey": false,
98
+ "notNull": true
99
+ }
100
+ },
101
+ "indexes": {},
102
+ "foreignKeys": {},
103
+ "compositePrimaryKeys": {},
104
+ "uniqueConstraints": {
105
+ "wallet_user_id_unique": {
106
+ "name": "wallet_user_id_unique",
107
+ "nullsNotDistinct": false,
108
+ "columns": ["user_id"]
109
+ }
110
+ },
111
+ "policies": {},
112
+ "checkConstraints": {},
113
+ "isRLSEnabled": false
114
+ },
115
+ "public.wallet_asset": {
116
+ "name": "wallet_asset",
117
+ "schema": "",
118
+ "columns": {
119
+ "id": {
120
+ "name": "id",
121
+ "type": "uuid",
122
+ "primaryKey": true,
123
+ "notNull": true,
124
+ "default": "gen_random_uuid()"
125
+ },
126
+ "currency": {
127
+ "name": "currency",
128
+ "type": "text",
129
+ "primaryKey": false,
130
+ "notNull": true
131
+ },
132
+ "network": {
133
+ "name": "network",
134
+ "type": "text",
135
+ "primaryKey": false,
136
+ "notNull": true
137
+ },
138
+ "provider_asset_id": {
139
+ "name": "provider_asset_id",
140
+ "type": "text",
141
+ "primaryKey": false,
142
+ "notNull": true
143
+ },
144
+ "min_deposit": {
145
+ "name": "min_deposit",
146
+ "type": "numeric(38, 18)",
147
+ "primaryKey": false,
148
+ "notNull": true
149
+ },
150
+ "min_withdrawal": {
151
+ "name": "min_withdrawal",
152
+ "type": "numeric(38, 18)",
153
+ "primaryKey": false,
154
+ "notNull": true
155
+ },
156
+ "withdrawal_fee": {
157
+ "name": "withdrawal_fee",
158
+ "type": "numeric(38, 18)",
159
+ "primaryKey": false,
160
+ "notNull": true
161
+ },
162
+ "deposit_enabled": {
163
+ "name": "deposit_enabled",
164
+ "type": "boolean",
165
+ "primaryKey": false,
166
+ "notNull": true,
167
+ "default": true
168
+ },
169
+ "withdrawal_enabled": {
170
+ "name": "withdrawal_enabled",
171
+ "type": "boolean",
172
+ "primaryKey": false,
173
+ "notNull": true,
174
+ "default": true
175
+ },
176
+ "provider_name": {
177
+ "name": "provider_name",
178
+ "type": "text",
179
+ "primaryKey": false,
180
+ "notNull": false
181
+ },
182
+ "sweep_fee_ceiling": {
183
+ "name": "sweep_fee_ceiling",
184
+ "type": "numeric(38, 18)",
185
+ "primaryKey": false,
186
+ "notNull": false
187
+ },
188
+ "pool_liquidity_floor": {
189
+ "name": "pool_liquidity_floor",
190
+ "type": "numeric(38, 18)",
191
+ "primaryKey": false,
192
+ "notNull": false
193
+ },
194
+ "created_at": {
195
+ "name": "created_at",
196
+ "type": "timestamp with time zone",
197
+ "primaryKey": false,
198
+ "notNull": true,
199
+ "default": "now()"
200
+ },
201
+ "updated_at": {
202
+ "name": "updated_at",
203
+ "type": "timestamp with time zone",
204
+ "primaryKey": false,
205
+ "notNull": true,
206
+ "default": "now()"
207
+ }
208
+ },
209
+ "indexes": {
210
+ "wallet_asset_currency_network_idx": {
211
+ "name": "wallet_asset_currency_network_idx",
212
+ "columns": [
213
+ {
214
+ "expression": "currency",
215
+ "isExpression": false,
216
+ "asc": true,
217
+ "nulls": "last"
218
+ },
219
+ {
220
+ "expression": "network",
221
+ "isExpression": false,
222
+ "asc": true,
223
+ "nulls": "last"
224
+ }
225
+ ],
226
+ "isUnique": true,
227
+ "concurrently": false,
228
+ "method": "btree",
229
+ "with": {}
230
+ }
231
+ },
232
+ "foreignKeys": {},
233
+ "compositePrimaryKeys": {},
234
+ "uniqueConstraints": {},
235
+ "policies": {},
236
+ "checkConstraints": {},
237
+ "isRLSEnabled": false
238
+ },
239
+ "public.wallet_auto_withdrawal_config": {
240
+ "name": "wallet_auto_withdrawal_config",
241
+ "schema": "",
242
+ "columns": {
243
+ "id": {
244
+ "name": "id",
245
+ "type": "uuid",
246
+ "primaryKey": true,
247
+ "notNull": true,
248
+ "default": "gen_random_uuid()"
249
+ },
250
+ "singleton_key": {
251
+ "name": "singleton_key",
252
+ "type": "text",
253
+ "primaryKey": false,
254
+ "notNull": true,
255
+ "default": "'global'"
256
+ },
257
+ "fiat_threshold": {
258
+ "name": "fiat_threshold",
259
+ "type": "numeric(38, 18)",
260
+ "primaryKey": false,
261
+ "notNull": true
262
+ },
263
+ "crypto_threshold": {
264
+ "name": "crypto_threshold",
265
+ "type": "numeric(38, 18)",
266
+ "primaryKey": false,
267
+ "notNull": true
268
+ },
269
+ "exclude_risk_flags": {
270
+ "name": "exclude_risk_flags",
271
+ "type": "text[]",
272
+ "primaryKey": false,
273
+ "notNull": true,
274
+ "default": "ARRAY['high_risk','bonus_abuser','kyc_rejected','withdrawal_review','multi_account']::text[]"
275
+ },
276
+ "updated_by": {
277
+ "name": "updated_by",
278
+ "type": "uuid",
279
+ "primaryKey": false,
280
+ "notNull": false
281
+ },
282
+ "updated_at": {
283
+ "name": "updated_at",
284
+ "type": "timestamp with time zone",
285
+ "primaryKey": false,
286
+ "notNull": true
287
+ },
288
+ "created_at": {
289
+ "name": "created_at",
290
+ "type": "timestamp with time zone",
291
+ "primaryKey": false,
292
+ "notNull": true,
293
+ "default": "now()"
294
+ }
295
+ },
296
+ "indexes": {},
297
+ "foreignKeys": {},
298
+ "compositePrimaryKeys": {},
299
+ "uniqueConstraints": {
300
+ "wallet_auto_withdrawal_config_singletonKey_unique": {
301
+ "name": "wallet_auto_withdrawal_config_singletonKey_unique",
302
+ "nullsNotDistinct": false,
303
+ "columns": ["singleton_key"]
304
+ }
305
+ },
306
+ "policies": {},
307
+ "checkConstraints": {},
308
+ "isRLSEnabled": false
309
+ },
310
+ "public.wallet_balance": {
311
+ "name": "wallet_balance",
312
+ "schema": "",
313
+ "columns": {
314
+ "id": {
315
+ "name": "id",
316
+ "type": "uuid",
317
+ "primaryKey": true,
318
+ "notNull": true,
319
+ "default": "gen_random_uuid()"
320
+ },
321
+ "wallet_id": {
322
+ "name": "wallet_id",
323
+ "type": "uuid",
324
+ "primaryKey": false,
325
+ "notNull": true
326
+ },
327
+ "currency": {
328
+ "name": "currency",
329
+ "type": "text",
330
+ "primaryKey": false,
331
+ "notNull": true
332
+ },
333
+ "amount": {
334
+ "name": "amount",
335
+ "type": "numeric(38, 18)",
336
+ "primaryKey": false,
337
+ "notNull": true,
338
+ "default": "'0'"
339
+ },
340
+ "created_at": {
341
+ "name": "created_at",
342
+ "type": "timestamp with time zone",
343
+ "primaryKey": false,
344
+ "notNull": true,
345
+ "default": "now()"
346
+ },
347
+ "updated_at": {
348
+ "name": "updated_at",
349
+ "type": "timestamp with time zone",
350
+ "primaryKey": false,
351
+ "notNull": true,
352
+ "default": "now()"
353
+ }
354
+ },
355
+ "indexes": {
356
+ "wallet_balance_wallet_id_currency_idx": {
357
+ "name": "wallet_balance_wallet_id_currency_idx",
358
+ "columns": [
359
+ {
360
+ "expression": "wallet_id",
361
+ "isExpression": false,
362
+ "asc": true,
363
+ "nulls": "last"
364
+ },
365
+ {
366
+ "expression": "currency",
367
+ "isExpression": false,
368
+ "asc": true,
369
+ "nulls": "last"
370
+ }
371
+ ],
372
+ "isUnique": true,
373
+ "concurrently": false,
374
+ "method": "btree",
375
+ "with": {}
376
+ }
377
+ },
378
+ "foreignKeys": {
379
+ "wallet_balance_wallet_id_wallet_id_fk": {
380
+ "name": "wallet_balance_wallet_id_wallet_id_fk",
381
+ "tableFrom": "wallet_balance",
382
+ "tableTo": "wallet",
383
+ "columnsFrom": ["wallet_id"],
384
+ "columnsTo": ["id"],
385
+ "onDelete": "no action",
386
+ "onUpdate": "no action"
387
+ }
388
+ },
389
+ "compositePrimaryKeys": {},
390
+ "uniqueConstraints": {},
391
+ "policies": {},
392
+ "checkConstraints": {},
393
+ "isRLSEnabled": false
394
+ },
395
+ "public.wallet_custody_sweep": {
396
+ "name": "wallet_custody_sweep",
397
+ "schema": "",
398
+ "columns": {
399
+ "id": {
400
+ "name": "id",
401
+ "type": "uuid",
402
+ "primaryKey": true,
403
+ "notNull": true,
404
+ "default": "gen_random_uuid()"
405
+ },
406
+ "user_id": {
407
+ "name": "user_id",
408
+ "type": "uuid",
409
+ "primaryKey": false,
410
+ "notNull": true
411
+ },
412
+ "provider_name": {
413
+ "name": "provider_name",
414
+ "type": "text",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ },
418
+ "currency": {
419
+ "name": "currency",
420
+ "type": "text",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "network": {
425
+ "name": "network",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true
429
+ },
430
+ "amount": {
431
+ "name": "amount",
432
+ "type": "numeric(38, 18)",
433
+ "primaryKey": false,
434
+ "notNull": true
435
+ },
436
+ "estimated_fee": {
437
+ "name": "estimated_fee",
438
+ "type": "numeric(38, 18)",
439
+ "primaryKey": false,
440
+ "notNull": true
441
+ },
442
+ "external_id": {
443
+ "name": "external_id",
444
+ "type": "text",
445
+ "primaryKey": false,
446
+ "notNull": false
447
+ },
448
+ "pool_ref": {
449
+ "name": "pool_ref",
450
+ "type": "text",
451
+ "primaryKey": false,
452
+ "notNull": false
453
+ },
454
+ "tx_hash": {
455
+ "name": "tx_hash",
456
+ "type": "text",
457
+ "primaryKey": false,
458
+ "notNull": false
459
+ },
460
+ "status": {
461
+ "name": "status",
462
+ "type": "wallet_custody_sweep_status",
463
+ "typeSchema": "public",
464
+ "primaryKey": false,
465
+ "notNull": true,
466
+ "default": "'pending'"
467
+ },
468
+ "run_id": {
469
+ "name": "run_id",
470
+ "type": "uuid",
471
+ "primaryKey": false,
472
+ "notNull": false
473
+ },
474
+ "created_at": {
475
+ "name": "created_at",
476
+ "type": "timestamp with time zone",
477
+ "primaryKey": false,
478
+ "notNull": true,
479
+ "default": "now()"
480
+ },
481
+ "updated_at": {
482
+ "name": "updated_at",
483
+ "type": "timestamp with time zone",
484
+ "primaryKey": false,
485
+ "notNull": true,
486
+ "default": "now()"
487
+ }
488
+ },
489
+ "indexes": {
490
+ "wallet_custody_sweep_user_id_currency_network_idx": {
491
+ "name": "wallet_custody_sweep_user_id_currency_network_idx",
492
+ "columns": [
493
+ {
494
+ "expression": "user_id",
495
+ "isExpression": false,
496
+ "asc": true,
497
+ "nulls": "last"
498
+ },
499
+ {
500
+ "expression": "currency",
501
+ "isExpression": false,
502
+ "asc": true,
503
+ "nulls": "last"
504
+ },
505
+ {
506
+ "expression": "network",
507
+ "isExpression": false,
508
+ "asc": true,
509
+ "nulls": "last"
510
+ }
511
+ ],
512
+ "isUnique": true,
513
+ "where": "status IN ('pending','processing','unknown')",
514
+ "concurrently": false,
515
+ "method": "btree",
516
+ "with": {}
517
+ },
518
+ "wallet_custody_sweep_external_id_idx": {
519
+ "name": "wallet_custody_sweep_external_id_idx",
520
+ "columns": [
521
+ {
522
+ "expression": "external_id",
523
+ "isExpression": false,
524
+ "asc": true,
525
+ "nulls": "last"
526
+ }
527
+ ],
528
+ "isUnique": true,
529
+ "where": "\"wallet_custody_sweep\".\"external_id\" IS NOT NULL",
530
+ "concurrently": false,
531
+ "method": "btree",
532
+ "with": {}
533
+ },
534
+ "wallet_custody_sweep_status_created_at_idx": {
535
+ "name": "wallet_custody_sweep_status_created_at_idx",
536
+ "columns": [
537
+ {
538
+ "expression": "status",
539
+ "isExpression": false,
540
+ "asc": true,
541
+ "nulls": "last"
542
+ },
543
+ {
544
+ "expression": "created_at",
545
+ "isExpression": false,
546
+ "asc": true,
547
+ "nulls": "last"
548
+ }
549
+ ],
550
+ "isUnique": false,
551
+ "concurrently": false,
552
+ "method": "btree",
553
+ "with": {}
554
+ },
555
+ "wallet_custody_sweep_provider_name_created_at_idx": {
556
+ "name": "wallet_custody_sweep_provider_name_created_at_idx",
557
+ "columns": [
558
+ {
559
+ "expression": "provider_name",
560
+ "isExpression": false,
561
+ "asc": true,
562
+ "nulls": "last"
563
+ },
564
+ {
565
+ "expression": "created_at",
566
+ "isExpression": false,
567
+ "asc": true,
568
+ "nulls": "last"
569
+ }
570
+ ],
571
+ "isUnique": false,
572
+ "concurrently": false,
573
+ "method": "btree",
574
+ "with": {}
575
+ }
576
+ },
577
+ "foreignKeys": {},
578
+ "compositePrimaryKeys": {},
579
+ "uniqueConstraints": {},
580
+ "policies": {},
581
+ "checkConstraints": {},
582
+ "isRLSEnabled": false
583
+ },
584
+ "public.wallet_deposit_address": {
585
+ "name": "wallet_deposit_address",
586
+ "schema": "",
587
+ "columns": {
588
+ "id": {
589
+ "name": "id",
590
+ "type": "uuid",
591
+ "primaryKey": true,
592
+ "notNull": true,
593
+ "default": "gen_random_uuid()"
594
+ },
595
+ "user_id": {
596
+ "name": "user_id",
597
+ "type": "uuid",
598
+ "primaryKey": false,
599
+ "notNull": true
600
+ },
601
+ "currency": {
602
+ "name": "currency",
603
+ "type": "text",
604
+ "primaryKey": false,
605
+ "notNull": true
606
+ },
607
+ "network": {
608
+ "name": "network",
609
+ "type": "text",
610
+ "primaryKey": false,
611
+ "notNull": false
612
+ },
613
+ "address": {
614
+ "name": "address",
615
+ "type": "text",
616
+ "primaryKey": false,
617
+ "notNull": true
618
+ },
619
+ "tag": {
620
+ "name": "tag",
621
+ "type": "text",
622
+ "primaryKey": false,
623
+ "notNull": false
624
+ },
625
+ "provider_name": {
626
+ "name": "provider_name",
627
+ "type": "text",
628
+ "primaryKey": false,
629
+ "notNull": true
630
+ },
631
+ "created_at": {
632
+ "name": "created_at",
633
+ "type": "timestamp with time zone",
634
+ "primaryKey": false,
635
+ "notNull": true,
636
+ "default": "now()"
637
+ }
638
+ },
639
+ "indexes": {
640
+ "wallet_deposit_address_user_id_currency_network_idx": {
641
+ "name": "wallet_deposit_address_user_id_currency_network_idx",
642
+ "columns": [
643
+ {
644
+ "expression": "user_id",
645
+ "isExpression": false,
646
+ "asc": true,
647
+ "nulls": "last"
648
+ },
649
+ {
650
+ "expression": "currency",
651
+ "isExpression": false,
652
+ "asc": true,
653
+ "nulls": "last"
654
+ },
655
+ {
656
+ "expression": "network",
657
+ "isExpression": false,
658
+ "asc": true,
659
+ "nulls": "last"
660
+ }
661
+ ],
662
+ "isUnique": true,
663
+ "where": "\"wallet_deposit_address\".\"network\" IS NOT NULL",
664
+ "concurrently": false,
665
+ "method": "btree",
666
+ "with": {}
667
+ },
668
+ "wallet_deposit_address_user_id_currency_idx": {
669
+ "name": "wallet_deposit_address_user_id_currency_idx",
670
+ "columns": [
671
+ {
672
+ "expression": "user_id",
673
+ "isExpression": false,
674
+ "asc": true,
675
+ "nulls": "last"
676
+ },
677
+ {
678
+ "expression": "currency",
679
+ "isExpression": false,
680
+ "asc": true,
681
+ "nulls": "last"
682
+ }
683
+ ],
684
+ "isUnique": true,
685
+ "where": "\"wallet_deposit_address\".\"network\" IS NULL",
686
+ "concurrently": false,
687
+ "method": "btree",
688
+ "with": {}
689
+ },
690
+ "wallet_deposit_address_address_tag_idx": {
691
+ "name": "wallet_deposit_address_address_tag_idx",
692
+ "columns": [
693
+ {
694
+ "expression": "address",
695
+ "isExpression": false,
696
+ "asc": true,
697
+ "nulls": "last"
698
+ },
699
+ {
700
+ "expression": "tag",
701
+ "isExpression": false,
702
+ "asc": true,
703
+ "nulls": "last"
704
+ }
705
+ ],
706
+ "isUnique": true,
707
+ "where": "\"wallet_deposit_address\".\"tag\" IS NOT NULL",
708
+ "concurrently": false,
709
+ "method": "btree",
710
+ "with": {}
711
+ },
712
+ "wallet_deposit_address_address_network_currency_idx": {
713
+ "name": "wallet_deposit_address_address_network_currency_idx",
714
+ "columns": [
715
+ {
716
+ "expression": "address",
717
+ "isExpression": false,
718
+ "asc": true,
719
+ "nulls": "last"
720
+ },
721
+ {
722
+ "expression": "network",
723
+ "isExpression": false,
724
+ "asc": true,
725
+ "nulls": "last"
726
+ },
727
+ {
728
+ "expression": "currency",
729
+ "isExpression": false,
730
+ "asc": true,
731
+ "nulls": "last"
732
+ }
733
+ ],
734
+ "isUnique": true,
735
+ "where": "\"wallet_deposit_address\".\"tag\" IS NULL AND \"wallet_deposit_address\".\"network\" IS NOT NULL",
736
+ "concurrently": false,
737
+ "method": "btree",
738
+ "with": {}
739
+ },
740
+ "wallet_deposit_address_address_idx": {
741
+ "name": "wallet_deposit_address_address_idx",
742
+ "columns": [
743
+ {
744
+ "expression": "address",
745
+ "isExpression": false,
746
+ "asc": true,
747
+ "nulls": "last"
748
+ }
749
+ ],
750
+ "isUnique": false,
751
+ "concurrently": false,
752
+ "method": "btree",
753
+ "with": {}
754
+ }
755
+ },
756
+ "foreignKeys": {},
757
+ "compositePrimaryKeys": {},
758
+ "uniqueConstraints": {},
759
+ "policies": {},
760
+ "checkConstraints": {},
761
+ "isRLSEnabled": false
762
+ },
763
+ "public.wallet_job_run": {
764
+ "name": "wallet_job_run",
765
+ "schema": "",
766
+ "columns": {
767
+ "id": {
768
+ "name": "id",
769
+ "type": "uuid",
770
+ "primaryKey": true,
771
+ "notNull": true,
772
+ "default": "gen_random_uuid()"
773
+ },
774
+ "job_name": {
775
+ "name": "job_name",
776
+ "type": "text",
777
+ "primaryKey": false,
778
+ "notNull": true
779
+ },
780
+ "run_id": {
781
+ "name": "run_id",
782
+ "type": "uuid",
783
+ "primaryKey": false,
784
+ "notNull": true
785
+ },
786
+ "started_at": {
787
+ "name": "started_at",
788
+ "type": "timestamp with time zone",
789
+ "primaryKey": false,
790
+ "notNull": true,
791
+ "default": "now()"
792
+ },
793
+ "finished_at": {
794
+ "name": "finished_at",
795
+ "type": "timestamp with time zone",
796
+ "primaryKey": false,
797
+ "notNull": false
798
+ },
799
+ "status": {
800
+ "name": "status",
801
+ "type": "wallet_job_run_status",
802
+ "typeSchema": "public",
803
+ "primaryKey": false,
804
+ "notNull": true,
805
+ "default": "'running'"
806
+ },
807
+ "summary": {
808
+ "name": "summary",
809
+ "type": "jsonb",
810
+ "primaryKey": false,
811
+ "notNull": false
812
+ },
813
+ "created_at": {
814
+ "name": "created_at",
815
+ "type": "timestamp with time zone",
816
+ "primaryKey": false,
817
+ "notNull": true,
818
+ "default": "now()"
819
+ }
820
+ },
821
+ "indexes": {
822
+ "wallet_job_run_job_name_idx": {
823
+ "name": "wallet_job_run_job_name_idx",
824
+ "columns": [
825
+ {
826
+ "expression": "job_name",
827
+ "isExpression": false,
828
+ "asc": true,
829
+ "nulls": "last"
830
+ }
831
+ ],
832
+ "isUnique": true,
833
+ "where": "\"wallet_job_run\".\"finished_at\" IS NULL",
834
+ "concurrently": false,
835
+ "method": "btree",
836
+ "with": {}
837
+ },
838
+ "wallet_job_run_job_name_started_at_idx": {
839
+ "name": "wallet_job_run_job_name_started_at_idx",
840
+ "columns": [
841
+ {
842
+ "expression": "job_name",
843
+ "isExpression": false,
844
+ "asc": true,
845
+ "nulls": "last"
846
+ },
847
+ {
848
+ "expression": "started_at",
849
+ "isExpression": false,
850
+ "asc": true,
851
+ "nulls": "last"
852
+ }
853
+ ],
854
+ "isUnique": false,
855
+ "concurrently": false,
856
+ "method": "btree",
857
+ "with": {}
858
+ }
859
+ },
860
+ "foreignKeys": {},
861
+ "compositePrimaryKeys": {},
862
+ "uniqueConstraints": {},
863
+ "policies": {},
864
+ "checkConstraints": {},
865
+ "isRLSEnabled": false
866
+ },
867
+ "public.wallet_provider_vault": {
868
+ "name": "wallet_provider_vault",
869
+ "schema": "",
870
+ "columns": {
871
+ "id": {
872
+ "name": "id",
873
+ "type": "uuid",
874
+ "primaryKey": true,
875
+ "notNull": true,
876
+ "default": "gen_random_uuid()"
877
+ },
878
+ "user_id": {
879
+ "name": "user_id",
880
+ "type": "uuid",
881
+ "primaryKey": false,
882
+ "notNull": true
883
+ },
884
+ "provider_name": {
885
+ "name": "provider_name",
886
+ "type": "text",
887
+ "primaryKey": false,
888
+ "notNull": true
889
+ },
890
+ "vault_account_id": {
891
+ "name": "vault_account_id",
892
+ "type": "text",
893
+ "primaryKey": false,
894
+ "notNull": true
895
+ },
896
+ "created_at": {
897
+ "name": "created_at",
898
+ "type": "timestamp with time zone",
899
+ "primaryKey": false,
900
+ "notNull": true,
901
+ "default": "now()"
902
+ }
903
+ },
904
+ "indexes": {
905
+ "wallet_provider_vault_user_id_provider_name_idx": {
906
+ "name": "wallet_provider_vault_user_id_provider_name_idx",
907
+ "columns": [
908
+ {
909
+ "expression": "user_id",
910
+ "isExpression": false,
911
+ "asc": true,
912
+ "nulls": "last"
913
+ },
914
+ {
915
+ "expression": "provider_name",
916
+ "isExpression": false,
917
+ "asc": true,
918
+ "nulls": "last"
919
+ }
920
+ ],
921
+ "isUnique": true,
922
+ "concurrently": false,
923
+ "method": "btree",
924
+ "with": {}
925
+ },
926
+ "wallet_provider_vault_provider_name_vault_account_id_idx": {
927
+ "name": "wallet_provider_vault_provider_name_vault_account_id_idx",
928
+ "columns": [
929
+ {
930
+ "expression": "provider_name",
931
+ "isExpression": false,
932
+ "asc": true,
933
+ "nulls": "last"
934
+ },
935
+ {
936
+ "expression": "vault_account_id",
937
+ "isExpression": false,
938
+ "asc": true,
939
+ "nulls": "last"
940
+ }
941
+ ],
942
+ "isUnique": true,
943
+ "concurrently": false,
944
+ "method": "btree",
945
+ "with": {}
946
+ }
947
+ },
948
+ "foreignKeys": {},
949
+ "compositePrimaryKeys": {},
950
+ "uniqueConstraints": {},
951
+ "policies": {},
952
+ "checkConstraints": {},
953
+ "isRLSEnabled": false
954
+ },
955
+ "public.wallet_reconciliation_finding": {
956
+ "name": "wallet_reconciliation_finding",
957
+ "schema": "",
958
+ "columns": {
959
+ "id": {
960
+ "name": "id",
961
+ "type": "uuid",
962
+ "primaryKey": true,
963
+ "notNull": true,
964
+ "default": "gen_random_uuid()"
965
+ },
966
+ "run_id": {
967
+ "name": "run_id",
968
+ "type": "uuid",
969
+ "primaryKey": false,
970
+ "notNull": true
971
+ },
972
+ "provider_name": {
973
+ "name": "provider_name",
974
+ "type": "text",
975
+ "primaryKey": false,
976
+ "notNull": true
977
+ },
978
+ "kind": {
979
+ "name": "kind",
980
+ "type": "wallet_reconciliation_finding_kind",
981
+ "typeSchema": "public",
982
+ "primaryKey": false,
983
+ "notNull": true
984
+ },
985
+ "currency": {
986
+ "name": "currency",
987
+ "type": "text",
988
+ "primaryKey": false,
989
+ "notNull": false
990
+ },
991
+ "network": {
992
+ "name": "network",
993
+ "type": "text",
994
+ "primaryKey": false,
995
+ "notNull": false
996
+ },
997
+ "amount": {
998
+ "name": "amount",
999
+ "type": "numeric(38, 18)",
1000
+ "primaryKey": false,
1001
+ "notNull": false
1002
+ },
1003
+ "address": {
1004
+ "name": "address",
1005
+ "type": "text",
1006
+ "primaryKey": false,
1007
+ "notNull": false
1008
+ },
1009
+ "tag": {
1010
+ "name": "tag",
1011
+ "type": "text",
1012
+ "primaryKey": false,
1013
+ "notNull": false
1014
+ },
1015
+ "tx_hash": {
1016
+ "name": "tx_hash",
1017
+ "type": "text",
1018
+ "primaryKey": false,
1019
+ "notNull": false
1020
+ },
1021
+ "external_id": {
1022
+ "name": "external_id",
1023
+ "type": "text",
1024
+ "primaryKey": false,
1025
+ "notNull": false
1026
+ },
1027
+ "transaction_id": {
1028
+ "name": "transaction_id",
1029
+ "type": "uuid",
1030
+ "primaryKey": false,
1031
+ "notNull": false
1032
+ },
1033
+ "detail": {
1034
+ "name": "detail",
1035
+ "type": "text",
1036
+ "primaryKey": false,
1037
+ "notNull": false
1038
+ },
1039
+ "status": {
1040
+ "name": "status",
1041
+ "type": "wallet_reconciliation_finding_status",
1042
+ "typeSchema": "public",
1043
+ "primaryKey": false,
1044
+ "notNull": true,
1045
+ "default": "'open'"
1046
+ },
1047
+ "resolved_by": {
1048
+ "name": "resolved_by",
1049
+ "type": "uuid",
1050
+ "primaryKey": false,
1051
+ "notNull": false
1052
+ },
1053
+ "resolved_at": {
1054
+ "name": "resolved_at",
1055
+ "type": "timestamp with time zone",
1056
+ "primaryKey": false,
1057
+ "notNull": false
1058
+ },
1059
+ "resolution_note": {
1060
+ "name": "resolution_note",
1061
+ "type": "text",
1062
+ "primaryKey": false,
1063
+ "notNull": false
1064
+ },
1065
+ "created_at": {
1066
+ "name": "created_at",
1067
+ "type": "timestamp with time zone",
1068
+ "primaryKey": false,
1069
+ "notNull": true,
1070
+ "default": "now()"
1071
+ }
1072
+ },
1073
+ "indexes": {
1074
+ "wallet_reconciliation_finding_kind_external_id_idx": {
1075
+ "name": "wallet_reconciliation_finding_kind_external_id_idx",
1076
+ "columns": [
1077
+ {
1078
+ "expression": "kind",
1079
+ "isExpression": false,
1080
+ "asc": true,
1081
+ "nulls": "last"
1082
+ },
1083
+ {
1084
+ "expression": "external_id",
1085
+ "isExpression": false,
1086
+ "asc": true,
1087
+ "nulls": "last"
1088
+ }
1089
+ ],
1090
+ "isUnique": true,
1091
+ "where": "\"wallet_reconciliation_finding\".\"external_id\" IS NOT NULL",
1092
+ "concurrently": false,
1093
+ "method": "btree",
1094
+ "with": {}
1095
+ },
1096
+ "wallet_reconciliation_finding_status_created_at_idx": {
1097
+ "name": "wallet_reconciliation_finding_status_created_at_idx",
1098
+ "columns": [
1099
+ {
1100
+ "expression": "status",
1101
+ "isExpression": false,
1102
+ "asc": true,
1103
+ "nulls": "last"
1104
+ },
1105
+ {
1106
+ "expression": "created_at",
1107
+ "isExpression": false,
1108
+ "asc": true,
1109
+ "nulls": "last"
1110
+ }
1111
+ ],
1112
+ "isUnique": false,
1113
+ "concurrently": false,
1114
+ "method": "btree",
1115
+ "with": {}
1116
+ },
1117
+ "wallet_reconciliation_finding_run_id_idx": {
1118
+ "name": "wallet_reconciliation_finding_run_id_idx",
1119
+ "columns": [
1120
+ {
1121
+ "expression": "run_id",
1122
+ "isExpression": false,
1123
+ "asc": true,
1124
+ "nulls": "last"
1125
+ }
1126
+ ],
1127
+ "isUnique": false,
1128
+ "concurrently": false,
1129
+ "method": "btree",
1130
+ "with": {}
1131
+ }
1132
+ },
1133
+ "foreignKeys": {},
1134
+ "compositePrimaryKeys": {},
1135
+ "uniqueConstraints": {},
1136
+ "policies": {},
1137
+ "checkConstraints": {},
1138
+ "isRLSEnabled": false
1139
+ },
1140
+ "public.wallet_transaction": {
1141
+ "name": "wallet_transaction",
1142
+ "schema": "",
1143
+ "columns": {
1144
+ "id": {
1145
+ "name": "id",
1146
+ "type": "uuid",
1147
+ "primaryKey": true,
1148
+ "notNull": true,
1149
+ "default": "gen_random_uuid()"
1150
+ },
1151
+ "wallet_id": {
1152
+ "name": "wallet_id",
1153
+ "type": "uuid",
1154
+ "primaryKey": false,
1155
+ "notNull": true
1156
+ },
1157
+ "type": {
1158
+ "name": "type",
1159
+ "type": "wallet_transaction_type",
1160
+ "typeSchema": "public",
1161
+ "primaryKey": false,
1162
+ "notNull": true
1163
+ },
1164
+ "amount": {
1165
+ "name": "amount",
1166
+ "type": "numeric(38, 18)",
1167
+ "primaryKey": false,
1168
+ "notNull": true
1169
+ },
1170
+ "currency": {
1171
+ "name": "currency",
1172
+ "type": "text",
1173
+ "primaryKey": false,
1174
+ "notNull": true
1175
+ },
1176
+ "network": {
1177
+ "name": "network",
1178
+ "type": "text",
1179
+ "primaryKey": false,
1180
+ "notNull": false
1181
+ },
1182
+ "status": {
1183
+ "name": "status",
1184
+ "type": "wallet_transaction_status",
1185
+ "typeSchema": "public",
1186
+ "primaryKey": false,
1187
+ "notNull": true,
1188
+ "default": "'pending'"
1189
+ },
1190
+ "rail": {
1191
+ "name": "rail",
1192
+ "type": "wallet_rail",
1193
+ "typeSchema": "public",
1194
+ "primaryKey": false,
1195
+ "notNull": false
1196
+ },
1197
+ "reviewed_by": {
1198
+ "name": "reviewed_by",
1199
+ "type": "uuid",
1200
+ "primaryKey": false,
1201
+ "notNull": false
1202
+ },
1203
+ "reviewed_at": {
1204
+ "name": "reviewed_at",
1205
+ "type": "timestamp with time zone",
1206
+ "primaryKey": false,
1207
+ "notNull": false
1208
+ },
1209
+ "review_reason": {
1210
+ "name": "review_reason",
1211
+ "type": "text",
1212
+ "primaryKey": false,
1213
+ "notNull": false
1214
+ },
1215
+ "provider_name": {
1216
+ "name": "provider_name",
1217
+ "type": "text",
1218
+ "primaryKey": false,
1219
+ "notNull": false
1220
+ },
1221
+ "provider_ref_id": {
1222
+ "name": "provider_ref_id",
1223
+ "type": "text",
1224
+ "primaryKey": false,
1225
+ "notNull": false
1226
+ },
1227
+ "destination_address": {
1228
+ "name": "destination_address",
1229
+ "type": "text",
1230
+ "primaryKey": false,
1231
+ "notNull": false
1232
+ },
1233
+ "tx_hash": {
1234
+ "name": "tx_hash",
1235
+ "type": "text",
1236
+ "primaryKey": false,
1237
+ "notNull": false
1238
+ },
1239
+ "metadata": {
1240
+ "name": "metadata",
1241
+ "type": "text",
1242
+ "primaryKey": false,
1243
+ "notNull": false
1244
+ },
1245
+ "idempotency_key": {
1246
+ "name": "idempotency_key",
1247
+ "type": "uuid",
1248
+ "primaryKey": false,
1249
+ "notNull": false
1250
+ },
1251
+ "created_at": {
1252
+ "name": "created_at",
1253
+ "type": "timestamp with time zone",
1254
+ "primaryKey": false,
1255
+ "notNull": true,
1256
+ "default": "now()"
1257
+ }
1258
+ },
1259
+ "indexes": {
1260
+ "wallet_transaction_wallet_id_idx": {
1261
+ "name": "wallet_transaction_wallet_id_idx",
1262
+ "columns": [
1263
+ {
1264
+ "expression": "wallet_id",
1265
+ "isExpression": false,
1266
+ "asc": true,
1267
+ "nulls": "last"
1268
+ }
1269
+ ],
1270
+ "isUnique": false,
1271
+ "concurrently": false,
1272
+ "method": "btree",
1273
+ "with": {}
1274
+ },
1275
+ "wallet_transaction_created_at_idx": {
1276
+ "name": "wallet_transaction_created_at_idx",
1277
+ "columns": [
1278
+ {
1279
+ "expression": "created_at",
1280
+ "isExpression": false,
1281
+ "asc": true,
1282
+ "nulls": "last"
1283
+ }
1284
+ ],
1285
+ "isUnique": false,
1286
+ "concurrently": false,
1287
+ "method": "btree",
1288
+ "with": {}
1289
+ },
1290
+ "wallet_transaction_type_idx": {
1291
+ "name": "wallet_transaction_type_idx",
1292
+ "columns": [
1293
+ {
1294
+ "expression": "type",
1295
+ "isExpression": false,
1296
+ "asc": true,
1297
+ "nulls": "last"
1298
+ }
1299
+ ],
1300
+ "isUnique": false,
1301
+ "concurrently": false,
1302
+ "method": "btree",
1303
+ "with": {}
1304
+ },
1305
+ "wallet_transaction_status_idx": {
1306
+ "name": "wallet_transaction_status_idx",
1307
+ "columns": [
1308
+ {
1309
+ "expression": "status",
1310
+ "isExpression": false,
1311
+ "asc": true,
1312
+ "nulls": "last"
1313
+ }
1314
+ ],
1315
+ "isUnique": false,
1316
+ "concurrently": false,
1317
+ "method": "btree",
1318
+ "with": {}
1319
+ },
1320
+ "wallet_transaction_rail_idx": {
1321
+ "name": "wallet_transaction_rail_idx",
1322
+ "columns": [
1323
+ {
1324
+ "expression": "rail",
1325
+ "isExpression": false,
1326
+ "asc": true,
1327
+ "nulls": "last"
1328
+ }
1329
+ ],
1330
+ "isUnique": false,
1331
+ "concurrently": false,
1332
+ "method": "btree",
1333
+ "with": {}
1334
+ },
1335
+ "wallet_transaction_currency_idx": {
1336
+ "name": "wallet_transaction_currency_idx",
1337
+ "columns": [
1338
+ {
1339
+ "expression": "currency",
1340
+ "isExpression": false,
1341
+ "asc": true,
1342
+ "nulls": "last"
1343
+ }
1344
+ ],
1345
+ "isUnique": false,
1346
+ "concurrently": false,
1347
+ "method": "btree",
1348
+ "with": {}
1349
+ },
1350
+ "wallet_transaction_currency_network_idx": {
1351
+ "name": "wallet_transaction_currency_network_idx",
1352
+ "columns": [
1353
+ {
1354
+ "expression": "currency",
1355
+ "isExpression": false,
1356
+ "asc": true,
1357
+ "nulls": "last"
1358
+ },
1359
+ {
1360
+ "expression": "network",
1361
+ "isExpression": false,
1362
+ "asc": true,
1363
+ "nulls": "last"
1364
+ }
1365
+ ],
1366
+ "isUnique": false,
1367
+ "concurrently": false,
1368
+ "method": "btree",
1369
+ "with": {}
1370
+ },
1371
+ "wallet_transaction_tx_hash_idx": {
1372
+ "name": "wallet_transaction_tx_hash_idx",
1373
+ "columns": [
1374
+ {
1375
+ "expression": "tx_hash",
1376
+ "isExpression": false,
1377
+ "asc": true,
1378
+ "nulls": "last"
1379
+ }
1380
+ ],
1381
+ "isUnique": false,
1382
+ "concurrently": false,
1383
+ "method": "btree",
1384
+ "with": {}
1385
+ },
1386
+ "wallet_transaction_status_type_created_at_idx": {
1387
+ "name": "wallet_transaction_status_type_created_at_idx",
1388
+ "columns": [
1389
+ {
1390
+ "expression": "status",
1391
+ "isExpression": false,
1392
+ "asc": true,
1393
+ "nulls": "last"
1394
+ },
1395
+ {
1396
+ "expression": "type",
1397
+ "isExpression": false,
1398
+ "asc": true,
1399
+ "nulls": "last"
1400
+ },
1401
+ {
1402
+ "expression": "created_at",
1403
+ "isExpression": false,
1404
+ "asc": true,
1405
+ "nulls": "last"
1406
+ }
1407
+ ],
1408
+ "isUnique": false,
1409
+ "concurrently": false,
1410
+ "method": "btree",
1411
+ "with": {}
1412
+ },
1413
+ "wallet_transaction_wallet_id_type_status_idx": {
1414
+ "name": "wallet_transaction_wallet_id_type_status_idx",
1415
+ "columns": [
1416
+ {
1417
+ "expression": "wallet_id",
1418
+ "isExpression": false,
1419
+ "asc": true,
1420
+ "nulls": "last"
1421
+ },
1422
+ {
1423
+ "expression": "type",
1424
+ "isExpression": false,
1425
+ "asc": true,
1426
+ "nulls": "last"
1427
+ },
1428
+ {
1429
+ "expression": "status",
1430
+ "isExpression": false,
1431
+ "asc": true,
1432
+ "nulls": "last"
1433
+ }
1434
+ ],
1435
+ "isUnique": false,
1436
+ "concurrently": false,
1437
+ "method": "btree",
1438
+ "with": {}
1439
+ },
1440
+ "wallet_transaction_provider_ref_id_idx": {
1441
+ "name": "wallet_transaction_provider_ref_id_idx",
1442
+ "columns": [
1443
+ {
1444
+ "expression": "provider_ref_id",
1445
+ "isExpression": false,
1446
+ "asc": true,
1447
+ "nulls": "last"
1448
+ }
1449
+ ],
1450
+ "isUnique": true,
1451
+ "where": "\"wallet_transaction\".\"provider_ref_id\" IS NOT NULL",
1452
+ "concurrently": false,
1453
+ "method": "btree",
1454
+ "with": {}
1455
+ },
1456
+ "wallet_transaction_wallet_id_idempotency_key_idx": {
1457
+ "name": "wallet_transaction_wallet_id_idempotency_key_idx",
1458
+ "columns": [
1459
+ {
1460
+ "expression": "wallet_id",
1461
+ "isExpression": false,
1462
+ "asc": true,
1463
+ "nulls": "last"
1464
+ },
1465
+ {
1466
+ "expression": "idempotency_key",
1467
+ "isExpression": false,
1468
+ "asc": true,
1469
+ "nulls": "last"
1470
+ }
1471
+ ],
1472
+ "isUnique": true,
1473
+ "where": "\"wallet_transaction\".\"idempotency_key\" IS NOT NULL",
1474
+ "concurrently": false,
1475
+ "method": "btree",
1476
+ "with": {}
1477
+ }
1478
+ },
1479
+ "foreignKeys": {
1480
+ "wallet_transaction_wallet_id_wallet_id_fk": {
1481
+ "name": "wallet_transaction_wallet_id_wallet_id_fk",
1482
+ "tableFrom": "wallet_transaction",
1483
+ "tableTo": "wallet",
1484
+ "columnsFrom": ["wallet_id"],
1485
+ "columnsTo": ["id"],
1486
+ "onDelete": "no action",
1487
+ "onUpdate": "no action"
1488
+ }
1489
+ },
1490
+ "compositePrimaryKeys": {},
1491
+ "uniqueConstraints": {},
1492
+ "policies": {},
1493
+ "checkConstraints": {},
1494
+ "isRLSEnabled": false
1495
+ },
1496
+ "public.wallet_withdrawal_address": {
1497
+ "name": "wallet_withdrawal_address",
1498
+ "schema": "",
1499
+ "columns": {
1500
+ "id": {
1501
+ "name": "id",
1502
+ "type": "uuid",
1503
+ "primaryKey": true,
1504
+ "notNull": true,
1505
+ "default": "gen_random_uuid()"
1506
+ },
1507
+ "user_id": {
1508
+ "name": "user_id",
1509
+ "type": "uuid",
1510
+ "primaryKey": false,
1511
+ "notNull": true
1512
+ },
1513
+ "label": {
1514
+ "name": "label",
1515
+ "type": "text",
1516
+ "primaryKey": false,
1517
+ "notNull": true
1518
+ },
1519
+ "currency": {
1520
+ "name": "currency",
1521
+ "type": "text",
1522
+ "primaryKey": false,
1523
+ "notNull": true
1524
+ },
1525
+ "network": {
1526
+ "name": "network",
1527
+ "type": "text",
1528
+ "primaryKey": false,
1529
+ "notNull": true
1530
+ },
1531
+ "address": {
1532
+ "name": "address",
1533
+ "type": "text",
1534
+ "primaryKey": false,
1535
+ "notNull": true
1536
+ },
1537
+ "created_at": {
1538
+ "name": "created_at",
1539
+ "type": "timestamp with time zone",
1540
+ "primaryKey": false,
1541
+ "notNull": true,
1542
+ "default": "now()"
1543
+ }
1544
+ },
1545
+ "indexes": {
1546
+ "wallet_withdrawal_address_user_id_currency_network_address_idx": {
1547
+ "name": "wallet_withdrawal_address_user_id_currency_network_address_idx",
1548
+ "columns": [
1549
+ {
1550
+ "expression": "user_id",
1551
+ "isExpression": false,
1552
+ "asc": true,
1553
+ "nulls": "last"
1554
+ },
1555
+ {
1556
+ "expression": "currency",
1557
+ "isExpression": false,
1558
+ "asc": true,
1559
+ "nulls": "last"
1560
+ },
1561
+ {
1562
+ "expression": "network",
1563
+ "isExpression": false,
1564
+ "asc": true,
1565
+ "nulls": "last"
1566
+ },
1567
+ {
1568
+ "expression": "address",
1569
+ "isExpression": false,
1570
+ "asc": true,
1571
+ "nulls": "last"
1572
+ }
1573
+ ],
1574
+ "isUnique": true,
1575
+ "concurrently": false,
1576
+ "method": "btree",
1577
+ "with": {}
1578
+ },
1579
+ "wallet_withdrawal_address_user_id_created_at_idx": {
1580
+ "name": "wallet_withdrawal_address_user_id_created_at_idx",
1581
+ "columns": [
1582
+ {
1583
+ "expression": "user_id",
1584
+ "isExpression": false,
1585
+ "asc": true,
1586
+ "nulls": "last"
1587
+ },
1588
+ {
1589
+ "expression": "created_at",
1590
+ "isExpression": false,
1591
+ "asc": true,
1592
+ "nulls": "last"
1593
+ }
1594
+ ],
1595
+ "isUnique": false,
1596
+ "concurrently": false,
1597
+ "method": "btree",
1598
+ "with": {}
1599
+ }
1600
+ },
1601
+ "foreignKeys": {},
1602
+ "compositePrimaryKeys": {},
1603
+ "uniqueConstraints": {},
1604
+ "policies": {},
1605
+ "checkConstraints": {},
1606
+ "isRLSEnabled": false
1607
+ }
1608
+ },
1609
+ "enums": {
1610
+ "public.wallet_custody_sweep_status": {
1611
+ "name": "wallet_custody_sweep_status",
1612
+ "schema": "public",
1613
+ "values": ["pending", "processing", "completed", "failed", "unknown"]
1614
+ },
1615
+ "public.wallet_job_run_status": {
1616
+ "name": "wallet_job_run_status",
1617
+ "schema": "public",
1618
+ "values": ["running", "completed", "failed", "abandoned"]
1619
+ },
1620
+ "public.wallet_rail": {
1621
+ "name": "wallet_rail",
1622
+ "schema": "public",
1623
+ "values": ["crypto", "fiat"]
1624
+ },
1625
+ "public.wallet_reconciliation_finding_kind": {
1626
+ "name": "wallet_reconciliation_finding_kind",
1627
+ "schema": "public",
1628
+ "values": [
1629
+ "missing_deposit",
1630
+ "unattributed_deposit",
1631
+ "amount_mismatch",
1632
+ "currency_mismatch",
1633
+ "status_mismatch",
1634
+ "unknown_at_provider",
1635
+ "unconfigured_asset",
1636
+ "stuck_sweep"
1637
+ ]
1638
+ },
1639
+ "public.wallet_reconciliation_finding_status": {
1640
+ "name": "wallet_reconciliation_finding_status",
1641
+ "schema": "public",
1642
+ "values": ["open", "resolved"]
1643
+ },
1644
+ "public.wallet_transaction_status": {
1645
+ "name": "wallet_transaction_status",
1646
+ "schema": "public",
1647
+ "values": ["pending", "processing", "completed", "failed", "rejected", "on_hold", "cancelled"]
1648
+ },
1649
+ "public.wallet_transaction_type": {
1650
+ "name": "wallet_transaction_type",
1651
+ "schema": "public",
1652
+ "values": [
1653
+ "deposit",
1654
+ "withdrawal",
1655
+ "bet",
1656
+ "win",
1657
+ "loss",
1658
+ "bonus",
1659
+ "tip",
1660
+ "gift",
1661
+ "rain",
1662
+ "manual_credit",
1663
+ "manual_debit"
1664
+ ]
1665
+ }
1666
+ },
1667
+ "schemas": {},
1668
+ "sequences": {},
1669
+ "roles": {},
1670
+ "policies": {},
1671
+ "views": {},
1672
+ "_meta": {
1673
+ "columns": {},
1674
+ "schemas": {},
1675
+ "tables": {}
1676
+ }
1677
+ }