televerse-dao-typechain-types 1.0.8-alpha.12 → 1.0.8-alpha.13
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 +1 -1
- package/televerse-utils/index.d.ts +75 -0
- package/televerse-utils/index.js +16 -16
package/package.json
CHANGED
|
@@ -72,6 +72,13 @@ export declare const QuoteSchema: z.ZodIntersection<z.ZodObject<{
|
|
|
72
72
|
hashHex: z.ZodString;
|
|
73
73
|
encryptedMessage: z.ZodString;
|
|
74
74
|
}, z.core.$strip>>;
|
|
75
|
+
export declare const SearchPointSchema: z.ZodObject<{
|
|
76
|
+
uuid: z.ZodUUID;
|
|
77
|
+
coordinate: z.ZodObject<{
|
|
78
|
+
lat: z.ZodNumber;
|
|
79
|
+
lng: z.ZodNumber;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>;
|
|
75
82
|
export type Rfq = z.infer<typeof searchRequestSchema>;
|
|
76
83
|
export declare const searchRequestSchema: z.ZodObject<{
|
|
77
84
|
service_type: z.ZodString;
|
|
@@ -103,6 +110,11 @@ export declare const searchRequestSchema: z.ZodObject<{
|
|
|
103
110
|
}, z.core.$strip>;
|
|
104
111
|
export declare const jwtSchema: z.ZodString;
|
|
105
112
|
export type JwtToken = z.infer<typeof jwtSchema>;
|
|
113
|
+
export declare const supportedNetworks: {
|
|
114
|
+
readonly holesky: "holesky";
|
|
115
|
+
readonly sepolia: "sepolia";
|
|
116
|
+
readonly lineaSepolia: "linea-sepolia";
|
|
117
|
+
};
|
|
106
118
|
export declare const supportedNetworkEnumSchema: z.ZodEnum<{
|
|
107
119
|
readonly holesky: "holesky";
|
|
108
120
|
readonly sepolia: "sepolia";
|
|
@@ -200,6 +212,26 @@ export declare const unsignedCredentialSchema: z.ZodObject<{
|
|
|
200
212
|
}, z.core.$strip>>;
|
|
201
213
|
id: z.ZodOptional<z.ZodString>;
|
|
202
214
|
}, z.core.$strip>;
|
|
215
|
+
export declare const jwtProofTypeSchema: z.ZodObject<{
|
|
216
|
+
type: z.ZodOptional<z.ZodString>;
|
|
217
|
+
jwt: z.ZodOptional<z.ZodString>;
|
|
218
|
+
}, z.core.$strip>;
|
|
219
|
+
export declare const eip712ProofTypeSchema: z.ZodObject<{
|
|
220
|
+
type: z.ZodOptional<z.ZodString>;
|
|
221
|
+
verificationMethod: z.ZodOptional<z.ZodString>;
|
|
222
|
+
created: z.ZodOptional<z.ZodString>;
|
|
223
|
+
proofPurpose: z.ZodOptional<z.ZodString>;
|
|
224
|
+
proofValue: z.ZodOptional<z.ZodString>;
|
|
225
|
+
eip712: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
domain: z.ZodOptional<z.ZodObject<{
|
|
227
|
+
chainId: z.ZodNumber;
|
|
228
|
+
name: z.ZodString;
|
|
229
|
+
version: z.ZodString;
|
|
230
|
+
}, z.core.$strip>>;
|
|
231
|
+
types: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
|
|
232
|
+
primaryType: z.ZodOptional<z.ZodString>;
|
|
233
|
+
}, z.core.$strip>>;
|
|
234
|
+
}, z.core.$strip>;
|
|
203
235
|
export declare const proofTypeSchema: z.ZodUnion<readonly [z.ZodObject<{
|
|
204
236
|
type: z.ZodOptional<z.ZodString>;
|
|
205
237
|
jwt: z.ZodOptional<z.ZodString>;
|
|
@@ -318,6 +350,49 @@ export declare const LoginVcMessageSchema: z.ZodObject<{
|
|
|
318
350
|
nonce: z.ZodString;
|
|
319
351
|
}, z.core.$strip>;
|
|
320
352
|
export declare const ResultSchema: <T extends z.ZodTypeAny>(dataSchema: T) => z.ZodUnion<readonly [z.ZodTuple<[z.ZodLiteral<true>, T], null>, z.ZodTuple<[z.ZodLiteral<false>, z.ZodString], null>]>;
|
|
353
|
+
export declare const EphemeralPublicKeySchema: z.ZodObject<{
|
|
354
|
+
kty: z.ZodOptional<z.ZodString>;
|
|
355
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
356
|
+
x: z.ZodOptional<z.ZodString>;
|
|
357
|
+
y: z.ZodOptional<z.ZodString>;
|
|
358
|
+
n: z.ZodOptional<z.ZodString>;
|
|
359
|
+
e: z.ZodOptional<z.ZodString>;
|
|
360
|
+
}, z.core.$strip>;
|
|
361
|
+
export declare const RecipientHeaderSchema: z.ZodObject<{
|
|
362
|
+
alg: z.ZodOptional<z.ZodString>;
|
|
363
|
+
iv: z.ZodOptional<z.ZodString>;
|
|
364
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
365
|
+
epk: z.ZodOptional<z.ZodObject<{
|
|
366
|
+
kty: z.ZodOptional<z.ZodString>;
|
|
367
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
368
|
+
x: z.ZodOptional<z.ZodString>;
|
|
369
|
+
y: z.ZodOptional<z.ZodString>;
|
|
370
|
+
n: z.ZodOptional<z.ZodString>;
|
|
371
|
+
e: z.ZodOptional<z.ZodString>;
|
|
372
|
+
}, z.core.$strip>>;
|
|
373
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
374
|
+
apv: z.ZodOptional<z.ZodString>;
|
|
375
|
+
apu: z.ZodOptional<z.ZodString>;
|
|
376
|
+
}, z.core.$strip>;
|
|
377
|
+
export declare const RecipientSchema: z.ZodObject<{
|
|
378
|
+
header: z.ZodObject<{
|
|
379
|
+
alg: z.ZodOptional<z.ZodString>;
|
|
380
|
+
iv: z.ZodOptional<z.ZodString>;
|
|
381
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
382
|
+
epk: z.ZodOptional<z.ZodObject<{
|
|
383
|
+
kty: z.ZodOptional<z.ZodString>;
|
|
384
|
+
crv: z.ZodOptional<z.ZodString>;
|
|
385
|
+
x: z.ZodOptional<z.ZodString>;
|
|
386
|
+
y: z.ZodOptional<z.ZodString>;
|
|
387
|
+
n: z.ZodOptional<z.ZodString>;
|
|
388
|
+
e: z.ZodOptional<z.ZodString>;
|
|
389
|
+
}, z.core.$strip>>;
|
|
390
|
+
kid: z.ZodOptional<z.ZodString>;
|
|
391
|
+
apv: z.ZodOptional<z.ZodString>;
|
|
392
|
+
apu: z.ZodOptional<z.ZodString>;
|
|
393
|
+
}, z.core.$strip>;
|
|
394
|
+
encrypted_key: z.ZodString;
|
|
395
|
+
}, z.core.$strip>;
|
|
321
396
|
export declare const JWESchema: z.ZodObject<{
|
|
322
397
|
protected: z.ZodString;
|
|
323
398
|
iv: z.ZodString;
|
package/televerse-utils/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.JWESchema = exports.ResultSchema = exports.LoginVcMessageSchema = exports.IVerifyResultSchema = exports.IErrorSchema = exports.CreateSearchVcSchema = exports.VerifiableCredentialSchema = exports.proofTypeSchema = exports.unsignedCredentialSchema = exports.credentialStatusReferenceSchema = exports.contextTypeSchema = exports.credentialSubjectSchema = exports.issuerTypeSchema = exports.networksSchema = exports.configJsonSchema = exports.supportedNetworkEnumSchema = exports.jwtSchema = exports.searchRequestSchema = exports.QuoteSchema = exports.DIDCommQuoteMessageSchema = exports.GisPointSchema = exports.nniPayloadSchema = exports.postMessagePayloadSchema = exports.postMessageSchema = exports.ChargeFrequency = void 0;
|
|
3
|
+
exports.JWESchema = exports.RecipientSchema = exports.RecipientHeaderSchema = exports.EphemeralPublicKeySchema = exports.ResultSchema = exports.LoginVcMessageSchema = 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.searchRequestSchema = exports.SearchPointSchema = exports.QuoteSchema = exports.DIDCommQuoteMessageSchema = exports.GisPointSchema = exports.nniPayloadSchema = exports.postMessagePayloadSchema = exports.postMessageSchema = exports.ChargeFrequency = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
exports.ChargeFrequency = {
|
|
6
6
|
DAILY: 'DAILY',
|
|
@@ -45,15 +45,15 @@ exports.QuoteSchema = exports.DIDCommQuoteMessageSchema.and(zod_1.z.object({
|
|
|
45
45
|
hashHex: zod_1.z.string(),
|
|
46
46
|
encryptedMessage: zod_1.z.string(),
|
|
47
47
|
}));
|
|
48
|
-
|
|
48
|
+
exports.SearchPointSchema = zod_1.z.object({
|
|
49
49
|
uuid: zod_1.z.uuid(),
|
|
50
50
|
coordinate: exports.GisPointSchema,
|
|
51
51
|
});
|
|
52
52
|
// TODO: This is build on the fly to verify for RFQ table
|
|
53
53
|
exports.searchRequestSchema = zod_1.z.object({
|
|
54
54
|
service_type: zod_1.z.string(),
|
|
55
|
-
src_point: SearchPointSchema,
|
|
56
|
-
dest_point: SearchPointSchema,
|
|
55
|
+
src_point: exports.SearchPointSchema,
|
|
56
|
+
dest_point: exports.SearchPointSchema,
|
|
57
57
|
speed: zod_1.z.number(),
|
|
58
58
|
contract_period: zod_1.z.number(),
|
|
59
59
|
charge_frequency: zod_1.z.enum(exports.ChargeFrequency),
|
|
@@ -63,12 +63,12 @@ exports.searchRequestSchema = zod_1.z.object({
|
|
|
63
63
|
exports.jwtSchema = zod_1.z
|
|
64
64
|
.string()
|
|
65
65
|
.regex(/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+$/, 'Invalid JWT format');
|
|
66
|
-
|
|
66
|
+
exports.supportedNetworks = {
|
|
67
67
|
holesky: 'holesky',
|
|
68
68
|
sepolia: 'sepolia',
|
|
69
69
|
lineaSepolia: 'linea-sepolia',
|
|
70
70
|
};
|
|
71
|
-
exports.supportedNetworkEnumSchema = zod_1.z.enum(supportedNetworks);
|
|
71
|
+
exports.supportedNetworkEnumSchema = zod_1.z.enum(exports.supportedNetworks);
|
|
72
72
|
const networkProviderSchema = zod_1.z.object({
|
|
73
73
|
name: zod_1.z.string().min(1),
|
|
74
74
|
rpcUrl: zod_1.z.string().min(1),
|
|
@@ -130,11 +130,11 @@ exports.unsignedCredentialSchema = zod_1.z.object({
|
|
|
130
130
|
credentialStatus: exports.credentialStatusReferenceSchema.optional(),
|
|
131
131
|
id: zod_1.z.string().optional(),
|
|
132
132
|
});
|
|
133
|
-
|
|
133
|
+
exports.jwtProofTypeSchema = zod_1.z.object({
|
|
134
134
|
type: zod_1.z.string().optional(),
|
|
135
135
|
jwt: zod_1.z.string().optional(),
|
|
136
136
|
});
|
|
137
|
-
|
|
137
|
+
exports.eip712ProofTypeSchema = zod_1.z.object({
|
|
138
138
|
type: zod_1.z.string().optional(),
|
|
139
139
|
verificationMethod: zod_1.z.string().optional(),
|
|
140
140
|
created: zod_1.z.string().optional(),
|
|
@@ -155,8 +155,8 @@ const eip712ProofTypeSchema = zod_1.z.object({
|
|
|
155
155
|
.optional(),
|
|
156
156
|
});
|
|
157
157
|
exports.proofTypeSchema = zod_1.z.union([
|
|
158
|
-
jwtProofTypeSchema,
|
|
159
|
-
eip712ProofTypeSchema,
|
|
158
|
+
exports.jwtProofTypeSchema,
|
|
159
|
+
exports.eip712ProofTypeSchema,
|
|
160
160
|
]);
|
|
161
161
|
exports.VerifiableCredentialSchema = exports.unsignedCredentialSchema.and(zod_1.z.object({
|
|
162
162
|
proof: exports.proofTypeSchema,
|
|
@@ -181,7 +181,7 @@ const ResultSchema = (dataSchema) => zod_1.z.union([
|
|
|
181
181
|
zod_1.z.tuple([zod_1.z.literal(false), zod_1.z.string()]),
|
|
182
182
|
]);
|
|
183
183
|
exports.ResultSchema = ResultSchema;
|
|
184
|
-
|
|
184
|
+
exports.EphemeralPublicKeySchema = zod_1.z.object({
|
|
185
185
|
kty: zod_1.z.string().optional(),
|
|
186
186
|
crv: zod_1.z.string().optional(),
|
|
187
187
|
x: zod_1.z.string().optional(),
|
|
@@ -189,17 +189,17 @@ const EphemeralPublicKeySchema = zod_1.z.object({
|
|
|
189
189
|
n: zod_1.z.string().optional(),
|
|
190
190
|
e: zod_1.z.string().optional(),
|
|
191
191
|
});
|
|
192
|
-
|
|
192
|
+
exports.RecipientHeaderSchema = zod_1.z.object({
|
|
193
193
|
alg: zod_1.z.string().optional(),
|
|
194
194
|
iv: zod_1.z.string().optional(),
|
|
195
195
|
tag: zod_1.z.string().optional(),
|
|
196
|
-
epk: EphemeralPublicKeySchema.optional(),
|
|
196
|
+
epk: exports.EphemeralPublicKeySchema.optional(),
|
|
197
197
|
kid: zod_1.z.string().optional(),
|
|
198
198
|
apv: zod_1.z.string().optional(),
|
|
199
199
|
apu: zod_1.z.string().optional(),
|
|
200
200
|
});
|
|
201
|
-
|
|
202
|
-
header: RecipientHeaderSchema,
|
|
201
|
+
exports.RecipientSchema = zod_1.z.object({
|
|
202
|
+
header: exports.RecipientHeaderSchema,
|
|
203
203
|
encrypted_key: zod_1.z.string(),
|
|
204
204
|
});
|
|
205
205
|
exports.JWESchema = zod_1.z.object({
|
|
@@ -208,5 +208,5 @@ exports.JWESchema = zod_1.z.object({
|
|
|
208
208
|
ciphertext: zod_1.z.string(),
|
|
209
209
|
tag: zod_1.z.string(),
|
|
210
210
|
add: zod_1.z.string().optional(),
|
|
211
|
-
recipients: zod_1.z.array(RecipientSchema).optional(),
|
|
211
|
+
recipients: zod_1.z.array(exports.RecipientSchema).optional(),
|
|
212
212
|
});
|