@prosopo/datasets 3.0.42 → 3.0.43

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.
Files changed (72) hide show
  1. package/CHANGELOG.md +20 -0
  2. package/dist/captcha/captcha.js +173 -154
  3. package/dist/captcha/dataset.js +83 -69
  4. package/dist/captcha/index.js +27 -5
  5. package/dist/captcha/merkle.js +112 -109
  6. package/dist/captcha/util.js +19 -18
  7. package/dist/cjs/captcha/captcha.cjs +195 -0
  8. package/dist/cjs/captcha/dataset.cjs +94 -0
  9. package/dist/cjs/captcha/index.cjs +27 -0
  10. package/dist/cjs/captcha/merkle.cjs +128 -0
  11. package/dist/cjs/captcha/util.cjs +23 -0
  12. package/dist/cjs/index.cjs +31 -0
  13. package/dist/cjs/tests/mocks/data/captchas.cjs +1044 -0
  14. package/dist/index.js +31 -3
  15. package/dist/tests/mocks/data/captchas.js +1039 -1033
  16. package/dist/tests/mocks/data/captchas.json +886 -886
  17. package/dist/tests/mocks/data/captchas1.json +132 -132
  18. package/dist/tests/mocks/data/captchas2.json +175 -175
  19. package/dist/tests/mocks/data/captchas3.json +133 -133
  20. package/dist/tests/mocks/data/captchas4.json +132 -132
  21. package/package.json +7 -7
  22. package/coverage/base.css +0 -224
  23. package/coverage/block-navigation.js +0 -87
  24. package/coverage/clover.xml +0 -493
  25. package/coverage/coverage-final.json +0 -7
  26. package/coverage/favicon.png +0 -0
  27. package/coverage/index.html +0 -131
  28. package/coverage/prettify.css +0 -1
  29. package/coverage/prettify.js +0 -2
  30. package/coverage/sort-arrow-sprite.png +0 -0
  31. package/coverage/sorter.js +0 -210
  32. package/coverage/src/captcha/captcha.ts.html +0 -1093
  33. package/coverage/src/captcha/dataset.ts.html +0 -490
  34. package/coverage/src/captcha/index.html +0 -176
  35. package/coverage/src/captcha/index.ts.html +0 -136
  36. package/coverage/src/captcha/merkle.ts.html +0 -610
  37. package/coverage/src/captcha/util.ts.html +0 -187
  38. package/coverage/src/index.html +0 -116
  39. package/coverage/src/index.ts.html +0 -139
  40. package/dist/captcha/captcha.d.ts +0 -21
  41. package/dist/captcha/captcha.d.ts.map +0 -1
  42. package/dist/captcha/captcha.js.map +0 -1
  43. package/dist/captcha/dataset.d.ts +0 -8
  44. package/dist/captcha/dataset.d.ts.map +0 -1
  45. package/dist/captcha/dataset.js.map +0 -1
  46. package/dist/captcha/index.d.ts +0 -5
  47. package/dist/captcha/index.d.ts.map +0 -1
  48. package/dist/captcha/index.js.map +0 -1
  49. package/dist/captcha/merkle.d.ts +0 -20
  50. package/dist/captcha/merkle.d.ts.map +0 -1
  51. package/dist/captcha/merkle.js.map +0 -1
  52. package/dist/captcha/util.d.ts +0 -2
  53. package/dist/captcha/util.d.ts.map +0 -1
  54. package/dist/captcha/util.js.map +0 -1
  55. package/dist/index.d.ts +0 -3
  56. package/dist/index.d.ts.map +0 -1
  57. package/dist/index.js.map +0 -1
  58. package/dist/tests/captcha.unit.test.d.ts +0 -2
  59. package/dist/tests/captcha.unit.test.d.ts.map +0 -1
  60. package/dist/tests/captcha.unit.test.js +0 -357
  61. package/dist/tests/captcha.unit.test.js.map +0 -1
  62. package/dist/tests/dataset.unit.test.d.ts +0 -2
  63. package/dist/tests/dataset.unit.test.d.ts.map +0 -1
  64. package/dist/tests/dataset.unit.test.js +0 -126
  65. package/dist/tests/dataset.unit.test.js.map +0 -1
  66. package/dist/tests/merkle.unit.test.d.ts +0 -2
  67. package/dist/tests/merkle.unit.test.d.ts.map +0 -1
  68. package/dist/tests/merkle.unit.test.js +0 -171
  69. package/dist/tests/merkle.unit.test.js.map +0 -1
  70. package/dist/tests/mocks/data/captchas.d.ts +0 -24
  71. package/dist/tests/mocks/data/captchas.d.ts.map +0 -1
  72. package/dist/tests/mocks/data/captchas.js.map +0 -1
@@ -1,134 +1,134 @@
1
1
  {
2
- "captchas": [
3
- {
4
- "salt": "0x01",
5
- "solution": [2, 3, 8],
6
- "items": [
7
- {
8
- "data": "http://localhost:4000/img/test_image_png_5.png",
9
- "type": "image"
10
- },
11
- {
12
- "data": "http://localhost:4000/img/test_image_png_24.png",
13
- "type": "image"
14
- },
15
- {
16
- "data": "http://localhost:4000/img/test_image_png_27.png",
17
- "type": "image"
18
- },
19
- {
20
- "data": "http://localhost:4000/img/test_image_png_28.png",
21
- "type": "image"
22
- },
23
- {
24
- "data": "http://localhost:4000/img/test_image_png_22.png",
25
- "type": "image"
26
- },
27
- {
28
- "data": "http://localhost:4000/img/test_image_png_32.png",
29
- "type": "image"
30
- },
31
- {
32
- "data": "http://localhost:4000/img/test_image_png_26.png",
33
- "type": "image"
34
- },
35
- {
36
- "data": "http://localhost:4000/img/test_image_png_44.png",
37
- "type": "image"
38
- },
39
- {
40
- "data": "http://localhost:4000/img/test_image_png_51.png",
41
- "type": "image"
42
- }
43
- ],
44
- "target": "dog"
45
- },
46
- {
47
- "salt": "0x02",
48
- "solution": [0, 1, 4],
49
- "items": [
50
- {
51
- "data": "http://localhost:4000/img/test_image_png_5.png",
52
- "type": "image"
53
- },
54
- {
55
- "data": "http://localhost:4000/img/test_image_png_24.png",
56
- "type": "image"
57
- },
58
- {
59
- "data": "http://localhost:4000/img/test_image_png_27.png",
60
- "type": "image"
61
- },
62
- {
63
- "data": "http://localhost:4000/img/test_image_png_28.png",
64
- "type": "image"
65
- },
66
- {
67
- "data": "http://localhost:4000/img/test_image_png_22.png",
68
- "type": "image"
69
- },
70
- {
71
- "data": "http://localhost:4000/img/test_image_png_32.png",
72
- "type": "image"
73
- },
74
- {
75
- "data": "http://localhost:4000/img/test_image_png_26.png",
76
- "type": "image"
77
- },
78
- {
79
- "data": "http://localhost:4000/img/test_image_png_44.png",
80
- "type": "image"
81
- },
82
- {
83
- "data": "http://localhost:4000/img/test_image_png_51.png",
84
- "type": "image"
85
- }
86
- ],
87
- "target": "cat"
88
- },
89
- {
90
- "salt": "0x03",
91
- "items": [
92
- {
93
- "data": "http://localhost:4000/img/test_image_png_5.png",
94
- "type": "image"
95
- },
96
- {
97
- "data": "http://localhost:4000/img/test_image_png_24.png",
98
- "type": "image"
99
- },
100
- {
101
- "data": "http://localhost:4000/img/test_image_png_27.png",
102
- "type": "image"
103
- },
104
- {
105
- "data": "http://localhost:4000/img/test_image_png_28.png",
106
- "type": "image"
107
- },
108
- {
109
- "data": "http://localhost:4000/img/test_image_png_22.png",
110
- "type": "image"
111
- },
112
- {
113
- "data": "http://localhost:4000/img/test_image_png_32.png",
114
- "type": "image"
115
- },
116
- {
117
- "data": "http://localhost:4000/img/test_image_png_26.png",
118
- "type": "image"
119
- },
120
- {
121
- "data": "http://localhost:4000/img/test_image_png_44.png",
122
- "type": "image"
123
- },
124
- {
125
- "data": "http://localhost:4000/img/test_image_png_51.png",
126
- "type": "image"
127
- }
128
- ],
129
- "target": "horse"
130
- }
131
- ],
132
- "format": "SelectAll",
133
- "datasetId": "0x45f0bab71f6873f55f9c60a9dcb727e26951388a41f625c7001914660b5040a2"
2
+ "captchas": [
3
+ {
4
+ "salt": "0x01",
5
+ "solution": [2, 3, 8],
6
+ "items": [
7
+ {
8
+ "data": "http://localhost:4000/img/test_image_png_5.png",
9
+ "type": "image"
10
+ },
11
+ {
12
+ "data": "http://localhost:4000/img/test_image_png_24.png",
13
+ "type": "image"
14
+ },
15
+ {
16
+ "data": "http://localhost:4000/img/test_image_png_27.png",
17
+ "type": "image"
18
+ },
19
+ {
20
+ "data": "http://localhost:4000/img/test_image_png_28.png",
21
+ "type": "image"
22
+ },
23
+ {
24
+ "data": "http://localhost:4000/img/test_image_png_22.png",
25
+ "type": "image"
26
+ },
27
+ {
28
+ "data": "http://localhost:4000/img/test_image_png_32.png",
29
+ "type": "image"
30
+ },
31
+ {
32
+ "data": "http://localhost:4000/img/test_image_png_26.png",
33
+ "type": "image"
34
+ },
35
+ {
36
+ "data": "http://localhost:4000/img/test_image_png_44.png",
37
+ "type": "image"
38
+ },
39
+ {
40
+ "data": "http://localhost:4000/img/test_image_png_51.png",
41
+ "type": "image"
42
+ }
43
+ ],
44
+ "target": "dog"
45
+ },
46
+ {
47
+ "salt": "0x02",
48
+ "solution": [0, 1, 4],
49
+ "items": [
50
+ {
51
+ "data": "http://localhost:4000/img/test_image_png_5.png",
52
+ "type": "image"
53
+ },
54
+ {
55
+ "data": "http://localhost:4000/img/test_image_png_24.png",
56
+ "type": "image"
57
+ },
58
+ {
59
+ "data": "http://localhost:4000/img/test_image_png_27.png",
60
+ "type": "image"
61
+ },
62
+ {
63
+ "data": "http://localhost:4000/img/test_image_png_28.png",
64
+ "type": "image"
65
+ },
66
+ {
67
+ "data": "http://localhost:4000/img/test_image_png_22.png",
68
+ "type": "image"
69
+ },
70
+ {
71
+ "data": "http://localhost:4000/img/test_image_png_32.png",
72
+ "type": "image"
73
+ },
74
+ {
75
+ "data": "http://localhost:4000/img/test_image_png_26.png",
76
+ "type": "image"
77
+ },
78
+ {
79
+ "data": "http://localhost:4000/img/test_image_png_44.png",
80
+ "type": "image"
81
+ },
82
+ {
83
+ "data": "http://localhost:4000/img/test_image_png_51.png",
84
+ "type": "image"
85
+ }
86
+ ],
87
+ "target": "cat"
88
+ },
89
+ {
90
+ "salt": "0x03",
91
+ "items": [
92
+ {
93
+ "data": "http://localhost:4000/img/test_image_png_5.png",
94
+ "type": "image"
95
+ },
96
+ {
97
+ "data": "http://localhost:4000/img/test_image_png_24.png",
98
+ "type": "image"
99
+ },
100
+ {
101
+ "data": "http://localhost:4000/img/test_image_png_27.png",
102
+ "type": "image"
103
+ },
104
+ {
105
+ "data": "http://localhost:4000/img/test_image_png_28.png",
106
+ "type": "image"
107
+ },
108
+ {
109
+ "data": "http://localhost:4000/img/test_image_png_22.png",
110
+ "type": "image"
111
+ },
112
+ {
113
+ "data": "http://localhost:4000/img/test_image_png_32.png",
114
+ "type": "image"
115
+ },
116
+ {
117
+ "data": "http://localhost:4000/img/test_image_png_26.png",
118
+ "type": "image"
119
+ },
120
+ {
121
+ "data": "http://localhost:4000/img/test_image_png_44.png",
122
+ "type": "image"
123
+ },
124
+ {
125
+ "data": "http://localhost:4000/img/test_image_png_51.png",
126
+ "type": "image"
127
+ }
128
+ ],
129
+ "target": "horse"
130
+ }
131
+ ],
132
+ "format": "SelectAll",
133
+ "datasetId": "0x45f0bab71f6873f55f9c60a9dcb727e26951388a41f625c7001914660b5040a2"
134
134
  }
@@ -1,177 +1,177 @@
1
1
  {
2
- "captchas": [
3
- {
4
- "salt": "0x01",
5
- "solution": [0, 7],
6
- "items": [
7
- {
8
- "data": "http://localhost:4000/img/test_image_png_4.png",
9
- "type": "image"
10
- },
11
- {
12
- "data": "http://localhost:4000/img/test_image_png_15",
13
- "type": "image"
14
- },
15
- {
16
- "data": "http://localhost:4000/img/test_image_png_26.png",
17
- "type": "image"
18
- },
19
- {
20
- "data": "http://localhost:4000/img/test_image_png_94.png",
21
- "type": "image"
22
- },
23
- {
24
- "data": "http://localhost:4000/img/test_image_png_95.png",
25
- "type": "image"
26
- },
27
- {
28
- "data": "http://localhost:4000/img/test_image_png_20.png",
29
- "type": "image"
30
- },
31
- {
32
- "data": "http://localhost:4000/img/test_image_png_79.png",
33
- "type": "image"
34
- },
35
- {
36
- "data": "http://localhost:4000/img/test_image_png_85.png",
37
- "type": "image"
38
- },
39
- {
40
- "data": "http://localhost:4000/img/test_image_png_90.png",
41
- "type": "image"
42
- }
43
- ],
44
- "target": "plane"
45
- },
46
- {
47
- "salt": "0x02",
48
- "solution": [4, 6, 8],
49
- "items": [
50
- {
51
- "data": "http://localhost:4000/img/test_image_png_4.png",
52
- "type": "image"
53
- },
54
- {
55
- "data": "http://localhost:4000/img/test_image_png_15",
56
- "type": "image"
57
- },
58
- {
59
- "data": "http://localhost:4000/img/test_image_png_26.png",
60
- "type": "image"
61
- },
62
- {
63
- "data": "http://localhost:4000/img/test_image_png_94.png",
64
- "type": "image"
65
- },
66
- {
67
- "data": "http://localhost:4000/img/test_image_png_95.png",
68
- "type": "image"
69
- },
70
- {
71
- "data": "http://localhost:4000/img/test_image_png_20.png",
72
- "type": "image"
73
- },
74
- {
75
- "data": "http://localhost:4000/img/test_image_png_79.png",
76
- "type": "image"
77
- },
78
- {
79
- "data": "http://localhost:4000/img/test_image_png_85.png",
80
- "type": "image"
81
- },
82
- {
83
- "data": "http://localhost:4000/img/test_image_png_90.png",
84
- "type": "image"
85
- }
86
- ],
87
- "target": "dog"
88
- },
89
- {
90
- "salt": "0x03",
91
- "solution": [2, 3, 5],
92
- "items": [
93
- {
94
- "data": "http://localhost:4000/img/test_image_png_4.png",
95
- "type": "image"
96
- },
97
- {
98
- "data": "http://localhost:4000/img/test_image_png_15",
99
- "type": "image"
100
- },
101
- {
102
- "data": "http://localhost:4000/img/test_image_png_26.png",
103
- "type": "image"
104
- },
105
- {
106
- "data": "http://localhost:4000/img/test_image_png_94.png",
107
- "type": "image"
108
- },
109
- {
110
- "data": "http://localhost:4000/img/test_image_png_95.png",
111
- "type": "image"
112
- },
113
- {
114
- "data": "http://localhost:4000/img/test_image_png_20.png",
115
- "type": "image"
116
- },
117
- {
118
- "data": "http://localhost:4000/img/test_image_png_79.png",
119
- "type": "image"
120
- },
121
- {
122
- "data": "http://localhost:4000/img/test_image_png_85.png",
123
- "type": "image"
124
- },
125
- {
126
- "data": "http://localhost:4000/img/test_image_png_90.png",
127
- "type": "image"
128
- }
129
- ],
130
- "target": "horse"
131
- },
132
- {
133
- "salt": "0x04",
134
- "items": [
135
- {
136
- "data": "http://localhost:4000/img/test_image_png_4.png",
137
- "type": "image"
138
- },
139
- {
140
- "data": "http://localhost:4000/img/test_image_png_15",
141
- "type": "image"
142
- },
143
- {
144
- "data": "http://localhost:4000/img/test_image_png_26.png",
145
- "type": "image"
146
- },
147
- {
148
- "data": "http://localhost:4000/img/test_image_png_94.png",
149
- "type": "image"
150
- },
151
- {
152
- "data": "http://localhost:4000/img/test_image_png_95.png",
153
- "type": "image"
154
- },
155
- {
156
- "data": "http://localhost:4000/img/test_image_png_20.png",
157
- "type": "image"
158
- },
159
- {
160
- "data": "http://localhost:4000/img/test_image_png_79.png",
161
- "type": "image"
162
- },
163
- {
164
- "data": "http://localhost:4000/img/test_image_png_85.png",
165
- "type": "image"
166
- },
167
- {
168
- "data": "http://localhost:4000/img/test_image_png_90.png",
169
- "type": "image"
170
- }
171
- ],
172
- "target": "bird"
173
- }
174
- ],
175
- "format": "SelectAll",
176
- "datasetId": "0x37e3b1db75f9bd55c0492c18e4aa28a63b22af55335033162aac320f21513ca8"
2
+ "captchas": [
3
+ {
4
+ "salt": "0x01",
5
+ "solution": [0, 7],
6
+ "items": [
7
+ {
8
+ "data": "http://localhost:4000/img/test_image_png_4.png",
9
+ "type": "image"
10
+ },
11
+ {
12
+ "data": "http://localhost:4000/img/test_image_png_15",
13
+ "type": "image"
14
+ },
15
+ {
16
+ "data": "http://localhost:4000/img/test_image_png_26.png",
17
+ "type": "image"
18
+ },
19
+ {
20
+ "data": "http://localhost:4000/img/test_image_png_94.png",
21
+ "type": "image"
22
+ },
23
+ {
24
+ "data": "http://localhost:4000/img/test_image_png_95.png",
25
+ "type": "image"
26
+ },
27
+ {
28
+ "data": "http://localhost:4000/img/test_image_png_20.png",
29
+ "type": "image"
30
+ },
31
+ {
32
+ "data": "http://localhost:4000/img/test_image_png_79.png",
33
+ "type": "image"
34
+ },
35
+ {
36
+ "data": "http://localhost:4000/img/test_image_png_85.png",
37
+ "type": "image"
38
+ },
39
+ {
40
+ "data": "http://localhost:4000/img/test_image_png_90.png",
41
+ "type": "image"
42
+ }
43
+ ],
44
+ "target": "plane"
45
+ },
46
+ {
47
+ "salt": "0x02",
48
+ "solution": [4, 6, 8],
49
+ "items": [
50
+ {
51
+ "data": "http://localhost:4000/img/test_image_png_4.png",
52
+ "type": "image"
53
+ },
54
+ {
55
+ "data": "http://localhost:4000/img/test_image_png_15",
56
+ "type": "image"
57
+ },
58
+ {
59
+ "data": "http://localhost:4000/img/test_image_png_26.png",
60
+ "type": "image"
61
+ },
62
+ {
63
+ "data": "http://localhost:4000/img/test_image_png_94.png",
64
+ "type": "image"
65
+ },
66
+ {
67
+ "data": "http://localhost:4000/img/test_image_png_95.png",
68
+ "type": "image"
69
+ },
70
+ {
71
+ "data": "http://localhost:4000/img/test_image_png_20.png",
72
+ "type": "image"
73
+ },
74
+ {
75
+ "data": "http://localhost:4000/img/test_image_png_79.png",
76
+ "type": "image"
77
+ },
78
+ {
79
+ "data": "http://localhost:4000/img/test_image_png_85.png",
80
+ "type": "image"
81
+ },
82
+ {
83
+ "data": "http://localhost:4000/img/test_image_png_90.png",
84
+ "type": "image"
85
+ }
86
+ ],
87
+ "target": "dog"
88
+ },
89
+ {
90
+ "salt": "0x03",
91
+ "solution": [2, 3, 5],
92
+ "items": [
93
+ {
94
+ "data": "http://localhost:4000/img/test_image_png_4.png",
95
+ "type": "image"
96
+ },
97
+ {
98
+ "data": "http://localhost:4000/img/test_image_png_15",
99
+ "type": "image"
100
+ },
101
+ {
102
+ "data": "http://localhost:4000/img/test_image_png_26.png",
103
+ "type": "image"
104
+ },
105
+ {
106
+ "data": "http://localhost:4000/img/test_image_png_94.png",
107
+ "type": "image"
108
+ },
109
+ {
110
+ "data": "http://localhost:4000/img/test_image_png_95.png",
111
+ "type": "image"
112
+ },
113
+ {
114
+ "data": "http://localhost:4000/img/test_image_png_20.png",
115
+ "type": "image"
116
+ },
117
+ {
118
+ "data": "http://localhost:4000/img/test_image_png_79.png",
119
+ "type": "image"
120
+ },
121
+ {
122
+ "data": "http://localhost:4000/img/test_image_png_85.png",
123
+ "type": "image"
124
+ },
125
+ {
126
+ "data": "http://localhost:4000/img/test_image_png_90.png",
127
+ "type": "image"
128
+ }
129
+ ],
130
+ "target": "horse"
131
+ },
132
+ {
133
+ "salt": "0x04",
134
+ "items": [
135
+ {
136
+ "data": "http://localhost:4000/img/test_image_png_4.png",
137
+ "type": "image"
138
+ },
139
+ {
140
+ "data": "http://localhost:4000/img/test_image_png_15",
141
+ "type": "image"
142
+ },
143
+ {
144
+ "data": "http://localhost:4000/img/test_image_png_26.png",
145
+ "type": "image"
146
+ },
147
+ {
148
+ "data": "http://localhost:4000/img/test_image_png_94.png",
149
+ "type": "image"
150
+ },
151
+ {
152
+ "data": "http://localhost:4000/img/test_image_png_95.png",
153
+ "type": "image"
154
+ },
155
+ {
156
+ "data": "http://localhost:4000/img/test_image_png_20.png",
157
+ "type": "image"
158
+ },
159
+ {
160
+ "data": "http://localhost:4000/img/test_image_png_79.png",
161
+ "type": "image"
162
+ },
163
+ {
164
+ "data": "http://localhost:4000/img/test_image_png_85.png",
165
+ "type": "image"
166
+ },
167
+ {
168
+ "data": "http://localhost:4000/img/test_image_png_90.png",
169
+ "type": "image"
170
+ }
171
+ ],
172
+ "target": "bird"
173
+ }
174
+ ],
175
+ "format": "SelectAll",
176
+ "datasetId": "0x37e3b1db75f9bd55c0492c18e4aa28a63b22af55335033162aac320f21513ca8"
177
177
  }