@levrbet/shared 0.1.156 → 0.1.157
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.
- package/dist/core/types/oracle/market/markets.types.d.ts +2 -2
- package/dist/core/types/oracle/requests/game.request.types.d.ts +2 -2
- package/dist/core/validators/bytes.validators.d.ts +4 -3
- package/dist/core/validators/bytes.validators.js +5 -5
- package/dist/core/validators/bytes.validators.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { GamePhase, MarketStatus, MarketType, Prisma } from "../../../../core/prisma";
|
|
2
|
-
import {
|
|
2
|
+
import { Bytes10, Bytes32 } from "../../../validators";
|
|
3
3
|
import { LevrChain } from "../../blockchain";
|
|
4
4
|
import { type OddsData, type PriceData } from "./odds.types";
|
|
5
5
|
export type MarketWithRelations = Prisma.MarketGetPayload<{
|
|
@@ -92,4 +92,4 @@ export declare const SIDE_UNDER: number;
|
|
|
92
92
|
export declare const GROUP_OUTCOME: number;
|
|
93
93
|
export declare const GROUP_TOTAL: number;
|
|
94
94
|
export type LevrGameMarketId = Bytes32;
|
|
95
|
-
export type LevrFixtureId =
|
|
95
|
+
export type LevrFixtureId = Bytes10;
|
|
@@ -58,7 +58,7 @@ export declare const TeamSchema: z.ZodObject<{
|
|
|
58
58
|
mascot: z.ZodString;
|
|
59
59
|
}, z.core.$strip>;
|
|
60
60
|
export declare const CreateFixtureRequestSchema: z.ZodObject<{
|
|
61
|
-
levrFixtureId: z.ZodType<import("../../../validators").
|
|
61
|
+
levrFixtureId: z.ZodType<import("../../../validators").Bytes10, unknown, z.core.$ZodTypeInternals<import("../../../validators").Bytes10, unknown>>;
|
|
62
62
|
leagueObjectId: z.ZodString;
|
|
63
63
|
opticOddsFixtureId: z.ZodString;
|
|
64
64
|
lsportsFixtureId: z.ZodString;
|
|
@@ -156,7 +156,7 @@ export declare const GetFixturesQuerySchema: z.ZodObject<{
|
|
|
156
156
|
leagueAbbreviation: z.ZodOptional<z.ZodString>;
|
|
157
157
|
}, z.core.$strip>;
|
|
158
158
|
export declare const FixtureIdChainIdSchema: z.ZodObject<{
|
|
159
|
-
fixtureId: z.ZodType<import("../../../validators").
|
|
159
|
+
fixtureId: z.ZodType<import("../../../validators").Bytes10, unknown, z.core.$ZodTypeInternals<import("../../../validators").Bytes10, unknown>>;
|
|
160
160
|
chainId: z.ZodDefault<z.ZodCoercedNumber<unknown>>;
|
|
161
161
|
}, z.core.$strip>;
|
|
162
162
|
export type CreateLeaguesRequest = z.infer<typeof CreateLeaguesRequestSchema>;
|
|
@@ -5,27 +5,28 @@ type BrandedHexString<TBrand extends string> = `0x${string}` & {
|
|
|
5
5
|
};
|
|
6
6
|
export type Bytes6 = BrandedHexString<"Bytes6">;
|
|
7
7
|
export type Bytes8 = BrandedHexString<"Bytes8">;
|
|
8
|
+
export type Bytes10 = BrandedHexString<"Bytes10">;
|
|
8
9
|
export type Bytes12 = BrandedHexString<"Bytes12">;
|
|
9
10
|
export type Bytes16 = BrandedHexString<"Bytes16">;
|
|
10
11
|
export type Bytes32 = BrandedHexString<"Bytes32">;
|
|
11
12
|
export type Bytes64 = BrandedHexString<"Bytes64">;
|
|
12
13
|
export declare const isBytes6: (val: unknown) => val is Bytes6;
|
|
13
14
|
export declare const isBytes8: (val: unknown) => val is Bytes8;
|
|
15
|
+
export declare const isBytes10: (val: unknown) => val is Bytes10;
|
|
14
16
|
export declare const isBytes12: (val: unknown) => val is Bytes12;
|
|
15
|
-
export declare const isBytes10: (val: unknown) => val is Bytes12;
|
|
16
17
|
export declare const isBytes16: (val: unknown) => val is Bytes16;
|
|
17
18
|
export declare const isBytes32: (val: unknown) => val is Bytes32;
|
|
18
19
|
export declare const isBytes64: (val: unknown) => val is Bytes64;
|
|
19
20
|
export declare const bytes6Schema: z.ZodType<Bytes6, unknown, z.core.$ZodTypeInternals<Bytes6, unknown>>;
|
|
20
21
|
export declare const bytes8Schema: z.ZodType<Bytes8, unknown, z.core.$ZodTypeInternals<Bytes8, unknown>>;
|
|
21
22
|
export declare const bytes12Schema: z.ZodType<Bytes12, unknown, z.core.$ZodTypeInternals<Bytes12, unknown>>;
|
|
22
|
-
export declare const bytes10Schema: z.ZodType<
|
|
23
|
+
export declare const bytes10Schema: z.ZodType<Bytes10, unknown, z.core.$ZodTypeInternals<Bytes10, unknown>>;
|
|
23
24
|
export declare const bytes16Schema: z.ZodType<Bytes16, unknown, z.core.$ZodTypeInternals<Bytes16, unknown>>;
|
|
24
25
|
export declare const bytes32Schema: z.ZodType<Bytes32, unknown, z.core.$ZodTypeInternals<Bytes32, unknown>>;
|
|
25
26
|
export declare const bytes64Schema: z.ZodType<Bytes64, unknown, z.core.$ZodTypeInternals<Bytes64, unknown>>;
|
|
26
27
|
export declare const levrTournamentIdSchema: z.ZodType<Bytes6, unknown, z.core.$ZodTypeInternals<Bytes6, unknown>>;
|
|
27
28
|
export declare const levrSportIdSchema: z.ZodType<Bytes12, unknown, z.core.$ZodTypeInternals<Bytes12, unknown>>;
|
|
28
|
-
export declare const levrFixtureIdSchema: z.ZodType<
|
|
29
|
+
export declare const levrFixtureIdSchema: z.ZodType<Bytes10, unknown, z.core.$ZodTypeInternals<Bytes10, unknown>>;
|
|
29
30
|
export declare const levrLeagueIdSchema: z.ZodType<Bytes8, unknown, z.core.$ZodTypeInternals<Bytes8, unknown>>;
|
|
30
31
|
export declare const levrGameMarketIdSchema: z.ZodType<Bytes32, unknown, z.core.$ZodTypeInternals<Bytes32, unknown>>;
|
|
31
32
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.levrGameMarketIdSchema = exports.levrLeagueIdSchema = exports.levrFixtureIdSchema = exports.levrSportIdSchema = exports.levrTournamentIdSchema = exports.bytes64Schema = exports.bytes32Schema = exports.bytes16Schema = exports.bytes10Schema = exports.bytes12Schema = exports.bytes8Schema = exports.bytes6Schema = exports.isBytes64 = exports.isBytes32 = exports.isBytes16 = exports.
|
|
3
|
+
exports.levrGameMarketIdSchema = exports.levrLeagueIdSchema = exports.levrFixtureIdSchema = exports.levrSportIdSchema = exports.levrTournamentIdSchema = exports.bytes64Schema = exports.bytes32Schema = exports.bytes16Schema = exports.bytes10Schema = exports.bytes12Schema = exports.bytes8Schema = exports.bytes6Schema = exports.isBytes64 = exports.isBytes32 = exports.isBytes16 = exports.isBytes12 = exports.isBytes10 = exports.isBytes8 = exports.isBytes6 = exports.addressSchema = void 0;
|
|
4
4
|
const viem_1 = require("viem");
|
|
5
5
|
const zod_1 = require("zod");
|
|
6
6
|
exports.addressSchema = zod_1.z.custom((val) => typeof val === "string" && (0, viem_1.isAddress)(val), {
|
|
@@ -13,10 +13,10 @@ const isBytes6 = (val) => createBytesValidator(6)(val);
|
|
|
13
13
|
exports.isBytes6 = isBytes6;
|
|
14
14
|
const isBytes8 = (val) => createBytesValidator(8)(val);
|
|
15
15
|
exports.isBytes8 = isBytes8;
|
|
16
|
+
const isBytes10 = (val) => createBytesValidator(10)(val);
|
|
17
|
+
exports.isBytes10 = isBytes10;
|
|
16
18
|
const isBytes12 = (val) => createBytesValidator(12)(val);
|
|
17
19
|
exports.isBytes12 = isBytes12;
|
|
18
|
-
const isBytes10 = (val) => createBytesValidator(10)(val); // Added isBytes10
|
|
19
|
-
exports.isBytes10 = isBytes10;
|
|
20
20
|
const isBytes16 = (val) => createBytesValidator(16)(val);
|
|
21
21
|
exports.isBytes16 = isBytes16;
|
|
22
22
|
const isBytes32 = (val) => createBytesValidator(32)(val);
|
|
@@ -34,14 +34,14 @@ function createBytesSchema(validator, bytesSize) {
|
|
|
34
34
|
exports.bytes6Schema = createBytesSchema(exports.isBytes6, 6);
|
|
35
35
|
exports.bytes8Schema = createBytesSchema(exports.isBytes8, 8);
|
|
36
36
|
exports.bytes12Schema = createBytesSchema(exports.isBytes12, 12);
|
|
37
|
-
exports.bytes10Schema = createBytesSchema(exports.isBytes10, 10);
|
|
37
|
+
exports.bytes10Schema = createBytesSchema(exports.isBytes10, 10);
|
|
38
38
|
exports.bytes16Schema = createBytesSchema(exports.isBytes16, 16);
|
|
39
39
|
exports.bytes32Schema = createBytesSchema(exports.isBytes32, 32);
|
|
40
40
|
exports.bytes64Schema = createBytesSchema(exports.isBytes64, 64);
|
|
41
41
|
// Specific schemas using the existing generic function
|
|
42
42
|
exports.levrTournamentIdSchema = exports.bytes6Schema;
|
|
43
43
|
exports.levrSportIdSchema = exports.bytes12Schema;
|
|
44
|
-
exports.levrFixtureIdSchema = exports.
|
|
44
|
+
exports.levrFixtureIdSchema = exports.bytes10Schema;
|
|
45
45
|
exports.levrLeagueIdSchema = exports.bytes8Schema;
|
|
46
46
|
exports.levrGameMarketIdSchema = exports.bytes32Schema;
|
|
47
47
|
//# sourceMappingURL=bytes.validators.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bytes.validators.js","sourceRoot":"","sources":["../../../src/core/validators/bytes.validators.ts"],"names":[],"mappings":";;;AACA,+BAA6C;AAC7C,6BAAuB;AAEV,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAU,CAAC,GAAG,EAAkB,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAA,gBAAS,EAAC,GAAG,CAAC,EAAE;IAC/G,OAAO,EAAE,uBAAuB;CACnC,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"bytes.validators.js","sourceRoot":"","sources":["../../../src/core/validators/bytes.validators.ts"],"names":[],"mappings":";;;AACA,+BAA6C;AAC7C,6BAAuB;AAEV,QAAA,aAAa,GAAG,OAAC,CAAC,MAAM,CAAU,CAAC,GAAG,EAAkB,EAAE,CAAC,OAAO,GAAG,KAAK,QAAQ,IAAI,IAAA,gBAAS,EAAC,GAAG,CAAC,EAAE;IAC/G,OAAO,EAAE,uBAAuB;CACnC,CAAC,CAAA;AAcF,kDAAkD;AAClD,MAAM,oBAAoB,GAAG,CAAC,SAA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