@levrbet/shared 0.1.133 → 0.2.2
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.
|
@@ -13,12 +13,10 @@ export declare const MarketRiskAllocationSchema: z.ZodObject<{
|
|
|
13
13
|
export declare const CreateMarketSchema: z.ZodObject<{
|
|
14
14
|
chainId: z.ZodNumber;
|
|
15
15
|
gameId: z.ZodNumber;
|
|
16
|
-
|
|
17
|
-
levrMarketContract: z.ZodCustom<`0x${string}`, `0x${string}`>;
|
|
18
|
-
leveraged: z.ZodBoolean;
|
|
16
|
+
levrMarketIds: z.ZodArray<z.ZodEnum<typeof LevrMarketId>>;
|
|
19
17
|
normalizationFactor: z.ZodNumber;
|
|
20
18
|
marketDetails: z.ZodObject<{}, z.core.$strip>;
|
|
21
|
-
|
|
19
|
+
marketRiskAllocations: z.ZodArray<z.ZodObject<{
|
|
22
20
|
asset: z.ZodString;
|
|
23
21
|
boundedLossA: z.ZodNumber;
|
|
24
22
|
boundedLossB: z.ZodNumber;
|
|
@@ -27,22 +25,10 @@ export declare const CreateMarketSchema: z.ZodObject<{
|
|
|
27
25
|
odds: z.ZodArray<z.ZodNumber>;
|
|
28
26
|
targetScore: z.ZodOptional<z.ZodNumber>;
|
|
29
27
|
sideGroup: z.ZodOptional<z.ZodNumber>;
|
|
30
|
-
}, z.core.$strip
|
|
28
|
+
}, z.core.$strip>>;
|
|
31
29
|
providers: z.ZodObject<{}, z.core.$strip>;
|
|
32
30
|
activeProvider: z.ZodObject<{}, z.core.$strip>;
|
|
33
|
-
marketType: z.ZodEnum<{
|
|
34
|
-
FullTimeWinner: "FullTimeWinner";
|
|
35
|
-
OverUnder: "OverUnder";
|
|
36
|
-
}>;
|
|
37
|
-
status: z.ZodEnum<{
|
|
38
|
-
Open: "Open";
|
|
39
|
-
Closed: "Closed";
|
|
40
|
-
Settled: "Settled";
|
|
41
|
-
Refunded: "Refunded";
|
|
42
|
-
}>;
|
|
43
31
|
levrGameObjectId: z.ZodString;
|
|
44
|
-
marketName: z.ZodString;
|
|
45
|
-
allowSideGroup: z.ZodOptional<z.ZodNumber>;
|
|
46
32
|
}, z.core.$strip>;
|
|
47
33
|
export type CreateMarketRequest = z.infer<typeof CreateMarketSchema>;
|
|
48
34
|
export declare const ProviderDetailsSchema: z.ZodObject<{
|
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.ProviderDetailsArraySchema = exports.ProviderDetailsSchema = exports.CreateMarketSchema = exports.MarketRiskAllocationSchema = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const contracts_1 = require("../../../contracts");
|
|
6
|
-
const prisma_1 = require("../../../prisma");
|
|
7
6
|
const validators_1 = require("../../../validators");
|
|
8
7
|
exports.MarketRiskAllocationSchema = zod_1.z.object({
|
|
9
8
|
asset: zod_1.z.string(), // Address is a string alias
|
|
@@ -18,19 +17,13 @@ exports.MarketRiskAllocationSchema = zod_1.z.object({
|
|
|
18
17
|
exports.CreateMarketSchema = zod_1.z.object({
|
|
19
18
|
chainId: zod_1.z.number(),
|
|
20
19
|
gameId: zod_1.z.number(),
|
|
21
|
-
|
|
22
|
-
levrMarketContract: validators_1.addressSchema,
|
|
23
|
-
leveraged: zod_1.z.boolean(),
|
|
20
|
+
levrMarketIds: zod_1.z.array(zod_1.z.enum(contracts_1.LevrMarketId)).min(1),
|
|
24
21
|
normalizationFactor: zod_1.z.number(),
|
|
25
22
|
marketDetails: zod_1.z.object({}), // details as needed
|
|
26
|
-
|
|
23
|
+
marketRiskAllocations: zod_1.z.array(exports.MarketRiskAllocationSchema).min(1),
|
|
27
24
|
providers: zod_1.z.object({}), // providers as needed
|
|
28
25
|
activeProvider: zod_1.z.object({}), // active provider as needed
|
|
29
|
-
marketType: zod_1.z.enum(prisma_1.MarketTypes),
|
|
30
|
-
status: zod_1.z.enum(prisma_1.MarketStatus),
|
|
31
26
|
levrGameObjectId: validators_1.objectIdSchema,
|
|
32
|
-
marketName: zod_1.z.string(),
|
|
33
|
-
allowSideGroup: zod_1.z.number().optional(), // Optional side group, using Bytes8Schema for validation
|
|
34
27
|
});
|
|
35
28
|
exports.ProviderDetailsSchema = zod_1.z.object({
|
|
36
29
|
fixtureId: zod_1.z.string(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market.request.types.js","sourceRoot":"","sources":["../../../../../src/core/types/oracle/requests/market.request.types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,kDAAiD;AACjD,
|
|
1
|
+
{"version":3,"file":"market.request.types.js","sourceRoot":"","sources":["../../../../../src/core/types/oracle/requests/market.request.types.ts"],"names":[],"mappings":";;;AAAA,6BAAuB;AACvB,kDAAiD;AACjD,oDAAoD;AAEvC,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,KAAK,EAAE,OAAC,CAAC,MAAM,EAAE,EAAE,4BAA4B;IAC/C,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,YAAY,EAAE,OAAC,CAAC,MAAM,EAAE;IACxB,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,IAAI,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,MAAM,EAAE,CAAC,EAAE,4BAA4B;IACvD,WAAW,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,wBAAwB;IAC5D,SAAS,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,EAAE,yBAAyB;CAC9D,CAAC,CAAA;AAEW,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,MAAM,EAAE;IACnB,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,aAAa,EAAE,OAAC,CAAC,KAAK,CAAC,OAAC,CAAC,IAAI,CAAC,wBAAY,CAAC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