@aitlabs/namkwong 0.0.106 → 0.0.107

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.
@@ -28,7 +28,19 @@ export declare const betterAuthPlugin: Elysia<"", {
28
28
  headers: import("elysia").HTTPHeaders;
29
29
  status?: number | keyof import("elysia").StatusMap;
30
30
  redirect?: string;
31
- cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
31
+ cookie?: Record<string, {
32
+ domain?: string | undefined;
33
+ expires?: Date | undefined;
34
+ httpOnly?: boolean | undefined;
35
+ maxAge?: number | undefined;
36
+ path?: string | undefined;
37
+ priority?: 'low' | 'medium' | 'high' | undefined;
38
+ partitioned?: boolean | undefined;
39
+ sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
40
+ secure?: boolean | undefined;
41
+ secrets?: string | null | (string | null)[];
42
+ value?: unknown;
43
+ }>;
32
44
  };
33
45
  path: string;
34
46
  route: string;
@@ -18,6 +18,10 @@ interface BinaryOptionSettlementRunInput {
18
18
  operatorId?: string;
19
19
  }
20
20
  export declare abstract class InternalBinaryOptionService {
21
+ private static buildLast10UtcCalendarDays;
22
+ private static completeTrend10dSparse;
23
+ private static loadPriceTrend10dMap;
24
+ private static enrichMarketsWithBaseAssetPrice;
21
25
  private static validateUserId;
22
26
  private static parseStakeAmount;
23
27
  private static assertStakeAmountInRange;
@@ -42,90 +46,10 @@ export declare abstract class InternalBinaryOptionService {
42
46
  limit?: number;
43
47
  offset?: number;
44
48
  }): Promise<{
45
- items: {
46
- baseAssetIdSnapshot: string;
47
- createdAt: Date;
48
- description: string | null;
49
- durationConfigs: {
50
- createdAt: Date;
51
- durationSeconds: number;
52
- id: string;
53
- isEnabled: boolean;
54
- losePayoutMultiplier: string;
55
- marketId: string;
56
- sortOrder: number;
57
- updatedAt: Date;
58
- winPayoutMultiplier: string;
59
- }[];
60
- id: string;
61
- image: string | null;
62
- isHot: boolean;
63
- isVisibleOnFrontend: boolean;
64
- marketSymbol: {
65
- baseAssetId: string;
66
- chartEnabled: boolean;
67
- createdAt: Date;
68
- id: string;
69
- quoteAssetId: string;
70
- settlementEnabled: boolean;
71
- sourceType: "manual" | "market_pricing" | "trade_market";
72
- status: "active" | "draft" | "ended" | "paused";
73
- symbol: string;
74
- updatedAt: Date;
75
- };
76
- marketSymbolId: string;
77
- maxStakeAmount: string | null;
78
- minStakeAmount: string;
79
- name: string;
80
- quoteAssetIdSnapshot: string;
81
- sortOrder: number;
82
- status: "active" | "draft" | "ended" | "paused";
83
- symbolSnapshot: string;
84
- updatedAt: Date;
85
- }[];
49
+ items: any[];
86
50
  total: number;
87
51
  }>;
88
- static getMarketForUser(marketId: string): Promise<{
89
- baseAssetIdSnapshot: string;
90
- createdAt: Date;
91
- description: string | null;
92
- durationConfigs: {
93
- createdAt: Date;
94
- durationSeconds: number;
95
- id: string;
96
- isEnabled: boolean;
97
- losePayoutMultiplier: string;
98
- marketId: string;
99
- sortOrder: number;
100
- updatedAt: Date;
101
- winPayoutMultiplier: string;
102
- }[];
103
- id: string;
104
- image: string | null;
105
- isHot: boolean;
106
- isVisibleOnFrontend: boolean;
107
- marketSymbol: {
108
- baseAssetId: string;
109
- chartEnabled: boolean;
110
- createdAt: Date;
111
- id: string;
112
- quoteAssetId: string;
113
- settlementEnabled: boolean;
114
- sourceType: "manual" | "market_pricing" | "trade_market";
115
- status: "active" | "draft" | "ended" | "paused";
116
- symbol: string;
117
- updatedAt: Date;
118
- };
119
- marketSymbolId: string;
120
- maxStakeAmount: string | null;
121
- minStakeAmount: string;
122
- name: string;
123
- quoteAssetIdSnapshot: string;
124
- sortOrder: number;
125
- status: "active" | "draft" | "ended" | "paused";
126
- symbolSnapshot: string;
127
- updatedAt: Date;
128
- }>;
52
+ static getMarketForUser(marketId: string): Promise<any>;
129
53
  static getOrderByIdForUser(userId: string, orderId: string): Promise<{
130
54
  baseAssetIdSnapshot: string;
131
55
  createdAt: Date;
@@ -169,178 +169,58 @@ export declare const binaryOptionUserMarketItemSchema: import("@sinclair/typebox
169
169
  image: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
170
170
  isHot: import("@sinclair/typebox").TBoolean;
171
171
  isVisibleOnFrontend: import("@sinclair/typebox").TBoolean;
172
- marketSymbol: import("drizzle-typebox").BuildSchema<"select", {
173
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
174
- name: "created_at";
175
- tableName: "market_symbol";
176
- dataType: "date";
177
- columnType: "PgTimestamp";
178
- data: Date;
179
- driverParam: string;
180
- notNull: true;
181
- hasDefault: true;
182
- isPrimaryKey: false;
183
- isAutoincrement: false;
184
- hasRuntimeDefault: false;
185
- enumValues: undefined;
186
- baseColumn: never;
187
- identity: undefined;
188
- generated: undefined;
189
- }, {}, {}>;
190
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
191
- name: "updated_at";
192
- tableName: "market_symbol";
193
- dataType: "date";
194
- columnType: "PgTimestamp";
195
- data: Date;
196
- driverParam: string;
197
- notNull: true;
198
- hasDefault: true;
199
- isPrimaryKey: false;
200
- isAutoincrement: false;
201
- hasRuntimeDefault: false;
202
- enumValues: undefined;
203
- baseColumn: never;
204
- identity: undefined;
205
- generated: undefined;
206
- }, {}, {}>;
207
- id: import("drizzle-orm/pg-core").PgColumn<{
208
- name: "id";
209
- tableName: "market_symbol";
210
- dataType: "string";
211
- columnType: "PgUUID";
212
- data: string;
213
- driverParam: string;
214
- notNull: true;
215
- hasDefault: true;
216
- isPrimaryKey: true;
217
- isAutoincrement: false;
218
- hasRuntimeDefault: false;
219
- enumValues: undefined;
220
- baseColumn: never;
221
- identity: undefined;
222
- generated: undefined;
223
- }, {}, {}>;
224
- symbol: import("drizzle-orm/pg-core").PgColumn<{
225
- name: "symbol";
226
- tableName: "market_symbol";
227
- dataType: "string";
228
- columnType: "PgText";
229
- data: string;
230
- driverParam: string;
231
- notNull: true;
232
- hasDefault: false;
233
- isPrimaryKey: false;
234
- isAutoincrement: false;
235
- hasRuntimeDefault: false;
236
- enumValues: [string, ...string[]];
237
- baseColumn: never;
238
- identity: undefined;
239
- generated: undefined;
240
- }, {}, {}>;
241
- baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
242
- name: "base_asset_id";
243
- tableName: "market_symbol";
244
- dataType: "string";
245
- columnType: "PgUUID";
246
- data: string;
247
- driverParam: string;
248
- notNull: true;
249
- hasDefault: false;
250
- isPrimaryKey: false;
251
- isAutoincrement: false;
252
- hasRuntimeDefault: false;
253
- enumValues: undefined;
254
- baseColumn: never;
255
- identity: undefined;
256
- generated: undefined;
257
- }, {}, {}>;
258
- quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
259
- name: "quote_asset_id";
260
- tableName: "market_symbol";
261
- dataType: "string";
262
- columnType: "PgUUID";
263
- data: string;
264
- driverParam: string;
265
- notNull: true;
266
- hasDefault: false;
267
- isPrimaryKey: false;
268
- isAutoincrement: false;
269
- hasRuntimeDefault: false;
270
- enumValues: undefined;
271
- baseColumn: never;
272
- identity: undefined;
273
- generated: undefined;
274
- }, {}, {}>;
275
- status: import("drizzle-orm/pg-core").PgColumn<{
276
- name: "status";
277
- tableName: "market_symbol";
278
- dataType: "string";
279
- columnType: "PgEnumColumn";
280
- data: "active" | "draft" | "ended" | "paused";
281
- driverParam: string;
282
- notNull: true;
283
- hasDefault: true;
284
- isPrimaryKey: false;
285
- isAutoincrement: false;
286
- hasRuntimeDefault: false;
287
- enumValues: ["draft", "active", "paused", "ended"];
288
- baseColumn: never;
289
- identity: undefined;
290
- generated: undefined;
291
- }, {}, {}>;
292
- chartEnabled: import("drizzle-orm/pg-core").PgColumn<{
293
- name: "chart_enabled";
294
- tableName: "market_symbol";
295
- dataType: "boolean";
296
- columnType: "PgBoolean";
297
- data: boolean;
298
- driverParam: boolean;
299
- notNull: true;
300
- hasDefault: true;
301
- isPrimaryKey: false;
302
- isAutoincrement: false;
303
- hasRuntimeDefault: false;
304
- enumValues: undefined;
305
- baseColumn: never;
306
- identity: undefined;
307
- generated: undefined;
308
- }, {}, {}>;
309
- settlementEnabled: import("drizzle-orm/pg-core").PgColumn<{
310
- name: "settlement_enabled";
311
- tableName: "market_symbol";
312
- dataType: "boolean";
313
- columnType: "PgBoolean";
314
- data: boolean;
315
- driverParam: boolean;
316
- notNull: true;
317
- hasDefault: true;
318
- isPrimaryKey: false;
319
- isAutoincrement: false;
320
- hasRuntimeDefault: false;
321
- enumValues: undefined;
322
- baseColumn: never;
323
- identity: undefined;
324
- generated: undefined;
325
- }, {}, {}>;
326
- sourceType: import("drizzle-orm/pg-core").PgColumn<{
327
- name: "source_type";
328
- tableName: "market_symbol";
329
- dataType: "string";
330
- columnType: "PgEnumColumn";
331
- data: "manual" | "market_pricing" | "trade_market";
332
- driverParam: string;
333
- notNull: true;
334
- hasDefault: false;
335
- isPrimaryKey: false;
336
- isAutoincrement: false;
337
- hasRuntimeDefault: false;
338
- enumValues: ["trade_market", "market_pricing", "manual"];
339
- baseColumn: never;
340
- identity: undefined;
341
- generated: undefined;
342
- }, {}, {}>;
343
- }, undefined>;
172
+ marketSymbol: import("@sinclair/typebox").TObject<{
173
+ baseAsset: import("@sinclair/typebox").TObject<{
174
+ category: import("@sinclair/typebox").TEnum<{
175
+ CRYPTO: "CRYPTO";
176
+ FIAT: "FIAT";
177
+ POINT: "POINT";
178
+ RWA: "RWA";
179
+ }>;
180
+ code: import("@sinclair/typebox").TString;
181
+ iconUrl: import("@sinclair/typebox").TString;
182
+ id: import("@sinclair/typebox").TString;
183
+ isActive: import("@sinclair/typebox").TBoolean;
184
+ name: import("@sinclair/typebox").TString;
185
+ precision: import("@sinclair/typebox").TInteger;
186
+ price: import("@sinclair/typebox").TObject<{
187
+ latestPrice: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
188
+ id: import("@sinclair/typebox").TString;
189
+ baseAssetId: import("@sinclair/typebox").TString;
190
+ quoteAssetId: import("@sinclair/typebox").TString;
191
+ price: import("@sinclair/typebox").TString;
192
+ source: import("@sinclair/typebox").TString;
193
+ effectiveAt: import("@sinclair/typebox").TDate;
194
+ }>, import("@sinclair/typebox").TNull]>;
195
+ dailyChangeRate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
196
+ trend10d: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
197
+ date: import("@sinclair/typebox").TString;
198
+ price: import("@sinclair/typebox").TString;
199
+ effectiveAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TString]>;
200
+ }>>;
201
+ }>;
202
+ symbol: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
203
+ }>;
204
+ baseAssetId: import("@sinclair/typebox").TString;
205
+ chartEnabled: import("@sinclair/typebox").TBoolean;
206
+ createdAt: import("@sinclair/typebox").TDate;
207
+ id: import("@sinclair/typebox").TString;
208
+ quoteAssetId: import("@sinclair/typebox").TString;
209
+ settlementEnabled: import("@sinclair/typebox").TBoolean;
210
+ sourceType: import("@sinclair/typebox").TEnum<{
211
+ manual: "manual";
212
+ market_pricing: "market_pricing";
213
+ trade_market: "trade_market";
214
+ }>;
215
+ status: import("@sinclair/typebox").TEnum<{
216
+ active: "active";
217
+ draft: "draft";
218
+ ended: "ended";
219
+ paused: "paused";
220
+ }>;
221
+ symbol: import("@sinclair/typebox").TString;
222
+ updatedAt: import("@sinclair/typebox").TDate;
223
+ }>;
344
224
  marketSymbolId: import("@sinclair/typebox").TString;
345
225
  maxStakeAmount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
346
226
  minStakeAmount: import("@sinclair/typebox").TString;
@@ -521,178 +401,58 @@ export declare const binaryOptionUserMarketListResponseSchema: import("@sinclair
521
401
  image: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
522
402
  isHot: import("@sinclair/typebox").TBoolean;
523
403
  isVisibleOnFrontend: import("@sinclair/typebox").TBoolean;
524
- marketSymbol: import("drizzle-typebox").BuildSchema<"select", {
525
- createdAt: import("drizzle-orm/pg-core").PgColumn<{
526
- name: "created_at";
527
- tableName: "market_symbol";
528
- dataType: "date";
529
- columnType: "PgTimestamp";
530
- data: Date;
531
- driverParam: string;
532
- notNull: true;
533
- hasDefault: true;
534
- isPrimaryKey: false;
535
- isAutoincrement: false;
536
- hasRuntimeDefault: false;
537
- enumValues: undefined;
538
- baseColumn: never;
539
- identity: undefined;
540
- generated: undefined;
541
- }, {}, {}>;
542
- updatedAt: import("drizzle-orm/pg-core").PgColumn<{
543
- name: "updated_at";
544
- tableName: "market_symbol";
545
- dataType: "date";
546
- columnType: "PgTimestamp";
547
- data: Date;
548
- driverParam: string;
549
- notNull: true;
550
- hasDefault: true;
551
- isPrimaryKey: false;
552
- isAutoincrement: false;
553
- hasRuntimeDefault: false;
554
- enumValues: undefined;
555
- baseColumn: never;
556
- identity: undefined;
557
- generated: undefined;
558
- }, {}, {}>;
559
- id: import("drizzle-orm/pg-core").PgColumn<{
560
- name: "id";
561
- tableName: "market_symbol";
562
- dataType: "string";
563
- columnType: "PgUUID";
564
- data: string;
565
- driverParam: string;
566
- notNull: true;
567
- hasDefault: true;
568
- isPrimaryKey: true;
569
- isAutoincrement: false;
570
- hasRuntimeDefault: false;
571
- enumValues: undefined;
572
- baseColumn: never;
573
- identity: undefined;
574
- generated: undefined;
575
- }, {}, {}>;
576
- symbol: import("drizzle-orm/pg-core").PgColumn<{
577
- name: "symbol";
578
- tableName: "market_symbol";
579
- dataType: "string";
580
- columnType: "PgText";
581
- data: string;
582
- driverParam: string;
583
- notNull: true;
584
- hasDefault: false;
585
- isPrimaryKey: false;
586
- isAutoincrement: false;
587
- hasRuntimeDefault: false;
588
- enumValues: [string, ...string[]];
589
- baseColumn: never;
590
- identity: undefined;
591
- generated: undefined;
592
- }, {}, {}>;
593
- baseAssetId: import("drizzle-orm/pg-core").PgColumn<{
594
- name: "base_asset_id";
595
- tableName: "market_symbol";
596
- dataType: "string";
597
- columnType: "PgUUID";
598
- data: string;
599
- driverParam: string;
600
- notNull: true;
601
- hasDefault: false;
602
- isPrimaryKey: false;
603
- isAutoincrement: false;
604
- hasRuntimeDefault: false;
605
- enumValues: undefined;
606
- baseColumn: never;
607
- identity: undefined;
608
- generated: undefined;
609
- }, {}, {}>;
610
- quoteAssetId: import("drizzle-orm/pg-core").PgColumn<{
611
- name: "quote_asset_id";
612
- tableName: "market_symbol";
613
- dataType: "string";
614
- columnType: "PgUUID";
615
- data: string;
616
- driverParam: string;
617
- notNull: true;
618
- hasDefault: false;
619
- isPrimaryKey: false;
620
- isAutoincrement: false;
621
- hasRuntimeDefault: false;
622
- enumValues: undefined;
623
- baseColumn: never;
624
- identity: undefined;
625
- generated: undefined;
626
- }, {}, {}>;
627
- status: import("drizzle-orm/pg-core").PgColumn<{
628
- name: "status";
629
- tableName: "market_symbol";
630
- dataType: "string";
631
- columnType: "PgEnumColumn";
632
- data: "active" | "draft" | "ended" | "paused";
633
- driverParam: string;
634
- notNull: true;
635
- hasDefault: true;
636
- isPrimaryKey: false;
637
- isAutoincrement: false;
638
- hasRuntimeDefault: false;
639
- enumValues: ["draft", "active", "paused", "ended"];
640
- baseColumn: never;
641
- identity: undefined;
642
- generated: undefined;
643
- }, {}, {}>;
644
- chartEnabled: import("drizzle-orm/pg-core").PgColumn<{
645
- name: "chart_enabled";
646
- tableName: "market_symbol";
647
- dataType: "boolean";
648
- columnType: "PgBoolean";
649
- data: boolean;
650
- driverParam: boolean;
651
- notNull: true;
652
- hasDefault: true;
653
- isPrimaryKey: false;
654
- isAutoincrement: false;
655
- hasRuntimeDefault: false;
656
- enumValues: undefined;
657
- baseColumn: never;
658
- identity: undefined;
659
- generated: undefined;
660
- }, {}, {}>;
661
- settlementEnabled: import("drizzle-orm/pg-core").PgColumn<{
662
- name: "settlement_enabled";
663
- tableName: "market_symbol";
664
- dataType: "boolean";
665
- columnType: "PgBoolean";
666
- data: boolean;
667
- driverParam: boolean;
668
- notNull: true;
669
- hasDefault: true;
670
- isPrimaryKey: false;
671
- isAutoincrement: false;
672
- hasRuntimeDefault: false;
673
- enumValues: undefined;
674
- baseColumn: never;
675
- identity: undefined;
676
- generated: undefined;
677
- }, {}, {}>;
678
- sourceType: import("drizzle-orm/pg-core").PgColumn<{
679
- name: "source_type";
680
- tableName: "market_symbol";
681
- dataType: "string";
682
- columnType: "PgEnumColumn";
683
- data: "manual" | "market_pricing" | "trade_market";
684
- driverParam: string;
685
- notNull: true;
686
- hasDefault: false;
687
- isPrimaryKey: false;
688
- isAutoincrement: false;
689
- hasRuntimeDefault: false;
690
- enumValues: ["trade_market", "market_pricing", "manual"];
691
- baseColumn: never;
692
- identity: undefined;
693
- generated: undefined;
694
- }, {}, {}>;
695
- }, undefined>;
404
+ marketSymbol: import("@sinclair/typebox").TObject<{
405
+ baseAsset: import("@sinclair/typebox").TObject<{
406
+ category: import("@sinclair/typebox").TEnum<{
407
+ CRYPTO: "CRYPTO";
408
+ FIAT: "FIAT";
409
+ POINT: "POINT";
410
+ RWA: "RWA";
411
+ }>;
412
+ code: import("@sinclair/typebox").TString;
413
+ iconUrl: import("@sinclair/typebox").TString;
414
+ id: import("@sinclair/typebox").TString;
415
+ isActive: import("@sinclair/typebox").TBoolean;
416
+ name: import("@sinclair/typebox").TString;
417
+ precision: import("@sinclair/typebox").TInteger;
418
+ price: import("@sinclair/typebox").TObject<{
419
+ latestPrice: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TObject<{
420
+ id: import("@sinclair/typebox").TString;
421
+ baseAssetId: import("@sinclair/typebox").TString;
422
+ quoteAssetId: import("@sinclair/typebox").TString;
423
+ price: import("@sinclair/typebox").TString;
424
+ source: import("@sinclair/typebox").TString;
425
+ effectiveAt: import("@sinclair/typebox").TDate;
426
+ }>, import("@sinclair/typebox").TNull]>;
427
+ dailyChangeRate: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
428
+ trend10d: import("@sinclair/typebox").TArray<import("@sinclair/typebox").TObject<{
429
+ date: import("@sinclair/typebox").TString;
430
+ price: import("@sinclair/typebox").TString;
431
+ effectiveAt: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TDate, import("@sinclair/typebox").TString]>;
432
+ }>>;
433
+ }>;
434
+ symbol: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
435
+ }>;
436
+ baseAssetId: import("@sinclair/typebox").TString;
437
+ chartEnabled: import("@sinclair/typebox").TBoolean;
438
+ createdAt: import("@sinclair/typebox").TDate;
439
+ id: import("@sinclair/typebox").TString;
440
+ quoteAssetId: import("@sinclair/typebox").TString;
441
+ settlementEnabled: import("@sinclair/typebox").TBoolean;
442
+ sourceType: import("@sinclair/typebox").TEnum<{
443
+ manual: "manual";
444
+ market_pricing: "market_pricing";
445
+ trade_market: "trade_market";
446
+ }>;
447
+ status: import("@sinclair/typebox").TEnum<{
448
+ active: "active";
449
+ draft: "draft";
450
+ ended: "ended";
451
+ paused: "paused";
452
+ }>;
453
+ symbol: import("@sinclair/typebox").TString;
454
+ updatedAt: import("@sinclair/typebox").TDate;
455
+ }>;
696
456
  marketSymbolId: import("@sinclair/typebox").TString;
697
457
  maxStakeAmount: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString, import("@sinclair/typebox").TNull]>;
698
458
  minStakeAmount: import("@sinclair/typebox").TString;
@@ -35,19 +35,7 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, {
39
- domain?: string | undefined;
40
- expires?: Date | undefined;
41
- httpOnly?: boolean | undefined;
42
- maxAge?: number | undefined;
43
- path?: string | undefined;
44
- priority?: 'low' | 'medium' | 'high' | undefined;
45
- partitioned?: boolean | undefined;
46
- sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
- secure?: boolean | undefined;
48
- secrets?: string | null | (string | null)[];
49
- value?: unknown;
50
- }>;
38
+ cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
51
39
  };
52
40
  path: string;
53
41
  route: string;
@@ -427,16 +415,42 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
427
415
  isHot: boolean;
428
416
  isVisibleOnFrontend: boolean;
429
417
  marketSymbol: {
418
+ baseAsset: {
419
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
420
+ code: string;
421
+ iconUrl: string;
422
+ id: string;
423
+ isActive: boolean;
424
+ name: string;
425
+ precision: number;
426
+ price: {
427
+ latestPrice: {
428
+ id: string;
429
+ baseAssetId: string;
430
+ quoteAssetId: string;
431
+ price: string;
432
+ source: string;
433
+ effectiveAt: Date;
434
+ } | null;
435
+ dailyChangeRate: string | null;
436
+ trend10d: {
437
+ date: string;
438
+ price: string;
439
+ effectiveAt: string | Date;
440
+ }[];
441
+ };
442
+ symbol: string | null;
443
+ };
444
+ baseAssetId: string;
445
+ chartEnabled: boolean;
430
446
  createdAt: Date;
431
- updatedAt: Date;
432
447
  id: string;
433
- symbol: string;
434
- baseAssetId: string;
435
448
  quoteAssetId: string;
436
- status: "active" | "draft" | "ended" | "paused";
437
- chartEnabled: boolean;
438
449
  settlementEnabled: boolean;
439
450
  sourceType: "manual" | "market_pricing" | "trade_market";
451
+ status: "active" | "draft" | "ended" | "paused";
452
+ symbol: string;
453
+ updatedAt: Date;
440
454
  };
441
455
  marketSymbolId: string;
442
456
  maxStakeAmount: string | null;
@@ -502,16 +516,42 @@ export declare const binaryOptionRouter: Elysia<"/binary_option", {
502
516
  isHot: boolean;
503
517
  isVisibleOnFrontend: boolean;
504
518
  marketSymbol: {
519
+ baseAsset: {
520
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
521
+ code: string;
522
+ iconUrl: string;
523
+ id: string;
524
+ isActive: boolean;
525
+ name: string;
526
+ precision: number;
527
+ price: {
528
+ latestPrice: {
529
+ id: string;
530
+ baseAssetId: string;
531
+ quoteAssetId: string;
532
+ price: string;
533
+ source: string;
534
+ effectiveAt: Date;
535
+ } | null;
536
+ dailyChangeRate: string | null;
537
+ trend10d: {
538
+ date: string;
539
+ price: string;
540
+ effectiveAt: string | Date;
541
+ }[];
542
+ };
543
+ symbol: string | null;
544
+ };
545
+ baseAssetId: string;
546
+ chartEnabled: boolean;
505
547
  createdAt: Date;
506
- updatedAt: Date;
507
548
  id: string;
508
- symbol: string;
509
- baseAssetId: string;
510
549
  quoteAssetId: string;
511
- status: "active" | "draft" | "ended" | "paused";
512
- chartEnabled: boolean;
513
550
  settlementEnabled: boolean;
514
551
  sourceType: "manual" | "market_pricing" | "trade_market";
552
+ status: "active" | "draft" | "ended" | "paused";
553
+ symbol: string;
554
+ updatedAt: Date;
515
555
  };
516
556
  marketSymbolId: string;
517
557
  maxStakeAmount: string | null;
@@ -3,90 +3,10 @@ export declare abstract class UserBinaryOptionService {
3
3
  private static validateUserId;
4
4
  private static verifyTransactionPasswordByStatus;
5
5
  static listMarkets(query?: BinaryOptionUserMarketListQueryType): Promise<{
6
- items: {
7
- baseAssetIdSnapshot: string;
8
- createdAt: Date;
9
- description: string | null;
10
- durationConfigs: {
11
- createdAt: Date;
12
- durationSeconds: number;
13
- id: string;
14
- isEnabled: boolean;
15
- losePayoutMultiplier: string;
16
- marketId: string;
17
- sortOrder: number;
18
- updatedAt: Date;
19
- winPayoutMultiplier: string;
20
- }[];
21
- id: string;
22
- image: string | null;
23
- isHot: boolean;
24
- isVisibleOnFrontend: boolean;
25
- marketSymbol: {
26
- baseAssetId: string;
27
- chartEnabled: boolean;
28
- createdAt: Date;
29
- id: string;
30
- quoteAssetId: string;
31
- settlementEnabled: boolean;
32
- sourceType: "manual" | "market_pricing" | "trade_market";
33
- status: "active" | "draft" | "ended" | "paused";
34
- symbol: string;
35
- updatedAt: Date;
36
- };
37
- marketSymbolId: string;
38
- maxStakeAmount: string | null;
39
- minStakeAmount: string;
40
- name: string;
41
- quoteAssetIdSnapshot: string;
42
- sortOrder: number;
43
- status: "active" | "draft" | "ended" | "paused";
44
- symbolSnapshot: string;
45
- updatedAt: Date;
46
- }[];
6
+ items: any[];
47
7
  total: number;
48
8
  }>;
49
- static getMarket(marketId: string): Promise<{
50
- baseAssetIdSnapshot: string;
51
- createdAt: Date;
52
- description: string | null;
53
- durationConfigs: {
54
- createdAt: Date;
55
- durationSeconds: number;
56
- id: string;
57
- isEnabled: boolean;
58
- losePayoutMultiplier: string;
59
- marketId: string;
60
- sortOrder: number;
61
- updatedAt: Date;
62
- winPayoutMultiplier: string;
63
- }[];
64
- id: string;
65
- image: string | null;
66
- isHot: boolean;
67
- isVisibleOnFrontend: boolean;
68
- marketSymbol: {
69
- baseAssetId: string;
70
- chartEnabled: boolean;
71
- createdAt: Date;
72
- id: string;
73
- quoteAssetId: string;
74
- settlementEnabled: boolean;
75
- sourceType: "manual" | "market_pricing" | "trade_market";
76
- status: "active" | "draft" | "ended" | "paused";
77
- symbol: string;
78
- updatedAt: Date;
79
- };
80
- marketSymbolId: string;
81
- maxStakeAmount: string | null;
82
- minStakeAmount: string;
83
- name: string;
84
- quoteAssetIdSnapshot: string;
85
- sortOrder: number;
86
- status: "active" | "draft" | "ended" | "paused";
87
- symbolSnapshot: string;
88
- updatedAt: Date;
89
- }>;
9
+ static getMarket(marketId: string): Promise<any>;
90
10
  static placeOrder(userId: string, input: BinaryOptionUserOrderCreateInputType): Promise<{
91
11
  baseAssetIdSnapshot: string;
92
12
  createdAt: Date;
package/dist/index.d.ts CHANGED
@@ -15777,16 +15777,42 @@ declare const app: Elysia<"/api", {
15777
15777
  isHot: boolean;
15778
15778
  isVisibleOnFrontend: boolean;
15779
15779
  marketSymbol: {
15780
+ baseAsset: {
15781
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
15782
+ code: string;
15783
+ iconUrl: string;
15784
+ id: string;
15785
+ isActive: boolean;
15786
+ name: string;
15787
+ precision: number;
15788
+ price: {
15789
+ latestPrice: {
15790
+ id: string;
15791
+ baseAssetId: string;
15792
+ quoteAssetId: string;
15793
+ price: string;
15794
+ source: string;
15795
+ effectiveAt: Date;
15796
+ } | null;
15797
+ dailyChangeRate: string | null;
15798
+ trend10d: {
15799
+ date: string;
15800
+ price: string;
15801
+ effectiveAt: string | Date;
15802
+ }[];
15803
+ };
15804
+ symbol: string | null;
15805
+ };
15806
+ baseAssetId: string;
15807
+ chartEnabled: boolean;
15780
15808
  createdAt: Date;
15781
- updatedAt: Date;
15782
15809
  id: string;
15783
- symbol: string;
15784
- baseAssetId: string;
15785
15810
  quoteAssetId: string;
15786
- status: "active" | "draft" | "ended" | "paused";
15787
- chartEnabled: boolean;
15788
15811
  settlementEnabled: boolean;
15789
15812
  sourceType: "manual" | "market_pricing" | "trade_market";
15813
+ status: "active" | "draft" | "ended" | "paused";
15814
+ symbol: string;
15815
+ updatedAt: Date;
15790
15816
  };
15791
15817
  marketSymbolId: string;
15792
15818
  maxStakeAmount: string | null;
@@ -15852,16 +15878,42 @@ declare const app: Elysia<"/api", {
15852
15878
  isHot: boolean;
15853
15879
  isVisibleOnFrontend: boolean;
15854
15880
  marketSymbol: {
15881
+ baseAsset: {
15882
+ category: "CRYPTO" | "FIAT" | "POINT" | "RWA";
15883
+ code: string;
15884
+ iconUrl: string;
15885
+ id: string;
15886
+ isActive: boolean;
15887
+ name: string;
15888
+ precision: number;
15889
+ price: {
15890
+ latestPrice: {
15891
+ id: string;
15892
+ baseAssetId: string;
15893
+ quoteAssetId: string;
15894
+ price: string;
15895
+ source: string;
15896
+ effectiveAt: Date;
15897
+ } | null;
15898
+ dailyChangeRate: string | null;
15899
+ trend10d: {
15900
+ date: string;
15901
+ price: string;
15902
+ effectiveAt: string | Date;
15903
+ }[];
15904
+ };
15905
+ symbol: string | null;
15906
+ };
15907
+ baseAssetId: string;
15908
+ chartEnabled: boolean;
15855
15909
  createdAt: Date;
15856
- updatedAt: Date;
15857
15910
  id: string;
15858
- symbol: string;
15859
- baseAssetId: string;
15860
15911
  quoteAssetId: string;
15861
- status: "active" | "draft" | "ended" | "paused";
15862
- chartEnabled: boolean;
15863
15912
  settlementEnabled: boolean;
15864
15913
  sourceType: "manual" | "market_pricing" | "trade_market";
15914
+ status: "active" | "draft" | "ended" | "paused";
15915
+ symbol: string;
15916
+ updatedAt: Date;
15865
15917
  };
15866
15918
  marketSymbolId: string;
15867
15919
  maxStakeAmount: string | null;
@@ -35,7 +35,19 @@ export declare const ledgerAccountTransferRouter: Elysia<"/ledger_account_transf
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
38
+ cookie?: Record<string, {
39
+ domain?: string | undefined;
40
+ expires?: Date | undefined;
41
+ httpOnly?: boolean | undefined;
42
+ maxAge?: number | undefined;
43
+ path?: string | undefined;
44
+ priority?: 'low' | 'medium' | 'high' | undefined;
45
+ partitioned?: boolean | undefined;
46
+ sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
+ secure?: boolean | undefined;
48
+ secrets?: string | null | (string | null)[];
49
+ value?: unknown;
50
+ }>;
39
51
  };
40
52
  path: string;
41
53
  route: string;
@@ -35,19 +35,7 @@ export declare const newsAdminRouter: Elysia<"/news", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, {
39
- domain?: string | undefined;
40
- expires?: Date | undefined;
41
- httpOnly?: boolean | undefined;
42
- maxAge?: number | undefined;
43
- path?: string | undefined;
44
- priority?: 'low' | 'medium' | 'high' | undefined;
45
- partitioned?: boolean | undefined;
46
- sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
- secure?: boolean | undefined;
48
- secrets?: string | null | (string | null)[];
49
- value?: unknown;
50
- }>;
38
+ cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
51
39
  };
52
40
  path: string;
53
41
  route: string;
@@ -35,7 +35,19 @@ export declare const shippingAddressAdminRouter: Elysia<"/shipping_address", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
38
+ cookie?: Record<string, {
39
+ domain?: string | undefined;
40
+ expires?: Date | undefined;
41
+ httpOnly?: boolean | undefined;
42
+ maxAge?: number | undefined;
43
+ path?: string | undefined;
44
+ priority?: 'low' | 'medium' | 'high' | undefined;
45
+ partitioned?: boolean | undefined;
46
+ sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
+ secure?: boolean | undefined;
48
+ secrets?: string | null | (string | null)[];
49
+ value?: unknown;
50
+ }>;
39
51
  };
40
52
  path: string;
41
53
  route: string;
@@ -35,19 +35,7 @@ export declare const teamAdminRouter: Elysia<"/team", {
35
35
  headers: import("elysia").HTTPHeaders;
36
36
  status?: number | keyof import("elysia").StatusMap;
37
37
  redirect?: string;
38
- cookie?: Record<string, {
39
- domain?: string | undefined;
40
- expires?: Date | undefined;
41
- httpOnly?: boolean | undefined;
42
- maxAge?: number | undefined;
43
- path?: string | undefined;
44
- priority?: 'low' | 'medium' | 'high' | undefined;
45
- partitioned?: boolean | undefined;
46
- sameSite?: true | false | 'lax' | 'strict' | 'none' | undefined;
47
- secure?: boolean | undefined;
48
- secrets?: string | null | (string | null)[];
49
- value?: unknown;
50
- }>;
38
+ cookie?: Record<string, import("elysia/cookies").ElysiaCookie>;
51
39
  };
52
40
  path: string;
53
41
  route: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aitlabs/namkwong",
3
- "version": "0.0.106",
3
+ "version": "0.0.107",
4
4
  "description": "Elysia API type definitions for Eden Treaty",
5
5
  "files": [
6
6
  "dist"