@coin-voyage/shared 2.2.0-beta.8 → 2.2.1
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.
|
@@ -23,7 +23,7 @@ export interface CurrencyWithTokenFiatAmount extends Currency {
|
|
|
23
23
|
export interface QuoteWithCurrency extends CurrencyWithAmount {
|
|
24
24
|
total: CurrencyWithAmount;
|
|
25
25
|
base: CurrencyWithAmount;
|
|
26
|
-
|
|
26
|
+
fees?: CurrencyWithAmount;
|
|
27
27
|
gas?: CurrencyWithAmount;
|
|
28
28
|
}
|
|
29
29
|
export interface CurrencyWithAmount extends Currency {
|
|
@@ -15,8 +15,131 @@ export declare const zPayOrderMetadata: z.ZodObject<{
|
|
|
15
15
|
refund_amount: z.ZodOptional<z.ZodNumber>;
|
|
16
16
|
currency: z.ZodOptional<z.ZodString>;
|
|
17
17
|
}, z.core.$strip>>;
|
|
18
|
-
}, z.core.$catchall<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodObject<{
|
|
19
|
-
|
|
18
|
+
}, z.core.$catchall<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodObject<{
|
|
19
|
+
def: z.core.$ZodAnyDef;
|
|
20
|
+
type: "any";
|
|
21
|
+
_def: z.core.$ZodAnyDef;
|
|
22
|
+
_output: any;
|
|
23
|
+
_input: any;
|
|
24
|
+
check: (...checks: (z.core.CheckFn<any> | z.core.$ZodCheck<any>)[]) => z.ZodAny;
|
|
25
|
+
clone: (def?: z.core.$ZodAnyDef | undefined, params?: {
|
|
26
|
+
parent: boolean;
|
|
27
|
+
} | undefined) => z.ZodAny;
|
|
28
|
+
register: <R extends z.core.$ZodRegistry>(registry: R, ...meta: z.ZodAny extends infer T ? T extends z.ZodAny ? T extends R["_schema"] ? undefined extends R["_meta"] ? [(z.core.$replace<R["_meta"], R["_schema"] & z.ZodAny> | undefined)?] : [z.core.$replace<R["_meta"], R["_schema"] & z.ZodAny>] : ["Incompatible schema"] : never : never) => z.ZodAny;
|
|
29
|
+
brand: <T extends PropertyKey = PropertyKey>(value?: T | undefined) => PropertyKey extends T ? z.ZodAny : z.core.$ZodBranded<z.ZodAny, T>;
|
|
30
|
+
parse: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => any;
|
|
31
|
+
safeParse: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<any>;
|
|
32
|
+
parseAsync: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<any>;
|
|
33
|
+
safeParseAsync: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
34
|
+
spa: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
35
|
+
encode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => any;
|
|
36
|
+
decode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => any;
|
|
37
|
+
encodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<any>;
|
|
38
|
+
decodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<any>;
|
|
39
|
+
safeEncode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<any>;
|
|
40
|
+
safeDecode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<any>;
|
|
41
|
+
safeEncodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
42
|
+
safeDecodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
43
|
+
refine: (check: (arg: any) => unknown | Promise<unknown>, params?: string | {
|
|
44
|
+
abort?: boolean | undefined | undefined;
|
|
45
|
+
when?: ((payload: z.core.ParsePayload) => boolean) | undefined | undefined;
|
|
46
|
+
path?: PropertyKey[] | undefined | undefined;
|
|
47
|
+
params?: Record<string, any> | undefined;
|
|
48
|
+
error?: string | z.core.$ZodErrorMap<NonNullable<z.core.$ZodIssue>> | undefined;
|
|
49
|
+
message?: string | undefined | undefined;
|
|
50
|
+
} | undefined) => z.ZodAny;
|
|
51
|
+
superRefine: (refinement: (arg: any, ctx: z.core.$RefinementCtx<any>) => void | Promise<void>) => z.ZodAny;
|
|
52
|
+
overwrite: (fn: (x: any) => any) => z.ZodAny;
|
|
53
|
+
optional: () => z.ZodOptional<z.ZodAny>;
|
|
54
|
+
nonoptional: (params?: string | z.core.$ZodNonOptionalParams) => z.ZodNonOptional<z.ZodAny>;
|
|
55
|
+
nullable: () => z.ZodNullable<z.ZodAny>;
|
|
56
|
+
nullish: () => z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
57
|
+
default: {
|
|
58
|
+
(def: any): z.ZodDefault<z.ZodAny>;
|
|
59
|
+
(def: () => any): z.ZodDefault<z.ZodAny>;
|
|
60
|
+
};
|
|
61
|
+
prefault: {
|
|
62
|
+
(def: () => any): z.ZodPrefault<z.ZodAny>;
|
|
63
|
+
(def: any): z.ZodPrefault<z.ZodAny>;
|
|
64
|
+
};
|
|
65
|
+
array: () => z.ZodArray<z.ZodAny>;
|
|
66
|
+
or: <T extends z.core.SomeType>(option: T) => z.ZodUnion<[z.ZodAny, T]>;
|
|
67
|
+
and: <T extends z.core.SomeType>(incoming: T) => z.ZodIntersection<z.ZodAny, T>;
|
|
68
|
+
transform: <NewOut>(transform: (arg: any, ctx: z.core.$RefinementCtx<any>) => NewOut | Promise<NewOut>) => z.ZodPipe<z.ZodAny, z.ZodTransform<Awaited<NewOut>, any>>;
|
|
69
|
+
catch: {
|
|
70
|
+
(def: any): z.ZodCatch<z.ZodAny>;
|
|
71
|
+
(def: (ctx: z.core.$ZodCatchCtx) => any): z.ZodCatch<z.ZodAny>;
|
|
72
|
+
};
|
|
73
|
+
pipe: <T extends z.core.$ZodType<any, any, z.core.$ZodTypeInternals<any, any>>>(target: T | z.core.$ZodType<any, any, z.core.$ZodTypeInternals<any, any>>) => z.ZodPipe<z.ZodAny, T>;
|
|
74
|
+
readonly: () => z.ZodReadonly<z.ZodAny>;
|
|
75
|
+
describe: (description: string) => z.ZodAny;
|
|
76
|
+
description?: string | undefined;
|
|
77
|
+
meta: {
|
|
78
|
+
(): {
|
|
79
|
+
[x: string]: unknown;
|
|
80
|
+
id?: string | undefined | undefined;
|
|
81
|
+
title?: string | undefined | undefined;
|
|
82
|
+
description?: string | undefined | undefined;
|
|
83
|
+
deprecated?: boolean | undefined | undefined;
|
|
84
|
+
} | undefined;
|
|
85
|
+
(data: {
|
|
86
|
+
[x: string]: unknown;
|
|
87
|
+
id?: string | undefined | undefined;
|
|
88
|
+
title?: string | undefined | undefined;
|
|
89
|
+
description?: string | undefined | undefined;
|
|
90
|
+
deprecated?: boolean | undefined | undefined;
|
|
91
|
+
}): z.ZodAny;
|
|
92
|
+
};
|
|
93
|
+
isOptional: () => boolean;
|
|
94
|
+
isNullable: () => boolean;
|
|
95
|
+
_zod: z.core.$ZodAnyInternals;
|
|
96
|
+
"~standard": z.core.$ZodStandardSchema<z.ZodAny>;
|
|
97
|
+
}, z.core.$strip>]>, z.ZodTransform<string, string | number | boolean | any[] | {
|
|
98
|
+
def: unknown;
|
|
99
|
+
type: unknown;
|
|
100
|
+
_def: unknown;
|
|
101
|
+
_output: any;
|
|
102
|
+
_input: any;
|
|
103
|
+
check: unknown;
|
|
104
|
+
clone: unknown;
|
|
105
|
+
register: unknown;
|
|
106
|
+
brand: unknown;
|
|
107
|
+
parse: unknown;
|
|
108
|
+
safeParse: unknown;
|
|
109
|
+
parseAsync: unknown;
|
|
110
|
+
safeParseAsync: unknown;
|
|
111
|
+
spa: unknown;
|
|
112
|
+
encode: unknown;
|
|
113
|
+
decode: unknown;
|
|
114
|
+
encodeAsync: unknown;
|
|
115
|
+
decodeAsync: unknown;
|
|
116
|
+
safeEncode: unknown;
|
|
117
|
+
safeDecode: unknown;
|
|
118
|
+
safeEncodeAsync: unknown;
|
|
119
|
+
safeDecodeAsync: unknown;
|
|
120
|
+
refine: unknown;
|
|
121
|
+
superRefine: unknown;
|
|
122
|
+
overwrite: unknown;
|
|
123
|
+
optional: unknown;
|
|
124
|
+
nonoptional: unknown;
|
|
125
|
+
nullable: unknown;
|
|
126
|
+
nullish: unknown;
|
|
127
|
+
default: unknown;
|
|
128
|
+
prefault: unknown;
|
|
129
|
+
array: unknown;
|
|
130
|
+
or: unknown;
|
|
131
|
+
and: unknown;
|
|
132
|
+
transform: unknown;
|
|
133
|
+
catch: unknown;
|
|
134
|
+
pipe: unknown;
|
|
135
|
+
readonly: unknown;
|
|
136
|
+
describe: unknown;
|
|
137
|
+
description?: unknown;
|
|
138
|
+
meta: unknown;
|
|
139
|
+
isOptional: unknown;
|
|
140
|
+
isNullable: unknown;
|
|
141
|
+
_zod: unknown;
|
|
142
|
+
"~standard": unknown;
|
|
20
143
|
}>>>>;
|
|
21
144
|
export declare const zPayOrder: z.ZodObject<{
|
|
22
145
|
metadata: z.ZodOptional<z.ZodObject<{
|
|
@@ -35,8 +158,131 @@ export declare const zPayOrder: z.ZodObject<{
|
|
|
35
158
|
refund_amount: z.ZodOptional<z.ZodNumber>;
|
|
36
159
|
currency: z.ZodOptional<z.ZodString>;
|
|
37
160
|
}, z.core.$strip>>;
|
|
38
|
-
}, z.core.$catchall<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodObject<{
|
|
39
|
-
|
|
161
|
+
}, z.core.$catchall<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean, z.ZodArray<z.ZodAny>, z.ZodObject<{
|
|
162
|
+
def: z.core.$ZodAnyDef;
|
|
163
|
+
type: "any";
|
|
164
|
+
_def: z.core.$ZodAnyDef;
|
|
165
|
+
_output: any;
|
|
166
|
+
_input: any;
|
|
167
|
+
check: (...checks: (z.core.CheckFn<any> | z.core.$ZodCheck<any>)[]) => z.ZodAny;
|
|
168
|
+
clone: (def?: z.core.$ZodAnyDef | undefined, params?: {
|
|
169
|
+
parent: boolean;
|
|
170
|
+
} | undefined) => z.ZodAny;
|
|
171
|
+
register: <R extends z.core.$ZodRegistry>(registry: R, ...meta: z.ZodAny extends infer T ? T extends z.ZodAny ? T extends R["_schema"] ? undefined extends R["_meta"] ? [(z.core.$replace<R["_meta"], R["_schema"] & z.ZodAny> | undefined)?] : [z.core.$replace<R["_meta"], R["_schema"] & z.ZodAny>] : ["Incompatible schema"] : never : never) => z.ZodAny;
|
|
172
|
+
brand: <T extends PropertyKey = PropertyKey>(value?: T | undefined) => PropertyKey extends T ? z.ZodAny : z.core.$ZodBranded<z.ZodAny, T>;
|
|
173
|
+
parse: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => any;
|
|
174
|
+
safeParse: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<any>;
|
|
175
|
+
parseAsync: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<any>;
|
|
176
|
+
safeParseAsync: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
177
|
+
spa: (data: unknown, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
178
|
+
encode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => any;
|
|
179
|
+
decode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => any;
|
|
180
|
+
encodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<any>;
|
|
181
|
+
decodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<any>;
|
|
182
|
+
safeEncode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<any>;
|
|
183
|
+
safeDecode: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => z.ZodSafeParseResult<any>;
|
|
184
|
+
safeEncodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
185
|
+
safeDecodeAsync: (data: any, params?: z.core.ParseContext<z.core.$ZodIssue>) => Promise<z.ZodSafeParseResult<any>>;
|
|
186
|
+
refine: (check: (arg: any) => unknown | Promise<unknown>, params?: string | {
|
|
187
|
+
abort?: boolean | undefined | undefined;
|
|
188
|
+
when?: ((payload: z.core.ParsePayload) => boolean) | undefined | undefined;
|
|
189
|
+
path?: PropertyKey[] | undefined | undefined;
|
|
190
|
+
params?: Record<string, any> | undefined;
|
|
191
|
+
error?: string | z.core.$ZodErrorMap<NonNullable<z.core.$ZodIssue>> | undefined;
|
|
192
|
+
message?: string | undefined | undefined;
|
|
193
|
+
} | undefined) => z.ZodAny;
|
|
194
|
+
superRefine: (refinement: (arg: any, ctx: z.core.$RefinementCtx<any>) => void | Promise<void>) => z.ZodAny;
|
|
195
|
+
overwrite: (fn: (x: any) => any) => z.ZodAny;
|
|
196
|
+
optional: () => z.ZodOptional<z.ZodAny>;
|
|
197
|
+
nonoptional: (params?: string | z.core.$ZodNonOptionalParams) => z.ZodNonOptional<z.ZodAny>;
|
|
198
|
+
nullable: () => z.ZodNullable<z.ZodAny>;
|
|
199
|
+
nullish: () => z.ZodOptional<z.ZodNullable<z.ZodAny>>;
|
|
200
|
+
default: {
|
|
201
|
+
(def: any): z.ZodDefault<z.ZodAny>;
|
|
202
|
+
(def: () => any): z.ZodDefault<z.ZodAny>;
|
|
203
|
+
};
|
|
204
|
+
prefault: {
|
|
205
|
+
(def: () => any): z.ZodPrefault<z.ZodAny>;
|
|
206
|
+
(def: any): z.ZodPrefault<z.ZodAny>;
|
|
207
|
+
};
|
|
208
|
+
array: () => z.ZodArray<z.ZodAny>;
|
|
209
|
+
or: <T extends z.core.SomeType>(option: T) => z.ZodUnion<[z.ZodAny, T]>;
|
|
210
|
+
and: <T extends z.core.SomeType>(incoming: T) => z.ZodIntersection<z.ZodAny, T>;
|
|
211
|
+
transform: <NewOut>(transform: (arg: any, ctx: z.core.$RefinementCtx<any>) => NewOut | Promise<NewOut>) => z.ZodPipe<z.ZodAny, z.ZodTransform<Awaited<NewOut>, any>>;
|
|
212
|
+
catch: {
|
|
213
|
+
(def: any): z.ZodCatch<z.ZodAny>;
|
|
214
|
+
(def: (ctx: z.core.$ZodCatchCtx) => any): z.ZodCatch<z.ZodAny>;
|
|
215
|
+
};
|
|
216
|
+
pipe: <T extends z.core.$ZodType<any, any, z.core.$ZodTypeInternals<any, any>>>(target: T | z.core.$ZodType<any, any, z.core.$ZodTypeInternals<any, any>>) => z.ZodPipe<z.ZodAny, T>;
|
|
217
|
+
readonly: () => z.ZodReadonly<z.ZodAny>;
|
|
218
|
+
describe: (description: string) => z.ZodAny;
|
|
219
|
+
description?: string | undefined;
|
|
220
|
+
meta: {
|
|
221
|
+
(): {
|
|
222
|
+
[x: string]: unknown;
|
|
223
|
+
id?: string | undefined | undefined;
|
|
224
|
+
title?: string | undefined | undefined;
|
|
225
|
+
description?: string | undefined | undefined;
|
|
226
|
+
deprecated?: boolean | undefined | undefined;
|
|
227
|
+
} | undefined;
|
|
228
|
+
(data: {
|
|
229
|
+
[x: string]: unknown;
|
|
230
|
+
id?: string | undefined | undefined;
|
|
231
|
+
title?: string | undefined | undefined;
|
|
232
|
+
description?: string | undefined | undefined;
|
|
233
|
+
deprecated?: boolean | undefined | undefined;
|
|
234
|
+
}): z.ZodAny;
|
|
235
|
+
};
|
|
236
|
+
isOptional: () => boolean;
|
|
237
|
+
isNullable: () => boolean;
|
|
238
|
+
_zod: z.core.$ZodAnyInternals;
|
|
239
|
+
"~standard": z.core.$ZodStandardSchema<z.ZodAny>;
|
|
240
|
+
}, z.core.$strip>]>, z.ZodTransform<string, string | number | boolean | any[] | {
|
|
241
|
+
def: unknown;
|
|
242
|
+
type: unknown;
|
|
243
|
+
_def: unknown;
|
|
244
|
+
_output: any;
|
|
245
|
+
_input: any;
|
|
246
|
+
check: unknown;
|
|
247
|
+
clone: unknown;
|
|
248
|
+
register: unknown;
|
|
249
|
+
brand: unknown;
|
|
250
|
+
parse: unknown;
|
|
251
|
+
safeParse: unknown;
|
|
252
|
+
parseAsync: unknown;
|
|
253
|
+
safeParseAsync: unknown;
|
|
254
|
+
spa: unknown;
|
|
255
|
+
encode: unknown;
|
|
256
|
+
decode: unknown;
|
|
257
|
+
encodeAsync: unknown;
|
|
258
|
+
decodeAsync: unknown;
|
|
259
|
+
safeEncode: unknown;
|
|
260
|
+
safeDecode: unknown;
|
|
261
|
+
safeEncodeAsync: unknown;
|
|
262
|
+
safeDecodeAsync: unknown;
|
|
263
|
+
refine: unknown;
|
|
264
|
+
superRefine: unknown;
|
|
265
|
+
overwrite: unknown;
|
|
266
|
+
optional: unknown;
|
|
267
|
+
nonoptional: unknown;
|
|
268
|
+
nullable: unknown;
|
|
269
|
+
nullish: unknown;
|
|
270
|
+
default: unknown;
|
|
271
|
+
prefault: unknown;
|
|
272
|
+
array: unknown;
|
|
273
|
+
or: unknown;
|
|
274
|
+
and: unknown;
|
|
275
|
+
transform: unknown;
|
|
276
|
+
catch: unknown;
|
|
277
|
+
pipe: unknown;
|
|
278
|
+
readonly: unknown;
|
|
279
|
+
describe: unknown;
|
|
280
|
+
description?: unknown;
|
|
281
|
+
meta: unknown;
|
|
282
|
+
isOptional: unknown;
|
|
283
|
+
isNullable: unknown;
|
|
284
|
+
_zod: unknown;
|
|
285
|
+
"~standard": unknown;
|
|
40
286
|
}>>>>>;
|
|
41
287
|
intent: z.ZodObject<{
|
|
42
288
|
asset: z.ZodOptional<z.ZodObject<{
|
|
@@ -56,9 +302,13 @@ export declare const zPayOrder: z.ZodObject<{
|
|
|
56
302
|
}, z.core.$strip>;
|
|
57
303
|
}, z.core.$strip>;
|
|
58
304
|
export type PayOrderMetadata = z.infer<typeof zPayOrderMetadata> & {
|
|
59
|
-
[key: string]: string | number | boolean
|
|
305
|
+
[key: string]: string | number | boolean | any[] | {
|
|
306
|
+
[x: string]: any;
|
|
307
|
+
};
|
|
60
308
|
};
|
|
61
309
|
export type PayOrderMetadataInput = {
|
|
62
310
|
items?: z.input<typeof zPayOrderMetadata.shape.items>;
|
|
63
311
|
refund?: z.input<typeof zPayOrderMetadata.shape.refund>;
|
|
64
|
-
} & Record<string, string | number | boolean
|
|
312
|
+
} & Record<string, string | number | boolean | any[] | {
|
|
313
|
+
[x: string]: any;
|
|
314
|
+
}>;
|
|
@@ -4,7 +4,7 @@ import { ChainId } from "../chains";
|
|
|
4
4
|
import { FIAT_CURRENCIES } from "../currencies";
|
|
5
5
|
const knownKeys = ["items", "refund"];
|
|
6
6
|
const customFieldSchema = z
|
|
7
|
-
.union([z.string(), z.number(), z.boolean(), z.array(z.any()), z.object(
|
|
7
|
+
.union([z.string(), z.number(), z.boolean(), z.array(z.any()), z.object(z.any())])
|
|
8
8
|
.transform((val) => String(val))
|
|
9
9
|
.refine((val) => val.length <= 500, {
|
|
10
10
|
message: "Each custom field value must be 500 characters or less",
|