@taqueria/protocol 0.19.6 → 0.20.0
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/Faucet.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Faucet.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as PublicKeyHash from '@taqueria/protocol/PublicKeyHash';\nimport { z } from 'zod';\n\
|
|
1
|
+
{"version":3,"sources":["Faucet.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as PublicKeyHash from '@taqueria/protocol/PublicKeyHash';\nimport { z } from 'zod';\n\nconst commonSchema = z.object({\n\tmnemonic: z.preprocess(\n\t\targ => typeof arg === 'string' ? arg.split(' ') : arg,\n\t\tz.array(\n\t\t\tz.string({ description: 'Faucet Mnemonic Word' }).min(1).regex(/^[a-z]{2,}$/),\n\t\t\t{ description: 'Faucet Mnemonic' },\n\t\t),\n\t),\n\temail: z.string({ description: 'Faucet E-mail' }).regex(/^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/).optional(),\n\tpassword: z.string({ description: 'Faucet Password' }).optional(),\n\tamount: z.string({ description: 'Faucet Amount' }).refine(\n\t\tval => val.length === 0 || /^\\d+$/.test(val),\n\t\t'Amount, if present, must be numeric',\n\t).optional(),\n\tactivation_code: z.string({ description: 'Faucet Activation Code' }).optional(),\n});\n\nexport const rawSchema = commonSchema.extend({\n\tpkh: z.string({ description: 'Faucet Public Key Hash' }).min(1),\n}).describe('Faucet');\n\nconst internalSchema = z.preprocess(\n\tinput => {\n\t\tconst defaults = {\n\t\t\tpkh: '',\n\t\t\tmnemonic: [],\n\t\t\temail: '',\n\t\t\tpassword: '',\n\t\t\tactivation_code: '',\n\t\t};\n\t\treturn typeof input === 'object'\n\t\t\t? { ...defaults, ...input }\n\t\t\t: defaults;\n\t},\n\tcommonSchema.extend({\n\t\tpkh: PublicKeyHash.schemas.schema,\n\t}),\n).describe('Faucet');\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 valid faucet configuration`,\n\tunknownErrMsg: 'Something went wrong trying to parse the faucet',\n});\n\nexport type Faucet = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Faucet;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Faucet),\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAAA;AAAA;AAAA;AAAA,kBAAoC;AACpC,oBAA+B;AAC/B,iBAAkB;AAElB,IAAM,eAAe,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AAC,UAAmB,GAAG;AAAA,EACpC,eAAe;AAChB,CAAC;AAIM,IAAM,EAAE,QAAQ,IAAI,KAAK,IAAI;AAE7B,IAAMD,WAAU;AAAA,EACtB,GAAG;AAAA,EACH,QAAQ,iBAAiB,OAAO,UAAU,SAAO,GAAa;AAC/D;","names":["schemas","createType"]}
|
package/Faucet.mjs
CHANGED
|
@@ -2,28 +2,40 @@
|
|
|
2
2
|
import createType from "@taqueria/protocol/Base";
|
|
3
3
|
import * as PublicKeyHash from "@taqueria/protocol/PublicKeyHash";
|
|
4
4
|
import { z } from "zod";
|
|
5
|
-
var
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
z.
|
|
9
|
-
|
|
5
|
+
var commonSchema = z.object({
|
|
6
|
+
mnemonic: z.preprocess(
|
|
7
|
+
(arg) => typeof arg === "string" ? arg.split(" ") : arg,
|
|
8
|
+
z.array(
|
|
9
|
+
z.string({ description: "Faucet Mnemonic Word" }).min(1).regex(/^[a-z]{2,}$/),
|
|
10
|
+
{ description: "Faucet Mnemonic" }
|
|
11
|
+
)
|
|
10
12
|
),
|
|
11
|
-
email: z.string({ description: "Faucet E-mail" }).regex(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}
|
|
12
|
-
password: z.string({ description: "Faucet Password" }).
|
|
13
|
-
amount: z.string({ description: "Faucet
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
),
|
|
22
|
-
email: z.string({ description: "Faucet E-mail" }).regex(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/),
|
|
23
|
-
password: z.string({ description: "Faucet Password" }).nonempty(),
|
|
24
|
-
amount: z.string({ description: "Faucet Account" }).nonempty().regex(/^\d+$/),
|
|
25
|
-
activation_code: z.string({ description: "Faucet Activation Code" }).nonempty()
|
|
13
|
+
email: z.string({ description: "Faucet E-mail" }).regex(/^([\w-\.]+@([\w-]+\.)+[\w-]{2,4})?$/).optional(),
|
|
14
|
+
password: z.string({ description: "Faucet Password" }).optional(),
|
|
15
|
+
amount: z.string({ description: "Faucet Amount" }).refine(
|
|
16
|
+
(val) => val.length === 0 || /^\d+$/.test(val),
|
|
17
|
+
"Amount, if present, must be numeric"
|
|
18
|
+
).optional(),
|
|
19
|
+
activation_code: z.string({ description: "Faucet Activation Code" }).optional()
|
|
20
|
+
});
|
|
21
|
+
var rawSchema = commonSchema.extend({
|
|
22
|
+
pkh: z.string({ description: "Faucet Public Key Hash" }).min(1)
|
|
26
23
|
}).describe("Faucet");
|
|
24
|
+
var internalSchema = z.preprocess(
|
|
25
|
+
(input) => {
|
|
26
|
+
const defaults = {
|
|
27
|
+
pkh: "",
|
|
28
|
+
mnemonic: [],
|
|
29
|
+
email: "",
|
|
30
|
+
password: "",
|
|
31
|
+
activation_code: ""
|
|
32
|
+
};
|
|
33
|
+
return typeof input === "object" ? { ...defaults, ...input } : defaults;
|
|
34
|
+
},
|
|
35
|
+
commonSchema.extend({
|
|
36
|
+
pkh: PublicKeyHash.schemas.schema
|
|
37
|
+
})
|
|
38
|
+
).describe("Faucet");
|
|
27
39
|
var { schemas: generatedSchemas, factory } = createType({
|
|
28
40
|
rawSchema,
|
|
29
41
|
internalSchema,
|
package/Faucet.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["Faucet.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as PublicKeyHash from '@taqueria/protocol/PublicKeyHash';\nimport { z } from 'zod';\n\
|
|
1
|
+
{"version":3,"sources":["Faucet.ts"],"sourcesContent":["import createType, { Flatten } from '@taqueria/protocol/Base';\nimport * as PublicKeyHash from '@taqueria/protocol/PublicKeyHash';\nimport { z } from 'zod';\n\nconst commonSchema = z.object({\n\tmnemonic: z.preprocess(\n\t\targ => typeof arg === 'string' ? arg.split(' ') : arg,\n\t\tz.array(\n\t\t\tz.string({ description: 'Faucet Mnemonic Word' }).min(1).regex(/^[a-z]{2,}$/),\n\t\t\t{ description: 'Faucet Mnemonic' },\n\t\t),\n\t),\n\temail: z.string({ description: 'Faucet E-mail' }).regex(/^([\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4})?$/).optional(),\n\tpassword: z.string({ description: 'Faucet Password' }).optional(),\n\tamount: z.string({ description: 'Faucet Amount' }).refine(\n\t\tval => val.length === 0 || /^\\d+$/.test(val),\n\t\t'Amount, if present, must be numeric',\n\t).optional(),\n\tactivation_code: z.string({ description: 'Faucet Activation Code' }).optional(),\n});\n\nexport const rawSchema = commonSchema.extend({\n\tpkh: z.string({ description: 'Faucet Public Key Hash' }).min(1),\n}).describe('Faucet');\n\nconst internalSchema = z.preprocess(\n\tinput => {\n\t\tconst defaults = {\n\t\t\tpkh: '',\n\t\t\tmnemonic: [],\n\t\t\temail: '',\n\t\t\tpassword: '',\n\t\t\tactivation_code: '',\n\t\t};\n\t\treturn typeof input === 'object'\n\t\t\t? { ...defaults, ...input }\n\t\t\t: defaults;\n\t},\n\tcommonSchema.extend({\n\t\tpkh: PublicKeyHash.schemas.schema,\n\t}),\n).describe('Faucet');\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 valid faucet configuration`,\n\tunknownErrMsg: 'Something went wrong trying to parse the faucet',\n});\n\nexport type Faucet = Flatten<z.infer<typeof generatedSchemas.schema>>;\nexport type t = Faucet;\nexport const { create, of, make } = factory;\n\nexport const schemas = {\n\t...generatedSchemas,\n\tschema: generatedSchemas.schema.transform(val => val as Faucet),\n};\n"],"mappings":";AAAA,OAAO,gBAA6B;AACpC,YAAY,mBAAmB;AAC/B,SAAS,SAAS;AAElB,IAAM,eAAe,EAAE,OAAO;AAAA,EAC7B,UAAU,EAAE;AAAA,IACX,SAAO,OAAO,QAAQ,WAAW,IAAI,MA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