@openora/core 0.4.1-canary.150 → 0.4.1-canary.151

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 (67) hide show
  1. package/dist/.tsbuildinfo +1 -1
  2. package/dist/admin-console/plugin.d.ts +1 -0
  3. package/dist/admin-console/plugin.d.ts.map +1 -1
  4. package/dist/analytics/plugin.d.ts +1 -0
  5. package/dist/analytics/plugin.d.ts.map +1 -1
  6. package/dist/audit/plugin.d.ts +1 -0
  7. package/dist/audit/plugin.d.ts.map +1 -1
  8. package/dist/casino/gaming/plugin.d.ts +1 -0
  9. package/dist/casino/gaming/plugin.d.ts.map +1 -1
  10. package/dist/casino/lobby/plugin.d.ts +1 -0
  11. package/dist/casino/lobby/plugin.d.ts.map +1 -1
  12. package/dist/cms/plugin.d.ts +1 -0
  13. package/dist/cms/plugin.d.ts.map +1 -1
  14. package/dist/compliance/plugin.d.ts +1 -0
  15. package/dist/compliance/plugin.d.ts.map +1 -1
  16. package/dist/contracts/schemas/platform-config.d.ts +3 -0
  17. package/dist/contracts/schemas/platform-config.d.ts.map +1 -1
  18. package/dist/contracts/schemas/platform-config.js +8 -0
  19. package/dist/contracts/schemas/platform-config.js.map +1 -1
  20. package/dist/contracts/schemas/wallet-tx.d.ts +2 -1
  21. package/dist/contracts/schemas/wallet-tx.d.ts.map +1 -1
  22. package/dist/contracts/schemas/wallet-tx.js +1 -0
  23. package/dist/contracts/schemas/wallet-tx.js.map +1 -1
  24. package/dist/engagement/chat/plugin.d.ts +1 -0
  25. package/dist/engagement/chat/plugin.d.ts.map +1 -1
  26. package/dist/engagement/chat-commands/plugin.d.ts +1 -0
  27. package/dist/engagement/chat-commands/plugin.d.ts.map +1 -1
  28. package/dist/engagement/notifications/plugin.d.ts +1 -0
  29. package/dist/engagement/notifications/plugin.d.ts.map +1 -1
  30. package/dist/engagement/social/plugin.d.ts +1 -0
  31. package/dist/engagement/social/plugin.d.ts.map +1 -1
  32. package/dist/fx/exchange-rate/plugin.d.ts +1 -0
  33. package/dist/fx/exchange-rate/plugin.d.ts.map +1 -1
  34. package/dist/iam/plugin.d.ts +1 -0
  35. package/dist/iam/plugin.d.ts.map +1 -1
  36. package/dist/mail/plugin.d.ts +1 -0
  37. package/dist/mail/plugin.d.ts.map +1 -1
  38. package/dist/pam/identity/plugin.d.ts +1 -0
  39. package/dist/pam/identity/plugin.d.ts.map +1 -1
  40. package/dist/pam/player-management/plugin.d.ts +1 -0
  41. package/dist/pam/player-management/plugin.d.ts.map +1 -1
  42. package/dist/pam/player-note/plugin.d.ts +1 -0
  43. package/dist/pam/player-note/plugin.d.ts.map +1 -1
  44. package/dist/pam/profile/plugin.d.ts +1 -0
  45. package/dist/pam/profile/plugin.d.ts.map +1 -1
  46. package/dist/pam/tag/plugin.d.ts +1 -0
  47. package/dist/pam/tag/plugin.d.ts.map +1 -1
  48. package/dist/server/runtime/core-token-catalog.d.ts +1 -0
  49. package/dist/server/runtime/core-token-catalog.d.ts.map +1 -1
  50. package/dist/wallet/__tests__/reconciliation.service.int.test.js +88 -0
  51. package/dist/wallet/__tests__/reconciliation.service.int.test.js.map +1 -1
  52. package/dist/wallet/contract/index.d.ts +5 -0
  53. package/dist/wallet/contract/index.d.ts.map +1 -1
  54. package/dist/wallet/drizzle/migrations/0022_natural_exodus.sql +1 -0
  55. package/dist/wallet/drizzle/migrations/meta/0022_snapshot.json +1987 -0
  56. package/dist/wallet/drizzle/migrations/meta/_journal.json +7 -0
  57. package/dist/wallet/plugin.d.ts +1 -0
  58. package/dist/wallet/plugin.d.ts.map +1 -1
  59. package/dist/wallet/router/index.d.ts +3 -0
  60. package/dist/wallet/router/index.d.ts.map +1 -1
  61. package/dist/wallet/schema/index.d.ts +4 -4
  62. package/dist/wallet/schema/index.d.ts.map +1 -1
  63. package/dist/wallet/service/reconciliation.service.d.ts +10 -1
  64. package/dist/wallet/service/reconciliation.service.d.ts.map +1 -1
  65. package/dist/wallet/service/reconciliation.service.js +93 -3
  66. package/dist/wallet/service/reconciliation.service.js.map +1 -1
  67. package/package.json +1 -1
@@ -0,0 +1,1987 @@
1
+ {
2
+ "id": "66cb94b1-6e45-4b2c-866e-92ba072730f4",
3
+ "prevId": "9e7f16a4-3d43-4efa-90d9-3493ef5a573a",
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_dust_threshold": {
183
+ "name": "sweep_dust_threshold",
184
+ "type": "numeric(38, 18)",
185
+ "primaryKey": false,
186
+ "notNull": false
187
+ },
188
+ "sweep_fee_ceiling": {
189
+ "name": "sweep_fee_ceiling",
190
+ "type": "numeric(38, 18)",
191
+ "primaryKey": false,
192
+ "notNull": false
193
+ },
194
+ "pool_liquidity_floor": {
195
+ "name": "pool_liquidity_floor",
196
+ "type": "numeric(38, 18)",
197
+ "primaryKey": false,
198
+ "notNull": false
199
+ },
200
+ "created_at": {
201
+ "name": "created_at",
202
+ "type": "timestamp with time zone",
203
+ "primaryKey": false,
204
+ "notNull": true,
205
+ "default": "now()"
206
+ },
207
+ "updated_at": {
208
+ "name": "updated_at",
209
+ "type": "timestamp with time zone",
210
+ "primaryKey": false,
211
+ "notNull": true,
212
+ "default": "now()"
213
+ }
214
+ },
215
+ "indexes": {
216
+ "wallet_asset_currency_network_idx": {
217
+ "name": "wallet_asset_currency_network_idx",
218
+ "columns": [
219
+ {
220
+ "expression": "currency",
221
+ "isExpression": false,
222
+ "asc": true,
223
+ "nulls": "last"
224
+ },
225
+ {
226
+ "expression": "network",
227
+ "isExpression": false,
228
+ "asc": true,
229
+ "nulls": "last"
230
+ }
231
+ ],
232
+ "isUnique": true,
233
+ "concurrently": false,
234
+ "method": "btree",
235
+ "with": {}
236
+ }
237
+ },
238
+ "foreignKeys": {},
239
+ "compositePrimaryKeys": {},
240
+ "uniqueConstraints": {},
241
+ "policies": {},
242
+ "checkConstraints": {},
243
+ "isRLSEnabled": false
244
+ },
245
+ "public.wallet_auto_withdrawal_config": {
246
+ "name": "wallet_auto_withdrawal_config",
247
+ "schema": "",
248
+ "columns": {
249
+ "id": {
250
+ "name": "id",
251
+ "type": "uuid",
252
+ "primaryKey": true,
253
+ "notNull": true,
254
+ "default": "gen_random_uuid()"
255
+ },
256
+ "singleton_key": {
257
+ "name": "singleton_key",
258
+ "type": "text",
259
+ "primaryKey": false,
260
+ "notNull": true,
261
+ "default": "'global'"
262
+ },
263
+ "fiat_threshold": {
264
+ "name": "fiat_threshold",
265
+ "type": "numeric(38, 18)",
266
+ "primaryKey": false,
267
+ "notNull": true
268
+ },
269
+ "crypto_threshold": {
270
+ "name": "crypto_threshold",
271
+ "type": "numeric(38, 18)",
272
+ "primaryKey": false,
273
+ "notNull": true
274
+ },
275
+ "exclude_risk_flags": {
276
+ "name": "exclude_risk_flags",
277
+ "type": "text[]",
278
+ "primaryKey": false,
279
+ "notNull": true,
280
+ "default": "ARRAY['high_risk','bonus_abuser','kyc_rejected','withdrawal_review','multi_account']::text[]"
281
+ },
282
+ "updated_by": {
283
+ "name": "updated_by",
284
+ "type": "uuid",
285
+ "primaryKey": false,
286
+ "notNull": false
287
+ },
288
+ "updated_at": {
289
+ "name": "updated_at",
290
+ "type": "timestamp with time zone",
291
+ "primaryKey": false,
292
+ "notNull": true
293
+ },
294
+ "created_at": {
295
+ "name": "created_at",
296
+ "type": "timestamp with time zone",
297
+ "primaryKey": false,
298
+ "notNull": true,
299
+ "default": "now()"
300
+ }
301
+ },
302
+ "indexes": {},
303
+ "foreignKeys": {},
304
+ "compositePrimaryKeys": {},
305
+ "uniqueConstraints": {
306
+ "wallet_auto_withdrawal_config_singletonKey_unique": {
307
+ "name": "wallet_auto_withdrawal_config_singletonKey_unique",
308
+ "nullsNotDistinct": false,
309
+ "columns": ["singleton_key"]
310
+ }
311
+ },
312
+ "policies": {},
313
+ "checkConstraints": {},
314
+ "isRLSEnabled": false
315
+ },
316
+ "public.wallet_balance": {
317
+ "name": "wallet_balance",
318
+ "schema": "",
319
+ "columns": {
320
+ "id": {
321
+ "name": "id",
322
+ "type": "uuid",
323
+ "primaryKey": true,
324
+ "notNull": true,
325
+ "default": "gen_random_uuid()"
326
+ },
327
+ "wallet_id": {
328
+ "name": "wallet_id",
329
+ "type": "uuid",
330
+ "primaryKey": false,
331
+ "notNull": true
332
+ },
333
+ "currency": {
334
+ "name": "currency",
335
+ "type": "text",
336
+ "primaryKey": false,
337
+ "notNull": true
338
+ },
339
+ "amount": {
340
+ "name": "amount",
341
+ "type": "numeric(38, 18)",
342
+ "primaryKey": false,
343
+ "notNull": true,
344
+ "default": "'0'"
345
+ },
346
+ "created_at": {
347
+ "name": "created_at",
348
+ "type": "timestamp with time zone",
349
+ "primaryKey": false,
350
+ "notNull": true,
351
+ "default": "now()"
352
+ },
353
+ "updated_at": {
354
+ "name": "updated_at",
355
+ "type": "timestamp with time zone",
356
+ "primaryKey": false,
357
+ "notNull": true,
358
+ "default": "now()"
359
+ }
360
+ },
361
+ "indexes": {
362
+ "wallet_balance_wallet_id_currency_idx": {
363
+ "name": "wallet_balance_wallet_id_currency_idx",
364
+ "columns": [
365
+ {
366
+ "expression": "wallet_id",
367
+ "isExpression": false,
368
+ "asc": true,
369
+ "nulls": "last"
370
+ },
371
+ {
372
+ "expression": "currency",
373
+ "isExpression": false,
374
+ "asc": true,
375
+ "nulls": "last"
376
+ }
377
+ ],
378
+ "isUnique": true,
379
+ "concurrently": false,
380
+ "method": "btree",
381
+ "with": {}
382
+ }
383
+ },
384
+ "foreignKeys": {
385
+ "wallet_balance_wallet_id_wallet_id_fk": {
386
+ "name": "wallet_balance_wallet_id_wallet_id_fk",
387
+ "tableFrom": "wallet_balance",
388
+ "tableTo": "wallet",
389
+ "columnsFrom": ["wallet_id"],
390
+ "columnsTo": ["id"],
391
+ "onDelete": "no action",
392
+ "onUpdate": "no action"
393
+ }
394
+ },
395
+ "compositePrimaryKeys": {},
396
+ "uniqueConstraints": {},
397
+ "policies": {},
398
+ "checkConstraints": {},
399
+ "isRLSEnabled": false
400
+ },
401
+ "public.wallet_bonus_credit": {
402
+ "name": "wallet_bonus_credit",
403
+ "schema": "",
404
+ "columns": {
405
+ "id": {
406
+ "name": "id",
407
+ "type": "uuid",
408
+ "primaryKey": true,
409
+ "notNull": true,
410
+ "default": "gen_random_uuid()"
411
+ },
412
+ "wallet_id": {
413
+ "name": "wallet_id",
414
+ "type": "uuid",
415
+ "primaryKey": false,
416
+ "notNull": true
417
+ },
418
+ "user_id": {
419
+ "name": "user_id",
420
+ "type": "uuid",
421
+ "primaryKey": false,
422
+ "notNull": true
423
+ },
424
+ "currency": {
425
+ "name": "currency",
426
+ "type": "text",
427
+ "primaryKey": false,
428
+ "notNull": true
429
+ },
430
+ "source_type": {
431
+ "name": "source_type",
432
+ "type": "wallet_bonus_credit_source_type",
433
+ "typeSchema": "public",
434
+ "primaryKey": false,
435
+ "notNull": true
436
+ },
437
+ "credited_amount": {
438
+ "name": "credited_amount",
439
+ "type": "numeric(38, 18)",
440
+ "primaryKey": false,
441
+ "notNull": true
442
+ },
443
+ "rollover_multiplier": {
444
+ "name": "rollover_multiplier",
445
+ "type": "numeric(38, 18)",
446
+ "primaryKey": false,
447
+ "notNull": true
448
+ },
449
+ "rollover_required": {
450
+ "name": "rollover_required",
451
+ "type": "numeric(38, 18)",
452
+ "primaryKey": false,
453
+ "notNull": true
454
+ },
455
+ "rollover_progress": {
456
+ "name": "rollover_progress",
457
+ "type": "numeric(38, 18)",
458
+ "primaryKey": false,
459
+ "notNull": true,
460
+ "default": "'0'"
461
+ },
462
+ "status": {
463
+ "name": "status",
464
+ "type": "wallet_bonus_credit_status",
465
+ "typeSchema": "public",
466
+ "primaryKey": false,
467
+ "notNull": true,
468
+ "default": "'active'"
469
+ },
470
+ "created_at": {
471
+ "name": "created_at",
472
+ "type": "timestamp with time zone",
473
+ "primaryKey": false,
474
+ "notNull": true,
475
+ "default": "now()"
476
+ },
477
+ "completed_at": {
478
+ "name": "completed_at",
479
+ "type": "timestamp with time zone",
480
+ "primaryKey": false,
481
+ "notNull": false
482
+ }
483
+ },
484
+ "indexes": {
485
+ "wallet_bonus_credit_user_id_currency_status_idx": {
486
+ "name": "wallet_bonus_credit_user_id_currency_status_idx",
487
+ "columns": [
488
+ {
489
+ "expression": "user_id",
490
+ "isExpression": false,
491
+ "asc": true,
492
+ "nulls": "last"
493
+ },
494
+ {
495
+ "expression": "currency",
496
+ "isExpression": false,
497
+ "asc": true,
498
+ "nulls": "last"
499
+ },
500
+ {
501
+ "expression": "status",
502
+ "isExpression": false,
503
+ "asc": true,
504
+ "nulls": "last"
505
+ }
506
+ ],
507
+ "isUnique": false,
508
+ "concurrently": false,
509
+ "method": "btree",
510
+ "with": {}
511
+ },
512
+ "wallet_bonus_credit_wallet_id_idx": {
513
+ "name": "wallet_bonus_credit_wallet_id_idx",
514
+ "columns": [
515
+ {
516
+ "expression": "wallet_id",
517
+ "isExpression": false,
518
+ "asc": true,
519
+ "nulls": "last"
520
+ }
521
+ ],
522
+ "isUnique": false,
523
+ "concurrently": false,
524
+ "method": "btree",
525
+ "with": {}
526
+ }
527
+ },
528
+ "foreignKeys": {
529
+ "wallet_bonus_credit_wallet_id_wallet_id_fk": {
530
+ "name": "wallet_bonus_credit_wallet_id_wallet_id_fk",
531
+ "tableFrom": "wallet_bonus_credit",
532
+ "tableTo": "wallet",
533
+ "columnsFrom": ["wallet_id"],
534
+ "columnsTo": ["id"],
535
+ "onDelete": "no action",
536
+ "onUpdate": "no action"
537
+ }
538
+ },
539
+ "compositePrimaryKeys": {},
540
+ "uniqueConstraints": {},
541
+ "policies": {},
542
+ "checkConstraints": {},
543
+ "isRLSEnabled": false
544
+ },
545
+ "public.wallet_bonus_rollover_config": {
546
+ "name": "wallet_bonus_rollover_config",
547
+ "schema": "",
548
+ "columns": {
549
+ "id": {
550
+ "name": "id",
551
+ "type": "uuid",
552
+ "primaryKey": true,
553
+ "notNull": true,
554
+ "default": "gen_random_uuid()"
555
+ },
556
+ "singleton_key": {
557
+ "name": "singleton_key",
558
+ "type": "text",
559
+ "primaryKey": false,
560
+ "notNull": true,
561
+ "default": "'global'"
562
+ },
563
+ "multiplier": {
564
+ "name": "multiplier",
565
+ "type": "numeric(38, 18)",
566
+ "primaryKey": false,
567
+ "notNull": true
568
+ },
569
+ "updated_by": {
570
+ "name": "updated_by",
571
+ "type": "uuid",
572
+ "primaryKey": false,
573
+ "notNull": false
574
+ },
575
+ "updated_at": {
576
+ "name": "updated_at",
577
+ "type": "timestamp with time zone",
578
+ "primaryKey": false,
579
+ "notNull": true
580
+ },
581
+ "created_at": {
582
+ "name": "created_at",
583
+ "type": "timestamp with time zone",
584
+ "primaryKey": false,
585
+ "notNull": true,
586
+ "default": "now()"
587
+ }
588
+ },
589
+ "indexes": {},
590
+ "foreignKeys": {},
591
+ "compositePrimaryKeys": {},
592
+ "uniqueConstraints": {
593
+ "wallet_bonus_rollover_config_singletonKey_unique": {
594
+ "name": "wallet_bonus_rollover_config_singletonKey_unique",
595
+ "nullsNotDistinct": false,
596
+ "columns": ["singleton_key"]
597
+ }
598
+ },
599
+ "policies": {},
600
+ "checkConstraints": {},
601
+ "isRLSEnabled": false
602
+ },
603
+ "public.wallet_custody_sweep": {
604
+ "name": "wallet_custody_sweep",
605
+ "schema": "",
606
+ "columns": {
607
+ "id": {
608
+ "name": "id",
609
+ "type": "uuid",
610
+ "primaryKey": true,
611
+ "notNull": true,
612
+ "default": "gen_random_uuid()"
613
+ },
614
+ "user_id": {
615
+ "name": "user_id",
616
+ "type": "uuid",
617
+ "primaryKey": false,
618
+ "notNull": true
619
+ },
620
+ "provider_name": {
621
+ "name": "provider_name",
622
+ "type": "text",
623
+ "primaryKey": false,
624
+ "notNull": true
625
+ },
626
+ "currency": {
627
+ "name": "currency",
628
+ "type": "text",
629
+ "primaryKey": false,
630
+ "notNull": true
631
+ },
632
+ "network": {
633
+ "name": "network",
634
+ "type": "text",
635
+ "primaryKey": false,
636
+ "notNull": true
637
+ },
638
+ "amount": {
639
+ "name": "amount",
640
+ "type": "numeric(38, 18)",
641
+ "primaryKey": false,
642
+ "notNull": true
643
+ },
644
+ "estimated_fee": {
645
+ "name": "estimated_fee",
646
+ "type": "numeric(38, 18)",
647
+ "primaryKey": false,
648
+ "notNull": true
649
+ },
650
+ "external_id": {
651
+ "name": "external_id",
652
+ "type": "text",
653
+ "primaryKey": false,
654
+ "notNull": false
655
+ },
656
+ "pool_ref": {
657
+ "name": "pool_ref",
658
+ "type": "text",
659
+ "primaryKey": false,
660
+ "notNull": false
661
+ },
662
+ "tx_hash": {
663
+ "name": "tx_hash",
664
+ "type": "text",
665
+ "primaryKey": false,
666
+ "notNull": false
667
+ },
668
+ "status": {
669
+ "name": "status",
670
+ "type": "wallet_custody_sweep_status",
671
+ "typeSchema": "public",
672
+ "primaryKey": false,
673
+ "notNull": true,
674
+ "default": "'pending'"
675
+ },
676
+ "run_id": {
677
+ "name": "run_id",
678
+ "type": "uuid",
679
+ "primaryKey": false,
680
+ "notNull": false
681
+ },
682
+ "created_at": {
683
+ "name": "created_at",
684
+ "type": "timestamp with time zone",
685
+ "primaryKey": false,
686
+ "notNull": true,
687
+ "default": "now()"
688
+ },
689
+ "updated_at": {
690
+ "name": "updated_at",
691
+ "type": "timestamp with time zone",
692
+ "primaryKey": false,
693
+ "notNull": true,
694
+ "default": "now()"
695
+ }
696
+ },
697
+ "indexes": {
698
+ "wallet_custody_sweep_user_id_currency_network_idx": {
699
+ "name": "wallet_custody_sweep_user_id_currency_network_idx",
700
+ "columns": [
701
+ {
702
+ "expression": "user_id",
703
+ "isExpression": false,
704
+ "asc": true,
705
+ "nulls": "last"
706
+ },
707
+ {
708
+ "expression": "currency",
709
+ "isExpression": false,
710
+ "asc": true,
711
+ "nulls": "last"
712
+ },
713
+ {
714
+ "expression": "network",
715
+ "isExpression": false,
716
+ "asc": true,
717
+ "nulls": "last"
718
+ }
719
+ ],
720
+ "isUnique": true,
721
+ "where": "status IN ('pending','processing','unknown')",
722
+ "concurrently": false,
723
+ "method": "btree",
724
+ "with": {}
725
+ },
726
+ "wallet_custody_sweep_external_id_idx": {
727
+ "name": "wallet_custody_sweep_external_id_idx",
728
+ "columns": [
729
+ {
730
+ "expression": "external_id",
731
+ "isExpression": false,
732
+ "asc": true,
733
+ "nulls": "last"
734
+ }
735
+ ],
736
+ "isUnique": true,
737
+ "where": "\"wallet_custody_sweep\".\"external_id\" IS NOT NULL",
738
+ "concurrently": false,
739
+ "method": "btree",
740
+ "with": {}
741
+ },
742
+ "wallet_custody_sweep_status_created_at_idx": {
743
+ "name": "wallet_custody_sweep_status_created_at_idx",
744
+ "columns": [
745
+ {
746
+ "expression": "status",
747
+ "isExpression": false,
748
+ "asc": true,
749
+ "nulls": "last"
750
+ },
751
+ {
752
+ "expression": "created_at",
753
+ "isExpression": false,
754
+ "asc": true,
755
+ "nulls": "last"
756
+ }
757
+ ],
758
+ "isUnique": false,
759
+ "concurrently": false,
760
+ "method": "btree",
761
+ "with": {}
762
+ },
763
+ "wallet_custody_sweep_provider_name_created_at_idx": {
764
+ "name": "wallet_custody_sweep_provider_name_created_at_idx",
765
+ "columns": [
766
+ {
767
+ "expression": "provider_name",
768
+ "isExpression": false,
769
+ "asc": true,
770
+ "nulls": "last"
771
+ },
772
+ {
773
+ "expression": "created_at",
774
+ "isExpression": false,
775
+ "asc": true,
776
+ "nulls": "last"
777
+ }
778
+ ],
779
+ "isUnique": false,
780
+ "concurrently": false,
781
+ "method": "btree",
782
+ "with": {}
783
+ }
784
+ },
785
+ "foreignKeys": {},
786
+ "compositePrimaryKeys": {},
787
+ "uniqueConstraints": {},
788
+ "policies": {},
789
+ "checkConstraints": {},
790
+ "isRLSEnabled": false
791
+ },
792
+ "public.wallet_deposit_address": {
793
+ "name": "wallet_deposit_address",
794
+ "schema": "",
795
+ "columns": {
796
+ "id": {
797
+ "name": "id",
798
+ "type": "uuid",
799
+ "primaryKey": true,
800
+ "notNull": true,
801
+ "default": "gen_random_uuid()"
802
+ },
803
+ "user_id": {
804
+ "name": "user_id",
805
+ "type": "uuid",
806
+ "primaryKey": false,
807
+ "notNull": true
808
+ },
809
+ "currency": {
810
+ "name": "currency",
811
+ "type": "text",
812
+ "primaryKey": false,
813
+ "notNull": true
814
+ },
815
+ "network": {
816
+ "name": "network",
817
+ "type": "text",
818
+ "primaryKey": false,
819
+ "notNull": false
820
+ },
821
+ "address": {
822
+ "name": "address",
823
+ "type": "text",
824
+ "primaryKey": false,
825
+ "notNull": true
826
+ },
827
+ "tag": {
828
+ "name": "tag",
829
+ "type": "text",
830
+ "primaryKey": false,
831
+ "notNull": false
832
+ },
833
+ "provider_name": {
834
+ "name": "provider_name",
835
+ "type": "text",
836
+ "primaryKey": false,
837
+ "notNull": true
838
+ },
839
+ "created_at": {
840
+ "name": "created_at",
841
+ "type": "timestamp with time zone",
842
+ "primaryKey": false,
843
+ "notNull": true,
844
+ "default": "now()"
845
+ }
846
+ },
847
+ "indexes": {
848
+ "wallet_deposit_address_user_id_currency_network_idx": {
849
+ "name": "wallet_deposit_address_user_id_currency_network_idx",
850
+ "columns": [
851
+ {
852
+ "expression": "user_id",
853
+ "isExpression": false,
854
+ "asc": true,
855
+ "nulls": "last"
856
+ },
857
+ {
858
+ "expression": "currency",
859
+ "isExpression": false,
860
+ "asc": true,
861
+ "nulls": "last"
862
+ },
863
+ {
864
+ "expression": "network",
865
+ "isExpression": false,
866
+ "asc": true,
867
+ "nulls": "last"
868
+ }
869
+ ],
870
+ "isUnique": true,
871
+ "where": "\"wallet_deposit_address\".\"network\" IS NOT NULL",
872
+ "concurrently": false,
873
+ "method": "btree",
874
+ "with": {}
875
+ },
876
+ "wallet_deposit_address_user_id_currency_idx": {
877
+ "name": "wallet_deposit_address_user_id_currency_idx",
878
+ "columns": [
879
+ {
880
+ "expression": "user_id",
881
+ "isExpression": false,
882
+ "asc": true,
883
+ "nulls": "last"
884
+ },
885
+ {
886
+ "expression": "currency",
887
+ "isExpression": false,
888
+ "asc": true,
889
+ "nulls": "last"
890
+ }
891
+ ],
892
+ "isUnique": true,
893
+ "where": "\"wallet_deposit_address\".\"network\" IS NULL",
894
+ "concurrently": false,
895
+ "method": "btree",
896
+ "with": {}
897
+ },
898
+ "wallet_deposit_address_address_tag_idx": {
899
+ "name": "wallet_deposit_address_address_tag_idx",
900
+ "columns": [
901
+ {
902
+ "expression": "address",
903
+ "isExpression": false,
904
+ "asc": true,
905
+ "nulls": "last"
906
+ },
907
+ {
908
+ "expression": "tag",
909
+ "isExpression": false,
910
+ "asc": true,
911
+ "nulls": "last"
912
+ }
913
+ ],
914
+ "isUnique": true,
915
+ "where": "\"wallet_deposit_address\".\"tag\" IS NOT NULL",
916
+ "concurrently": false,
917
+ "method": "btree",
918
+ "with": {}
919
+ },
920
+ "wallet_deposit_address_address_network_currency_idx": {
921
+ "name": "wallet_deposit_address_address_network_currency_idx",
922
+ "columns": [
923
+ {
924
+ "expression": "address",
925
+ "isExpression": false,
926
+ "asc": true,
927
+ "nulls": "last"
928
+ },
929
+ {
930
+ "expression": "network",
931
+ "isExpression": false,
932
+ "asc": true,
933
+ "nulls": "last"
934
+ },
935
+ {
936
+ "expression": "currency",
937
+ "isExpression": false,
938
+ "asc": true,
939
+ "nulls": "last"
940
+ }
941
+ ],
942
+ "isUnique": true,
943
+ "where": "\"wallet_deposit_address\".\"tag\" IS NULL AND \"wallet_deposit_address\".\"network\" IS NOT NULL",
944
+ "concurrently": false,
945
+ "method": "btree",
946
+ "with": {}
947
+ },
948
+ "wallet_deposit_address_address_idx": {
949
+ "name": "wallet_deposit_address_address_idx",
950
+ "columns": [
951
+ {
952
+ "expression": "address",
953
+ "isExpression": false,
954
+ "asc": true,
955
+ "nulls": "last"
956
+ }
957
+ ],
958
+ "isUnique": false,
959
+ "concurrently": false,
960
+ "method": "btree",
961
+ "with": {}
962
+ }
963
+ },
964
+ "foreignKeys": {},
965
+ "compositePrimaryKeys": {},
966
+ "uniqueConstraints": {},
967
+ "policies": {},
968
+ "checkConstraints": {},
969
+ "isRLSEnabled": false
970
+ },
971
+ "public.wallet_job_run": {
972
+ "name": "wallet_job_run",
973
+ "schema": "",
974
+ "columns": {
975
+ "id": {
976
+ "name": "id",
977
+ "type": "uuid",
978
+ "primaryKey": true,
979
+ "notNull": true,
980
+ "default": "gen_random_uuid()"
981
+ },
982
+ "job_name": {
983
+ "name": "job_name",
984
+ "type": "text",
985
+ "primaryKey": false,
986
+ "notNull": true
987
+ },
988
+ "run_id": {
989
+ "name": "run_id",
990
+ "type": "uuid",
991
+ "primaryKey": false,
992
+ "notNull": true
993
+ },
994
+ "started_at": {
995
+ "name": "started_at",
996
+ "type": "timestamp with time zone",
997
+ "primaryKey": false,
998
+ "notNull": true,
999
+ "default": "now()"
1000
+ },
1001
+ "finished_at": {
1002
+ "name": "finished_at",
1003
+ "type": "timestamp with time zone",
1004
+ "primaryKey": false,
1005
+ "notNull": false
1006
+ },
1007
+ "status": {
1008
+ "name": "status",
1009
+ "type": "wallet_job_run_status",
1010
+ "typeSchema": "public",
1011
+ "primaryKey": false,
1012
+ "notNull": true,
1013
+ "default": "'running'"
1014
+ },
1015
+ "summary": {
1016
+ "name": "summary",
1017
+ "type": "jsonb",
1018
+ "primaryKey": false,
1019
+ "notNull": false
1020
+ },
1021
+ "created_at": {
1022
+ "name": "created_at",
1023
+ "type": "timestamp with time zone",
1024
+ "primaryKey": false,
1025
+ "notNull": true,
1026
+ "default": "now()"
1027
+ }
1028
+ },
1029
+ "indexes": {
1030
+ "wallet_job_run_job_name_idx": {
1031
+ "name": "wallet_job_run_job_name_idx",
1032
+ "columns": [
1033
+ {
1034
+ "expression": "job_name",
1035
+ "isExpression": false,
1036
+ "asc": true,
1037
+ "nulls": "last"
1038
+ }
1039
+ ],
1040
+ "isUnique": true,
1041
+ "where": "\"wallet_job_run\".\"finished_at\" IS NULL",
1042
+ "concurrently": false,
1043
+ "method": "btree",
1044
+ "with": {}
1045
+ },
1046
+ "wallet_job_run_job_name_started_at_idx": {
1047
+ "name": "wallet_job_run_job_name_started_at_idx",
1048
+ "columns": [
1049
+ {
1050
+ "expression": "job_name",
1051
+ "isExpression": false,
1052
+ "asc": true,
1053
+ "nulls": "last"
1054
+ },
1055
+ {
1056
+ "expression": "started_at",
1057
+ "isExpression": false,
1058
+ "asc": true,
1059
+ "nulls": "last"
1060
+ }
1061
+ ],
1062
+ "isUnique": false,
1063
+ "concurrently": false,
1064
+ "method": "btree",
1065
+ "with": {}
1066
+ }
1067
+ },
1068
+ "foreignKeys": {},
1069
+ "compositePrimaryKeys": {},
1070
+ "uniqueConstraints": {},
1071
+ "policies": {},
1072
+ "checkConstraints": {},
1073
+ "isRLSEnabled": false
1074
+ },
1075
+ "public.wallet_provider_vault": {
1076
+ "name": "wallet_provider_vault",
1077
+ "schema": "",
1078
+ "columns": {
1079
+ "id": {
1080
+ "name": "id",
1081
+ "type": "uuid",
1082
+ "primaryKey": true,
1083
+ "notNull": true,
1084
+ "default": "gen_random_uuid()"
1085
+ },
1086
+ "user_id": {
1087
+ "name": "user_id",
1088
+ "type": "uuid",
1089
+ "primaryKey": false,
1090
+ "notNull": true
1091
+ },
1092
+ "provider_name": {
1093
+ "name": "provider_name",
1094
+ "type": "text",
1095
+ "primaryKey": false,
1096
+ "notNull": true
1097
+ },
1098
+ "vault_account_id": {
1099
+ "name": "vault_account_id",
1100
+ "type": "text",
1101
+ "primaryKey": false,
1102
+ "notNull": true
1103
+ },
1104
+ "created_at": {
1105
+ "name": "created_at",
1106
+ "type": "timestamp with time zone",
1107
+ "primaryKey": false,
1108
+ "notNull": true,
1109
+ "default": "now()"
1110
+ }
1111
+ },
1112
+ "indexes": {
1113
+ "wallet_provider_vault_user_id_provider_name_idx": {
1114
+ "name": "wallet_provider_vault_user_id_provider_name_idx",
1115
+ "columns": [
1116
+ {
1117
+ "expression": "user_id",
1118
+ "isExpression": false,
1119
+ "asc": true,
1120
+ "nulls": "last"
1121
+ },
1122
+ {
1123
+ "expression": "provider_name",
1124
+ "isExpression": false,
1125
+ "asc": true,
1126
+ "nulls": "last"
1127
+ }
1128
+ ],
1129
+ "isUnique": true,
1130
+ "concurrently": false,
1131
+ "method": "btree",
1132
+ "with": {}
1133
+ },
1134
+ "wallet_provider_vault_provider_name_vault_account_id_idx": {
1135
+ "name": "wallet_provider_vault_provider_name_vault_account_id_idx",
1136
+ "columns": [
1137
+ {
1138
+ "expression": "provider_name",
1139
+ "isExpression": false,
1140
+ "asc": true,
1141
+ "nulls": "last"
1142
+ },
1143
+ {
1144
+ "expression": "vault_account_id",
1145
+ "isExpression": false,
1146
+ "asc": true,
1147
+ "nulls": "last"
1148
+ }
1149
+ ],
1150
+ "isUnique": true,
1151
+ "concurrently": false,
1152
+ "method": "btree",
1153
+ "with": {}
1154
+ }
1155
+ },
1156
+ "foreignKeys": {},
1157
+ "compositePrimaryKeys": {},
1158
+ "uniqueConstraints": {},
1159
+ "policies": {},
1160
+ "checkConstraints": {},
1161
+ "isRLSEnabled": false
1162
+ },
1163
+ "public.wallet_reconciliation_finding": {
1164
+ "name": "wallet_reconciliation_finding",
1165
+ "schema": "",
1166
+ "columns": {
1167
+ "id": {
1168
+ "name": "id",
1169
+ "type": "uuid",
1170
+ "primaryKey": true,
1171
+ "notNull": true,
1172
+ "default": "gen_random_uuid()"
1173
+ },
1174
+ "run_id": {
1175
+ "name": "run_id",
1176
+ "type": "uuid",
1177
+ "primaryKey": false,
1178
+ "notNull": true
1179
+ },
1180
+ "provider_name": {
1181
+ "name": "provider_name",
1182
+ "type": "text",
1183
+ "primaryKey": false,
1184
+ "notNull": true
1185
+ },
1186
+ "kind": {
1187
+ "name": "kind",
1188
+ "type": "wallet_reconciliation_finding_kind",
1189
+ "typeSchema": "public",
1190
+ "primaryKey": false,
1191
+ "notNull": true
1192
+ },
1193
+ "currency": {
1194
+ "name": "currency",
1195
+ "type": "text",
1196
+ "primaryKey": false,
1197
+ "notNull": false
1198
+ },
1199
+ "network": {
1200
+ "name": "network",
1201
+ "type": "text",
1202
+ "primaryKey": false,
1203
+ "notNull": false
1204
+ },
1205
+ "amount": {
1206
+ "name": "amount",
1207
+ "type": "numeric(38, 18)",
1208
+ "primaryKey": false,
1209
+ "notNull": false
1210
+ },
1211
+ "address": {
1212
+ "name": "address",
1213
+ "type": "text",
1214
+ "primaryKey": false,
1215
+ "notNull": false
1216
+ },
1217
+ "tag": {
1218
+ "name": "tag",
1219
+ "type": "text",
1220
+ "primaryKey": false,
1221
+ "notNull": false
1222
+ },
1223
+ "tx_hash": {
1224
+ "name": "tx_hash",
1225
+ "type": "text",
1226
+ "primaryKey": false,
1227
+ "notNull": false
1228
+ },
1229
+ "external_id": {
1230
+ "name": "external_id",
1231
+ "type": "text",
1232
+ "primaryKey": false,
1233
+ "notNull": false
1234
+ },
1235
+ "transaction_id": {
1236
+ "name": "transaction_id",
1237
+ "type": "uuid",
1238
+ "primaryKey": false,
1239
+ "notNull": false
1240
+ },
1241
+ "detail": {
1242
+ "name": "detail",
1243
+ "type": "text",
1244
+ "primaryKey": false,
1245
+ "notNull": false
1246
+ },
1247
+ "status": {
1248
+ "name": "status",
1249
+ "type": "wallet_reconciliation_finding_status",
1250
+ "typeSchema": "public",
1251
+ "primaryKey": false,
1252
+ "notNull": true,
1253
+ "default": "'open'"
1254
+ },
1255
+ "resolved_by": {
1256
+ "name": "resolved_by",
1257
+ "type": "uuid",
1258
+ "primaryKey": false,
1259
+ "notNull": false
1260
+ },
1261
+ "resolved_at": {
1262
+ "name": "resolved_at",
1263
+ "type": "timestamp with time zone",
1264
+ "primaryKey": false,
1265
+ "notNull": false
1266
+ },
1267
+ "resolution_note": {
1268
+ "name": "resolution_note",
1269
+ "type": "text",
1270
+ "primaryKey": false,
1271
+ "notNull": false
1272
+ },
1273
+ "created_at": {
1274
+ "name": "created_at",
1275
+ "type": "timestamp with time zone",
1276
+ "primaryKey": false,
1277
+ "notNull": true,
1278
+ "default": "now()"
1279
+ }
1280
+ },
1281
+ "indexes": {
1282
+ "wallet_reconciliation_finding_kind_provider_external_id_idx": {
1283
+ "name": "wallet_reconciliation_finding_kind_provider_external_id_idx",
1284
+ "columns": [
1285
+ {
1286
+ "expression": "kind",
1287
+ "isExpression": false,
1288
+ "asc": true,
1289
+ "nulls": "last"
1290
+ },
1291
+ {
1292
+ "expression": "provider_name",
1293
+ "isExpression": false,
1294
+ "asc": true,
1295
+ "nulls": "last"
1296
+ },
1297
+ {
1298
+ "expression": "external_id",
1299
+ "isExpression": false,
1300
+ "asc": true,
1301
+ "nulls": "last"
1302
+ }
1303
+ ],
1304
+ "isUnique": true,
1305
+ "where": "\"wallet_reconciliation_finding\".\"external_id\" IS NOT NULL",
1306
+ "concurrently": false,
1307
+ "method": "btree",
1308
+ "with": {}
1309
+ },
1310
+ "wallet_reconciliation_finding_status_created_at_idx": {
1311
+ "name": "wallet_reconciliation_finding_status_created_at_idx",
1312
+ "columns": [
1313
+ {
1314
+ "expression": "status",
1315
+ "isExpression": false,
1316
+ "asc": true,
1317
+ "nulls": "last"
1318
+ },
1319
+ {
1320
+ "expression": "created_at",
1321
+ "isExpression": false,
1322
+ "asc": true,
1323
+ "nulls": "last"
1324
+ }
1325
+ ],
1326
+ "isUnique": false,
1327
+ "concurrently": false,
1328
+ "method": "btree",
1329
+ "with": {}
1330
+ },
1331
+ "wallet_reconciliation_finding_run_id_idx": {
1332
+ "name": "wallet_reconciliation_finding_run_id_idx",
1333
+ "columns": [
1334
+ {
1335
+ "expression": "run_id",
1336
+ "isExpression": false,
1337
+ "asc": true,
1338
+ "nulls": "last"
1339
+ }
1340
+ ],
1341
+ "isUnique": false,
1342
+ "concurrently": false,
1343
+ "method": "btree",
1344
+ "with": {}
1345
+ }
1346
+ },
1347
+ "foreignKeys": {},
1348
+ "compositePrimaryKeys": {},
1349
+ "uniqueConstraints": {},
1350
+ "policies": {},
1351
+ "checkConstraints": {},
1352
+ "isRLSEnabled": false
1353
+ },
1354
+ "public.wallet_transaction": {
1355
+ "name": "wallet_transaction",
1356
+ "schema": "",
1357
+ "columns": {
1358
+ "id": {
1359
+ "name": "id",
1360
+ "type": "uuid",
1361
+ "primaryKey": true,
1362
+ "notNull": true,
1363
+ "default": "gen_random_uuid()"
1364
+ },
1365
+ "wallet_id": {
1366
+ "name": "wallet_id",
1367
+ "type": "uuid",
1368
+ "primaryKey": false,
1369
+ "notNull": true
1370
+ },
1371
+ "type": {
1372
+ "name": "type",
1373
+ "type": "wallet_transaction_type",
1374
+ "typeSchema": "public",
1375
+ "primaryKey": false,
1376
+ "notNull": true
1377
+ },
1378
+ "amount": {
1379
+ "name": "amount",
1380
+ "type": "numeric(38, 18)",
1381
+ "primaryKey": false,
1382
+ "notNull": true
1383
+ },
1384
+ "currency": {
1385
+ "name": "currency",
1386
+ "type": "text",
1387
+ "primaryKey": false,
1388
+ "notNull": true
1389
+ },
1390
+ "network": {
1391
+ "name": "network",
1392
+ "type": "text",
1393
+ "primaryKey": false,
1394
+ "notNull": false
1395
+ },
1396
+ "status": {
1397
+ "name": "status",
1398
+ "type": "wallet_transaction_status",
1399
+ "typeSchema": "public",
1400
+ "primaryKey": false,
1401
+ "notNull": true,
1402
+ "default": "'pending'"
1403
+ },
1404
+ "rail": {
1405
+ "name": "rail",
1406
+ "type": "wallet_rail",
1407
+ "typeSchema": "public",
1408
+ "primaryKey": false,
1409
+ "notNull": false
1410
+ },
1411
+ "direction": {
1412
+ "name": "direction",
1413
+ "type": "wallet_transaction_direction",
1414
+ "typeSchema": "public",
1415
+ "primaryKey": false,
1416
+ "notNull": false
1417
+ },
1418
+ "reviewed_by": {
1419
+ "name": "reviewed_by",
1420
+ "type": "uuid",
1421
+ "primaryKey": false,
1422
+ "notNull": false
1423
+ },
1424
+ "reviewed_at": {
1425
+ "name": "reviewed_at",
1426
+ "type": "timestamp with time zone",
1427
+ "primaryKey": false,
1428
+ "notNull": false
1429
+ },
1430
+ "review_reason": {
1431
+ "name": "review_reason",
1432
+ "type": "text",
1433
+ "primaryKey": false,
1434
+ "notNull": false
1435
+ },
1436
+ "auto_approval_pivot_amount": {
1437
+ "name": "auto_approval_pivot_amount",
1438
+ "type": "numeric(38, 18)",
1439
+ "primaryKey": false,
1440
+ "notNull": false
1441
+ },
1442
+ "provider_name": {
1443
+ "name": "provider_name",
1444
+ "type": "text",
1445
+ "primaryKey": false,
1446
+ "notNull": false
1447
+ },
1448
+ "provider_ref_id": {
1449
+ "name": "provider_ref_id",
1450
+ "type": "text",
1451
+ "primaryKey": false,
1452
+ "notNull": false
1453
+ },
1454
+ "external_round_id": {
1455
+ "name": "external_round_id",
1456
+ "type": "text",
1457
+ "primaryKey": false,
1458
+ "notNull": false
1459
+ },
1460
+ "destination_address": {
1461
+ "name": "destination_address",
1462
+ "type": "text",
1463
+ "primaryKey": false,
1464
+ "notNull": false
1465
+ },
1466
+ "destination_tag": {
1467
+ "name": "destination_tag",
1468
+ "type": "text",
1469
+ "primaryKey": false,
1470
+ "notNull": false
1471
+ },
1472
+ "destination_wallet_id": {
1473
+ "name": "destination_wallet_id",
1474
+ "type": "text",
1475
+ "primaryKey": false,
1476
+ "notNull": false
1477
+ },
1478
+ "tx_hash": {
1479
+ "name": "tx_hash",
1480
+ "type": "text",
1481
+ "primaryKey": false,
1482
+ "notNull": false
1483
+ },
1484
+ "metadata": {
1485
+ "name": "metadata",
1486
+ "type": "text",
1487
+ "primaryKey": false,
1488
+ "notNull": false
1489
+ },
1490
+ "idempotency_key": {
1491
+ "name": "idempotency_key",
1492
+ "type": "uuid",
1493
+ "primaryKey": false,
1494
+ "notNull": false
1495
+ },
1496
+ "created_at": {
1497
+ "name": "created_at",
1498
+ "type": "timestamp with time zone",
1499
+ "primaryKey": false,
1500
+ "notNull": true,
1501
+ "default": "now()"
1502
+ }
1503
+ },
1504
+ "indexes": {
1505
+ "wallet_transaction_wallet_id_idx": {
1506
+ "name": "wallet_transaction_wallet_id_idx",
1507
+ "columns": [
1508
+ {
1509
+ "expression": "wallet_id",
1510
+ "isExpression": false,
1511
+ "asc": true,
1512
+ "nulls": "last"
1513
+ }
1514
+ ],
1515
+ "isUnique": false,
1516
+ "concurrently": false,
1517
+ "method": "btree",
1518
+ "with": {}
1519
+ },
1520
+ "wallet_transaction_created_at_idx": {
1521
+ "name": "wallet_transaction_created_at_idx",
1522
+ "columns": [
1523
+ {
1524
+ "expression": "created_at",
1525
+ "isExpression": false,
1526
+ "asc": true,
1527
+ "nulls": "last"
1528
+ }
1529
+ ],
1530
+ "isUnique": false,
1531
+ "concurrently": false,
1532
+ "method": "btree",
1533
+ "with": {}
1534
+ },
1535
+ "wallet_transaction_type_idx": {
1536
+ "name": "wallet_transaction_type_idx",
1537
+ "columns": [
1538
+ {
1539
+ "expression": "type",
1540
+ "isExpression": false,
1541
+ "asc": true,
1542
+ "nulls": "last"
1543
+ }
1544
+ ],
1545
+ "isUnique": false,
1546
+ "concurrently": false,
1547
+ "method": "btree",
1548
+ "with": {}
1549
+ },
1550
+ "wallet_transaction_status_idx": {
1551
+ "name": "wallet_transaction_status_idx",
1552
+ "columns": [
1553
+ {
1554
+ "expression": "status",
1555
+ "isExpression": false,
1556
+ "asc": true,
1557
+ "nulls": "last"
1558
+ }
1559
+ ],
1560
+ "isUnique": false,
1561
+ "concurrently": false,
1562
+ "method": "btree",
1563
+ "with": {}
1564
+ },
1565
+ "wallet_transaction_rail_idx": {
1566
+ "name": "wallet_transaction_rail_idx",
1567
+ "columns": [
1568
+ {
1569
+ "expression": "rail",
1570
+ "isExpression": false,
1571
+ "asc": true,
1572
+ "nulls": "last"
1573
+ }
1574
+ ],
1575
+ "isUnique": false,
1576
+ "concurrently": false,
1577
+ "method": "btree",
1578
+ "with": {}
1579
+ },
1580
+ "wallet_transaction_currency_idx": {
1581
+ "name": "wallet_transaction_currency_idx",
1582
+ "columns": [
1583
+ {
1584
+ "expression": "currency",
1585
+ "isExpression": false,
1586
+ "asc": true,
1587
+ "nulls": "last"
1588
+ }
1589
+ ],
1590
+ "isUnique": false,
1591
+ "concurrently": false,
1592
+ "method": "btree",
1593
+ "with": {}
1594
+ },
1595
+ "wallet_transaction_currency_network_idx": {
1596
+ "name": "wallet_transaction_currency_network_idx",
1597
+ "columns": [
1598
+ {
1599
+ "expression": "currency",
1600
+ "isExpression": false,
1601
+ "asc": true,
1602
+ "nulls": "last"
1603
+ },
1604
+ {
1605
+ "expression": "network",
1606
+ "isExpression": false,
1607
+ "asc": true,
1608
+ "nulls": "last"
1609
+ }
1610
+ ],
1611
+ "isUnique": false,
1612
+ "concurrently": false,
1613
+ "method": "btree",
1614
+ "with": {}
1615
+ },
1616
+ "wallet_transaction_tx_hash_idx": {
1617
+ "name": "wallet_transaction_tx_hash_idx",
1618
+ "columns": [
1619
+ {
1620
+ "expression": "tx_hash",
1621
+ "isExpression": false,
1622
+ "asc": true,
1623
+ "nulls": "last"
1624
+ }
1625
+ ],
1626
+ "isUnique": false,
1627
+ "concurrently": false,
1628
+ "method": "btree",
1629
+ "with": {}
1630
+ },
1631
+ "wallet_transaction_status_type_created_at_idx": {
1632
+ "name": "wallet_transaction_status_type_created_at_idx",
1633
+ "columns": [
1634
+ {
1635
+ "expression": "status",
1636
+ "isExpression": false,
1637
+ "asc": true,
1638
+ "nulls": "last"
1639
+ },
1640
+ {
1641
+ "expression": "type",
1642
+ "isExpression": false,
1643
+ "asc": true,
1644
+ "nulls": "last"
1645
+ },
1646
+ {
1647
+ "expression": "created_at",
1648
+ "isExpression": false,
1649
+ "asc": true,
1650
+ "nulls": "last"
1651
+ }
1652
+ ],
1653
+ "isUnique": false,
1654
+ "concurrently": false,
1655
+ "method": "btree",
1656
+ "with": {}
1657
+ },
1658
+ "wallet_transaction_wallet_id_type_status_idx": {
1659
+ "name": "wallet_transaction_wallet_id_type_status_idx",
1660
+ "columns": [
1661
+ {
1662
+ "expression": "wallet_id",
1663
+ "isExpression": false,
1664
+ "asc": true,
1665
+ "nulls": "last"
1666
+ },
1667
+ {
1668
+ "expression": "type",
1669
+ "isExpression": false,
1670
+ "asc": true,
1671
+ "nulls": "last"
1672
+ },
1673
+ {
1674
+ "expression": "status",
1675
+ "isExpression": false,
1676
+ "asc": true,
1677
+ "nulls": "last"
1678
+ }
1679
+ ],
1680
+ "isUnique": false,
1681
+ "concurrently": false,
1682
+ "method": "btree",
1683
+ "with": {}
1684
+ },
1685
+ "wallet_transaction_provider_ref_id_idx": {
1686
+ "name": "wallet_transaction_provider_ref_id_idx",
1687
+ "columns": [
1688
+ {
1689
+ "expression": "provider_name",
1690
+ "isExpression": false,
1691
+ "asc": true,
1692
+ "nulls": "last"
1693
+ },
1694
+ {
1695
+ "expression": "provider_ref_id",
1696
+ "isExpression": false,
1697
+ "asc": true,
1698
+ "nulls": "last"
1699
+ }
1700
+ ],
1701
+ "isUnique": true,
1702
+ "where": "\"wallet_transaction\".\"provider_ref_id\" IS NOT NULL",
1703
+ "concurrently": false,
1704
+ "method": "btree",
1705
+ "with": {}
1706
+ },
1707
+ "wallet_transaction_external_round_id_idx": {
1708
+ "name": "wallet_transaction_external_round_id_idx",
1709
+ "columns": [
1710
+ {
1711
+ "expression": "external_round_id",
1712
+ "isExpression": false,
1713
+ "asc": true,
1714
+ "nulls": "last"
1715
+ }
1716
+ ],
1717
+ "isUnique": false,
1718
+ "concurrently": false,
1719
+ "method": "btree",
1720
+ "with": {}
1721
+ },
1722
+ "wallet_transaction_wallet_id_idempotency_key_idx": {
1723
+ "name": "wallet_transaction_wallet_id_idempotency_key_idx",
1724
+ "columns": [
1725
+ {
1726
+ "expression": "wallet_id",
1727
+ "isExpression": false,
1728
+ "asc": true,
1729
+ "nulls": "last"
1730
+ },
1731
+ {
1732
+ "expression": "idempotency_key",
1733
+ "isExpression": false,
1734
+ "asc": true,
1735
+ "nulls": "last"
1736
+ }
1737
+ ],
1738
+ "isUnique": true,
1739
+ "where": "\"wallet_transaction\".\"idempotency_key\" IS NOT NULL",
1740
+ "concurrently": false,
1741
+ "method": "btree",
1742
+ "with": {}
1743
+ }
1744
+ },
1745
+ "foreignKeys": {
1746
+ "wallet_transaction_wallet_id_wallet_id_fk": {
1747
+ "name": "wallet_transaction_wallet_id_wallet_id_fk",
1748
+ "tableFrom": "wallet_transaction",
1749
+ "tableTo": "wallet",
1750
+ "columnsFrom": ["wallet_id"],
1751
+ "columnsTo": ["id"],
1752
+ "onDelete": "no action",
1753
+ "onUpdate": "no action"
1754
+ }
1755
+ },
1756
+ "compositePrimaryKeys": {},
1757
+ "uniqueConstraints": {},
1758
+ "policies": {},
1759
+ "checkConstraints": {},
1760
+ "isRLSEnabled": false
1761
+ },
1762
+ "public.wallet_withdrawal_address": {
1763
+ "name": "wallet_withdrawal_address",
1764
+ "schema": "",
1765
+ "columns": {
1766
+ "id": {
1767
+ "name": "id",
1768
+ "type": "uuid",
1769
+ "primaryKey": true,
1770
+ "notNull": true,
1771
+ "default": "gen_random_uuid()"
1772
+ },
1773
+ "user_id": {
1774
+ "name": "user_id",
1775
+ "type": "uuid",
1776
+ "primaryKey": false,
1777
+ "notNull": true
1778
+ },
1779
+ "label": {
1780
+ "name": "label",
1781
+ "type": "text",
1782
+ "primaryKey": false,
1783
+ "notNull": true
1784
+ },
1785
+ "currency": {
1786
+ "name": "currency",
1787
+ "type": "text",
1788
+ "primaryKey": false,
1789
+ "notNull": true
1790
+ },
1791
+ "network": {
1792
+ "name": "network",
1793
+ "type": "text",
1794
+ "primaryKey": false,
1795
+ "notNull": true
1796
+ },
1797
+ "address": {
1798
+ "name": "address",
1799
+ "type": "text",
1800
+ "primaryKey": false,
1801
+ "notNull": true
1802
+ },
1803
+ "destination_tag": {
1804
+ "name": "destination_tag",
1805
+ "type": "text",
1806
+ "primaryKey": false,
1807
+ "notNull": false
1808
+ },
1809
+ "provider_name": {
1810
+ "name": "provider_name",
1811
+ "type": "text",
1812
+ "primaryKey": false,
1813
+ "notNull": false
1814
+ },
1815
+ "provider_wallet_id": {
1816
+ "name": "provider_wallet_id",
1817
+ "type": "text",
1818
+ "primaryKey": false,
1819
+ "notNull": false
1820
+ },
1821
+ "created_at": {
1822
+ "name": "created_at",
1823
+ "type": "timestamp with time zone",
1824
+ "primaryKey": false,
1825
+ "notNull": true,
1826
+ "default": "now()"
1827
+ }
1828
+ },
1829
+ "indexes": {
1830
+ "wallet_withdrawal_address_user_id_currency_network_address_idx": {
1831
+ "name": "wallet_withdrawal_address_user_id_currency_network_address_idx",
1832
+ "columns": [
1833
+ {
1834
+ "expression": "user_id",
1835
+ "isExpression": false,
1836
+ "asc": true,
1837
+ "nulls": "last"
1838
+ },
1839
+ {
1840
+ "expression": "currency",
1841
+ "isExpression": false,
1842
+ "asc": true,
1843
+ "nulls": "last"
1844
+ },
1845
+ {
1846
+ "expression": "network",
1847
+ "isExpression": false,
1848
+ "asc": true,
1849
+ "nulls": "last"
1850
+ },
1851
+ {
1852
+ "expression": "address",
1853
+ "isExpression": false,
1854
+ "asc": true,
1855
+ "nulls": "last"
1856
+ },
1857
+ {
1858
+ "expression": "coalesce(\"destination_tag\", '')",
1859
+ "asc": true,
1860
+ "isExpression": true,
1861
+ "nulls": "last"
1862
+ }
1863
+ ],
1864
+ "isUnique": true,
1865
+ "concurrently": false,
1866
+ "method": "btree",
1867
+ "with": {}
1868
+ },
1869
+ "wallet_withdrawal_address_user_id_created_at_idx": {
1870
+ "name": "wallet_withdrawal_address_user_id_created_at_idx",
1871
+ "columns": [
1872
+ {
1873
+ "expression": "user_id",
1874
+ "isExpression": false,
1875
+ "asc": true,
1876
+ "nulls": "last"
1877
+ },
1878
+ {
1879
+ "expression": "created_at",
1880
+ "isExpression": false,
1881
+ "asc": true,
1882
+ "nulls": "last"
1883
+ }
1884
+ ],
1885
+ "isUnique": false,
1886
+ "concurrently": false,
1887
+ "method": "btree",
1888
+ "with": {}
1889
+ }
1890
+ },
1891
+ "foreignKeys": {},
1892
+ "compositePrimaryKeys": {},
1893
+ "uniqueConstraints": {},
1894
+ "policies": {},
1895
+ "checkConstraints": {},
1896
+ "isRLSEnabled": false
1897
+ }
1898
+ },
1899
+ "enums": {
1900
+ "public.wallet_bonus_credit_source_type": {
1901
+ "name": "wallet_bonus_credit_source_type",
1902
+ "schema": "public",
1903
+ "values": ["gift", "rain"]
1904
+ },
1905
+ "public.wallet_bonus_credit_status": {
1906
+ "name": "wallet_bonus_credit_status",
1907
+ "schema": "public",
1908
+ "values": ["active", "completed"]
1909
+ },
1910
+ "public.wallet_custody_sweep_status": {
1911
+ "name": "wallet_custody_sweep_status",
1912
+ "schema": "public",
1913
+ "values": ["pending", "processing", "completed", "failed", "unknown"]
1914
+ },
1915
+ "public.wallet_job_run_status": {
1916
+ "name": "wallet_job_run_status",
1917
+ "schema": "public",
1918
+ "values": ["running", "completed", "skipped", "failed", "abandoned"]
1919
+ },
1920
+ "public.wallet_rail": {
1921
+ "name": "wallet_rail",
1922
+ "schema": "public",
1923
+ "values": ["crypto", "fiat"]
1924
+ },
1925
+ "public.wallet_reconciliation_finding_kind": {
1926
+ "name": "wallet_reconciliation_finding_kind",
1927
+ "schema": "public",
1928
+ "values": [
1929
+ "missing_deposit",
1930
+ "unattributed_deposit",
1931
+ "amount_mismatch",
1932
+ "currency_mismatch",
1933
+ "status_mismatch",
1934
+ "unknown_at_provider",
1935
+ "unconfigured_asset",
1936
+ "stuck_sweep",
1937
+ "rg_limit_breach",
1938
+ "stuck_swap"
1939
+ ]
1940
+ },
1941
+ "public.wallet_reconciliation_finding_status": {
1942
+ "name": "wallet_reconciliation_finding_status",
1943
+ "schema": "public",
1944
+ "values": ["open", "resolved"]
1945
+ },
1946
+ "public.wallet_transaction_direction": {
1947
+ "name": "wallet_transaction_direction",
1948
+ "schema": "public",
1949
+ "values": ["credit", "debit"]
1950
+ },
1951
+ "public.wallet_transaction_status": {
1952
+ "name": "wallet_transaction_status",
1953
+ "schema": "public",
1954
+ "values": ["pending", "processing", "completed", "failed", "rejected", "on_hold", "cancelled"]
1955
+ },
1956
+ "public.wallet_transaction_type": {
1957
+ "name": "wallet_transaction_type",
1958
+ "schema": "public",
1959
+ "values": [
1960
+ "deposit",
1961
+ "withdrawal",
1962
+ "bet",
1963
+ "win",
1964
+ "loss",
1965
+ "bonus",
1966
+ "tip",
1967
+ "gift",
1968
+ "rain",
1969
+ "manual_credit",
1970
+ "manual_debit",
1971
+ "swap_out",
1972
+ "swap_in",
1973
+ "bet_reversal"
1974
+ ]
1975
+ }
1976
+ },
1977
+ "schemas": {},
1978
+ "sequences": {},
1979
+ "roles": {},
1980
+ "policies": {},
1981
+ "views": {},
1982
+ "_meta": {
1983
+ "columns": {},
1984
+ "schemas": {},
1985
+ "tables": {}
1986
+ }
1987
+ }