@glowlabs-org/utils 0.2.91 → 0.2.93
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/cjs/browser.js +675 -636
- package/dist/cjs/browser.js.map +1 -1
- package/dist/cjs/{farms-router-ClIWm9AQ.js → farms-router-C2sviclU.js} +71 -22
- package/dist/cjs/farms-router-C2sviclU.js.map +1 -0
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/lib/control-api/control-router.d.ts +16 -0
- package/dist/cjs/lib/types/index.d.ts +14 -2
- package/dist/cjs/utils/stake-control.d.ts +33 -0
- package/dist/esm/browser.js +669 -633
- package/dist/esm/browser.js.map +1 -1
- package/dist/esm/{farms-router-DVSHNqsT.js → farms-router-oHFOyL2k.js} +69 -23
- package/dist/esm/farms-router-oHFOyL2k.js.map +1 -0
- package/dist/esm/index.js +2 -2
- package/dist/esm/lib/control-api/control-router.d.ts +16 -0
- package/dist/esm/lib/types/index.d.ts +14 -2
- package/dist/esm/utils/stake-control.d.ts +33 -0
- package/package.json +1 -1
- package/src/lib/control-api/control-router.ts +43 -0
- package/src/lib/hooks/use-forwarder.ts +23 -22
- package/src/lib/types/index.ts +16 -12
- package/src/utils/stake-control.ts +82 -1
- package/dist/cjs/farms-router-ClIWm9AQ.js.map +0 -1
- package/dist/esm/farms-router-DVSHNqsT.js.map +0 -1
package/dist/cjs/browser.js
CHANGED
|
@@ -1,32 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var farmsRouter = require('./farms-router-
|
|
3
|
+
var farmsRouter = require('./farms-router-C2sviclU.js');
|
|
4
4
|
var viem = require('viem');
|
|
5
5
|
require('ethers');
|
|
6
6
|
|
|
7
|
-
// ---------------------------------------------------------------------------
|
|
8
|
-
// Common / Shared Types
|
|
9
|
-
// ---------------------------------------------------------------------------
|
|
10
|
-
const PAYMENT_CURRENCIES = [
|
|
11
|
-
"GCTL",
|
|
12
|
-
"USDC",
|
|
13
|
-
"USDG",
|
|
14
|
-
"GLW",
|
|
15
|
-
"SGCTL",
|
|
16
|
-
];
|
|
17
|
-
const OFF_CHAIN_PAYMENT_CURRENCIES = ["SGCTL", "GCTL"];
|
|
18
|
-
const TRANSFER_TYPES = [
|
|
19
|
-
"PayProtocolFeeAndMintGCTLAndStake",
|
|
20
|
-
"PayProtocolFee",
|
|
21
|
-
"PayAuditFees",
|
|
22
|
-
"CommitKickstarter",
|
|
23
|
-
"MintGCTLAndStake",
|
|
24
|
-
"MintGCTL",
|
|
25
|
-
"BuySolarFarm",
|
|
26
|
-
"SponsorProtocolFee",
|
|
27
|
-
"SponsorProtocolFeeAndMintGCTLAndStake",
|
|
28
|
-
];
|
|
29
|
-
|
|
30
7
|
/** A special constant with type `never` */
|
|
31
8
|
const NEVER = Object.freeze({
|
|
32
9
|
status: "aborted",
|
|
@@ -626,60 +603,60 @@ class Class {
|
|
|
626
603
|
}
|
|
627
604
|
|
|
628
605
|
var util = /*#__PURE__*/Object.freeze({
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
606
|
+
__proto__: null,
|
|
607
|
+
BIGINT_FORMAT_RANGES: BIGINT_FORMAT_RANGES,
|
|
608
|
+
Class: Class,
|
|
609
|
+
NUMBER_FORMAT_RANGES: NUMBER_FORMAT_RANGES,
|
|
610
|
+
aborted: aborted,
|
|
611
|
+
allowsEval: allowsEval,
|
|
612
|
+
assert: assert,
|
|
613
|
+
assertEqual: assertEqual,
|
|
614
|
+
assertIs: assertIs,
|
|
615
|
+
assertNever: assertNever,
|
|
616
|
+
assertNotEqual: assertNotEqual,
|
|
617
|
+
assignProp: assignProp,
|
|
618
|
+
cached: cached,
|
|
619
|
+
captureStackTrace: captureStackTrace,
|
|
620
|
+
cleanEnum: cleanEnum,
|
|
621
|
+
cleanRegex: cleanRegex,
|
|
622
|
+
clone: clone,
|
|
623
|
+
cloneDef: cloneDef,
|
|
624
|
+
createTransparentProxy: createTransparentProxy,
|
|
625
|
+
defineLazy: defineLazy,
|
|
626
|
+
esc: esc,
|
|
627
|
+
escapeRegex: escapeRegex,
|
|
628
|
+
extend: extend,
|
|
629
|
+
finalizeIssue: finalizeIssue,
|
|
630
|
+
floatSafeRemainder: floatSafeRemainder,
|
|
631
|
+
getElementAtPath: getElementAtPath,
|
|
632
|
+
getEnumValues: getEnumValues,
|
|
633
|
+
getLengthableOrigin: getLengthableOrigin,
|
|
634
|
+
getParsedType: getParsedType,
|
|
635
|
+
getSizableOrigin: getSizableOrigin,
|
|
636
|
+
isObject: isObject,
|
|
637
|
+
isPlainObject: isPlainObject,
|
|
638
|
+
issue: issue,
|
|
639
|
+
joinValues: joinValues,
|
|
640
|
+
jsonStringifyReplacer: jsonStringifyReplacer,
|
|
641
|
+
merge: merge,
|
|
642
|
+
mergeDefs: mergeDefs,
|
|
643
|
+
normalizeParams: normalizeParams,
|
|
644
|
+
nullish: nullish$1,
|
|
645
|
+
numKeys: numKeys,
|
|
646
|
+
objectClone: objectClone,
|
|
647
|
+
omit: omit,
|
|
648
|
+
optionalKeys: optionalKeys,
|
|
649
|
+
partial: partial,
|
|
650
|
+
pick: pick,
|
|
651
|
+
prefixIssues: prefixIssues,
|
|
652
|
+
primitiveTypes: primitiveTypes,
|
|
653
|
+
promiseAllObject: promiseAllObject,
|
|
654
|
+
propertyKeyTypes: propertyKeyTypes,
|
|
655
|
+
randomString: randomString,
|
|
656
|
+
required: required,
|
|
657
|
+
shallowClone: shallowClone,
|
|
658
|
+
stringifyPrimitive: stringifyPrimitive,
|
|
659
|
+
unwrapMessage: unwrapMessage
|
|
683
660
|
});
|
|
684
661
|
|
|
685
662
|
const initializer$1 = (inst, def) => {
|
|
@@ -1022,48 +999,48 @@ const lowercase = /^[^A-Z]*$/;
|
|
|
1022
999
|
const uppercase = /^[^a-z]*$/;
|
|
1023
1000
|
|
|
1024
1001
|
var regexes = /*#__PURE__*/Object.freeze({
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1051
|
-
|
|
1052
|
-
|
|
1053
|
-
|
|
1054
|
-
|
|
1055
|
-
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1002
|
+
__proto__: null,
|
|
1003
|
+
base64: base64$1,
|
|
1004
|
+
base64url: base64url$1,
|
|
1005
|
+
bigint: bigint$2,
|
|
1006
|
+
boolean: boolean$2,
|
|
1007
|
+
browserEmail: browserEmail,
|
|
1008
|
+
cidrv4: cidrv4$1,
|
|
1009
|
+
cidrv6: cidrv6$1,
|
|
1010
|
+
cuid: cuid$1,
|
|
1011
|
+
cuid2: cuid2$1,
|
|
1012
|
+
date: date$3,
|
|
1013
|
+
datetime: datetime$1,
|
|
1014
|
+
domain: domain,
|
|
1015
|
+
duration: duration$1,
|
|
1016
|
+
e164: e164$1,
|
|
1017
|
+
email: email$1,
|
|
1018
|
+
emoji: emoji$1,
|
|
1019
|
+
extendedDuration: extendedDuration,
|
|
1020
|
+
guid: guid$1,
|
|
1021
|
+
hostname: hostname$1,
|
|
1022
|
+
html5Email: html5Email,
|
|
1023
|
+
idnEmail: idnEmail,
|
|
1024
|
+
integer: integer,
|
|
1025
|
+
ipv4: ipv4$1,
|
|
1026
|
+
ipv6: ipv6$1,
|
|
1027
|
+
ksuid: ksuid$1,
|
|
1028
|
+
lowercase: lowercase,
|
|
1029
|
+
nanoid: nanoid$1,
|
|
1030
|
+
null: _null$2,
|
|
1031
|
+
number: number$2,
|
|
1032
|
+
rfc5322Email: rfc5322Email,
|
|
1033
|
+
string: string$2,
|
|
1034
|
+
time: time$1,
|
|
1035
|
+
ulid: ulid$1,
|
|
1036
|
+
undefined: _undefined$2,
|
|
1037
|
+
unicodeEmail: unicodeEmail,
|
|
1038
|
+
uppercase: uppercase,
|
|
1039
|
+
uuid: uuid$1,
|
|
1040
|
+
uuid4: uuid4,
|
|
1041
|
+
uuid6: uuid6,
|
|
1042
|
+
uuid7: uuid7,
|
|
1043
|
+
xid: xid$1
|
|
1067
1044
|
});
|
|
1068
1045
|
|
|
1069
1046
|
// import { $ZodType } from "./schemas.js";
|
|
@@ -8415,49 +8392,49 @@ function yo () {
|
|
|
8415
8392
|
}
|
|
8416
8393
|
|
|
8417
8394
|
var index$1 = /*#__PURE__*/Object.freeze({
|
|
8418
|
-
|
|
8419
|
-
|
|
8420
|
-
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8426
|
-
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8440
|
-
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8395
|
+
__proto__: null,
|
|
8396
|
+
ar: ar,
|
|
8397
|
+
az: az,
|
|
8398
|
+
be: be,
|
|
8399
|
+
ca: ca,
|
|
8400
|
+
cs: cs,
|
|
8401
|
+
da: da,
|
|
8402
|
+
de: de,
|
|
8403
|
+
en: en,
|
|
8404
|
+
eo: eo,
|
|
8405
|
+
es: es,
|
|
8406
|
+
fa: fa,
|
|
8407
|
+
fi: fi,
|
|
8408
|
+
fr: fr,
|
|
8409
|
+
frCA: frCA,
|
|
8410
|
+
he: he,
|
|
8411
|
+
hu: hu,
|
|
8412
|
+
id: id,
|
|
8413
|
+
is: is,
|
|
8414
|
+
it: it,
|
|
8415
|
+
ja: ja,
|
|
8416
|
+
kh: kh,
|
|
8417
|
+
ko: ko,
|
|
8418
|
+
mk: mk,
|
|
8419
|
+
ms: ms,
|
|
8420
|
+
nl: nl,
|
|
8421
|
+
no: no,
|
|
8422
|
+
ota: ota,
|
|
8423
|
+
pl: pl,
|
|
8424
|
+
ps: ps,
|
|
8425
|
+
pt: pt,
|
|
8426
|
+
ru: ru,
|
|
8427
|
+
sl: sl,
|
|
8428
|
+
sv: sv,
|
|
8429
|
+
ta: ta,
|
|
8430
|
+
th: th,
|
|
8431
|
+
tr: tr,
|
|
8432
|
+
ua: ua,
|
|
8433
|
+
ur: ur,
|
|
8434
|
+
vi: vi,
|
|
8435
|
+
yo: yo,
|
|
8436
|
+
zhCN: zhCN,
|
|
8437
|
+
zhTW: zhTW
|
|
8461
8438
|
});
|
|
8462
8439
|
|
|
8463
8440
|
const $output = Symbol("ZodOutput");
|
|
@@ -10372,252 +10349,252 @@ function isTransforming(_schema, _ctx) {
|
|
|
10372
10349
|
}
|
|
10373
10350
|
|
|
10374
10351
|
var jsonSchema = /*#__PURE__*/Object.freeze({
|
|
10375
|
-
|
|
10352
|
+
__proto__: null
|
|
10376
10353
|
});
|
|
10377
10354
|
|
|
10378
10355
|
var index = /*#__PURE__*/Object.freeze({
|
|
10379
|
-
|
|
10380
|
-
|
|
10381
|
-
|
|
10382
|
-
|
|
10383
|
-
|
|
10384
|
-
|
|
10385
|
-
|
|
10386
|
-
|
|
10387
|
-
|
|
10388
|
-
|
|
10389
|
-
|
|
10390
|
-
|
|
10391
|
-
|
|
10392
|
-
|
|
10393
|
-
|
|
10394
|
-
|
|
10395
|
-
|
|
10396
|
-
|
|
10397
|
-
|
|
10398
|
-
|
|
10399
|
-
|
|
10400
|
-
|
|
10401
|
-
|
|
10402
|
-
|
|
10403
|
-
|
|
10404
|
-
|
|
10405
|
-
|
|
10406
|
-
|
|
10407
|
-
|
|
10408
|
-
|
|
10409
|
-
|
|
10410
|
-
|
|
10411
|
-
|
|
10412
|
-
|
|
10413
|
-
|
|
10414
|
-
|
|
10415
|
-
|
|
10416
|
-
|
|
10417
|
-
|
|
10418
|
-
|
|
10419
|
-
|
|
10420
|
-
|
|
10421
|
-
|
|
10422
|
-
|
|
10423
|
-
|
|
10424
|
-
|
|
10425
|
-
|
|
10426
|
-
|
|
10427
|
-
|
|
10428
|
-
|
|
10429
|
-
|
|
10430
|
-
|
|
10431
|
-
|
|
10432
|
-
|
|
10433
|
-
|
|
10434
|
-
|
|
10435
|
-
|
|
10436
|
-
|
|
10437
|
-
|
|
10438
|
-
|
|
10439
|
-
|
|
10440
|
-
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10451
|
-
|
|
10452
|
-
|
|
10453
|
-
|
|
10454
|
-
|
|
10455
|
-
|
|
10456
|
-
|
|
10457
|
-
|
|
10458
|
-
|
|
10459
|
-
|
|
10460
|
-
|
|
10461
|
-
|
|
10462
|
-
|
|
10463
|
-
|
|
10464
|
-
|
|
10465
|
-
|
|
10466
|
-
|
|
10467
|
-
|
|
10468
|
-
|
|
10469
|
-
|
|
10470
|
-
|
|
10471
|
-
|
|
10472
|
-
|
|
10473
|
-
|
|
10474
|
-
|
|
10475
|
-
|
|
10476
|
-
|
|
10477
|
-
|
|
10478
|
-
|
|
10479
|
-
|
|
10480
|
-
|
|
10481
|
-
|
|
10482
|
-
|
|
10483
|
-
|
|
10484
|
-
|
|
10485
|
-
|
|
10486
|
-
|
|
10487
|
-
|
|
10488
|
-
|
|
10489
|
-
|
|
10490
|
-
|
|
10491
|
-
|
|
10492
|
-
|
|
10493
|
-
|
|
10494
|
-
|
|
10495
|
-
|
|
10496
|
-
|
|
10497
|
-
|
|
10498
|
-
|
|
10499
|
-
|
|
10500
|
-
|
|
10501
|
-
|
|
10502
|
-
|
|
10503
|
-
|
|
10504
|
-
|
|
10505
|
-
|
|
10506
|
-
|
|
10507
|
-
|
|
10508
|
-
|
|
10509
|
-
|
|
10510
|
-
|
|
10511
|
-
|
|
10512
|
-
|
|
10513
|
-
|
|
10514
|
-
|
|
10515
|
-
|
|
10516
|
-
|
|
10517
|
-
|
|
10518
|
-
|
|
10519
|
-
|
|
10520
|
-
|
|
10521
|
-
|
|
10522
|
-
|
|
10523
|
-
|
|
10524
|
-
|
|
10525
|
-
|
|
10526
|
-
|
|
10527
|
-
|
|
10528
|
-
|
|
10529
|
-
|
|
10530
|
-
|
|
10531
|
-
|
|
10532
|
-
|
|
10533
|
-
|
|
10534
|
-
|
|
10535
|
-
|
|
10536
|
-
|
|
10537
|
-
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10544
|
-
|
|
10545
|
-
|
|
10546
|
-
|
|
10547
|
-
|
|
10548
|
-
|
|
10549
|
-
|
|
10550
|
-
|
|
10551
|
-
|
|
10552
|
-
|
|
10553
|
-
|
|
10554
|
-
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
|
|
10569
|
-
|
|
10570
|
-
|
|
10571
|
-
|
|
10572
|
-
|
|
10573
|
-
|
|
10574
|
-
|
|
10575
|
-
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
|
|
10583
|
-
|
|
10584
|
-
|
|
10585
|
-
|
|
10586
|
-
|
|
10587
|
-
|
|
10588
|
-
|
|
10589
|
-
|
|
10590
|
-
|
|
10591
|
-
|
|
10592
|
-
|
|
10593
|
-
|
|
10594
|
-
|
|
10595
|
-
|
|
10596
|
-
|
|
10597
|
-
|
|
10598
|
-
|
|
10599
|
-
|
|
10600
|
-
|
|
10601
|
-
|
|
10602
|
-
|
|
10603
|
-
|
|
10604
|
-
|
|
10605
|
-
|
|
10606
|
-
|
|
10607
|
-
|
|
10608
|
-
|
|
10609
|
-
|
|
10610
|
-
|
|
10611
|
-
|
|
10612
|
-
|
|
10613
|
-
|
|
10614
|
-
|
|
10615
|
-
|
|
10616
|
-
|
|
10617
|
-
|
|
10618
|
-
|
|
10619
|
-
|
|
10620
|
-
|
|
10356
|
+
__proto__: null,
|
|
10357
|
+
$ZodAny: $ZodAny,
|
|
10358
|
+
$ZodArray: $ZodArray,
|
|
10359
|
+
$ZodAsyncError: $ZodAsyncError,
|
|
10360
|
+
$ZodBase64: $ZodBase64,
|
|
10361
|
+
$ZodBase64URL: $ZodBase64URL,
|
|
10362
|
+
$ZodBigInt: $ZodBigInt,
|
|
10363
|
+
$ZodBigIntFormat: $ZodBigIntFormat,
|
|
10364
|
+
$ZodBoolean: $ZodBoolean,
|
|
10365
|
+
$ZodCIDRv4: $ZodCIDRv4,
|
|
10366
|
+
$ZodCIDRv6: $ZodCIDRv6,
|
|
10367
|
+
$ZodCUID: $ZodCUID,
|
|
10368
|
+
$ZodCUID2: $ZodCUID2,
|
|
10369
|
+
$ZodCatch: $ZodCatch,
|
|
10370
|
+
$ZodCheck: $ZodCheck,
|
|
10371
|
+
$ZodCheckBigIntFormat: $ZodCheckBigIntFormat,
|
|
10372
|
+
$ZodCheckEndsWith: $ZodCheckEndsWith,
|
|
10373
|
+
$ZodCheckGreaterThan: $ZodCheckGreaterThan,
|
|
10374
|
+
$ZodCheckIncludes: $ZodCheckIncludes,
|
|
10375
|
+
$ZodCheckLengthEquals: $ZodCheckLengthEquals,
|
|
10376
|
+
$ZodCheckLessThan: $ZodCheckLessThan,
|
|
10377
|
+
$ZodCheckLowerCase: $ZodCheckLowerCase,
|
|
10378
|
+
$ZodCheckMaxLength: $ZodCheckMaxLength,
|
|
10379
|
+
$ZodCheckMaxSize: $ZodCheckMaxSize,
|
|
10380
|
+
$ZodCheckMimeType: $ZodCheckMimeType,
|
|
10381
|
+
$ZodCheckMinLength: $ZodCheckMinLength,
|
|
10382
|
+
$ZodCheckMinSize: $ZodCheckMinSize,
|
|
10383
|
+
$ZodCheckMultipleOf: $ZodCheckMultipleOf,
|
|
10384
|
+
$ZodCheckNumberFormat: $ZodCheckNumberFormat,
|
|
10385
|
+
$ZodCheckOverwrite: $ZodCheckOverwrite,
|
|
10386
|
+
$ZodCheckProperty: $ZodCheckProperty,
|
|
10387
|
+
$ZodCheckRegex: $ZodCheckRegex,
|
|
10388
|
+
$ZodCheckSizeEquals: $ZodCheckSizeEquals,
|
|
10389
|
+
$ZodCheckStartsWith: $ZodCheckStartsWith,
|
|
10390
|
+
$ZodCheckStringFormat: $ZodCheckStringFormat,
|
|
10391
|
+
$ZodCheckUpperCase: $ZodCheckUpperCase,
|
|
10392
|
+
$ZodCustom: $ZodCustom,
|
|
10393
|
+
$ZodCustomStringFormat: $ZodCustomStringFormat,
|
|
10394
|
+
$ZodDate: $ZodDate,
|
|
10395
|
+
$ZodDefault: $ZodDefault,
|
|
10396
|
+
$ZodDiscriminatedUnion: $ZodDiscriminatedUnion,
|
|
10397
|
+
$ZodE164: $ZodE164,
|
|
10398
|
+
$ZodEmail: $ZodEmail,
|
|
10399
|
+
$ZodEmoji: $ZodEmoji,
|
|
10400
|
+
$ZodEnum: $ZodEnum,
|
|
10401
|
+
$ZodError: $ZodError,
|
|
10402
|
+
$ZodFile: $ZodFile,
|
|
10403
|
+
$ZodFunction: $ZodFunction,
|
|
10404
|
+
$ZodGUID: $ZodGUID,
|
|
10405
|
+
$ZodIPv4: $ZodIPv4,
|
|
10406
|
+
$ZodIPv6: $ZodIPv6,
|
|
10407
|
+
$ZodISODate: $ZodISODate,
|
|
10408
|
+
$ZodISODateTime: $ZodISODateTime,
|
|
10409
|
+
$ZodISODuration: $ZodISODuration,
|
|
10410
|
+
$ZodISOTime: $ZodISOTime,
|
|
10411
|
+
$ZodIntersection: $ZodIntersection,
|
|
10412
|
+
$ZodJWT: $ZodJWT,
|
|
10413
|
+
$ZodKSUID: $ZodKSUID,
|
|
10414
|
+
$ZodLazy: $ZodLazy,
|
|
10415
|
+
$ZodLiteral: $ZodLiteral,
|
|
10416
|
+
$ZodMap: $ZodMap,
|
|
10417
|
+
$ZodNaN: $ZodNaN,
|
|
10418
|
+
$ZodNanoID: $ZodNanoID,
|
|
10419
|
+
$ZodNever: $ZodNever,
|
|
10420
|
+
$ZodNonOptional: $ZodNonOptional,
|
|
10421
|
+
$ZodNull: $ZodNull,
|
|
10422
|
+
$ZodNullable: $ZodNullable,
|
|
10423
|
+
$ZodNumber: $ZodNumber,
|
|
10424
|
+
$ZodNumberFormat: $ZodNumberFormat,
|
|
10425
|
+
$ZodObject: $ZodObject,
|
|
10426
|
+
$ZodOptional: $ZodOptional,
|
|
10427
|
+
$ZodPipe: $ZodPipe,
|
|
10428
|
+
$ZodPrefault: $ZodPrefault,
|
|
10429
|
+
$ZodPromise: $ZodPromise,
|
|
10430
|
+
$ZodReadonly: $ZodReadonly,
|
|
10431
|
+
$ZodRealError: $ZodRealError,
|
|
10432
|
+
$ZodRecord: $ZodRecord,
|
|
10433
|
+
$ZodRegistry: $ZodRegistry,
|
|
10434
|
+
$ZodSet: $ZodSet,
|
|
10435
|
+
$ZodString: $ZodString,
|
|
10436
|
+
$ZodStringFormat: $ZodStringFormat,
|
|
10437
|
+
$ZodSuccess: $ZodSuccess,
|
|
10438
|
+
$ZodSymbol: $ZodSymbol,
|
|
10439
|
+
$ZodTemplateLiteral: $ZodTemplateLiteral,
|
|
10440
|
+
$ZodTransform: $ZodTransform,
|
|
10441
|
+
$ZodTuple: $ZodTuple,
|
|
10442
|
+
$ZodType: $ZodType,
|
|
10443
|
+
$ZodULID: $ZodULID,
|
|
10444
|
+
$ZodURL: $ZodURL,
|
|
10445
|
+
$ZodUUID: $ZodUUID,
|
|
10446
|
+
$ZodUndefined: $ZodUndefined,
|
|
10447
|
+
$ZodUnion: $ZodUnion,
|
|
10448
|
+
$ZodUnknown: $ZodUnknown,
|
|
10449
|
+
$ZodVoid: $ZodVoid,
|
|
10450
|
+
$ZodXID: $ZodXID,
|
|
10451
|
+
$brand: $brand,
|
|
10452
|
+
$constructor: $constructor,
|
|
10453
|
+
$input: $input,
|
|
10454
|
+
$output: $output,
|
|
10455
|
+
Doc: Doc,
|
|
10456
|
+
JSONSchema: jsonSchema,
|
|
10457
|
+
JSONSchemaGenerator: JSONSchemaGenerator,
|
|
10458
|
+
NEVER: NEVER,
|
|
10459
|
+
TimePrecision: TimePrecision,
|
|
10460
|
+
_any: _any,
|
|
10461
|
+
_array: _array,
|
|
10462
|
+
_base64: _base64,
|
|
10463
|
+
_base64url: _base64url,
|
|
10464
|
+
_bigint: _bigint,
|
|
10465
|
+
_boolean: _boolean,
|
|
10466
|
+
_catch: _catch$1,
|
|
10467
|
+
_check: _check,
|
|
10468
|
+
_cidrv4: _cidrv4,
|
|
10469
|
+
_cidrv6: _cidrv6,
|
|
10470
|
+
_coercedBigint: _coercedBigint,
|
|
10471
|
+
_coercedBoolean: _coercedBoolean,
|
|
10472
|
+
_coercedDate: _coercedDate,
|
|
10473
|
+
_coercedNumber: _coercedNumber,
|
|
10474
|
+
_coercedString: _coercedString,
|
|
10475
|
+
_cuid: _cuid,
|
|
10476
|
+
_cuid2: _cuid2,
|
|
10477
|
+
_custom: _custom,
|
|
10478
|
+
_date: _date,
|
|
10479
|
+
_default: _default$1,
|
|
10480
|
+
_discriminatedUnion: _discriminatedUnion,
|
|
10481
|
+
_e164: _e164,
|
|
10482
|
+
_email: _email,
|
|
10483
|
+
_emoji: _emoji,
|
|
10484
|
+
_endsWith: _endsWith,
|
|
10485
|
+
_enum: _enum$1,
|
|
10486
|
+
_file: _file,
|
|
10487
|
+
_float32: _float32,
|
|
10488
|
+
_float64: _float64,
|
|
10489
|
+
_gt: _gt,
|
|
10490
|
+
_gte: _gte,
|
|
10491
|
+
_guid: _guid,
|
|
10492
|
+
_includes: _includes,
|
|
10493
|
+
_int: _int,
|
|
10494
|
+
_int32: _int32,
|
|
10495
|
+
_int64: _int64,
|
|
10496
|
+
_intersection: _intersection,
|
|
10497
|
+
_ipv4: _ipv4,
|
|
10498
|
+
_ipv6: _ipv6,
|
|
10499
|
+
_isoDate: _isoDate,
|
|
10500
|
+
_isoDateTime: _isoDateTime,
|
|
10501
|
+
_isoDuration: _isoDuration,
|
|
10502
|
+
_isoTime: _isoTime,
|
|
10503
|
+
_jwt: _jwt,
|
|
10504
|
+
_ksuid: _ksuid,
|
|
10505
|
+
_lazy: _lazy,
|
|
10506
|
+
_length: _length,
|
|
10507
|
+
_literal: _literal,
|
|
10508
|
+
_lowercase: _lowercase,
|
|
10509
|
+
_lt: _lt,
|
|
10510
|
+
_lte: _lte,
|
|
10511
|
+
_map: _map,
|
|
10512
|
+
_max: _lte,
|
|
10513
|
+
_maxLength: _maxLength,
|
|
10514
|
+
_maxSize: _maxSize,
|
|
10515
|
+
_mime: _mime,
|
|
10516
|
+
_min: _gte,
|
|
10517
|
+
_minLength: _minLength,
|
|
10518
|
+
_minSize: _minSize,
|
|
10519
|
+
_multipleOf: _multipleOf,
|
|
10520
|
+
_nan: _nan,
|
|
10521
|
+
_nanoid: _nanoid,
|
|
10522
|
+
_nativeEnum: _nativeEnum,
|
|
10523
|
+
_negative: _negative,
|
|
10524
|
+
_never: _never,
|
|
10525
|
+
_nonnegative: _nonnegative,
|
|
10526
|
+
_nonoptional: _nonoptional,
|
|
10527
|
+
_nonpositive: _nonpositive,
|
|
10528
|
+
_normalize: _normalize,
|
|
10529
|
+
_null: _null$1,
|
|
10530
|
+
_nullable: _nullable,
|
|
10531
|
+
_number: _number,
|
|
10532
|
+
_optional: _optional,
|
|
10533
|
+
_overwrite: _overwrite,
|
|
10534
|
+
_parse: _parse,
|
|
10535
|
+
_parseAsync: _parseAsync,
|
|
10536
|
+
_pipe: _pipe,
|
|
10537
|
+
_positive: _positive,
|
|
10538
|
+
_promise: _promise,
|
|
10539
|
+
_property: _property,
|
|
10540
|
+
_readonly: _readonly,
|
|
10541
|
+
_record: _record,
|
|
10542
|
+
_refine: _refine,
|
|
10543
|
+
_regex: _regex,
|
|
10544
|
+
_safeParse: _safeParse,
|
|
10545
|
+
_safeParseAsync: _safeParseAsync,
|
|
10546
|
+
_set: _set,
|
|
10547
|
+
_size: _size,
|
|
10548
|
+
_startsWith: _startsWith,
|
|
10549
|
+
_string: _string,
|
|
10550
|
+
_stringFormat: _stringFormat,
|
|
10551
|
+
_stringbool: _stringbool,
|
|
10552
|
+
_success: _success,
|
|
10553
|
+
_superRefine: _superRefine,
|
|
10554
|
+
_symbol: _symbol,
|
|
10555
|
+
_templateLiteral: _templateLiteral,
|
|
10556
|
+
_toLowerCase: _toLowerCase,
|
|
10557
|
+
_toUpperCase: _toUpperCase,
|
|
10558
|
+
_transform: _transform,
|
|
10559
|
+
_trim: _trim,
|
|
10560
|
+
_tuple: _tuple,
|
|
10561
|
+
_uint32: _uint32,
|
|
10562
|
+
_uint64: _uint64,
|
|
10563
|
+
_ulid: _ulid,
|
|
10564
|
+
_undefined: _undefined$1,
|
|
10565
|
+
_union: _union,
|
|
10566
|
+
_unknown: _unknown,
|
|
10567
|
+
_uppercase: _uppercase,
|
|
10568
|
+
_url: _url,
|
|
10569
|
+
_uuid: _uuid,
|
|
10570
|
+
_uuidv4: _uuidv4,
|
|
10571
|
+
_uuidv6: _uuidv6,
|
|
10572
|
+
_uuidv7: _uuidv7,
|
|
10573
|
+
_void: _void$1,
|
|
10574
|
+
_xid: _xid,
|
|
10575
|
+
clone: clone,
|
|
10576
|
+
config: config,
|
|
10577
|
+
flattenError: flattenError,
|
|
10578
|
+
formatError: formatError,
|
|
10579
|
+
function: _function,
|
|
10580
|
+
globalConfig: globalConfig,
|
|
10581
|
+
globalRegistry: globalRegistry,
|
|
10582
|
+
isValidBase64: isValidBase64,
|
|
10583
|
+
isValidBase64URL: isValidBase64URL,
|
|
10584
|
+
isValidJWT: isValidJWT,
|
|
10585
|
+
locales: index$1,
|
|
10586
|
+
parse: parse$1,
|
|
10587
|
+
parseAsync: parseAsync$1,
|
|
10588
|
+
prettifyError: prettifyError,
|
|
10589
|
+
regexes: regexes,
|
|
10590
|
+
registry: registry,
|
|
10591
|
+
safeParse: safeParse$1,
|
|
10592
|
+
safeParseAsync: safeParseAsync$1,
|
|
10593
|
+
toDotPath: toDotPath,
|
|
10594
|
+
toJSONSchema: toJSONSchema,
|
|
10595
|
+
treeifyError: treeifyError,
|
|
10596
|
+
util: util,
|
|
10597
|
+
version: version
|
|
10621
10598
|
});
|
|
10622
10599
|
|
|
10623
10600
|
const ZodISODateTime = /*@__PURE__*/ $constructor("ZodISODateTime", (inst, def) => {
|
|
@@ -10650,15 +10627,15 @@ function duration(params) {
|
|
|
10650
10627
|
}
|
|
10651
10628
|
|
|
10652
10629
|
var iso = /*#__PURE__*/Object.freeze({
|
|
10653
|
-
|
|
10654
|
-
|
|
10655
|
-
|
|
10656
|
-
|
|
10657
|
-
|
|
10658
|
-
|
|
10659
|
-
|
|
10660
|
-
|
|
10661
|
-
|
|
10630
|
+
__proto__: null,
|
|
10631
|
+
ZodISODate: ZodISODate,
|
|
10632
|
+
ZodISODateTime: ZodISODateTime,
|
|
10633
|
+
ZodISODuration: ZodISODuration,
|
|
10634
|
+
ZodISOTime: ZodISOTime,
|
|
10635
|
+
date: date$2,
|
|
10636
|
+
datetime: datetime,
|
|
10637
|
+
duration: duration,
|
|
10638
|
+
time: time
|
|
10662
10639
|
});
|
|
10663
10640
|
|
|
10664
10641
|
const initializer = (inst, issues) => {
|
|
@@ -11741,227 +11718,227 @@ function date(params) {
|
|
|
11741
11718
|
}
|
|
11742
11719
|
|
|
11743
11720
|
var coerce = /*#__PURE__*/Object.freeze({
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11721
|
+
__proto__: null,
|
|
11722
|
+
bigint: bigint,
|
|
11723
|
+
boolean: boolean,
|
|
11724
|
+
date: date,
|
|
11725
|
+
number: number,
|
|
11726
|
+
string: string
|
|
11750
11727
|
});
|
|
11751
11728
|
|
|
11752
11729
|
config(en());
|
|
11753
11730
|
|
|
11754
11731
|
var z = /*#__PURE__*/Object.freeze({
|
|
11755
|
-
|
|
11756
|
-
|
|
11757
|
-
|
|
11758
|
-
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
|
|
11765
|
-
|
|
11766
|
-
|
|
11767
|
-
|
|
11768
|
-
|
|
11769
|
-
|
|
11770
|
-
|
|
11771
|
-
|
|
11772
|
-
|
|
11773
|
-
|
|
11774
|
-
|
|
11775
|
-
|
|
11776
|
-
|
|
11777
|
-
|
|
11778
|
-
|
|
11779
|
-
|
|
11780
|
-
|
|
11781
|
-
|
|
11782
|
-
|
|
11783
|
-
|
|
11784
|
-
|
|
11785
|
-
|
|
11786
|
-
|
|
11787
|
-
|
|
11788
|
-
|
|
11789
|
-
|
|
11790
|
-
|
|
11791
|
-
|
|
11792
|
-
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
|
|
11804
|
-
|
|
11805
|
-
|
|
11806
|
-
|
|
11807
|
-
|
|
11808
|
-
|
|
11809
|
-
|
|
11810
|
-
|
|
11811
|
-
|
|
11812
|
-
|
|
11813
|
-
|
|
11814
|
-
|
|
11815
|
-
|
|
11816
|
-
|
|
11817
|
-
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11823
|
-
|
|
11824
|
-
|
|
11825
|
-
|
|
11826
|
-
|
|
11827
|
-
|
|
11828
|
-
|
|
11829
|
-
|
|
11830
|
-
|
|
11831
|
-
|
|
11832
|
-
|
|
11833
|
-
|
|
11834
|
-
|
|
11835
|
-
|
|
11836
|
-
|
|
11837
|
-
|
|
11838
|
-
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
|
|
11844
|
-
|
|
11845
|
-
|
|
11846
|
-
|
|
11847
|
-
|
|
11848
|
-
|
|
11849
|
-
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
|
|
11856
|
-
|
|
11857
|
-
|
|
11858
|
-
|
|
11859
|
-
|
|
11860
|
-
|
|
11861
|
-
|
|
11862
|
-
|
|
11863
|
-
|
|
11864
|
-
|
|
11865
|
-
|
|
11866
|
-
|
|
11867
|
-
|
|
11868
|
-
|
|
11869
|
-
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
|
|
11875
|
-
|
|
11876
|
-
|
|
11877
|
-
|
|
11878
|
-
|
|
11879
|
-
|
|
11880
|
-
|
|
11881
|
-
|
|
11882
|
-
|
|
11883
|
-
|
|
11884
|
-
|
|
11885
|
-
|
|
11886
|
-
|
|
11887
|
-
|
|
11888
|
-
|
|
11889
|
-
|
|
11890
|
-
|
|
11891
|
-
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
|
|
11900
|
-
|
|
11901
|
-
|
|
11902
|
-
|
|
11903
|
-
|
|
11904
|
-
|
|
11905
|
-
|
|
11906
|
-
|
|
11907
|
-
|
|
11908
|
-
|
|
11909
|
-
|
|
11910
|
-
|
|
11911
|
-
|
|
11912
|
-
|
|
11913
|
-
|
|
11914
|
-
|
|
11915
|
-
|
|
11916
|
-
|
|
11917
|
-
|
|
11918
|
-
|
|
11919
|
-
|
|
11920
|
-
|
|
11921
|
-
|
|
11922
|
-
|
|
11923
|
-
|
|
11924
|
-
|
|
11925
|
-
|
|
11926
|
-
|
|
11927
|
-
|
|
11928
|
-
|
|
11929
|
-
|
|
11930
|
-
|
|
11931
|
-
|
|
11932
|
-
|
|
11933
|
-
|
|
11934
|
-
|
|
11935
|
-
|
|
11936
|
-
|
|
11937
|
-
|
|
11938
|
-
|
|
11939
|
-
|
|
11940
|
-
|
|
11941
|
-
|
|
11942
|
-
|
|
11943
|
-
|
|
11944
|
-
|
|
11945
|
-
|
|
11946
|
-
|
|
11947
|
-
|
|
11948
|
-
|
|
11949
|
-
|
|
11950
|
-
|
|
11951
|
-
|
|
11952
|
-
|
|
11953
|
-
|
|
11954
|
-
|
|
11955
|
-
|
|
11956
|
-
|
|
11957
|
-
|
|
11958
|
-
|
|
11959
|
-
|
|
11960
|
-
|
|
11961
|
-
|
|
11962
|
-
|
|
11963
|
-
|
|
11964
|
-
|
|
11732
|
+
__proto__: null,
|
|
11733
|
+
$brand: $brand,
|
|
11734
|
+
$input: $input,
|
|
11735
|
+
$output: $output,
|
|
11736
|
+
NEVER: NEVER,
|
|
11737
|
+
TimePrecision: TimePrecision,
|
|
11738
|
+
ZodAny: ZodAny,
|
|
11739
|
+
ZodArray: ZodArray,
|
|
11740
|
+
ZodBase64: ZodBase64,
|
|
11741
|
+
ZodBase64URL: ZodBase64URL,
|
|
11742
|
+
ZodBigInt: ZodBigInt,
|
|
11743
|
+
ZodBigIntFormat: ZodBigIntFormat,
|
|
11744
|
+
ZodBoolean: ZodBoolean,
|
|
11745
|
+
ZodCIDRv4: ZodCIDRv4,
|
|
11746
|
+
ZodCIDRv6: ZodCIDRv6,
|
|
11747
|
+
ZodCUID: ZodCUID,
|
|
11748
|
+
ZodCUID2: ZodCUID2,
|
|
11749
|
+
ZodCatch: ZodCatch,
|
|
11750
|
+
ZodCustom: ZodCustom,
|
|
11751
|
+
ZodCustomStringFormat: ZodCustomStringFormat,
|
|
11752
|
+
ZodDate: ZodDate,
|
|
11753
|
+
ZodDefault: ZodDefault,
|
|
11754
|
+
ZodDiscriminatedUnion: ZodDiscriminatedUnion,
|
|
11755
|
+
ZodE164: ZodE164,
|
|
11756
|
+
ZodEmail: ZodEmail,
|
|
11757
|
+
ZodEmoji: ZodEmoji,
|
|
11758
|
+
ZodEnum: ZodEnum,
|
|
11759
|
+
ZodError: ZodError,
|
|
11760
|
+
ZodFile: ZodFile,
|
|
11761
|
+
get ZodFirstPartyTypeKind () { return ZodFirstPartyTypeKind; },
|
|
11762
|
+
ZodGUID: ZodGUID,
|
|
11763
|
+
ZodIPv4: ZodIPv4,
|
|
11764
|
+
ZodIPv6: ZodIPv6,
|
|
11765
|
+
ZodISODate: ZodISODate,
|
|
11766
|
+
ZodISODateTime: ZodISODateTime,
|
|
11767
|
+
ZodISODuration: ZodISODuration,
|
|
11768
|
+
ZodISOTime: ZodISOTime,
|
|
11769
|
+
ZodIntersection: ZodIntersection,
|
|
11770
|
+
ZodIssueCode: ZodIssueCode,
|
|
11771
|
+
ZodJWT: ZodJWT,
|
|
11772
|
+
ZodKSUID: ZodKSUID,
|
|
11773
|
+
ZodLazy: ZodLazy,
|
|
11774
|
+
ZodLiteral: ZodLiteral,
|
|
11775
|
+
ZodMap: ZodMap,
|
|
11776
|
+
ZodNaN: ZodNaN,
|
|
11777
|
+
ZodNanoID: ZodNanoID,
|
|
11778
|
+
ZodNever: ZodNever,
|
|
11779
|
+
ZodNonOptional: ZodNonOptional,
|
|
11780
|
+
ZodNull: ZodNull,
|
|
11781
|
+
ZodNullable: ZodNullable,
|
|
11782
|
+
ZodNumber: ZodNumber,
|
|
11783
|
+
ZodNumberFormat: ZodNumberFormat,
|
|
11784
|
+
ZodObject: ZodObject,
|
|
11785
|
+
ZodOptional: ZodOptional,
|
|
11786
|
+
ZodPipe: ZodPipe,
|
|
11787
|
+
ZodPrefault: ZodPrefault,
|
|
11788
|
+
ZodPromise: ZodPromise,
|
|
11789
|
+
ZodReadonly: ZodReadonly,
|
|
11790
|
+
ZodRealError: ZodRealError,
|
|
11791
|
+
ZodRecord: ZodRecord,
|
|
11792
|
+
ZodSet: ZodSet,
|
|
11793
|
+
ZodString: ZodString,
|
|
11794
|
+
ZodStringFormat: ZodStringFormat,
|
|
11795
|
+
ZodSuccess: ZodSuccess,
|
|
11796
|
+
ZodSymbol: ZodSymbol,
|
|
11797
|
+
ZodTemplateLiteral: ZodTemplateLiteral,
|
|
11798
|
+
ZodTransform: ZodTransform,
|
|
11799
|
+
ZodTuple: ZodTuple,
|
|
11800
|
+
ZodType: ZodType,
|
|
11801
|
+
ZodULID: ZodULID,
|
|
11802
|
+
ZodURL: ZodURL,
|
|
11803
|
+
ZodUUID: ZodUUID,
|
|
11804
|
+
ZodUndefined: ZodUndefined,
|
|
11805
|
+
ZodUnion: ZodUnion,
|
|
11806
|
+
ZodUnknown: ZodUnknown,
|
|
11807
|
+
ZodVoid: ZodVoid,
|
|
11808
|
+
ZodXID: ZodXID,
|
|
11809
|
+
_ZodString: _ZodString,
|
|
11810
|
+
_default: _default,
|
|
11811
|
+
any: any,
|
|
11812
|
+
array: array,
|
|
11813
|
+
base64: base64,
|
|
11814
|
+
base64url: base64url,
|
|
11815
|
+
bigint: bigint$1,
|
|
11816
|
+
boolean: boolean$1,
|
|
11817
|
+
catch: _catch,
|
|
11818
|
+
check: check,
|
|
11819
|
+
cidrv4: cidrv4,
|
|
11820
|
+
cidrv6: cidrv6,
|
|
11821
|
+
clone: clone,
|
|
11822
|
+
coerce: coerce,
|
|
11823
|
+
config: config,
|
|
11824
|
+
core: index,
|
|
11825
|
+
cuid: cuid,
|
|
11826
|
+
cuid2: cuid2,
|
|
11827
|
+
custom: custom,
|
|
11828
|
+
date: date$1,
|
|
11829
|
+
discriminatedUnion: discriminatedUnion,
|
|
11830
|
+
e164: e164,
|
|
11831
|
+
email: email,
|
|
11832
|
+
emoji: emoji,
|
|
11833
|
+
endsWith: _endsWith,
|
|
11834
|
+
enum: _enum,
|
|
11835
|
+
file: file,
|
|
11836
|
+
flattenError: flattenError,
|
|
11837
|
+
float32: float32,
|
|
11838
|
+
float64: float64,
|
|
11839
|
+
formatError: formatError,
|
|
11840
|
+
function: _function,
|
|
11841
|
+
getErrorMap: getErrorMap,
|
|
11842
|
+
globalRegistry: globalRegistry,
|
|
11843
|
+
gt: _gt,
|
|
11844
|
+
gte: _gte,
|
|
11845
|
+
guid: guid,
|
|
11846
|
+
hostname: hostname,
|
|
11847
|
+
includes: _includes,
|
|
11848
|
+
instanceof: _instanceof,
|
|
11849
|
+
int: int,
|
|
11850
|
+
int32: int32,
|
|
11851
|
+
int64: int64,
|
|
11852
|
+
intersection: intersection,
|
|
11853
|
+
ipv4: ipv4,
|
|
11854
|
+
ipv6: ipv6,
|
|
11855
|
+
iso: iso,
|
|
11856
|
+
json: json,
|
|
11857
|
+
jwt: jwt,
|
|
11858
|
+
keyof: keyof,
|
|
11859
|
+
ksuid: ksuid,
|
|
11860
|
+
lazy: lazy,
|
|
11861
|
+
length: _length,
|
|
11862
|
+
literal: literal,
|
|
11863
|
+
locales: index$1,
|
|
11864
|
+
looseObject: looseObject,
|
|
11865
|
+
lowercase: _lowercase,
|
|
11866
|
+
lt: _lt,
|
|
11867
|
+
lte: _lte,
|
|
11868
|
+
map: map,
|
|
11869
|
+
maxLength: _maxLength,
|
|
11870
|
+
maxSize: _maxSize,
|
|
11871
|
+
mime: _mime,
|
|
11872
|
+
minLength: _minLength,
|
|
11873
|
+
minSize: _minSize,
|
|
11874
|
+
multipleOf: _multipleOf,
|
|
11875
|
+
nan: nan,
|
|
11876
|
+
nanoid: nanoid,
|
|
11877
|
+
nativeEnum: nativeEnum,
|
|
11878
|
+
negative: _negative,
|
|
11879
|
+
never: never,
|
|
11880
|
+
nonnegative: _nonnegative,
|
|
11881
|
+
nonoptional: nonoptional,
|
|
11882
|
+
nonpositive: _nonpositive,
|
|
11883
|
+
normalize: _normalize,
|
|
11884
|
+
null: _null,
|
|
11885
|
+
nullable: nullable,
|
|
11886
|
+
nullish: nullish,
|
|
11887
|
+
number: number$1,
|
|
11888
|
+
object: object,
|
|
11889
|
+
optional: optional,
|
|
11890
|
+
overwrite: _overwrite,
|
|
11891
|
+
parse: parse,
|
|
11892
|
+
parseAsync: parseAsync,
|
|
11893
|
+
partialRecord: partialRecord,
|
|
11894
|
+
pipe: pipe,
|
|
11895
|
+
positive: _positive,
|
|
11896
|
+
prefault: prefault,
|
|
11897
|
+
preprocess: preprocess,
|
|
11898
|
+
prettifyError: prettifyError,
|
|
11899
|
+
promise: promise,
|
|
11900
|
+
property: _property,
|
|
11901
|
+
readonly: readonly,
|
|
11902
|
+
record: record,
|
|
11903
|
+
refine: refine,
|
|
11904
|
+
regex: _regex,
|
|
11905
|
+
regexes: regexes,
|
|
11906
|
+
registry: registry,
|
|
11907
|
+
safeParse: safeParse,
|
|
11908
|
+
safeParseAsync: safeParseAsync,
|
|
11909
|
+
set: set,
|
|
11910
|
+
setErrorMap: setErrorMap,
|
|
11911
|
+
size: _size,
|
|
11912
|
+
startsWith: _startsWith,
|
|
11913
|
+
strictObject: strictObject,
|
|
11914
|
+
string: string$1,
|
|
11915
|
+
stringFormat: stringFormat,
|
|
11916
|
+
stringbool: stringbool,
|
|
11917
|
+
success: success,
|
|
11918
|
+
superRefine: superRefine,
|
|
11919
|
+
symbol: symbol,
|
|
11920
|
+
templateLiteral: templateLiteral,
|
|
11921
|
+
toJSONSchema: toJSONSchema,
|
|
11922
|
+
toLowerCase: _toLowerCase,
|
|
11923
|
+
toUpperCase: _toUpperCase,
|
|
11924
|
+
transform: transform,
|
|
11925
|
+
treeifyError: treeifyError,
|
|
11926
|
+
trim: _trim,
|
|
11927
|
+
tuple: tuple,
|
|
11928
|
+
uint32: uint32,
|
|
11929
|
+
uint64: uint64,
|
|
11930
|
+
ulid: ulid,
|
|
11931
|
+
undefined: _undefined,
|
|
11932
|
+
union: union,
|
|
11933
|
+
unknown: unknown,
|
|
11934
|
+
uppercase: _uppercase,
|
|
11935
|
+
url: url,
|
|
11936
|
+
uuid: uuid,
|
|
11937
|
+
uuidv4: uuidv4,
|
|
11938
|
+
uuidv6: uuidv6,
|
|
11939
|
+
uuidv7: uuidv7,
|
|
11940
|
+
void: _void,
|
|
11941
|
+
xid: xid
|
|
11965
11942
|
});
|
|
11966
11943
|
|
|
11967
11944
|
const stakeControlEIP712Domain = (chainId) => ({
|
|
@@ -12014,6 +11991,14 @@ const commitKickstarterEIP712Types = {
|
|
|
12014
11991
|
{ name: "deadline", type: "uint256" },
|
|
12015
11992
|
],
|
|
12016
11993
|
};
|
|
11994
|
+
const payProtocolDepositUsingStakedControlEIP712Types = {
|
|
11995
|
+
PayProtocolDepositUsingStakedControl: [
|
|
11996
|
+
{ name: "amount", type: "uint256" },
|
|
11997
|
+
{ name: "applicationId", type: "string" },
|
|
11998
|
+
{ name: "nonce", type: "uint256" },
|
|
11999
|
+
{ name: "deadline", type: "uint256" },
|
|
12000
|
+
],
|
|
12001
|
+
};
|
|
12017
12002
|
// Separate request schemas for clarity between stake and unstake
|
|
12018
12003
|
const stakeSignatureRequestSchema = z.object({
|
|
12019
12004
|
wallet: z.string().regex(/^0x[a-fA-F0-9]{40}$/),
|
|
@@ -12057,6 +12042,14 @@ const commitKickstarterSignatureRequestSchema = z.object({
|
|
|
12057
12042
|
kickstarterId: z.string(),
|
|
12058
12043
|
deadline: z.string(),
|
|
12059
12044
|
});
|
|
12045
|
+
const payProtocolDepositUsingStakedControlSignatureRequestSchema = z.object({
|
|
12046
|
+
wallet: z.string().regex(/^0x[a-fA-F0-9]{40}$/),
|
|
12047
|
+
signature: z.string().regex(/^0x[a-fA-F0-9]{130}$/),
|
|
12048
|
+
nonce: z.string(),
|
|
12049
|
+
amount: z.string(),
|
|
12050
|
+
applicationId: z.string(),
|
|
12051
|
+
deadline: z.string(),
|
|
12052
|
+
});
|
|
12060
12053
|
function isDeadlineExpired(deadline) {
|
|
12061
12054
|
const nowSeconds = BigInt(Math.floor(Date.now() / 1000));
|
|
12062
12055
|
return deadline < nowSeconds;
|
|
@@ -12138,6 +12131,21 @@ function buildCommitKickstarterMessage(req) {
|
|
|
12138
12131
|
throw new Error("kickstarterId must be non-empty");
|
|
12139
12132
|
return { nonce, amount, kickstarterId, deadline };
|
|
12140
12133
|
}
|
|
12134
|
+
function buildPayProtocolDepositUsingStakedControlMessage(req) {
|
|
12135
|
+
const amount = BigInt(req.amount);
|
|
12136
|
+
const nonce = BigInt(req.nonce);
|
|
12137
|
+
const deadline = BigInt(req.deadline);
|
|
12138
|
+
const applicationId = req.applicationId;
|
|
12139
|
+
if (amount < 0n)
|
|
12140
|
+
throw new Error("Amount must be non-negative");
|
|
12141
|
+
if (nonce < 0n)
|
|
12142
|
+
throw new Error("Nonce must be non-negative");
|
|
12143
|
+
if (deadline < 0n)
|
|
12144
|
+
throw new Error("Deadline must be non-negative");
|
|
12145
|
+
if (!applicationId)
|
|
12146
|
+
throw new Error("applicationId must be non-empty");
|
|
12147
|
+
return { amount, applicationId, nonce, deadline };
|
|
12148
|
+
}
|
|
12141
12149
|
// Helper to validate the signature using viem
|
|
12142
12150
|
async function validateStakeSignature(input, domain = stakeControlEIP712Domain(1)) {
|
|
12143
12151
|
const message = buildStakeMessage({
|
|
@@ -12276,21 +12284,51 @@ async function validateCommitKickstarterSignature(input, domain = stakeControlEI
|
|
|
12276
12284
|
return { valid: false, recovered: null, reason: "signature_failed" };
|
|
12277
12285
|
}
|
|
12278
12286
|
}
|
|
12287
|
+
async function validatePayProtocolDepositUsingStakedControlSignature(input, domain = stakeControlEIP712Domain(1)) {
|
|
12288
|
+
const message = buildPayProtocolDepositUsingStakedControlMessage({
|
|
12289
|
+
amount: input.amount,
|
|
12290
|
+
applicationId: input.applicationId,
|
|
12291
|
+
nonce: input.nonce,
|
|
12292
|
+
deadline: input.deadline,
|
|
12293
|
+
});
|
|
12294
|
+
if (isDeadlineExpired(message.deadline)) {
|
|
12295
|
+
return { valid: false, recovered: null, reason: "deadline_expired" };
|
|
12296
|
+
}
|
|
12297
|
+
try {
|
|
12298
|
+
const verified = await viem.verifyTypedData({
|
|
12299
|
+
address: viem.getAddress(input.wallet),
|
|
12300
|
+
domain,
|
|
12301
|
+
types: payProtocolDepositUsingStakedControlEIP712Types,
|
|
12302
|
+
primaryType: farmsRouter.TRANSFER_TYPES.PayProtocolDepositUsingStakedControl,
|
|
12303
|
+
message,
|
|
12304
|
+
signature: input.signature,
|
|
12305
|
+
});
|
|
12306
|
+
return verified
|
|
12307
|
+
? { valid: true, recovered: input.wallet, reason: null }
|
|
12308
|
+
: { valid: false, recovered: null, reason: "signer_mismatch" };
|
|
12309
|
+
}
|
|
12310
|
+
catch (_) {
|
|
12311
|
+
return { valid: false, recovered: null, reason: "signature_failed" };
|
|
12312
|
+
}
|
|
12313
|
+
}
|
|
12279
12314
|
|
|
12280
12315
|
exports.ControlRouter = farmsRouter.ControlRouter;
|
|
12281
12316
|
exports.DECIMALS_BY_TOKEN = farmsRouter.DECIMALS_BY_TOKEN;
|
|
12282
12317
|
exports.FORWARDER_ABI = farmsRouter.FORWARDER_ABI;
|
|
12283
12318
|
exports.FarmsRouter = farmsRouter.FarmsRouter;
|
|
12284
12319
|
Object.defineProperty(exports, "ForwarderError", {
|
|
12285
|
-
|
|
12286
|
-
|
|
12320
|
+
enumerable: true,
|
|
12321
|
+
get: function () { return farmsRouter.ForwarderError; }
|
|
12287
12322
|
});
|
|
12288
12323
|
exports.GCA_URLS = farmsRouter.GCA_URLS;
|
|
12289
12324
|
exports.GLOW_WEIGHT_DECIMAL_PRECISION = farmsRouter.GLOW_WEIGHT_DECIMAL_PRECISION;
|
|
12290
12325
|
exports.HUB_URL = farmsRouter.HUB_URL;
|
|
12291
12326
|
exports.KickstarterRouter = farmsRouter.KickstarterRouter;
|
|
12292
12327
|
exports.MAX_WEIGHT = farmsRouter.MAX_WEIGHT;
|
|
12328
|
+
exports.OFF_CHAIN_PAYMENT_CURRENCIES = farmsRouter.OFF_CHAIN_PAYMENT_CURRENCIES;
|
|
12329
|
+
exports.PAYMENT_CURRENCIES = farmsRouter.PAYMENT_CURRENCIES;
|
|
12293
12330
|
exports.RegionRouter = farmsRouter.RegionRouter;
|
|
12331
|
+
exports.TRANSFER_TYPES = farmsRouter.TRANSFER_TYPES;
|
|
12294
12332
|
exports.USDG_WEIGHT_DECIMAL_PRECISION = farmsRouter.USDG_WEIGHT_DECIMAL_PRECISION;
|
|
12295
12333
|
exports.WalletsRouter = farmsRouter.WalletsRouter;
|
|
12296
12334
|
exports.allRegions = farmsRouter.allRegions;
|
|
@@ -12299,16 +12337,16 @@ exports.getAddresses = farmsRouter.getAddresses;
|
|
|
12299
12337
|
exports.regionMetadata = farmsRouter.regionMetadata;
|
|
12300
12338
|
exports.usStates = farmsRouter.usStates;
|
|
12301
12339
|
exports.useForwarder = farmsRouter.useForwarder;
|
|
12302
|
-
exports.OFF_CHAIN_PAYMENT_CURRENCIES = OFF_CHAIN_PAYMENT_CURRENCIES;
|
|
12303
|
-
exports.PAYMENT_CURRENCIES = PAYMENT_CURRENCIES;
|
|
12304
|
-
exports.TRANSFER_TYPES = TRANSFER_TYPES;
|
|
12305
12340
|
exports.buildCommitKickstarterMessage = buildCommitKickstarterMessage;
|
|
12341
|
+
exports.buildPayProtocolDepositUsingStakedControlMessage = buildPayProtocolDepositUsingStakedControlMessage;
|
|
12306
12342
|
exports.buildRestakeMessage = buildRestakeMessage;
|
|
12307
12343
|
exports.buildStakeMessage = buildStakeMessage;
|
|
12308
12344
|
exports.buildUnstakeMoveMessage = buildUnstakeMoveMessage;
|
|
12309
12345
|
exports.buildUnstakeUnlockMessage = buildUnstakeUnlockMessage;
|
|
12310
12346
|
exports.commitKickstarterEIP712Types = commitKickstarterEIP712Types;
|
|
12311
12347
|
exports.commitKickstarterSignatureRequestSchema = commitKickstarterSignatureRequestSchema;
|
|
12348
|
+
exports.payProtocolDepositUsingStakedControlEIP712Types = payProtocolDepositUsingStakedControlEIP712Types;
|
|
12349
|
+
exports.payProtocolDepositUsingStakedControlSignatureRequestSchema = payProtocolDepositUsingStakedControlSignatureRequestSchema;
|
|
12312
12350
|
exports.restakeEIP712Types = restakeEIP712Types;
|
|
12313
12351
|
exports.restakeSignatureRequestSchema = restakeSignatureRequestSchema;
|
|
12314
12352
|
exports.stakeControlEIP712Domain = stakeControlEIP712Domain;
|
|
@@ -12319,6 +12357,7 @@ exports.unstakeMoveSignatureRequestSchema = unstakeMoveSignatureRequestSchema;
|
|
|
12319
12357
|
exports.unstakeUnlockEIP712Types = unstakeUnlockEIP712Types;
|
|
12320
12358
|
exports.unstakeUnlockSignatureRequestSchema = unstakeUnlockSignatureRequestSchema;
|
|
12321
12359
|
exports.validateCommitKickstarterSignature = validateCommitKickstarterSignature;
|
|
12360
|
+
exports.validatePayProtocolDepositUsingStakedControlSignature = validatePayProtocolDepositUsingStakedControlSignature;
|
|
12322
12361
|
exports.validateRestakeSignature = validateRestakeSignature;
|
|
12323
12362
|
exports.validateStakeSignature = validateStakeSignature;
|
|
12324
12363
|
exports.validateUnstakeMoveSignature = validateUnstakeMoveSignature;
|