televerse-dao-typechain-types 1.0.8-alpha.20 → 1.0.8-alpha.21
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/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "televerse-dao-typechain-types",
|
|
3
3
|
"sourceType": "commonjs",
|
|
4
|
-
"version": "1.0.8-alpha.
|
|
4
|
+
"version": "1.0.8-alpha.21",
|
|
5
5
|
"description": "The typechain types for the Televerse DAO smart contracts.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"files": [
|
|
@@ -89,6 +89,7 @@
|
|
|
89
89
|
"axios": "^1.10.0",
|
|
90
90
|
"did-jwt": "^8.0.18",
|
|
91
91
|
"dotenv": "17.1.0",
|
|
92
|
+
"televerse-shared-schema": "0.0.2-alpha.2",
|
|
92
93
|
"ts-node": "10.9.2",
|
|
93
94
|
"typescript": "5.8.3",
|
|
94
95
|
"web3": "^4.16.0",
|
|
@@ -17,13 +17,84 @@ export declare const gisPointSchema: z.ZodObject<{
|
|
|
17
17
|
lat: z.ZodNumber;
|
|
18
18
|
lng: z.ZodNumber;
|
|
19
19
|
}, z.core.$strip>;
|
|
20
|
+
export declare const searchRequestPointSchema: z.ZodObject<{
|
|
21
|
+
uuid: z.ZodUUID;
|
|
22
|
+
coordinate: z.ZodObject<{
|
|
23
|
+
lat: z.ZodNumber;
|
|
24
|
+
lng: z.ZodNumber;
|
|
25
|
+
}, z.core.$strip>;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
export declare const searchRequestPayloadSchema: z.ZodUnion<[z.ZodObject<{
|
|
28
|
+
service_type: z.ZodEnum<{
|
|
29
|
+
readonly POINT_TO_POINT: "POINT_TO_POINT";
|
|
30
|
+
readonly INTERNET: "INTERNET";
|
|
31
|
+
}>;
|
|
32
|
+
src_point: z.ZodObject<{
|
|
33
|
+
uuid: z.ZodUUID;
|
|
34
|
+
coordinate: z.ZodObject<{
|
|
35
|
+
lat: z.ZodNumber;
|
|
36
|
+
lng: z.ZodNumber;
|
|
37
|
+
}, z.core.$strip>;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
dest_point: z.ZodObject<{
|
|
40
|
+
uuid: z.ZodUUID;
|
|
41
|
+
coordinate: z.ZodObject<{
|
|
42
|
+
lat: z.ZodNumber;
|
|
43
|
+
lng: z.ZodNumber;
|
|
44
|
+
}, z.core.$strip>;
|
|
45
|
+
}, z.core.$strip>;
|
|
46
|
+
speed: z.ZodNumber;
|
|
47
|
+
contract_period_count: z.ZodNumber;
|
|
48
|
+
contract_period_unit: z.ZodEnum<{
|
|
49
|
+
readonly DAILY: "DAILY";
|
|
50
|
+
readonly WEEKLY: "WEEKLY";
|
|
51
|
+
readonly MONTHLY: "MONTHLY";
|
|
52
|
+
readonly SEMIANNUALLY: "SEMIANNUALLY";
|
|
53
|
+
readonly ANNUALLY: "ANNUALLY";
|
|
54
|
+
}>;
|
|
55
|
+
rfq_uuid: z.ZodUUID;
|
|
56
|
+
created_at: z.ZodString;
|
|
57
|
+
tender_sec: z.ZodNumber;
|
|
58
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
59
|
+
service_type: z.ZodEnum<{
|
|
60
|
+
readonly POINT_TO_POINT: "POINT_TO_POINT";
|
|
61
|
+
readonly INTERNET: "INTERNET";
|
|
62
|
+
}>;
|
|
63
|
+
src_point: z.ZodObject<{
|
|
64
|
+
uuid: z.ZodUUID;
|
|
65
|
+
coordinate: z.ZodObject<{
|
|
66
|
+
lat: z.ZodNumber;
|
|
67
|
+
lng: z.ZodNumber;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
}, z.core.$strip>;
|
|
70
|
+
dest_point: z.ZodObject<{
|
|
71
|
+
uuid: z.ZodUUID;
|
|
72
|
+
coordinate: z.ZodObject<{
|
|
73
|
+
lat: z.ZodNumber;
|
|
74
|
+
lng: z.ZodNumber;
|
|
75
|
+
}, z.core.$strip>;
|
|
76
|
+
}, z.core.$strip>;
|
|
77
|
+
speed: z.ZodNumber;
|
|
78
|
+
contract_period_count: z.ZodNumber;
|
|
79
|
+
contract_period_unit: z.ZodEnum<{
|
|
80
|
+
readonly DAILY: "DAILY";
|
|
81
|
+
readonly WEEKLY: "WEEKLY";
|
|
82
|
+
readonly MONTHLY: "MONTHLY";
|
|
83
|
+
readonly SEMIANNUALLY: "SEMIANNUALLY";
|
|
84
|
+
readonly ANNUALLY: "ANNUALLY";
|
|
85
|
+
}>;
|
|
86
|
+
rfq_uuid: z.ZodString;
|
|
87
|
+
created_at: z.ZodString;
|
|
88
|
+
tender_sec: z.ZodNumber;
|
|
89
|
+
}, z.core.$strip>]>;
|
|
90
|
+
export type SearchRequestPayload = z.infer<typeof searchRequestPayloadSchema>;
|
|
20
91
|
export declare const DIDCommQuoteMessageSchema: z.ZodObject<{
|
|
21
92
|
rfq_uuid: z.ZodUUID;
|
|
22
93
|
quote_uuid: z.ZodUUID;
|
|
23
|
-
start_point_uuid: z.
|
|
24
|
-
start_point_other_uuid: z.ZodOptional<z.
|
|
25
|
-
end_point_uuid: z.
|
|
26
|
-
end_point_other_uuid: z.ZodOptional<z.
|
|
94
|
+
start_point_uuid: z.ZodUUID;
|
|
95
|
+
start_point_other_uuid: z.ZodOptional<z.ZodUUID>;
|
|
96
|
+
end_point_uuid: z.ZodUUID;
|
|
97
|
+
end_point_other_uuid: z.ZodOptional<z.ZodUUID>;
|
|
27
98
|
validity_time: z.ZodNumber;
|
|
28
99
|
created_at: z.ZodString;
|
|
29
100
|
lead_time: z.ZodNumber;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DecryptedDidCommMessageBodySchema = exports.DecryptedMessageListResultSchema = exports.DecryptedMessageResultSchema = exports.JWESchema = exports.RecipientSchema = exports.RecipientHeaderSchema = exports.EphemeralPublicKeySchema = exports.ResultSchema = exports.IVerifyResultSchema = exports.IErrorSchema = exports.CreateSearchVcSchema = exports.VerifiableCredentialSchema = exports.proofTypeSchema = exports.eip712ProofTypeSchema = exports.jwtProofTypeSchema = exports.unsignedCredentialSchema = exports.credentialStatusReferenceSchema = exports.contextTypeSchema = exports.credentialSubjectSchema = exports.issuerTypeSchema = exports.networksSchema = exports.configJsonSchema = exports.supportedNetworkEnumSchema = exports.supportedNetworks = exports.jwtSchema = exports.DIDCommQuoteMessageSchema = exports.gisPointSchema = exports.postMessagePayloadSchema = exports.postMessageSchema = exports.zOnChainState = void 0;
|
|
3
|
+
exports.DecryptedDidCommMessageBodySchema = exports.DecryptedMessageListResultSchema = exports.DecryptedMessageResultSchema = exports.JWESchema = exports.RecipientSchema = exports.RecipientHeaderSchema = exports.EphemeralPublicKeySchema = exports.ResultSchema = exports.IVerifyResultSchema = exports.IErrorSchema = exports.CreateSearchVcSchema = exports.VerifiableCredentialSchema = exports.proofTypeSchema = exports.eip712ProofTypeSchema = exports.jwtProofTypeSchema = exports.unsignedCredentialSchema = exports.credentialStatusReferenceSchema = exports.contextTypeSchema = exports.credentialSubjectSchema = exports.issuerTypeSchema = exports.networksSchema = exports.configJsonSchema = exports.supportedNetworkEnumSchema = exports.supportedNetworks = exports.jwtSchema = exports.DIDCommQuoteMessageSchema = exports.searchRequestPayloadSchema = exports.searchRequestPointSchema = exports.gisPointSchema = exports.postMessagePayloadSchema = exports.postMessageSchema = exports.zOnChainState = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
|
+
const televerse_shared_schema_1 = require("televerse-shared-schema");
|
|
5
6
|
exports.zOnChainState = zod_1.z.object({
|
|
6
7
|
ed25519Exists: zod_1.z.boolean(),
|
|
7
8
|
x25519Exists: zod_1.z.boolean(),
|
|
@@ -15,13 +16,42 @@ exports.postMessagePayloadSchema = zod_1.z.object({
|
|
|
15
16
|
token: zod_1.z.string().min(1, 'JWT token cannot be empty.'),
|
|
16
17
|
});
|
|
17
18
|
exports.gisPointSchema = zod_1.z.object({ lat: zod_1.z.number(), lng: zod_1.z.number() });
|
|
19
|
+
exports.searchRequestPointSchema = zod_1.z.object({
|
|
20
|
+
uuid: zod_1.z.uuid(),
|
|
21
|
+
coordinate: exports.gisPointSchema,
|
|
22
|
+
});
|
|
23
|
+
const point2PointRequestSchema = zod_1.z.object({
|
|
24
|
+
service_type: zod_1.z.enum(televerse_shared_schema_1.ServiceType),
|
|
25
|
+
src_point: exports.searchRequestPointSchema,
|
|
26
|
+
dest_point: exports.searchRequestPointSchema,
|
|
27
|
+
speed: zod_1.z.number(),
|
|
28
|
+
contract_period_count: zod_1.z.number(),
|
|
29
|
+
contract_period_unit: zod_1.z.enum(televerse_shared_schema_1.ChargeFrequency),
|
|
30
|
+
rfq_uuid: zod_1.z.uuid(),
|
|
31
|
+
created_at: zod_1.z.string(),
|
|
32
|
+
tender_sec: zod_1.z.number().min(1),
|
|
33
|
+
});
|
|
34
|
+
const networkRequestSchema = zod_1.z.object({
|
|
35
|
+
service_type: zod_1.z.enum(televerse_shared_schema_1.ServiceType),
|
|
36
|
+
src_point: exports.searchRequestPointSchema,
|
|
37
|
+
dest_point: exports.searchRequestPointSchema,
|
|
38
|
+
speed: zod_1.z.number(),
|
|
39
|
+
contract_period_count: zod_1.z.number(),
|
|
40
|
+
contract_period_unit: zod_1.z.enum(televerse_shared_schema_1.ChargeFrequency),
|
|
41
|
+
rfq_uuid: zod_1.z.string(),
|
|
42
|
+
created_at: zod_1.z.string(),
|
|
43
|
+
tender_sec: zod_1.z.number().min(1),
|
|
44
|
+
});
|
|
45
|
+
// TODO: Determine type schema for each serviceType
|
|
46
|
+
// This is just an prototype for implementation
|
|
47
|
+
exports.searchRequestPayloadSchema = point2PointRequestSchema.or(networkRequestSchema);
|
|
18
48
|
exports.DIDCommQuoteMessageSchema = zod_1.z.object({
|
|
19
49
|
rfq_uuid: zod_1.z.uuid(),
|
|
20
50
|
quote_uuid: zod_1.z.uuid(),
|
|
21
|
-
start_point_uuid: zod_1.z.
|
|
22
|
-
start_point_other_uuid: zod_1.z.
|
|
23
|
-
end_point_uuid: zod_1.z.
|
|
24
|
-
end_point_other_uuid: zod_1.z.
|
|
51
|
+
start_point_uuid: zod_1.z.uuid(),
|
|
52
|
+
start_point_other_uuid: zod_1.z.uuid().optional(),
|
|
53
|
+
end_point_uuid: zod_1.z.uuid(),
|
|
54
|
+
end_point_other_uuid: zod_1.z.uuid().optional(),
|
|
25
55
|
validity_time: zod_1.z.number(),
|
|
26
56
|
created_at: zod_1.z.string(),
|
|
27
57
|
lead_time: zod_1.z.number(),
|