@kleros/kleros-sdk 2.1.8 → 2.1.9
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.
|
@@ -2,9 +2,9 @@ import { z } from "zod";
|
|
|
2
2
|
export declare const isHexAddress: (str: string) => boolean;
|
|
3
3
|
export declare const isHexId: (str: string) => boolean;
|
|
4
4
|
export declare const isMultiaddr: (str: string) => boolean;
|
|
5
|
-
export declare const ethAddressSchema: z.ZodEffects<z.ZodString, string
|
|
5
|
+
export declare const ethAddressSchema: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
6
6
|
export declare const ensNameSchema: z.ZodEffects<z.ZodString, string, string>;
|
|
7
|
-
export declare const ethAddressOrEnsNameSchema: z.ZodUnion<[z.ZodEffects<z.ZodString, string
|
|
7
|
+
export declare const ethAddressOrEnsNameSchema: z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}`, string>, z.ZodEffects<z.ZodString, string, string>]>;
|
|
8
8
|
export declare enum QuestionType {
|
|
9
9
|
Bool = "bool",
|
|
10
10
|
Datetime = "datetime",
|
|
@@ -39,7 +39,7 @@ export declare const AttachmentSchema: z.ZodObject<{
|
|
|
39
39
|
label: string;
|
|
40
40
|
uri: string;
|
|
41
41
|
}>;
|
|
42
|
-
export declare const AliasSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, string
|
|
42
|
+
export declare const AliasSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}`, string>, z.ZodEffects<z.ZodString, string, string>]>>;
|
|
43
43
|
declare const DisputeDetailsSchema: z.ZodObject<{
|
|
44
44
|
title: z.ZodString;
|
|
45
45
|
description: z.ZodString;
|
|
@@ -74,11 +74,11 @@ declare const DisputeDetailsSchema: z.ZodObject<{
|
|
|
74
74
|
frontendUrl: z.ZodOptional<z.ZodString>;
|
|
75
75
|
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
76
76
|
arbitratorChainID: z.ZodString;
|
|
77
|
-
arbitratorAddress: z.ZodEffects<z.ZodString, string
|
|
77
|
+
arbitratorAddress: z.ZodEffects<z.ZodString, `0x${string}`, string>;
|
|
78
78
|
category: z.ZodOptional<z.ZodString>;
|
|
79
79
|
lang: z.ZodOptional<z.ZodString>;
|
|
80
80
|
specification: z.ZodOptional<z.ZodString>;
|
|
81
|
-
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, string
|
|
81
|
+
aliases: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodEffects<z.ZodString, `0x${string}`, string>, z.ZodEffects<z.ZodString, string, string>]>>>;
|
|
82
82
|
version: z.ZodString;
|
|
83
83
|
}, "strip", z.ZodTypeAny, {
|
|
84
84
|
description: string;
|
|
@@ -92,7 +92,7 @@ declare const DisputeDetailsSchema: z.ZodObject<{
|
|
|
92
92
|
title: string;
|
|
93
93
|
policyURI: string;
|
|
94
94
|
arbitratorChainID: string;
|
|
95
|
-
arbitratorAddress: string
|
|
95
|
+
arbitratorAddress: `0x${string}`;
|
|
96
96
|
version: string;
|
|
97
97
|
attachment?: {
|
|
98
98
|
label: string;
|
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.replacePlaceholdersWithValues =
|
|
6
|
+
exports.replacePlaceholdersWithValues = replacePlaceholdersWithValues;
|
|
7
7
|
const mustache_1 = __importDefault(require("mustache"));
|
|
8
8
|
const retrieveVariables_1 = __importDefault(require("./retrieveVariables"));
|
|
9
9
|
const errors_1 = require("../../errors");
|
|
@@ -25,7 +25,6 @@ function replacePlaceholdersWithValues(mapping, context) {
|
|
|
25
25
|
}
|
|
26
26
|
return replace(mapping);
|
|
27
27
|
}
|
|
28
|
-
exports.replacePlaceholdersWithValues = replacePlaceholdersWithValues;
|
|
29
28
|
const validateContext = (template, context) => {
|
|
30
29
|
const variables = (0, retrieveVariables_1.default)(template);
|
|
31
30
|
variables.forEach((variable) => {
|
package/package.json
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kleros/kleros-sdk",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.9",
|
|
4
4
|
"description": "SDK for Kleros version 2",
|
|
5
5
|
"repository": "git@github.com:kleros/kleros-v2.git",
|
|
6
|
+
"homepage": "https://github.com/kleros/kleros-v2/tree/master/kleros-sdk#readme",
|
|
6
7
|
"author": "Kleros",
|
|
7
8
|
"license": "MIT",
|
|
8
9
|
"main": "./lib/src/index.js",
|
|
@@ -12,10 +13,6 @@
|
|
|
12
13
|
"lib/**/*",
|
|
13
14
|
"!lib/**/test/*"
|
|
14
15
|
],
|
|
15
|
-
"packageManager": "yarn@4.0.2+sha256.825003a0f561ad09a3b1ac4a3b3ea6207af2796d54f62a9420520915721f5186",
|
|
16
|
-
"engines": {
|
|
17
|
-
"node": ">=16.0.0"
|
|
18
|
-
},
|
|
19
16
|
"type": "commonjs",
|
|
20
17
|
"volta": {
|
|
21
18
|
"node": "20.11.0"
|
|
@@ -36,18 +33,22 @@
|
|
|
36
33
|
},
|
|
37
34
|
"devDependencies": {
|
|
38
35
|
"@types/mustache": "^4.2.5",
|
|
39
|
-
"@
|
|
40
|
-
"
|
|
36
|
+
"@types/node": "^20.17.6",
|
|
37
|
+
"@vitest/ui": "^1.6.0",
|
|
38
|
+
"mocha": "^10.8.2",
|
|
41
39
|
"rimraf": "^6.0.1",
|
|
42
40
|
"ts-node": "^10.9.2",
|
|
43
|
-
"typescript": "^5.
|
|
44
|
-
"
|
|
41
|
+
"typescript": "^5.6.3",
|
|
42
|
+
"viem": "^2.21.48",
|
|
43
|
+
"vitest": "^1.6.0"
|
|
45
44
|
},
|
|
46
45
|
"dependencies": {
|
|
47
|
-
"@reality.eth/reality-eth-lib": "^3.2.
|
|
46
|
+
"@reality.eth/reality-eth-lib": "^3.2.44",
|
|
48
47
|
"@urql/core": "^5.0.8",
|
|
49
48
|
"mustache": "^4.2.0",
|
|
50
|
-
"
|
|
51
|
-
|
|
49
|
+
"zod": "^3.23.8"
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"viem": "^2.21.48"
|
|
52
53
|
}
|
|
53
54
|
}
|