@levrbet/shared 0.2.21 → 0.2.22
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.
|
@@ -1,33 +1,31 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { LevrMarketId } from "../../../contracts";
|
|
3
|
+
import { OddsServices } from "../market";
|
|
3
4
|
export declare const MarketRiskAllocationSchema: z.ZodObject<{
|
|
5
|
+
levrMarketId: z.ZodEnum<typeof LevrMarketId>;
|
|
4
6
|
asset: z.ZodString;
|
|
5
7
|
boundedLossA: z.ZodNumber;
|
|
6
8
|
boundedLossB: z.ZodNumber;
|
|
7
|
-
boundedLossC: z.ZodNumber
|
|
9
|
+
boundedLossC: z.ZodOptional<z.ZodNumber>;
|
|
8
10
|
nFactor: z.ZodNumber;
|
|
9
11
|
odds: z.ZodArray<z.ZodNumber>;
|
|
10
12
|
targetScore: z.ZodOptional<z.ZodNumber>;
|
|
11
|
-
|
|
13
|
+
primaryProvider: z.ZodEnum<typeof OddsServices>;
|
|
12
14
|
}, z.core.$strip>;
|
|
13
15
|
export declare const CreateMarketSchema: z.ZodObject<{
|
|
14
16
|
chainId: z.ZodNumber;
|
|
15
17
|
gameId: z.ZodNumber;
|
|
16
|
-
levrMarketIds: z.ZodArray<z.ZodEnum<typeof LevrMarketId>>;
|
|
17
|
-
normalizationFactor: z.ZodNumber;
|
|
18
|
-
marketDetails: z.ZodObject<{}, z.core.$strip>;
|
|
19
18
|
marketRiskAllocations: z.ZodArray<z.ZodObject<{
|
|
19
|
+
levrMarketId: z.ZodEnum<typeof LevrMarketId>;
|
|
20
20
|
asset: z.ZodString;
|
|
21
21
|
boundedLossA: z.ZodNumber;
|
|
22
22
|
boundedLossB: z.ZodNumber;
|
|
23
|
-
boundedLossC: z.ZodNumber
|
|
23
|
+
boundedLossC: z.ZodOptional<z.ZodNumber>;
|
|
24
24
|
nFactor: z.ZodNumber;
|
|
25
25
|
odds: z.ZodArray<z.ZodNumber>;
|
|
26
26
|
targetScore: z.ZodOptional<z.ZodNumber>;
|
|
27
|
-
|
|
27
|
+
primaryProvider: z.ZodEnum<typeof OddsServices>;
|
|
28
28
|
}, z.core.$strip>>;
|
|
29
|
-
providers: z.ZodObject<{}, z.core.$strip>;
|
|
30
|
-
activeProvider: z.ZodObject<{}, z.core.$strip>;
|
|
31
29
|
levrGameObjectId: z.ZodString;
|
|
32
30
|
}, z.core.$strip>;
|
|
33
31
|
export type CreateMarketRequest = z.infer<typeof CreateMarketSchema>;
|
|
@@ -4,25 +4,22 @@ exports.ProviderDetailsArraySchema = exports.ProviderDetailsSchema = exports.Cre
|
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
const contracts_1 = require("../../../contracts");
|
|
6
6
|
const validators_1 = require("../../../validators");
|
|
7
|
+
const market_1 = require("../market");
|
|
7
8
|
exports.MarketRiskAllocationSchema = zod_1.z.object({
|
|
9
|
+
levrMarketId: zod_1.z.enum(contracts_1.LevrMarketId),
|
|
8
10
|
asset: zod_1.z.string(), // Address is a string alias
|
|
9
11
|
boundedLossA: zod_1.z.number(),
|
|
10
12
|
boundedLossB: zod_1.z.number(),
|
|
11
|
-
boundedLossC: zod_1.z.number(),
|
|
13
|
+
boundedLossC: zod_1.z.number().optional(),
|
|
12
14
|
nFactor: zod_1.z.number(),
|
|
13
15
|
odds: zod_1.z.array(zod_1.z.number()), // Array of numbers for odds
|
|
14
16
|
targetScore: zod_1.z.number().optional(), // Optional target score
|
|
15
|
-
|
|
17
|
+
primaryProvider: zod_1.z.enum(market_1.OddsServices),
|
|
16
18
|
});
|
|
17
19
|
exports.CreateMarketSchema = zod_1.z.object({
|
|
18
20
|
chainId: zod_1.z.number(),
|
|
19
21
|
gameId: zod_1.z.number(),
|
|
20
|
-
levrMarketIds: zod_1.z.array(zod_1.z.enum(contracts_1.LevrMarketId)).min(1),
|
|
21
|
-
normalizationFactor: zod_1.z.number(),
|
|
22
|
-
marketDetails: zod_1.z.object({}), // details as needed
|
|
23
22
|
marketRiskAllocations: zod_1.z.array(exports.MarketRiskAllocationSchema).min(1),
|
|
24
|
-
providers: zod_1.z.object({}), // providers as needed
|
|
25
|
-
activeProvider: zod_1.z.object({}), // active provider as needed
|
|
26
23
|
levrGameObjectId: validators_1.objectIdSchema,
|
|
27
24
|
});
|
|
28
25
|
exports.ProviderDetailsSchema = zod_1.z.object({
|
|
@@ -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,oDAAoD;
|
|
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;AACpD,sCAAwC;AAE3B,QAAA,0BAA0B,GAAG,OAAC,CAAC,MAAM,CAAC;IAC/C,YAAY,EAAE,OAAC,CAAC,IAAI,CAAC,wBAAY,CAAC;IAClC,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,CAAC,QAAQ,EAAE;IACnC,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,eAAe,EAAE,OAAC,CAAC,IAAI,CAAC,qBAAY,CAAC;CACxC,CAAC,CAAA;AACW,QAAA,kBAAkB,GAAG,OAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,OAAC,CAAC,MA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