@taqueria/protocol 0.19.2 → 0.19.3
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/Base.d.ts +1 -1
- package/Base.d.ts.map +1 -1
- package/Base.js +1 -1
- package/Base.js.map +1 -1
- package/Base.mjs +1 -1
- package/Base.mjs.map +1 -1
- package/Config.d.ts +194 -193
- package/Config.d.ts.map +1 -1
- package/Config.js +18 -21
- package/Config.js.map +1 -1
- package/Config.mjs +19 -22
- package/Config.mjs.map +1 -1
- package/EphemeralState.d.ts +1 -3
- package/EphemeralState.d.ts.map +1 -1
- package/Faucet.d.ts +98 -97
- package/Faucet.d.ts.map +1 -1
- package/Faucet.js +32 -20
- package/Faucet.js.map +1 -1
- package/Faucet.mjs +32 -20
- package/Faucet.mjs.map +1 -1
- package/LoadedConfig.d.ts +202 -201
- package/LoadedConfig.d.ts.map +1 -1
- package/NetworkConfig.d.ts +108 -107
- package/NetworkConfig.d.ts.map +1 -1
- package/Operation.d.ts +32 -32
- package/ParsedOperation.d.ts +8 -8
- package/ParsedTemplate.d.ts +16 -16
- package/PluginSchema.d.ts +224 -224
- package/RequestArgs.d.ts +376 -376
- package/Template.d.ts +48 -48
- package/package.json +1 -1
package/Config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAQ9D,OAAO,EAAE,CAAC,
|
|
1
|
+
{"version":3,"file":"Config.d.ts","sourceRoot":"","sources":["Config.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAQ9D,OAAO,EAAE,CAAC,EAAY,MAAM,KAAK,CAAC;AAElC,eAAO,MAAM,gBAAgB;;;;;;;;;;;;aAM5B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;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gB,CAAC,MAAM,CAAC,CAAC;AAC7D,oBAAY,CAAC,GAAG,MAAM,CAAC;AAEvB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnB,CAAC"}
|
package/Config.js
CHANGED
|
@@ -62,17 +62,11 @@ var pluginsInternalSchema = import_zod.z.preprocess(
|
|
|
62
62
|
)
|
|
63
63
|
);
|
|
64
64
|
var networkMap = import_zod.z.record(
|
|
65
|
-
|
|
66
|
-
NetworkConfig.schemas.schema,
|
|
67
|
-
import_zod.z.string({ description: "config.network" }).nonempty("Default network must reference the name of an existing network configuration.")
|
|
68
|
-
]),
|
|
65
|
+
NetworkConfig.schemas.schema,
|
|
69
66
|
{ description: "Network configurations" }
|
|
70
67
|
).optional();
|
|
71
68
|
var sandboxMap = import_zod.z.record(
|
|
72
|
-
|
|
73
|
-
SandboxConfig.schemas.schema,
|
|
74
|
-
import_zod.z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
75
|
-
]),
|
|
69
|
+
SandboxConfig.schemas.schema,
|
|
76
70
|
{ description: "Sandbox configurations" }
|
|
77
71
|
).optional();
|
|
78
72
|
var environmentMap = import_zod.z.record(
|
|
@@ -124,18 +118,8 @@ var internalSchema = commonSchema.extend({
|
|
|
124
118
|
});
|
|
125
119
|
var rawSchema8 = commonSchema.extend({
|
|
126
120
|
plugins: pluginsRawSchema.optional(),
|
|
127
|
-
network: import_zod.z.record(
|
|
128
|
-
|
|
129
|
-
NetworkConfig.rawSchema,
|
|
130
|
-
import_zod.z.string({ description: "config.network" }).min(1, "Default network must reference the name of an existing network configuration.")
|
|
131
|
-
])
|
|
132
|
-
).optional(),
|
|
133
|
-
sandbox: import_zod.z.record(
|
|
134
|
-
import_zod.z.union([
|
|
135
|
-
SandboxConfig.rawSchema,
|
|
136
|
-
import_zod.z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
137
|
-
])
|
|
138
|
-
).optional(),
|
|
121
|
+
network: import_zod.z.record(NetworkConfig.rawSchema).optional(),
|
|
122
|
+
sandbox: import_zod.z.record(SandboxConfig.rawSchema).optional(),
|
|
139
123
|
environment: import_zod.z.record(
|
|
140
124
|
import_zod.z.union([
|
|
141
125
|
Environment.rawSchema,
|
|
@@ -151,7 +135,20 @@ var rawSchema8 = commonSchema.extend({
|
|
|
151
135
|
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
152
136
|
rawSchema: rawSchema8,
|
|
153
137
|
internalSchema,
|
|
154
|
-
parseErrMsg: (
|
|
138
|
+
parseErrMsg: (_value, previous) => {
|
|
139
|
+
if (previous instanceof import_zod.ZodError) {
|
|
140
|
+
const msgs = previous.errors.reduce(
|
|
141
|
+
(retval, issue) => {
|
|
142
|
+
const path = issue.path.join(" \u2192 ");
|
|
143
|
+
const msg = ` ${path}: ${issue.message}`;
|
|
144
|
+
return [...retval, msg];
|
|
145
|
+
},
|
|
146
|
+
[`Your .taq/config.json file is invalid:`]
|
|
147
|
+
);
|
|
148
|
+
return msgs.join("\n") + "\n";
|
|
149
|
+
}
|
|
150
|
+
return `Your .taq/config.json file is invalid.`;
|
|
151
|
+
},
|
|
155
152
|
unknownErrMsg: "Something went wrong trying to parse your configuration"
|
|
156
153
|
});
|
|
157
154
|
var { create, of, make } = factory;
|
package/Config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\
|
|
1
|
+
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z, ZodError } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\tNetworkConfig.schemas.schema,\n\t\t{ description: 'Network configurations' },\n\t)\n\t.optional();\n\nconst sandboxMap = z\n\t.record(\n\t\tSandboxConfig.schemas.schema,\n\t\t{ description: 'Sandbox configurations' },\n\t)\n\t.optional();\n\nconst environmentMap = z\n\t.record(\n\t\tz.union([\n\t\t\tEnvironment.schemas.schema,\n\t\t\tz.string().min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t]),\n\t\t{ description: 'Environment configurations' },\n\t)\n\t.optional();\n\nconst accountsMap = z.preprocess(\n\t(val: unknown) =>\n\t\tval ?? {\n\t\t\t'bob': '5_000_000_000',\n\t\t\t'alice': '5_000_000_000',\n\t\t\t'john': '5_000_000_000',\n\t\t},\n\tz.record(\n\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t{ description: 'config.accounts' },\n\t),\n);\n\nconst commonSchema = z.object({\n\tlanguage: z.preprocess(\n\t\tval => val ?? 'en',\n\t\tz.union([\n\t\t\tz.literal('en'),\n\t\t\tz.literal('fr'),\n\t\t], { description: 'config.language' })\n\t\t\t.optional(),\n\t),\n\tplugins: pluginsInternalSchema.optional(),\n\tcontractsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'contracts',\n\t\t\tz.string({ description: 'config.contractsDir' })\n\t\t\t\t.min(1, 'config.contractsDir must have a value'),\n\t\t),\n\tartifactsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'artifacts',\n\t\t\tz.string({ description: 'config.artifactsDir' })\n\t\t\t\t.min(1, 'config.artifactsDir must have a value'),\n\t\t),\n\tcontracts: z.record(\n\t\tContract.rawSchema,\n\t).optional(),\n}).describe('config');\n\nexport const internalSchema = commonSchema.extend({\n\tnetwork: networkMap,\n\tsandbox: sandboxMap,\n\tenvironment: environmentMap,\n\taccounts: accountsMap,\n\tcontracts: z.record(Contract.schemas.schema).optional(),\n\tmetadata: MetadataConfig.schemas.schema.optional(),\n});\n\nexport const rawSchema = commonSchema.extend({\n\tplugins: pluginsRawSchema.optional(),\n\tnetwork: z\n\t\t.record(NetworkConfig.rawSchema)\n\t\t.optional(),\n\tsandbox: z\n\t\t.record(SandboxConfig.rawSchema)\n\t\t.optional(),\n\tenvironment: z\n\t\t.record(\n\t\t\tz.union([\n\t\t\t\tEnvironment.rawSchema,\n\t\t\t\tz.string({ description: 'config.environment' })\n\t\t\t\t\t.min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t\t]),\n\t\t)\n\t\t.optional(),\n\taccounts: z\n\t\t.record(\n\t\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t\t{ description: 'config.accounts' },\n\t\t)\n\t\t.optional(),\n\tmetadata: MetadataConfig.rawSchema.optional(),\n}).describe('config');\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (_value, previous) => {\n\t\tif (previous instanceof ZodError) {\n\t\t\tconst msgs: string[] = previous.errors.reduce(\n\t\t\t\t(retval, issue) => {\n\t\t\t\t\tconst path = issue.path.join(' → ');\n\t\t\t\t\tconst msg = ` ${path}: ${issue.message}`;\n\t\t\t\t\treturn [...retval, msg];\n\t\t\t\t},\n\t\t\t\t[`Your .taq/config.json file is invalid:`],\n\t\t\t);\n\t\t\treturn msgs.join('\\n') + '\\n';\n\t\t}\n\t\treturn `Your .taq/config.json file is invalid.`;\n\t},\n\tunknownErrMsg: 'Something went wrong trying to parse your configuration',\n});\n\nexport const { create, of, make } = factory;\nexport type Config = z.infer<typeof generatedSchemas.schema>;\nexport type t = Config;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Config),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAAA;AAAA,EAAA,eAAAC;AAAA;AAAA;AAAA,kBAAoC;AACpC,eAA0B;AAC1B,kBAA6B;AAC7B,sBAAiC;AACjC,qBAAgC;AAChC,oBAA+B;AAC/B,oBAA+B;AAC/B,SAAoB;AACpB,iBAA4B;AAErB,IAAM,mBAAmB,aAAE;AAAA,EACjC,SAAO,OAAO,CAAC;AAAA,EACf,aAAE;AAAA,IACe;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M,KAAK,SAAS,MAAM;AAChC,iBAAO,CAAC,GAAG,QAAQ,GAAG;AAAA,QACvB;AAAA,QACA,CAAC,wCAAwC;AAAA,MAC1C;AACA,aAAO,KAAK,KAAK,IAAI,IAAI;AAAA,IAC1B;AACA,WAAO;AAAA,EACR;AAAA,EACA,eAAe;AAChB,CAAC;AAEM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAI7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAa;AAC/D;","names":["rawSchema","schemas","createType"]}
|
package/Config.mjs
CHANGED
|
@@ -7,7 +7,7 @@ import * as MetadataConfig from "@taqueria/protocol/MetadataConfig";
|
|
|
7
7
|
import * as NetworkConfig from "@taqueria/protocol/NetworkConfig";
|
|
8
8
|
import * as SandboxConfig from "@taqueria/protocol/SandboxConfig";
|
|
9
9
|
import * as Tz from "@taqueria/protocol/Tz";
|
|
10
|
-
import { z } from "zod";
|
|
10
|
+
import { z, ZodError } from "zod";
|
|
11
11
|
var pluginsRawSchema = z.preprocess(
|
|
12
12
|
(val) => val ?? [],
|
|
13
13
|
z.array(
|
|
@@ -23,17 +23,11 @@ var pluginsInternalSchema = z.preprocess(
|
|
|
23
23
|
)
|
|
24
24
|
);
|
|
25
25
|
var networkMap = z.record(
|
|
26
|
-
|
|
27
|
-
NetworkConfig.schemas.schema,
|
|
28
|
-
z.string({ description: "config.network" }).nonempty("Default network must reference the name of an existing network configuration.")
|
|
29
|
-
]),
|
|
26
|
+
NetworkConfig.schemas.schema,
|
|
30
27
|
{ description: "Network configurations" }
|
|
31
28
|
).optional();
|
|
32
29
|
var sandboxMap = z.record(
|
|
33
|
-
|
|
34
|
-
SandboxConfig.schemas.schema,
|
|
35
|
-
z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
36
|
-
]),
|
|
30
|
+
SandboxConfig.schemas.schema,
|
|
37
31
|
{ description: "Sandbox configurations" }
|
|
38
32
|
).optional();
|
|
39
33
|
var environmentMap = z.record(
|
|
@@ -85,18 +79,8 @@ var internalSchema = commonSchema.extend({
|
|
|
85
79
|
});
|
|
86
80
|
var rawSchema8 = commonSchema.extend({
|
|
87
81
|
plugins: pluginsRawSchema.optional(),
|
|
88
|
-
network: z.record(
|
|
89
|
-
|
|
90
|
-
NetworkConfig.rawSchema,
|
|
91
|
-
z.string({ description: "config.network" }).min(1, "Default network must reference the name of an existing network configuration.")
|
|
92
|
-
])
|
|
93
|
-
).optional(),
|
|
94
|
-
sandbox: z.record(
|
|
95
|
-
z.union([
|
|
96
|
-
SandboxConfig.rawSchema,
|
|
97
|
-
z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
98
|
-
])
|
|
99
|
-
).optional(),
|
|
82
|
+
network: z.record(NetworkConfig.rawSchema).optional(),
|
|
83
|
+
sandbox: z.record(SandboxConfig.rawSchema).optional(),
|
|
100
84
|
environment: z.record(
|
|
101
85
|
z.union([
|
|
102
86
|
Environment.rawSchema,
|
|
@@ -112,7 +96,20 @@ var rawSchema8 = commonSchema.extend({
|
|
|
112
96
|
var { schemas: generatedSchemas, factory } = createType({
|
|
113
97
|
rawSchema: rawSchema8,
|
|
114
98
|
internalSchema,
|
|
115
|
-
parseErrMsg: (
|
|
99
|
+
parseErrMsg: (_value, previous) => {
|
|
100
|
+
if (previous instanceof ZodError) {
|
|
101
|
+
const msgs = previous.errors.reduce(
|
|
102
|
+
(retval, issue) => {
|
|
103
|
+
const path = issue.path.join(" \u2192 ");
|
|
104
|
+
const msg = ` ${path}: ${issue.message}`;
|
|
105
|
+
return [...retval, msg];
|
|
106
|
+
},
|
|
107
|
+
[`Your .taq/config.json file is invalid:`]
|
|
108
|
+
);
|
|
109
|
+
return msgs.join("\n") + "\n";
|
|
110
|
+
}
|
|
111
|
+
return `Your .taq/config.json file is invalid.`;
|
|
112
|
+
},
|
|
116
113
|
unknownErrMsg: "Something went wrong trying to parse your configuration"
|
|
117
114
|
});
|
|
118
115
|
var { create, of, make } = factory;
|
package/Config.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\
|
|
1
|
+
{"version":3,"sources":["Config.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as Contract from '@taqueria/protocol/Contract';\nimport * as Environment from '@taqueria/protocol/Environment';\nimport * as InstalledPlugin from '@taqueria/protocol/InstalledPlugin';\nimport * as MetadataConfig from '@taqueria/protocol/MetadataConfig';\nimport * as NetworkConfig from '@taqueria/protocol/NetworkConfig';\nimport * as SandboxConfig from '@taqueria/protocol/SandboxConfig';\nimport * as Tz from '@taqueria/protocol/Tz';\nimport { z, ZodError } from 'zod';\n\nexport const pluginsRawSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.rawSchema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nexport const pluginsInternalSchema = z.preprocess(\n\tval => val ?? [],\n\tz.array(\n\t\tInstalledPlugin.schemas.schema,\n\t\t{ description: 'config.plugins' },\n\t),\n);\n\nconst networkMap = z\n\t.record(\n\t\tNetworkConfig.schemas.schema,\n\t\t{ description: 'Network configurations' },\n\t)\n\t.optional();\n\nconst sandboxMap = z\n\t.record(\n\t\tSandboxConfig.schemas.schema,\n\t\t{ description: 'Sandbox configurations' },\n\t)\n\t.optional();\n\nconst environmentMap = z\n\t.record(\n\t\tz.union([\n\t\t\tEnvironment.schemas.schema,\n\t\t\tz.string().min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t]),\n\t\t{ description: 'Environment configurations' },\n\t)\n\t.optional();\n\nconst accountsMap = z.preprocess(\n\t(val: unknown) =>\n\t\tval ?? {\n\t\t\t'bob': '5_000_000_000',\n\t\t\t'alice': '5_000_000_000',\n\t\t\t'john': '5_000_000_000',\n\t\t},\n\tz.record(\n\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t{ description: 'config.accounts' },\n\t),\n);\n\nconst commonSchema = z.object({\n\tlanguage: z.preprocess(\n\t\tval => val ?? 'en',\n\t\tz.union([\n\t\t\tz.literal('en'),\n\t\t\tz.literal('fr'),\n\t\t], { description: 'config.language' })\n\t\t\t.optional(),\n\t),\n\tplugins: pluginsInternalSchema.optional(),\n\tcontractsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'contracts',\n\t\t\tz.string({ description: 'config.contractsDir' })\n\t\t\t\t.min(1, 'config.contractsDir must have a value'),\n\t\t),\n\tartifactsDir: z\n\t\t.preprocess(\n\t\t\t(val: unknown) => val ?? 'artifacts',\n\t\t\tz.string({ description: 'config.artifactsDir' })\n\t\t\t\t.min(1, 'config.artifactsDir must have a value'),\n\t\t),\n\tcontracts: z.record(\n\t\tContract.rawSchema,\n\t).optional(),\n}).describe('config');\n\nexport const internalSchema = commonSchema.extend({\n\tnetwork: networkMap,\n\tsandbox: sandboxMap,\n\tenvironment: environmentMap,\n\taccounts: accountsMap,\n\tcontracts: z.record(Contract.schemas.schema).optional(),\n\tmetadata: MetadataConfig.schemas.schema.optional(),\n});\n\nexport const rawSchema = commonSchema.extend({\n\tplugins: pluginsRawSchema.optional(),\n\tnetwork: z\n\t\t.record(NetworkConfig.rawSchema)\n\t\t.optional(),\n\tsandbox: z\n\t\t.record(SandboxConfig.rawSchema)\n\t\t.optional(),\n\tenvironment: z\n\t\t.record(\n\t\t\tz.union([\n\t\t\t\tEnvironment.rawSchema,\n\t\t\t\tz.string({ description: 'config.environment' })\n\t\t\t\t\t.min(1, 'Default environment must reference the name of an existing environment.'),\n\t\t\t]),\n\t\t)\n\t\t.optional(),\n\taccounts: z\n\t\t.record(\n\t\t\tz.union([Tz.rawSchema, z.number()]),\n\t\t\t{ description: 'config.accounts' },\n\t\t)\n\t\t.optional(),\n\tmetadata: MetadataConfig.rawSchema.optional(),\n}).describe('config');\n\ntype RawInput = z.infer<typeof rawSchema>;\ntype Input = z.infer<typeof internalSchema>;\n\nexport const { schemas: generatedSchemas, factory } = createType<RawInput, Input>({\n\trawSchema,\n\tinternalSchema,\n\tparseErrMsg: (_value, previous) => {\n\t\tif (previous instanceof ZodError) {\n\t\t\tconst msgs: string[] = previous.errors.reduce(\n\t\t\t\t(retval, issue) => {\n\t\t\t\t\tconst path = issue.path.join(' → ');\n\t\t\t\t\tconst msg = ` ${path}: ${issue.message}`;\n\t\t\t\t\treturn [...retval, msg];\n\t\t\t\t},\n\t\t\t\t[`Your .taq/config.json file is invalid:`],\n\t\t\t);\n\t\t\treturn msgs.join('\\n') + '\\n';\n\t\t}\n\t\treturn `Your .taq/config.json file is invalid.`;\n\t},\n\tunknownErrMsg: 'Something went wrong trying to parse your configuration',\n});\n\nexport const { create, of, make } = factory;\nexport type Config = z.infer<typeof generatedSchemas.schema>;\nexport type t = Config;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Config),\n};\n"],"mappings":";AAAA,OAAO,gBAA6B;AACpC,YAAY,cAAc;AAC1B,YAAY,iBAAiB;AAC7B,YAAY,qBAAq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A;AAAA,EACA,aAAa,CAAC,QAAQ,aAAa;AAClC,QAAI,oBAAoB,UAAU;AACjC,YAAM,OAAiB,SAAS,OAAO;AAAA,QACtC,CAAC,QAAQ,UAAU;AAClB,gBAAM,OAAO,MAAM,KAAK,KAAK,UAAK;AAClC,gBAAM,MAAM,KAAK,SAAS,MAAM;AAChC,iBAAO,CAAC,GAAG,QAAQ,GAAG;AAAA,QACvB;AAAA,QACA,CAAC,wCAAwC;AAAA,MAC1C;AACA,aAAO,KAAK,KAAK,IAAI,IAAI;AAAA,IAC1B;AACA,WAAO;AAAA,EACR;AAAA,EACA,eAAe;AAChB,CAAC;AAEM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAI7B,IAAMC,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAa;AAC/D;","names":["rawSchema","schemas"]}
|
package/EphemeralState.d.ts
CHANGED
|
@@ -2030,9 +2030,7 @@ export declare const generatedSchemas: {
|
|
|
2030
2030
|
configHash: string;
|
|
2031
2031
|
} & {
|
|
2032
2032
|
readonly __kind: any;
|
|
2033
|
-
};
|
|
2034
|
-
* Private functions
|
|
2035
|
-
*/
|
|
2033
|
+
};
|
|
2036
2034
|
from: (input: unknown) => {
|
|
2037
2035
|
plugins: (import("@taqueria/protocol/Base").Flatten<{
|
|
2038
2036
|
operations?: ({
|
package/EphemeralState.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EphemeralState.d.ts","sourceRoot":"","sources":["EphemeralState.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,MAAM,2BAA2B,CAAC;AACpD,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAC;AAKpD,OAAO,KAAK,UAAU,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAc,QAAQ,EAAE,MAAM,6BAA6B,CAAC;AAGnE,OAAO,EAAY,cAAc,IAAI,MAAM,EAAm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F,CAAC;AAEF,eAAO,MAAM,qBAAqB,WAAY,QAAQ,cAAc,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwCjF,CAAC;AAEF,eAAO,MAAM,QAAQ,eAAgB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIjD,CAAC"}
|
package/Faucet.d.ts
CHANGED
|
@@ -1,113 +1,114 @@
|
|
|
1
1
|
import { Flatten } from '@taqueria/protocol/Base';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export declare const rawSchema: z.ZodObject<{
|
|
3
|
+
export declare const rawSchema: z.ZodObject<z.extendShape<{
|
|
4
|
+
mnemonic: z.ZodEffects<z.ZodArray<z.ZodString, "many">, string[], unknown>;
|
|
5
|
+
email: z.ZodOptional<z.ZodString>;
|
|
6
|
+
password: z.ZodOptional<z.ZodString>;
|
|
7
|
+
amount: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
|
|
8
|
+
activation_code: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, {
|
|
4
10
|
pkh: z.ZodString;
|
|
5
|
-
|
|
6
|
-
email
|
|
7
|
-
password
|
|
8
|
-
amount
|
|
9
|
-
activation_code
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
pkh: string;
|
|
11
|
+
}>, "strip", z.ZodTypeAny, {
|
|
12
|
+
email?: string | undefined;
|
|
13
|
+
password?: string | undefined;
|
|
14
|
+
amount?: string | undefined;
|
|
15
|
+
activation_code?: string | undefined;
|
|
12
16
|
mnemonic: string[];
|
|
13
|
-
|
|
14
|
-
password: string;
|
|
15
|
-
amount: string;
|
|
16
|
-
activation_code: string;
|
|
17
|
+
pkh: string;
|
|
17
18
|
}, {
|
|
19
|
+
mnemonic?: unknown;
|
|
20
|
+
email?: string | undefined;
|
|
21
|
+
password?: string | undefined;
|
|
22
|
+
amount?: string | undefined;
|
|
23
|
+
activation_code?: string | undefined;
|
|
18
24
|
pkh: string;
|
|
19
|
-
mnemonic: string[];
|
|
20
|
-
email: string;
|
|
21
|
-
password: string;
|
|
22
|
-
amount: string;
|
|
23
|
-
activation_code: string;
|
|
24
25
|
}>;
|
|
25
26
|
export declare const generatedSchemas: {
|
|
26
27
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
27
28
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
28
29
|
schema: z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
30
|
+
email?: string | undefined;
|
|
31
|
+
password?: string | undefined;
|
|
32
|
+
amount?: string | undefined;
|
|
33
|
+
activation_code?: string | undefined;
|
|
34
|
+
mnemonic: string[];
|
|
29
35
|
pkh: string & {
|
|
30
36
|
readonly __kind: any;
|
|
31
37
|
};
|
|
32
|
-
mnemonic: string[];
|
|
33
|
-
email: string;
|
|
34
|
-
password: string;
|
|
35
|
-
amount: string;
|
|
36
|
-
activation_code: string;
|
|
37
38
|
} & {
|
|
38
39
|
readonly __kind: any;
|
|
39
40
|
}, any>;
|
|
40
41
|
}, factory: {
|
|
41
42
|
make: (input: {
|
|
43
|
+
email?: string | undefined;
|
|
44
|
+
password?: string | undefined;
|
|
45
|
+
amount?: string | undefined;
|
|
46
|
+
activation_code?: string | undefined;
|
|
47
|
+
mnemonic: string[];
|
|
42
48
|
pkh: string & {
|
|
43
49
|
readonly __kind: any;
|
|
44
50
|
};
|
|
45
|
-
mnemonic: string[];
|
|
46
|
-
email: string;
|
|
47
|
-
password: string;
|
|
48
|
-
amount: string;
|
|
49
|
-
activation_code: string;
|
|
50
51
|
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
52
|
+
email?: string | undefined;
|
|
53
|
+
password?: string | undefined;
|
|
54
|
+
amount?: string | undefined;
|
|
55
|
+
activation_code?: string | undefined;
|
|
56
|
+
mnemonic: string[];
|
|
51
57
|
pkh: string & {
|
|
52
58
|
readonly __kind: any;
|
|
53
59
|
};
|
|
54
|
-
mnemonic: string[];
|
|
55
|
-
email: string;
|
|
56
|
-
password: string;
|
|
57
|
-
amount: string;
|
|
58
|
-
activation_code: string;
|
|
59
60
|
} & {
|
|
60
61
|
readonly __kind: any;
|
|
61
62
|
}>;
|
|
62
63
|
of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
64
|
+
email?: string | undefined;
|
|
65
|
+
password?: string | undefined;
|
|
66
|
+
amount?: string | undefined;
|
|
67
|
+
activation_code?: string | undefined;
|
|
68
|
+
mnemonic: string[];
|
|
63
69
|
pkh: string & {
|
|
64
70
|
readonly __kind: any;
|
|
65
71
|
};
|
|
66
|
-
mnemonic: string[];
|
|
67
|
-
email: string;
|
|
68
|
-
password: string;
|
|
69
|
-
amount: string;
|
|
70
|
-
activation_code: string;
|
|
71
72
|
} & {
|
|
72
73
|
readonly __kind: any;
|
|
73
74
|
}>;
|
|
74
75
|
create: (input: {
|
|
75
|
-
|
|
76
|
+
email?: string | undefined;
|
|
77
|
+
password?: string | undefined;
|
|
78
|
+
amount?: string | undefined;
|
|
79
|
+
activation_code?: string | undefined;
|
|
76
80
|
mnemonic: string[];
|
|
77
|
-
|
|
78
|
-
password: string;
|
|
79
|
-
amount: string;
|
|
80
|
-
activation_code: string;
|
|
81
|
+
pkh: string;
|
|
81
82
|
} | {
|
|
83
|
+
email?: string | undefined;
|
|
84
|
+
password?: string | undefined;
|
|
85
|
+
amount?: string | undefined;
|
|
86
|
+
activation_code?: string | undefined;
|
|
87
|
+
mnemonic: string[];
|
|
82
88
|
pkh: string & {
|
|
83
89
|
readonly __kind: any;
|
|
84
90
|
};
|
|
85
|
-
mnemonic: string[];
|
|
86
|
-
email: string;
|
|
87
|
-
password: string;
|
|
88
|
-
amount: string;
|
|
89
|
-
activation_code: string;
|
|
90
91
|
}) => {
|
|
92
|
+
email?: string | undefined;
|
|
93
|
+
password?: string | undefined;
|
|
94
|
+
amount?: string | undefined;
|
|
95
|
+
activation_code?: string | undefined;
|
|
96
|
+
mnemonic: string[];
|
|
91
97
|
pkh: string & {
|
|
92
98
|
readonly __kind: any;
|
|
93
99
|
};
|
|
94
|
-
mnemonic: string[];
|
|
95
|
-
email: string;
|
|
96
|
-
password: string;
|
|
97
|
-
amount: string;
|
|
98
|
-
activation_code: string;
|
|
99
100
|
} & {
|
|
100
101
|
readonly __kind: any;
|
|
101
102
|
};
|
|
102
103
|
from: (input: unknown) => {
|
|
104
|
+
email?: string | undefined;
|
|
105
|
+
password?: string | undefined;
|
|
106
|
+
amount?: string | undefined;
|
|
107
|
+
activation_code?: string | undefined;
|
|
108
|
+
mnemonic: string[];
|
|
103
109
|
pkh: string & {
|
|
104
110
|
readonly __kind: any;
|
|
105
111
|
};
|
|
106
|
-
mnemonic: string[];
|
|
107
|
-
email: string;
|
|
108
|
-
password: string;
|
|
109
|
-
amount: string;
|
|
110
|
-
activation_code: string;
|
|
111
112
|
} & {
|
|
112
113
|
readonly __kind: any;
|
|
113
114
|
};
|
|
@@ -115,85 +116,85 @@ export declare const generatedSchemas: {
|
|
|
115
116
|
export declare type Faucet = Flatten<z.infer<typeof generatedSchemas.schema>>;
|
|
116
117
|
export declare type t = Faucet;
|
|
117
118
|
export declare const create: (input: {
|
|
118
|
-
|
|
119
|
+
email?: string | undefined;
|
|
120
|
+
password?: string | undefined;
|
|
121
|
+
amount?: string | undefined;
|
|
122
|
+
activation_code?: string | undefined;
|
|
119
123
|
mnemonic: string[];
|
|
120
|
-
|
|
121
|
-
password: string;
|
|
122
|
-
amount: string;
|
|
123
|
-
activation_code: string;
|
|
124
|
+
pkh: string;
|
|
124
125
|
} | {
|
|
126
|
+
email?: string | undefined;
|
|
127
|
+
password?: string | undefined;
|
|
128
|
+
amount?: string | undefined;
|
|
129
|
+
activation_code?: string | undefined;
|
|
130
|
+
mnemonic: string[];
|
|
125
131
|
pkh: string & {
|
|
126
132
|
readonly __kind: any;
|
|
127
133
|
};
|
|
128
|
-
mnemonic: string[];
|
|
129
|
-
email: string;
|
|
130
|
-
password: string;
|
|
131
|
-
amount: string;
|
|
132
|
-
activation_code: string;
|
|
133
134
|
}) => {
|
|
135
|
+
email?: string | undefined;
|
|
136
|
+
password?: string | undefined;
|
|
137
|
+
amount?: string | undefined;
|
|
138
|
+
activation_code?: string | undefined;
|
|
139
|
+
mnemonic: string[];
|
|
134
140
|
pkh: string & {
|
|
135
141
|
readonly __kind: any;
|
|
136
142
|
};
|
|
137
|
-
mnemonic: string[];
|
|
138
|
-
email: string;
|
|
139
|
-
password: string;
|
|
140
|
-
amount: string;
|
|
141
|
-
activation_code: string;
|
|
142
143
|
} & {
|
|
143
144
|
readonly __kind: any;
|
|
144
145
|
}, of: (input: unknown) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
146
|
+
email?: string | undefined;
|
|
147
|
+
password?: string | undefined;
|
|
148
|
+
amount?: string | undefined;
|
|
149
|
+
activation_code?: string | undefined;
|
|
150
|
+
mnemonic: string[];
|
|
145
151
|
pkh: string & {
|
|
146
152
|
readonly __kind: any;
|
|
147
153
|
};
|
|
148
|
-
mnemonic: string[];
|
|
149
|
-
email: string;
|
|
150
|
-
password: string;
|
|
151
|
-
amount: string;
|
|
152
|
-
activation_code: string;
|
|
153
154
|
} & {
|
|
154
155
|
readonly __kind: any;
|
|
155
156
|
}>, make: (input: {
|
|
157
|
+
email?: string | undefined;
|
|
158
|
+
password?: string | undefined;
|
|
159
|
+
amount?: string | undefined;
|
|
160
|
+
activation_code?: string | undefined;
|
|
161
|
+
mnemonic: string[];
|
|
156
162
|
pkh: string & {
|
|
157
163
|
readonly __kind: any;
|
|
158
164
|
};
|
|
159
|
-
mnemonic: string[];
|
|
160
|
-
email: string;
|
|
161
|
-
password: string;
|
|
162
|
-
amount: string;
|
|
163
|
-
activation_code: string;
|
|
164
165
|
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
166
|
+
email?: string | undefined;
|
|
167
|
+
password?: string | undefined;
|
|
168
|
+
amount?: string | undefined;
|
|
169
|
+
activation_code?: string | undefined;
|
|
170
|
+
mnemonic: string[];
|
|
165
171
|
pkh: string & {
|
|
166
172
|
readonly __kind: any;
|
|
167
173
|
};
|
|
168
|
-
mnemonic: string[];
|
|
169
|
-
email: string;
|
|
170
|
-
password: string;
|
|
171
|
-
amount: string;
|
|
172
|
-
activation_code: string;
|
|
173
174
|
} & {
|
|
174
175
|
readonly __kind: any;
|
|
175
176
|
}>;
|
|
176
177
|
export declare const schemas: {
|
|
177
178
|
schema: z.ZodEffects<z.ZodEffects<z.ZodType<any, z.ZodTypeDef, any>, {
|
|
179
|
+
email?: string | undefined;
|
|
180
|
+
password?: string | undefined;
|
|
181
|
+
amount?: string | undefined;
|
|
182
|
+
activation_code?: string | undefined;
|
|
183
|
+
mnemonic: string[];
|
|
178
184
|
pkh: string & {
|
|
179
185
|
readonly __kind: any;
|
|
180
186
|
};
|
|
181
|
-
mnemonic: string[];
|
|
182
|
-
email: string;
|
|
183
|
-
password: string;
|
|
184
|
-
amount: string;
|
|
185
|
-
activation_code: string;
|
|
186
187
|
} & {
|
|
187
188
|
readonly __kind: any;
|
|
188
189
|
}, any>, Flatten<{
|
|
190
|
+
email?: string | undefined;
|
|
191
|
+
password?: string | undefined;
|
|
192
|
+
amount?: string | undefined;
|
|
193
|
+
activation_code?: string | undefined;
|
|
194
|
+
mnemonic: string[];
|
|
189
195
|
pkh: string & {
|
|
190
196
|
readonly __kind: any;
|
|
191
197
|
};
|
|
192
|
-
mnemonic: string[];
|
|
193
|
-
email: string;
|
|
194
|
-
password: string;
|
|
195
|
-
amount: string;
|
|
196
|
-
activation_code: string;
|
|
197
198
|
} & {
|
|
198
199
|
readonly __kind: any;
|
|
199
200
|
}>, any>;
|
package/Faucet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Faucet.d.ts","sourceRoot":"","sources":["Faucet.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"Faucet.d.ts","sourceRoot":"","sources":["Faucet.ts"],"names":[],"mappings":"AAAA,OAAmB,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmBxB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;EAED,CAAC;AAuBtB,eAAO,MAAiB,gBAAgB;;;;;;;;;;;;;;;GAAE,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAK/C,CAAC;AAEH,oBAAY,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;AACtE,oBAAY,CAAC,GAAG,MAAM,CAAC;AACvB,eAAO,MAAQ,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;GAAE,EAAE;;;;;;;;;;;IAAE,IAAI;;;;;;;;;;;;;;;;;;;;EAAY,CAAC;AAE5C,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnB,CAAC"}
|
package/Faucet.js
CHANGED
|
@@ -38,28 +38,40 @@ module.exports = __toCommonJS(Faucet_exports);
|
|
|
38
38
|
var import_Base = __toESM(require("@taqueria/protocol/Base"));
|
|
39
39
|
var PublicKeyHash = __toESM(require("@taqueria/protocol/PublicKeyHash"));
|
|
40
40
|
var import_zod = require("zod");
|
|
41
|
-
var
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
import_zod.z.
|
|
45
|
-
|
|
41
|
+
var commonSchema = import_zod.z.object({
|
|
42
|
+
mnemonic: import_zod.z.preprocess(
|
|
43
|
+
(arg) => typeof arg === "string" ? arg.split(" ") : arg,
|
|
44
|
+
import_zod.z.array(
|
|
45
|
+
import_zod.z.string({ description: "Faucet Mnemonic Word" }).min(1).regex(/^[a-z]{2,}$/),
|
|
46
|
+
{ description: "Faucet Mnemonic" }
|
|
47
|
+
)
|
|
46
48
|
),
|
|
47
|
-
email: import_zod.z.string({ description: "Faucet E-mail" }).regex(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}
|
|
48
|
-
password: import_zod.z.string({ description: "Faucet Password" }).
|
|
49
|
-
amount: import_zod.z.string({ description: "Faucet
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
),
|
|
58
|
-
email: import_zod.z.string({ description: "Faucet E-mail" }).regex(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/),
|
|
59
|
-
password: import_zod.z.string({ description: "Faucet Password" }).nonempty(),
|
|
60
|
-
amount: import_zod.z.string({ description: "Faucet Account" }).nonempty().regex(/^\d+$/),
|
|
61
|
-
activation_code: import_zod.z.string({ description: "Faucet Activation Code" }).nonempty()
|
|
49
|
+
email: import_zod.z.string({ description: "Faucet E-mail" }).regex(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/).optional(),
|
|
50
|
+
password: import_zod.z.string({ description: "Faucet Password" }).optional(),
|
|
51
|
+
amount: import_zod.z.string({ description: "Faucet Amount" }).refine(
|
|
52
|
+
(val) => val.length === 0 || /^\d+$/.test(val),
|
|
53
|
+
"Amount, if present, must be numeric"
|
|
54
|
+
).optional(),
|
|
55
|
+
activation_code: import_zod.z.string({ description: "Faucet Activation Code" }).optional()
|
|
56
|
+
});
|
|
57
|
+
var rawSchema = commonSchema.extend({
|
|
58
|
+
pkh: import_zod.z.string({ description: "Faucet Public Key Hash" }).min(1)
|
|
62
59
|
}).describe("Faucet");
|
|
60
|
+
var internalSchema = import_zod.z.preprocess(
|
|
61
|
+
(input) => {
|
|
62
|
+
const defaults = {
|
|
63
|
+
pkh: "",
|
|
64
|
+
mnemonic: [],
|
|
65
|
+
email: "",
|
|
66
|
+
password: "",
|
|
67
|
+
activation_code: ""
|
|
68
|
+
};
|
|
69
|
+
return typeof input === "object" ? { ...defaults, ...input } : defaults;
|
|
70
|
+
},
|
|
71
|
+
commonSchema.extend({
|
|
72
|
+
pkh: PublicKeyHash.schemas.schema
|
|
73
|
+
})
|
|
74
|
+
).describe("Faucet");
|
|
63
75
|
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
64
76
|
rawSchema,
|
|
65
77
|
internalSchema,
|