@prosopo/keyring 2.9.0 → 2.9.35

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.
@@ -1,5 +1,5 @@
1
1
 
2
- > @prosopo/keyring@2.9.0 build:cjs
2
+ > @prosopo/keyring@2.9.35 build:cjs
3
3
  > NODE_ENV=${NODE_ENV:-development}; vite build --config vite.cjs.config.ts --mode $NODE_ENV
4
4
 
5
5
  ViteCommonJSConfig: .
@@ -7,8 +7,9 @@ ViteCommonJSConfig: .
7
7
  tsConfigPaths: [
8
8
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
9
9
  '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
10
- '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
10
+ '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
11
11
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
12
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
12
13
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json'
13
14
  ]
14
15
  }
@@ -16,8 +17,9 @@ ViteCommonJSConfig: .
16
17
  externals: [
17
18
  '@prosopo/common',
18
19
  '@prosopo/locale',
19
- '@prosopo/types',
20
+ '@prosopo/logger',
20
21
  '@prosopo/util',
22
+ '@prosopo/types',
21
23
  '@prosopo/util-crypto'
22
24
  ]
23
25
  }
@@ -35,9 +37,9 @@ rendering chunks...
35
37
  dist/cjs/pair/encode.cjs  0.80 kB
36
38
  dist/cjs/keyring/pairs.cjs  0.83 kB
37
39
  dist/cjs/index.cjs  0.87 kB
38
- dist/cjs/accounts/testAccounts.cjs  1.29 kB
40
+ dist/cjs/accounts/testAccounts.cjs  1.39 kB
39
41
  dist/cjs/accounts/getPair.cjs  1.48 kB
40
42
  dist/cjs/pair/decode.cjs  1.49 kB
41
43
  dist/cjs/pair/index.cjs  5.24 kB
42
44
  dist/cjs/keyring/keyring.cjs 10.59 kB
43
- ✓ built in 358ms
45
+ ✓ built in 279ms
@@ -1,29 +1,32 @@
1
1
 
2
- > @prosopo/keyring@2.9.0 build:tsc
2
+ > @prosopo/keyring@2.9.35 build:tsc
3
3
  > tsc --build --verbose
4
4
 
5
- 4:56:53 PM - Projects in this build:
5
+ 10:13:12 AM - Projects in this build:
6
6
  * ../../dev/config/tsconfig.json
7
7
  * ../locale/tsconfig.json
8
8
  * ../util/tsconfig.json
9
+ * ../logger/tsconfig.json
9
10
  * ../util-crypto/tsconfig.json
10
11
  * ../types/tsconfig.json
11
12
  * ../common/tsconfig.json
12
13
  * tsconfig.json
13
14
 
14
- 4:56:53 PM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/dependencies.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
15
+ 10:13:13 AM - Project '../../dev/config/tsconfig.json' is up to date because newest input '../../dev/config/src/webpack/webpack.config.ts' is older than output '../../dev/config/tsconfig.tsbuildinfo'
15
16
 
16
- 4:56:53 PM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/translationKey.ts' is older than output '../locale/tsconfig.tsbuildinfo'
17
+ 10:13:13 AM - Project '../locale/tsconfig.json' is up to date because newest input '../locale/src/util.ts' is older than output '../locale/tsconfig.tsbuildinfo'
17
18
 
18
- 4:56:53 PM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/verifyRecency.ts' is older than output '../util/tsconfig.tsbuildinfo'
19
+ 10:13:13 AM - Project '../util/tsconfig.json' is up to date because newest input '../util/src/url.ts' is older than output '../util/tsconfig.tsbuildinfo'
19
20
 
20
- 4:56:53 PM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
21
+ 10:13:13 AM - Project '../logger/tsconfig.json' is up to date because newest input '../logger/src/index.ts' is older than output '../logger/tsconfig.tsbuildinfo'
21
22
 
22
- 4:56:53 PM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
23
+ 10:13:13 AM - Project '../util-crypto/tsconfig.json' is up to date because newest input '../util-crypto/src/types.ts' is older than output '../util-crypto/tsconfig.tsbuildinfo'
23
24
 
24
- 4:56:53 PM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/logger.ts' is older than output '../common/tsconfig.tsbuildinfo'
25
+ 10:13:13 AM - Project '../types/tsconfig.json' is up to date because newest input '../types/src/procaptcha/api.ts' is older than output '../types/tsconfig.tsbuildinfo'
25
26
 
26
- 4:56:53 PM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
27
+ 10:13:13 AM - Project '../common/tsconfig.json' is up to date because newest input '../common/src/index.ts' is older than output '../common/tsconfig.tsbuildinfo'
27
28
 
28
- 4:56:53 PM - Building project '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'...
29
+ 10:13:13 AM - Project 'tsconfig.json' is out of date because output file 'tsconfig.tsbuildinfo' does not exist
30
+
31
+ 10:13:13 AM - Building project '/home/runner/work/captcha/captcha/packages/keyring/tsconfig.json'...
29
32
 
@@ -1,9 +1,9 @@
1
1
 
2
- > @prosopo/keyring@2.9.0 build
2
+ > @prosopo/keyring@2.9.35 build
3
3
  > npm run build:cross-env -- --mode ${NODE_ENV:-development}
4
4
 
5
5
 
6
- > @prosopo/keyring@2.9.0 build:cross-env
6
+ > @prosopo/keyring@2.9.35 build:cross-env
7
7
  > vite build --config vite.esm.config.ts --mode production
8
8
 
9
9
  ViteEsmConfig: .
@@ -11,8 +11,9 @@ ViteEsmConfig: .
11
11
  tsConfigPaths: [
12
12
  '/home/runner/work/captcha/captcha/packages/common/tsconfig.json',
13
13
  '/home/runner/work/captcha/captcha/packages/locale/tsconfig.json',
14
- '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
14
+ '/home/runner/work/captcha/captcha/packages/logger/tsconfig.json',
15
15
  '/home/runner/work/captcha/captcha/packages/util/tsconfig.json',
16
+ '/home/runner/work/captcha/captcha/packages/types/tsconfig.json',
16
17
  '/home/runner/work/captcha/captcha/packages/util-crypto/tsconfig.json'
17
18
  ]
18
19
  }
@@ -20,8 +21,9 @@ ViteEsmConfig: .
20
21
  externals: [
21
22
  '@prosopo/common',
22
23
  '@prosopo/locale',
23
- '@prosopo/types',
24
+ '@prosopo/logger',
24
25
  '@prosopo/util',
26
+ '@prosopo/types',
25
27
  '@prosopo/util-crypto'
26
28
  ]
27
29
  }
@@ -39,9 +41,9 @@ rendering chunks...
39
41
  dist/accounts/mnemonic.js  0.63 kB
40
42
  dist/pair/encode.js  0.68 kB
41
43
  dist/keyring/pairs.js  0.70 kB
42
- dist/accounts/testAccounts.js  1.14 kB
44
+ dist/accounts/testAccounts.js  1.23 kB
43
45
  dist/pair/decode.js  1.31 kB
44
46
  dist/accounts/getPair.js  1.34 kB
45
47
  dist/pair/index.js  5.18 kB
46
48
  dist/keyring/keyring.js 10.45 kB
47
- ✓ built in 346ms
49
+ ✓ built in 305ms
package/CHANGELOG.md CHANGED
@@ -1,5 +1,263 @@
1
1
  # @prosopo/keyring
2
2
 
3
+ ## 2.9.35
4
+ ### Patch Changes
5
+
6
+ - Updated dependencies [b03dad1]
7
+ - @prosopo/types@4.3.1
8
+
9
+ ## 2.9.34
10
+ ### Patch Changes
11
+
12
+ - Updated dependencies [a1d60db]
13
+ - Updated dependencies [2392aaf]
14
+ - Updated dependencies [6ca1125]
15
+ - @prosopo/types@4.3.0
16
+ - @prosopo/util@3.2.15
17
+ - @prosopo/common@3.1.38
18
+
19
+ ## 2.9.33
20
+ ### Patch Changes
21
+
22
+ - Updated dependencies [6c26669]
23
+ - Updated dependencies [f7f9ec5]
24
+ - @prosopo/types@4.2.1
25
+
26
+ ## 2.9.32
27
+ ### Patch Changes
28
+
29
+ - Updated dependencies [0fd81af]
30
+ - @prosopo/common@3.1.37
31
+
32
+ ## 2.9.31
33
+ ### Patch Changes
34
+
35
+ - Updated dependencies [20cae63]
36
+ - Updated dependencies [4d9923e]
37
+ - @prosopo/types@4.2.0
38
+
39
+ ## 2.9.30
40
+ ### Patch Changes
41
+
42
+ - Updated dependencies [d351362]
43
+ - @prosopo/types@4.1.4
44
+
45
+ ## 2.9.29
46
+ ### Patch Changes
47
+
48
+ - Updated dependencies [6567ce0]
49
+ - Updated dependencies [e2711ae]
50
+ - Updated dependencies [5786629]
51
+ - @prosopo/util@3.2.14
52
+ - @prosopo/types@4.1.3
53
+ - @prosopo/common@3.1.36
54
+
55
+ ## 2.9.28
56
+ ### Patch Changes
57
+
58
+ - Updated dependencies [72a1218]
59
+ - @prosopo/util@3.2.13
60
+ - @prosopo/types@4.1.2
61
+
62
+ ## 2.9.27
63
+ ### Patch Changes
64
+
65
+ - Updated dependencies [91958da]
66
+ - @prosopo/types@4.1.1
67
+ - @prosopo/common@3.1.35
68
+
69
+ ## 2.9.26
70
+ ### Patch Changes
71
+
72
+ - Updated dependencies [6a741ce]
73
+ - @prosopo/types@4.1.0
74
+
75
+ ## 2.9.25
76
+ ### Patch Changes
77
+
78
+ - 8bb7286: Move `captchaType` from client (`data-captcha-type` / render-options prop)
79
+ to a server-side site-key setting; the bundle now calls `/frictionless`
80
+ for all flows. Renames the bundle's universal mount component from
81
+ `FrictionlessCaptcha` to `BundleCaptcha` to reflect that it is no longer
82
+ frictionless-specific — the server decides which concrete challenge type
83
+ to render.
84
+ - Updated dependencies [3c0be68]
85
+ - Updated dependencies [f9ea09d]
86
+ - Updated dependencies [4aae4e6]
87
+ - Updated dependencies [d865319]
88
+ - Updated dependencies [753304b]
89
+ - Updated dependencies [8bb7286]
90
+ - Updated dependencies [f9ea09d]
91
+ - Updated dependencies [4aae4e6]
92
+ - Updated dependencies [4993813]
93
+ - @prosopo/types@4.0.0
94
+ - @prosopo/util@3.2.12
95
+ - @prosopo/common@3.1.34
96
+
97
+ ## 2.9.24
98
+ ### Patch Changes
99
+
100
+ - Updated dependencies [819ed95]
101
+ - @prosopo/types@3.16.1
102
+
103
+ ## 2.9.23
104
+ ### Patch Changes
105
+
106
+ - Updated dependencies [f6a4402]
107
+ - Updated dependencies [99dfb44]
108
+ - @prosopo/types@3.16.0
109
+
110
+ ## 2.9.22
111
+ ### Patch Changes
112
+
113
+ - Updated dependencies [3e54c0a]
114
+ - @prosopo/types@3.15.0
115
+
116
+ ## 2.9.21
117
+ ### Patch Changes
118
+
119
+ - Updated dependencies [946a8ba]
120
+ - Updated dependencies [5614814]
121
+ - @prosopo/types@3.14.1
122
+ - @prosopo/common@3.1.33
123
+
124
+ ## 2.9.20
125
+ ### Patch Changes
126
+
127
+ - Updated dependencies [fc514dd]
128
+ - Updated dependencies [42650db]
129
+ - @prosopo/types@3.14.0
130
+ - @prosopo/common@3.1.32
131
+
132
+ ## 2.9.19
133
+ ### Patch Changes
134
+
135
+ - Updated dependencies [4a9c518]
136
+ - @prosopo/common@3.1.31
137
+
138
+ ## 2.9.18
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [a25dffa]
142
+ - @prosopo/util@3.2.11
143
+ - @prosopo/types@3.13.3
144
+
145
+ ## 2.9.17
146
+ ### Patch Changes
147
+
148
+ - Updated dependencies [346edd7]
149
+ - @prosopo/util@3.2.10
150
+ - @prosopo/types@3.13.2
151
+
152
+ ## 2.9.16
153
+ ### Patch Changes
154
+
155
+ - Updated dependencies [22bfee7]
156
+ - @prosopo/util@3.2.9
157
+ - @prosopo/types@3.13.1
158
+
159
+ ## 2.9.15
160
+ ### Patch Changes
161
+
162
+ - Updated dependencies [e0fb3d6]
163
+ - Updated dependencies [e6d9553]
164
+ - Updated dependencies [f3f23e3]
165
+ - @prosopo/util@3.2.8
166
+ - @prosopo/types@3.13.0
167
+
168
+ ## 2.9.14
169
+ ### Patch Changes
170
+
171
+ - Updated dependencies [d5082a9]
172
+ - Updated dependencies [e1ea65f]
173
+ - Updated dependencies [c316257]
174
+ - @prosopo/types@3.12.3
175
+ - @prosopo/util@3.2.7
176
+
177
+ ## 2.9.13
178
+ ### Patch Changes
179
+
180
+ - Updated dependencies [adb89a6]
181
+ - @prosopo/types@3.12.2
182
+ - @prosopo/util@3.2.6
183
+ - @prosopo/common@3.1.30
184
+
185
+ ## 2.9.12
186
+ ### Patch Changes
187
+
188
+ - Updated dependencies [c5ee492]
189
+ - Updated dependencies [a90eb54]
190
+ - @prosopo/common@3.1.29
191
+ - @prosopo/types@3.12.1
192
+
193
+ ## 2.9.11
194
+ ### Patch Changes
195
+
196
+ - 676c5f2: Use HTTPS in developmentwq
197
+ - Updated dependencies [676c5f2]
198
+ - Updated dependencies [feaca02]
199
+ - @prosopo/types@3.12.0
200
+
201
+ ## 2.9.10
202
+ ### Patch Changes
203
+
204
+ - Updated dependencies [8148587]
205
+ - @prosopo/types@3.11.1
206
+
207
+ ## 2.9.9
208
+ ### Patch Changes
209
+
210
+ - Updated dependencies [7f6ffc5]
211
+ - @prosopo/types@3.11.0
212
+
213
+ ## 2.9.8
214
+ ### Patch Changes
215
+
216
+ - Updated dependencies [93fa086]
217
+ - @prosopo/types@3.10.2
218
+
219
+ ## 2.9.7
220
+ ### Patch Changes
221
+
222
+ - Updated dependencies [cde7550]
223
+ - @prosopo/types@3.10.1
224
+
225
+ ## 2.9.6
226
+ ### Patch Changes
227
+
228
+ - Updated dependencies [ad6d622]
229
+ - @prosopo/types@3.10.0
230
+
231
+ ## 2.9.5
232
+ ### Patch Changes
233
+
234
+ - Updated dependencies [ff58a70]
235
+ - @prosopo/types@3.9.0
236
+
237
+ ## 2.9.4
238
+ ### Patch Changes
239
+
240
+ - Updated dependencies [d2431cd]
241
+ - @prosopo/types@3.8.4
242
+
243
+ ## 2.9.3
244
+ ### Patch Changes
245
+
246
+ - Updated dependencies [bd6995b]
247
+ - @prosopo/types@3.8.3
248
+
249
+ ## 2.9.2
250
+ ### Patch Changes
251
+
252
+ - Updated dependencies [9633e58]
253
+ - @prosopo/types@3.8.2
254
+
255
+ ## 2.9.1
256
+ ### Patch Changes
257
+
258
+ - Updated dependencies [f52a5c1]
259
+ - @prosopo/types@3.8.1
260
+
3
261
  ## 2.9.0
4
262
  ### Minor Changes
5
263
 
@@ -1 +1 @@
1
- {"version":3,"file":"testAccounts.d.ts","sourceRoot":"","sources":["../../src/accounts/testAccounts.ts"],"names":[],"mappings":"AAcA,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,MAAM,gBAAgB,CAAC;AAIxB,wBAAgB,kBAAkB,IAAI,KAAK,EAAE,CAqB5C;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,EAAE,CAcxD"}
1
+ {"version":3,"file":"testAccounts.d.ts","sourceRoot":"","sources":["../../src/accounts/testAccounts.ts"],"names":[],"mappings":"AAcA,OAAO,EAGN,KAAK,gBAAgB,EACrB,KAAK,KAAK,EACV,MAAM,gBAAgB,CAAC;AAIxB,wBAAgB,kBAAkB,IAAI,KAAK,EAAE,CA0B5C;AAED,wBAAgB,mBAAmB,IAAI,gBAAgB,EAAE,CAcxD"}
@@ -6,7 +6,8 @@ function getDefaultSiteKeys() {
6
6
  const captchaTypes = [
7
7
  CaptchaType.image,
8
8
  CaptchaType.pow,
9
- CaptchaType.frictionless
9
+ CaptchaType.frictionless,
10
+ CaptchaType.puzzle
10
11
  ];
11
12
  const sites = [];
12
13
  for (const captchaType of captchaTypes) {
@@ -18,7 +19,9 @@ function getDefaultSiteKeys() {
18
19
  secret,
19
20
  settings: ClientSettingsSchema.parse({
20
21
  captchaType,
21
- domains: ["localhost"]
22
+ domains: ["localhost"],
23
+ imageMaxRounds: 2,
24
+ frictionlessThreshold: 0.8
22
25
  })
23
26
  });
24
27
  }
@@ -30,7 +33,7 @@ function getDefaultProviders() {
30
33
  );
31
34
  return [
32
35
  {
33
- url: "http://localhost:9229",
36
+ url: "https://localhost:9229",
34
37
  pair,
35
38
  address: pair.address,
36
39
  datasetFile: "./dev/data/captchas.json",
@@ -1 +1 @@
1
- {"version":3,"file":"testAccounts.js","sourceRoot":"","sources":["../../src/accounts/testAccounts.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EACX,oBAAoB,GAGpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,kBAAkB;IACjC,MAAM,YAAY,GAAG;QACpB,WAAW,CAAC,KAAK;QACjB,WAAW,CAAC,GAAG;QACf,WAAW,CAAC,YAAY;KACxB,CAAC;IACF,MAAM,KAAK,GAAY,EAAE,CAAC;IAC1B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,GAAG,UAAU,KAAK,WAAW,EAAE,CAAC;QAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAC7B,KAAK,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,oBAAoB,CAAC,KAAK,CAAC;gBACpC,WAAW,EAAE,WAAW;gBACxB,OAAO,EAAE,CAAC,WAAW,CAAC;aACtB,CAAC;SACF,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,MAAM,UAAU,mBAAmB;IAClC,MAAM,IAAI,GAAG,OAAO,CACnB,oFAAoF,CACpF,CAAC;IACF,OAAO;QACN;YACC,GAAG,EAAE,uBAAuB;YAC5B,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,0BAA0B;YACvC,gBAAgB,EACf,oEAAoE;SACrE;KACD,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"testAccounts.js","sourceRoot":"","sources":["../../src/accounts/testAccounts.ts"],"names":[],"mappings":"AAcA,OAAO,EACN,WAAW,EACX,oBAAoB,GAGpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC,MAAM,UAAU,kBAAkB;IACjC,MAAM,YAAY,GAAG;QACpB,WAAW,CAAC,KAAK;QACjB,WAAW,CAAC,GAAG;QACf,WAAW,CAAC,YAAY;QACxB,WAAW,CAAC,MAAM;KAClB,CAAC;IACF,MAAM,KAAK,GAAY,EAAE,CAAC;IAC1B,KAAK,MAAM,WAAW,IAAI,YAAY,EAAE,CAAC;QACxC,MAAM,MAAM,GAAG,GAAG,UAAU,KAAK,WAAW,EAAE,CAAC;QAC/C,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;QAG7B,KAAK,CAAC,IAAI,CAAC;YACV,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,MAAM,EAAE,MAAM;YACd,QAAQ,EAAE,oBAAoB,CAAC,KAAK,CAAC;gBACpC,WAAW,EAAE,WAAW;gBACxB,OAAO,EAAE,CAAC,WAAW,CAAC;gBACtB,cAAc,EAAE,CAAC;gBACjB,qBAAqB,EAAE,GAAG;aAC1B,CAAC;SACF,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,KAAK,CAAC;AACd,CAAC;AAED,MAAM,UAAU,mBAAmB;IAClC,MAAM,IAAI,GAAG,OAAO,CACnB,oFAAoF,CACpF,CAAC;IACF,OAAO;QACN;YACC,GAAG,EAAE,wBAAwB;YAC7B,IAAI,EAAE,IAAI;YACV,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,WAAW,EAAE,0BAA0B;YACvC,gBAAgB,EACf,oEAAoE;SACrE;KACD,CAAC;AACH,CAAC"}
@@ -8,7 +8,8 @@ function getDefaultSiteKeys() {
8
8
  const captchaTypes = [
9
9
  types.CaptchaType.image,
10
10
  types.CaptchaType.pow,
11
- types.CaptchaType.frictionless
11
+ types.CaptchaType.frictionless,
12
+ types.CaptchaType.puzzle
12
13
  ];
13
14
  const sites = [];
14
15
  for (const captchaType of captchaTypes) {
@@ -20,7 +21,9 @@ function getDefaultSiteKeys() {
20
21
  secret,
21
22
  settings: types.ClientSettingsSchema.parse({
22
23
  captchaType,
23
- domains: ["localhost"]
24
+ domains: ["localhost"],
25
+ imageMaxRounds: 2,
26
+ frictionlessThreshold: 0.8
24
27
  })
25
28
  });
26
29
  }
@@ -32,7 +35,7 @@ function getDefaultProviders() {
32
35
  );
33
36
  return [
34
37
  {
35
- url: "http://localhost:9229",
38
+ url: "https://localhost:9229",
36
39
  pair,
37
40
  address: pair.address,
38
41
  datasetFile: "./dev/data/captchas.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prosopo/keyring",
3
- "version": "2.9.0",
3
+ "version": "2.9.35",
4
4
  "description": "Keypair generator for Prosopo",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -27,7 +27,8 @@
27
27
  },
28
28
  "repository": {
29
29
  "type": "git",
30
- "url": "git+ssh://git@github.com/prosopo/types.git"
30
+ "url": "git+https://github.com/prosopo/captcha.git",
31
+ "directory": "packages/keyring"
31
32
  },
32
33
  "author": "Prosopo Limited",
33
34
  "license": "Apache-2.0",
@@ -38,14 +39,14 @@
38
39
  "dependencies": {
39
40
  "@polkadot/util": "13.5.7",
40
41
  "@polkadot/util-crypto": "13.5.7",
41
- "@prosopo/common": "3.1.28",
42
- "@prosopo/types": "3.8.0",
43
- "@prosopo/util": "3.2.5",
42
+ "@prosopo/common": "3.1.38",
43
+ "@prosopo/types": "4.3.1",
44
+ "@prosopo/util": "3.2.15",
44
45
  "@prosopo/util-crypto": "13.5.29",
45
46
  "dotenv": "16.4.5"
46
47
  },
47
48
  "devDependencies": {
48
- "@prosopo/config": "3.3.0",
49
+ "@prosopo/config": "3.3.1",
49
50
  "@types/node": "22.10.2",
50
51
  "@vitest/coverage-v8": "3.2.4",
51
52
  "concurrently": "9.0.1",
@@ -0,0 +1,63 @@
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import { hexToU8a } from "@polkadot/util/hex";
16
+ import { isHex } from "@polkadot/util/is";
17
+ import { ProsopoEnvError } from "@prosopo/common";
18
+ import type { PolkadotSecretJSON } from "@prosopo/types";
19
+ import type { KeyringPair, KeyringPair$Json } from "@prosopo/types";
20
+ import { mnemonicValidate } from "@prosopo/util-crypto";
21
+ import type { KeypairType } from "@prosopo/util-crypto";
22
+ import { Keyring } from "../keyring/keyring.js";
23
+
24
+ export function getPair(
25
+ secret?: string | KeyringPair$Json | PolkadotSecretJSON,
26
+ account?: string | Uint8Array,
27
+ pairType?: KeypairType,
28
+ ss58Format?: number,
29
+ ): KeyringPair {
30
+ pairType = pairType || "sr25519";
31
+ ss58Format = ss58Format || 42;
32
+ const keyring = new Keyring({ type: pairType, ss58Format });
33
+ if (!secret && account) {
34
+ return keyring.addFromAddress(account);
35
+ }
36
+ if (secret && typeof secret === "string") {
37
+ if (mnemonicValidate(secret)) {
38
+ return keyring.addFromMnemonic(secret);
39
+ }
40
+ if (isHex(secret)) {
41
+ return keyring.addFromSeed(hexToU8a(secret));
42
+ }
43
+ if (secret.includes("//")) {
44
+ return keyring.addFromUri(secret);
45
+ }
46
+ try {
47
+ const json = JSON.parse(secret);
48
+ const {
49
+ encoding: { content },
50
+ } = json;
51
+ const keyring = new Keyring({ type: content[1], ss58Format });
52
+ return keyring.addFromJson(json as KeyringPair$Json);
53
+ } catch (e) {
54
+ throw new ProsopoEnvError("GENERAL.MISSING_SECRET_KEY", {
55
+ context: { error: e },
56
+ });
57
+ }
58
+ } else if (typeof secret === "object") {
59
+ return keyring.addFromJson(secret as KeyringPair$Json);
60
+ } else {
61
+ throw new ProsopoEnvError("GENERAL.MISSING_SECRET_KEY");
62
+ }
63
+ }
@@ -0,0 +1,16 @@
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+ export * from "./mnemonic.js";
15
+ export * from "./getPair.js";
16
+ export * from "./testAccounts.js";
@@ -0,0 +1,45 @@
1
+ // Copyright 2021-2026 Prosopo (UK) Ltd.
2
+ //
3
+ // Licensed under the Apache License, Version 2.0 (the "License");
4
+ // you may not use this file except in compliance with the License.
5
+ // You may obtain a copy of the License at
6
+ //
7
+ // http://www.apache.org/licenses/LICENSE-2.0
8
+ //
9
+ // Unless required by applicable law or agreed to in writing, software
10
+ // distributed under the License is distributed on an "AS IS" BASIS,
11
+ // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ // See the License for the specific language governing permissions and
13
+ // limitations under the License.
14
+
15
+ import { mnemonicGenerate, mnemonicToMiniSecret } from "@prosopo/util-crypto";
16
+ import type { KeypairType } from "@prosopo/util-crypto";
17
+ import { Keyring } from "../keyring/keyring.js";
18
+
19
+ /** Generate a mnemonic, returning the mnemonic and associated address
20
+ * @param keyring
21
+ * @param pairType
22
+ */
23
+ export async function generateMnemonic(
24
+ keyring?: Keyring,
25
+ pairType?: KeypairType,
26
+ ): Promise<[string, string]> {
27
+ if (!keyring) {
28
+ keyring = new Keyring({ type: pairType || "sr25519" });
29
+ }
30
+ const mnemonic = mnemonicGenerate();
31
+ const account = keyring.addFromMnemonic(mnemonic);
32
+ return [mnemonic, account.address];
33
+ }
34
+
35
+ /** Generate a secret, returning the secret and associated address
36
+ * @param keyring
37
+ * @param pairType
38
+ */
39
+ export async function generateMiniSecret(
40
+ keyring?: Keyring,
41
+ pairType?: KeypairType,
42
+ ): Promise<[Uint8Array, string]> {
43
+ const [mnemonic, address] = await generateMnemonic(keyring, pairType);
44
+ return [mnemonicToMiniSecret(mnemonic), address];
45
+ }