@taqueria/protocol 0.19.3 → 0.19.5
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 +193 -194
- package/Config.d.ts.map +1 -1
- package/Config.js +21 -18
- package/Config.js.map +1 -1
- package/Config.mjs +22 -19
- package/Config.mjs.map +1 -1
- package/EphemeralState.d.ts +3 -1
- package/EphemeralState.d.ts.map +1 -1
- package/Faucet.d.ts +97 -98
- package/Faucet.d.ts.map +1 -1
- package/Faucet.js +20 -32
- package/Faucet.js.map +1 -1
- package/Faucet.mjs +20 -32
- package/Faucet.mjs.map +1 -1
- package/LoadedConfig.d.ts +201 -202
- package/LoadedConfig.d.ts.map +1 -1
- package/NetworkConfig.d.ts +107 -108
- 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,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,gBAAgB;;;;;;;;;;;;aAM5B,CAAC;AAEF,eAAO,MAAM,qBAAqB;;;;;;;;;;;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,CAAC,MAAM,CAAC,CAAC;AAC7D,oBAAY,CAAC,GAAG,MAAM,CAAC;AAEvB,eAAO,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGnB,CAAC"}
|
package/Config.js
CHANGED
|
@@ -62,11 +62,17 @@ var pluginsInternalSchema = import_zod.z.preprocess(
|
|
|
62
62
|
)
|
|
63
63
|
);
|
|
64
64
|
var networkMap = import_zod.z.record(
|
|
65
|
-
|
|
65
|
+
import_zod.z.union([
|
|
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
|
+
]),
|
|
66
69
|
{ description: "Network configurations" }
|
|
67
70
|
).optional();
|
|
68
71
|
var sandboxMap = import_zod.z.record(
|
|
69
|
-
|
|
72
|
+
import_zod.z.union([
|
|
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
|
+
]),
|
|
70
76
|
{ description: "Sandbox configurations" }
|
|
71
77
|
).optional();
|
|
72
78
|
var environmentMap = import_zod.z.record(
|
|
@@ -118,8 +124,18 @@ var internalSchema = commonSchema.extend({
|
|
|
118
124
|
});
|
|
119
125
|
var rawSchema8 = commonSchema.extend({
|
|
120
126
|
plugins: pluginsRawSchema.optional(),
|
|
121
|
-
network: import_zod.z.record(
|
|
122
|
-
|
|
127
|
+
network: import_zod.z.record(
|
|
128
|
+
import_zod.z.union([
|
|
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(),
|
|
123
139
|
environment: import_zod.z.record(
|
|
124
140
|
import_zod.z.union([
|
|
125
141
|
Environment.rawSchema,
|
|
@@ -135,20 +151,7 @@ var rawSchema8 = commonSchema.extend({
|
|
|
135
151
|
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
136
152
|
rawSchema: rawSchema8,
|
|
137
153
|
internalSchema,
|
|
138
|
-
parseErrMsg: (
|
|
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
|
-
},
|
|
154
|
+
parseErrMsg: (value) => `${value} is not a configuration`,
|
|
152
155
|
unknownErrMsg: "Something went wrong trying to parse your configuration"
|
|
153
156
|
});
|
|
154
157
|
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
|
|
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\tz.union([\n\t\t\tNetworkConfig.schemas.schema,\n\t\t\tz.string({ description: 'config.network' })\n\t\t\t\t.nonempty('Default network must reference the name of an existing network configuration.'),\n\t\t]),\n\t\t{ description: 'Network configurations' },\n\t)\n\t.optional();\n\nconst sandboxMap = z\n\t.record(\n\t\tz.union([\n\t\t\tSandboxConfig.schemas.schema,\n\t\t\tz.string({ description: 'config.sandbox' })\n\t\t\t\t.min(1, 'Default sandbox must reference the name of an existing sandbox configuration.'),\n\t\t]),\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(\n\t\t\tz.union([\n\t\t\t\tNetworkConfig.rawSchema,\n\t\t\t\tz.string({ description: 'config.network' })\n\t\t\t\t\t.min(1, 'Default network must reference the name of an existing network configuration.'),\n\t\t\t]),\n\t\t)\n\t\t.optional(),\n\tsandbox: z\n\t\t.record(\n\t\t\tz.union([\n\t\t\t\tSandboxConfig.rawSchema,\n\t\t\t\tz.string({ description: 'config.sandbox' })\n\t\t\t\t\t.min(1, 'Default sandbox must reference the name of an existing sandbox configuration.'),\n\t\t\t]),\n\t\t)\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: unknown) => `${value} is not a configuration`,\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,iBAAkB;AAEX,IAAM,mBAAmB,aAAE;AAAA,EACjC,SAAO,OAAO,CAAC;AAAA,EACf,aAAE;AAAA,IACe;AAAA,IAChB,EAAE,aAAa,iBAAiB;AAAA,EACjC;AACD;AAEO,IAAM,wBAAwB,aAAE;AAAA,EACtC,SAAO,OAAO,CAAC;AAAA,EACf,aAAE;AAAA,IACe,wBAAQ;AAAA,IACxB,EAAE,aAAa,iBAAiB;A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,EAAE,SAAS,QAAQ;AAKb,IAAM,EAAE,SAAS,kBAAkB,QAAQ,QAAI,YAAAE,SAA4B;AAAA,EACjF,WAAAF;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,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
|
|
10
|
+
import { z } from "zod";
|
|
11
11
|
var pluginsRawSchema = z.preprocess(
|
|
12
12
|
(val) => val ?? [],
|
|
13
13
|
z.array(
|
|
@@ -23,11 +23,17 @@ var pluginsInternalSchema = z.preprocess(
|
|
|
23
23
|
)
|
|
24
24
|
);
|
|
25
25
|
var networkMap = z.record(
|
|
26
|
-
|
|
26
|
+
z.union([
|
|
27
|
+
NetworkConfig.schemas.schema,
|
|
28
|
+
z.string({ description: "config.network" }).nonempty("Default network must reference the name of an existing network configuration.")
|
|
29
|
+
]),
|
|
27
30
|
{ description: "Network configurations" }
|
|
28
31
|
).optional();
|
|
29
32
|
var sandboxMap = z.record(
|
|
30
|
-
|
|
33
|
+
z.union([
|
|
34
|
+
SandboxConfig.schemas.schema,
|
|
35
|
+
z.string({ description: "config.sandbox" }).min(1, "Default sandbox must reference the name of an existing sandbox configuration.")
|
|
36
|
+
]),
|
|
31
37
|
{ description: "Sandbox configurations" }
|
|
32
38
|
).optional();
|
|
33
39
|
var environmentMap = z.record(
|
|
@@ -79,8 +85,18 @@ var internalSchema = commonSchema.extend({
|
|
|
79
85
|
});
|
|
80
86
|
var rawSchema8 = commonSchema.extend({
|
|
81
87
|
plugins: pluginsRawSchema.optional(),
|
|
82
|
-
network: z.record(
|
|
83
|
-
|
|
88
|
+
network: z.record(
|
|
89
|
+
z.union([
|
|
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(),
|
|
84
100
|
environment: z.record(
|
|
85
101
|
z.union([
|
|
86
102
|
Environment.rawSchema,
|
|
@@ -96,20 +112,7 @@ var rawSchema8 = commonSchema.extend({
|
|
|
96
112
|
var { schemas: generatedSchemas, factory } = createType({
|
|
97
113
|
rawSchema: rawSchema8,
|
|
98
114
|
internalSchema,
|
|
99
|
-
parseErrMsg: (
|
|
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
|
-
},
|
|
115
|
+
parseErrMsg: (value) => `${value} is not a configuration`,
|
|
113
116
|
unknownErrMsg: "Something went wrong trying to parse your configuration"
|
|
114
117
|
});
|
|
115
118
|
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
|
|
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\tz.union([\n\t\t\tNetworkConfig.schemas.schema,\n\t\t\tz.string({ description: 'config.network' })\n\t\t\t\t.nonempty('Default network must reference the name of an existing network configuration.'),\n\t\t]),\n\t\t{ description: 'Network configurations' },\n\t)\n\t.optional();\n\nconst sandboxMap = z\n\t.record(\n\t\tz.union([\n\t\t\tSandboxConfig.schemas.schema,\n\t\t\tz.string({ description: 'config.sandbox' })\n\t\t\t\t.min(1, 'Default sandbox must reference the name of an existing sandbox configuration.'),\n\t\t]),\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(\n\t\t\tz.union([\n\t\t\t\tNetworkConfig.rawSchema,\n\t\t\t\tz.string({ description: 'config.network' })\n\t\t\t\t\t.min(1, 'Default network must reference the name of an existing network configuration.'),\n\t\t\t]),\n\t\t)\n\t\t.optional(),\n\tsandbox: z\n\t\t.record(\n\t\t\tz.union([\n\t\t\t\tSandboxConfig.rawSchema,\n\t\t\t\tz.string({ description: 'config.sandbox' })\n\t\t\t\t\t.min(1, 'Default sandbox must reference the name of an existing sandbox configuration.'),\n\t\t\t]),\n\t\t)\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: unknown) => `${value} is not a configuration`,\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,qBAAqB;AACjC,YAAY,oBAAoB;AAChC,YAAY,mBAAmB;AAC/B,YAAY,mBAAmB;AAC/B,YAAY,QAAQ;AACpB,SAAS,SAAS;AAEX,IAAM,mBAAmB,EAAE;AAAA,EACjC,SAAO,OAAO,CAAC;AAAA,EACf,EAAE;AAAA,IACe;AAAA,IAChB,EAAE,aAAa,iBAAiB;AAAA,EACj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AAI,cAAW,EAAE,OAAO,CAAC,CAAC;AAAA,IAClC,EAAE,aAAa,kBAAkB;AAAA,EAClC,EACC,SAAS;AAAA,EACX,UAAyB,yBAAU,SAAS;AAC7C,CAAC,EAAE,SAAS,QAAQ;AAKb,IAAM,EAAE,SAAS,kBAAkB,QAAQ,IAAI,WAA4B;AAAA,EACjF,WAAAA;AAAA,EACA;AAAA,EACA,aAAa,CAAC,UAAmB,GAAG;AAAA,EACpC,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,7 +2030,9 @@ export declare const generatedSchemas: {
|
|
|
2030
2030
|
configHash: string;
|
|
2031
2031
|
} & {
|
|
2032
2032
|
readonly __kind: any;
|
|
2033
|
-
};
|
|
2033
|
+
}; /**
|
|
2034
|
+
* Private functions
|
|
2035
|
+
*/
|
|
2034
2036
|
from: (input: unknown) => {
|
|
2035
2037
|
plugins: (import("@taqueria/protocol/Base").Flatten<{
|
|
2036
2038
|
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,EAAmB,MAAM,SAAS,CAAC;AAC9E,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAOxB,QAAA,MAAM,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAwCjF,CAAC;AAEF,eAAO,MAAM,QAAQ,eAAgB,YAAY,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIjD,CAAC"}
|
package/Faucet.d.ts
CHANGED
|
@@ -1,114 +1,113 @@
|
|
|
1
1
|
import { Flatten } from '@taqueria/protocol/Base';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
export declare const rawSchema: z.ZodObject<
|
|
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
|
-
}, {
|
|
3
|
+
export declare const rawSchema: z.ZodObject<{
|
|
10
4
|
pkh: z.ZodString;
|
|
11
|
-
|
|
12
|
-
email
|
|
13
|
-
password
|
|
14
|
-
amount
|
|
15
|
-
activation_code
|
|
16
|
-
|
|
5
|
+
mnemonic: z.ZodArray<z.ZodString, "many">;
|
|
6
|
+
email: z.ZodString;
|
|
7
|
+
password: z.ZodString;
|
|
8
|
+
amount: z.ZodString;
|
|
9
|
+
activation_code: z.ZodString;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
17
11
|
pkh: string;
|
|
12
|
+
mnemonic: string[];
|
|
13
|
+
email: string;
|
|
14
|
+
password: string;
|
|
15
|
+
amount: string;
|
|
16
|
+
activation_code: string;
|
|
18
17
|
}, {
|
|
19
|
-
mnemonic?: unknown;
|
|
20
|
-
email?: string | undefined;
|
|
21
|
-
password?: string | undefined;
|
|
22
|
-
amount?: string | undefined;
|
|
23
|
-
activation_code?: string | undefined;
|
|
24
18
|
pkh: string;
|
|
19
|
+
mnemonic: string[];
|
|
20
|
+
email: string;
|
|
21
|
+
password: string;
|
|
22
|
+
amount: string;
|
|
23
|
+
activation_code: string;
|
|
25
24
|
}>;
|
|
26
25
|
export declare const generatedSchemas: {
|
|
27
26
|
rawSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
28
27
|
internalSchema: z.ZodType<any, z.ZodTypeDef, any>;
|
|
29
28
|
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[];
|
|
35
29
|
pkh: string & {
|
|
36
30
|
readonly __kind: any;
|
|
37
31
|
};
|
|
32
|
+
mnemonic: string[];
|
|
33
|
+
email: string;
|
|
34
|
+
password: string;
|
|
35
|
+
amount: string;
|
|
36
|
+
activation_code: string;
|
|
38
37
|
} & {
|
|
39
38
|
readonly __kind: any;
|
|
40
39
|
}, any>;
|
|
41
40
|
}, factory: {
|
|
42
41
|
make: (input: {
|
|
43
|
-
email?: string | undefined;
|
|
44
|
-
password?: string | undefined;
|
|
45
|
-
amount?: string | undefined;
|
|
46
|
-
activation_code?: string | undefined;
|
|
47
|
-
mnemonic: string[];
|
|
48
42
|
pkh: string & {
|
|
49
43
|
readonly __kind: any;
|
|
50
44
|
};
|
|
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
45
|
mnemonic: string[];
|
|
46
|
+
email: string;
|
|
47
|
+
password: string;
|
|
48
|
+
amount: string;
|
|
49
|
+
activation_code: string;
|
|
50
|
+
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
57
51
|
pkh: string & {
|
|
58
52
|
readonly __kind: any;
|
|
59
53
|
};
|
|
54
|
+
mnemonic: string[];
|
|
55
|
+
email: string;
|
|
56
|
+
password: string;
|
|
57
|
+
amount: string;
|
|
58
|
+
activation_code: string;
|
|
60
59
|
} & {
|
|
61
60
|
readonly __kind: any;
|
|
62
61
|
}>;
|
|
63
62
|
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[];
|
|
69
63
|
pkh: string & {
|
|
70
64
|
readonly __kind: any;
|
|
71
65
|
};
|
|
66
|
+
mnemonic: string[];
|
|
67
|
+
email: string;
|
|
68
|
+
password: string;
|
|
69
|
+
amount: string;
|
|
70
|
+
activation_code: string;
|
|
72
71
|
} & {
|
|
73
72
|
readonly __kind: any;
|
|
74
73
|
}>;
|
|
75
74
|
create: (input: {
|
|
76
|
-
email?: string | undefined;
|
|
77
|
-
password?: string | undefined;
|
|
78
|
-
amount?: string | undefined;
|
|
79
|
-
activation_code?: string | undefined;
|
|
80
|
-
mnemonic: string[];
|
|
81
75
|
pkh: string;
|
|
82
|
-
} | {
|
|
83
|
-
email?: string | undefined;
|
|
84
|
-
password?: string | undefined;
|
|
85
|
-
amount?: string | undefined;
|
|
86
|
-
activation_code?: string | undefined;
|
|
87
76
|
mnemonic: string[];
|
|
77
|
+
email: string;
|
|
78
|
+
password: string;
|
|
79
|
+
amount: string;
|
|
80
|
+
activation_code: string;
|
|
81
|
+
} | {
|
|
88
82
|
pkh: string & {
|
|
89
83
|
readonly __kind: any;
|
|
90
84
|
};
|
|
91
|
-
}) => {
|
|
92
|
-
email?: string | undefined;
|
|
93
|
-
password?: string | undefined;
|
|
94
|
-
amount?: string | undefined;
|
|
95
|
-
activation_code?: string | undefined;
|
|
96
85
|
mnemonic: string[];
|
|
86
|
+
email: string;
|
|
87
|
+
password: string;
|
|
88
|
+
amount: string;
|
|
89
|
+
activation_code: string;
|
|
90
|
+
}) => {
|
|
97
91
|
pkh: string & {
|
|
98
92
|
readonly __kind: any;
|
|
99
93
|
};
|
|
94
|
+
mnemonic: string[];
|
|
95
|
+
email: string;
|
|
96
|
+
password: string;
|
|
97
|
+
amount: string;
|
|
98
|
+
activation_code: string;
|
|
100
99
|
} & {
|
|
101
100
|
readonly __kind: any;
|
|
102
101
|
};
|
|
103
102
|
from: (input: unknown) => {
|
|
104
|
-
email?: string | undefined;
|
|
105
|
-
password?: string | undefined;
|
|
106
|
-
amount?: string | undefined;
|
|
107
|
-
activation_code?: string | undefined;
|
|
108
|
-
mnemonic: string[];
|
|
109
103
|
pkh: string & {
|
|
110
104
|
readonly __kind: any;
|
|
111
105
|
};
|
|
106
|
+
mnemonic: string[];
|
|
107
|
+
email: string;
|
|
108
|
+
password: string;
|
|
109
|
+
amount: string;
|
|
110
|
+
activation_code: string;
|
|
112
111
|
} & {
|
|
113
112
|
readonly __kind: any;
|
|
114
113
|
};
|
|
@@ -116,85 +115,85 @@ export declare const generatedSchemas: {
|
|
|
116
115
|
export declare type Faucet = Flatten<z.infer<typeof generatedSchemas.schema>>;
|
|
117
116
|
export declare type t = Faucet;
|
|
118
117
|
export declare const create: (input: {
|
|
119
|
-
email?: string | undefined;
|
|
120
|
-
password?: string | undefined;
|
|
121
|
-
amount?: string | undefined;
|
|
122
|
-
activation_code?: string | undefined;
|
|
123
|
-
mnemonic: string[];
|
|
124
118
|
pkh: string;
|
|
125
|
-
} | {
|
|
126
|
-
email?: string | undefined;
|
|
127
|
-
password?: string | undefined;
|
|
128
|
-
amount?: string | undefined;
|
|
129
|
-
activation_code?: string | undefined;
|
|
130
119
|
mnemonic: string[];
|
|
120
|
+
email: string;
|
|
121
|
+
password: string;
|
|
122
|
+
amount: string;
|
|
123
|
+
activation_code: string;
|
|
124
|
+
} | {
|
|
131
125
|
pkh: string & {
|
|
132
126
|
readonly __kind: any;
|
|
133
127
|
};
|
|
134
|
-
}) => {
|
|
135
|
-
email?: string | undefined;
|
|
136
|
-
password?: string | undefined;
|
|
137
|
-
amount?: string | undefined;
|
|
138
|
-
activation_code?: string | undefined;
|
|
139
128
|
mnemonic: string[];
|
|
129
|
+
email: string;
|
|
130
|
+
password: string;
|
|
131
|
+
amount: string;
|
|
132
|
+
activation_code: string;
|
|
133
|
+
}) => {
|
|
140
134
|
pkh: string & {
|
|
141
135
|
readonly __kind: any;
|
|
142
136
|
};
|
|
137
|
+
mnemonic: string[];
|
|
138
|
+
email: string;
|
|
139
|
+
password: string;
|
|
140
|
+
amount: string;
|
|
141
|
+
activation_code: string;
|
|
143
142
|
} & {
|
|
144
143
|
readonly __kind: any;
|
|
145
144
|
}, 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[];
|
|
151
145
|
pkh: string & {
|
|
152
146
|
readonly __kind: any;
|
|
153
147
|
};
|
|
148
|
+
mnemonic: string[];
|
|
149
|
+
email: string;
|
|
150
|
+
password: string;
|
|
151
|
+
amount: string;
|
|
152
|
+
activation_code: string;
|
|
154
153
|
} & {
|
|
155
154
|
readonly __kind: any;
|
|
156
155
|
}>, make: (input: {
|
|
157
|
-
email?: string | undefined;
|
|
158
|
-
password?: string | undefined;
|
|
159
|
-
amount?: string | undefined;
|
|
160
|
-
activation_code?: string | undefined;
|
|
161
|
-
mnemonic: string[];
|
|
162
156
|
pkh: string & {
|
|
163
157
|
readonly __kind: any;
|
|
164
158
|
};
|
|
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
159
|
mnemonic: string[];
|
|
160
|
+
email: string;
|
|
161
|
+
password: string;
|
|
162
|
+
amount: string;
|
|
163
|
+
activation_code: string;
|
|
164
|
+
}) => import("fluture").FutureInstance<import("./TaqError").TaqError, {
|
|
171
165
|
pkh: string & {
|
|
172
166
|
readonly __kind: any;
|
|
173
167
|
};
|
|
168
|
+
mnemonic: string[];
|
|
169
|
+
email: string;
|
|
170
|
+
password: string;
|
|
171
|
+
amount: string;
|
|
172
|
+
activation_code: string;
|
|
174
173
|
} & {
|
|
175
174
|
readonly __kind: any;
|
|
176
175
|
}>;
|
|
177
176
|
export declare const schemas: {
|
|
178
177
|
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[];
|
|
184
178
|
pkh: string & {
|
|
185
179
|
readonly __kind: any;
|
|
186
180
|
};
|
|
181
|
+
mnemonic: string[];
|
|
182
|
+
email: string;
|
|
183
|
+
password: string;
|
|
184
|
+
amount: string;
|
|
185
|
+
activation_code: string;
|
|
187
186
|
} & {
|
|
188
187
|
readonly __kind: any;
|
|
189
188
|
}, any>, Flatten<{
|
|
190
|
-
email?: string | undefined;
|
|
191
|
-
password?: string | undefined;
|
|
192
|
-
amount?: string | undefined;
|
|
193
|
-
activation_code?: string | undefined;
|
|
194
|
-
mnemonic: string[];
|
|
195
189
|
pkh: string & {
|
|
196
190
|
readonly __kind: any;
|
|
197
191
|
};
|
|
192
|
+
mnemonic: string[];
|
|
193
|
+
email: string;
|
|
194
|
+
password: string;
|
|
195
|
+
amount: string;
|
|
196
|
+
activation_code: string;
|
|
198
197
|
} & {
|
|
199
198
|
readonly __kind: any;
|
|
200
199
|
}>, 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;AAExB,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;EAUD,CAAC;AAiBtB,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,40 +38,28 @@ 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
|
-
|
|
46
|
-
{ description: "Faucet Mnemonic" }
|
|
47
|
-
)
|
|
41
|
+
var rawSchema = import_zod.z.object({
|
|
42
|
+
pkh: import_zod.z.string({ description: "Faucet Public Key Hash" }).min(1),
|
|
43
|
+
mnemonic: import_zod.z.array(
|
|
44
|
+
import_zod.z.string({ description: "Faucet Mnemonic Word" }).min(1),
|
|
45
|
+
{ description: "Faucet Mnemonic" }
|
|
48
46
|
),
|
|
49
|
-
email: import_zod.z.string({ description: "Faucet E-mail" }).regex(/^
|
|
50
|
-
password: import_zod.z.string({ description: "Faucet Password" }).
|
|
51
|
-
amount: import_zod.z.string({ description: "Faucet
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
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" }).min(1),
|
|
49
|
+
amount: import_zod.z.string({ description: "Faucet Account" }).min(1).regex(/^\d+$/),
|
|
50
|
+
activation_code: import_zod.z.string({ description: "Faucet Activation Code" }).min(1)
|
|
51
|
+
}).describe("Faucet");
|
|
52
|
+
var internalSchema = import_zod.z.object({
|
|
53
|
+
pkh: PublicKeyHash.schemas.schema,
|
|
54
|
+
mnemonic: import_zod.z.array(
|
|
55
|
+
import_zod.z.string({ description: "Faucet Mnemonic Word" }).nonempty().regex(/^[a-z]{2,}$/),
|
|
56
|
+
{ description: "Faucet Mnemonic" }
|
|
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()
|
|
59
62
|
}).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");
|
|
75
63
|
var { schemas: generatedSchemas, factory } = (0, import_Base.default)({
|
|
76
64
|
rawSchema,
|
|
77
65
|
internalSchema,
|