@prosopo/types 0.3.2 → 0.3.4

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 (66) hide show
  1. package/dist/api/api.d.ts +16 -0
  2. package/dist/api/api.d.ts.map +1 -0
  3. package/dist/api/api.js +2 -0
  4. package/dist/api/api.js.map +1 -0
  5. package/dist/api/index.d.ts +2 -0
  6. package/dist/api/index.d.ts.map +1 -0
  7. package/dist/api/index.js +2 -0
  8. package/dist/api/index.js.map +1 -0
  9. package/dist/cjs/api/api.cjs +1 -0
  10. package/dist/cjs/api/index.cjs +2 -0
  11. package/dist/cjs/contract/index.cjs +1 -0
  12. package/dist/cjs/contract/interface.cjs +1 -0
  13. package/dist/cjs/index.cjs +3 -0
  14. package/dist/cjs/procaptcha/client.cjs +1 -0
  15. package/dist/cjs/procaptcha/index.cjs +3 -0
  16. package/dist/cjs/procaptcha/manager.cjs +2 -1
  17. package/dist/cjs/procaptcha/props.cjs +1 -0
  18. package/dist/cjs/procaptcha/utils.cjs +1 -0
  19. package/dist/cjs/provider/api.cjs +48 -1
  20. package/dist/cjs/provider/index.cjs +2 -0
  21. package/dist/config/config.d.ts +83 -83
  22. package/dist/config/network.d.ts +17 -17
  23. package/dist/contract/artifacts.d.ts +10 -10
  24. package/dist/contract/index.d.ts +1 -0
  25. package/dist/contract/index.d.ts.map +1 -1
  26. package/dist/contract/index.js +1 -0
  27. package/dist/contract/index.js.map +1 -1
  28. package/dist/contract/interface.d.ts +28 -0
  29. package/dist/contract/interface.d.ts.map +1 -0
  30. package/dist/contract/interface.js +2 -0
  31. package/dist/contract/interface.js.map +1 -0
  32. package/dist/datasets/captcha.d.ts +97 -95
  33. package/dist/datasets/captcha.d.ts.map +1 -1
  34. package/dist/datasets/captcha.js.map +1 -1
  35. package/dist/datasets/dataset.d.ts +48 -48
  36. package/dist/index.d.ts +1 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +1 -0
  39. package/dist/index.js.map +1 -1
  40. package/dist/procaptcha/api.d.ts +17 -33
  41. package/dist/procaptcha/api.d.ts.map +1 -1
  42. package/dist/procaptcha/client.d.ts +4 -0
  43. package/dist/procaptcha/client.d.ts.map +1 -0
  44. package/dist/procaptcha/client.js +2 -0
  45. package/dist/procaptcha/client.js.map +1 -0
  46. package/dist/procaptcha/index.d.ts +3 -0
  47. package/dist/procaptcha/index.d.ts.map +1 -1
  48. package/dist/procaptcha/index.js +3 -0
  49. package/dist/procaptcha/index.js.map +1 -1
  50. package/dist/procaptcha/manager.d.ts +31 -1
  51. package/dist/procaptcha/manager.d.ts.map +1 -1
  52. package/dist/procaptcha/manager.js +1 -0
  53. package/dist/procaptcha/manager.js.map +1 -1
  54. package/dist/procaptcha/props.d.ts +7 -0
  55. package/dist/procaptcha/props.d.ts.map +1 -0
  56. package/dist/procaptcha/props.js +2 -0
  57. package/dist/procaptcha/props.js.map +1 -0
  58. package/dist/procaptcha/utils.d.ts +2 -0
  59. package/dist/procaptcha/utils.d.ts.map +1 -0
  60. package/dist/procaptcha/utils.js +2 -0
  61. package/dist/procaptcha/utils.js.map +1 -0
  62. package/dist/provider/api.d.ts +64 -3
  63. package/dist/provider/api.d.ts.map +1 -1
  64. package/dist/provider/api.js +19 -1
  65. package/dist/provider/api.js.map +1 -1
  66. package/package.json +3 -3
@@ -1 +1 @@
1
- {"version":3,"file":"captcha.js","sourceRoot":"","sources":["../../src/datasets/captcha.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAmB,MAAM,KAAK,CAAA;AAGlG,MAAM,CAAN,IAAY,YAEX;AAFD,WAAY,YAAY;IACpB,uCAAuB,CAAA;AAC3B,CAAC,EAFW,YAAY,KAAZ,YAAY,QAEvB;AACD,MAAM,CAAN,IAAY,gBAGX;AAHD,WAAY,gBAAgB;IACxB,iCAAa,CAAA;IACb,mCAAe,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AM,cAAc,GAAG,KAAK,CAAC,yBAAyB,CAAC,CAAA;AAC9D,MAAM,CAAC,MAAM,iCAAiC,GAAG,KAAK,CAAC,yCAAyC,CAAC,CAAA;AAEjG,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;IACxC,SAAS,EAAE,MAAM,EAAE;IACnB,gBAAgB,EAAE,MAAM,EAAE;IAC1B,QAAQ,EAAE,MAAM,EAAE,CAAC,KAAK,EAAE;IAC1B,IAAI,EAAE,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC;CACzB,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,qBAAqB,CAAC,CAAA;AAEtE,MAAM,CAAC,MAAM,UAAU,GAAG,MAAM,CAAC;IAC7B,KAAK,EAAE,KAAK,CAAC,6BAA6B,CAAC;CAC9C,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;IACrC,KAAK,EAAE,KAAK,CAAC,kBAAkB,CAAC;CACnC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,MAAM,CAAC;IAC1C,QAAQ,EAAE,cAAc;IACxB,MAAM,EAAE,UAAU,CAAC,YAAY,CAAC;CACnC,CAAC,CAAA;AAEF,MAAM,CAAC,MAAM,qBAAqB,GAAG,MAAM,CAAC;IACxC,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;CAC1B,CAAC,CAAA"}
@@ -39,20 +39,20 @@ export declare const DatasetSchema: import("zod").ZodObject<{
39
39
  data: import("zod").ZodString;
40
40
  type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
41
41
  }, "strip", import("zod").ZodTypeAny, {
42
- type: import("./captcha.js").CaptchaItemTypes;
43
- data: string;
44
42
  hash: string;
45
- }, {
46
- type: import("./captcha.js").CaptchaItemTypes;
47
43
  data: string;
44
+ type: import("./captcha.js").CaptchaItemTypes;
45
+ }, {
48
46
  hash: string;
47
+ data: string;
48
+ type: import("./captcha.js").CaptchaItemTypes;
49
49
  }>, "many">;
50
50
  target: import("zod").ZodString;
51
51
  }, "strip", import("zod").ZodTypeAny, {
52
52
  items: {
53
- type: import("./captcha.js").CaptchaItemTypes;
54
- data: string;
55
53
  hash: string;
54
+ data: string;
55
+ type: import("./captcha.js").CaptchaItemTypes;
56
56
  }[];
57
57
  salt: string;
58
58
  target: string;
@@ -63,9 +63,9 @@ export declare const DatasetSchema: import("zod").ZodObject<{
63
63
  timeLimit?: number | undefined;
64
64
  }, {
65
65
  items: {
66
- type: import("./captcha.js").CaptchaItemTypes;
67
- data: string;
68
66
  hash: string;
67
+ data: string;
68
+ type: import("./captcha.js").CaptchaItemTypes;
69
69
  }[];
70
70
  salt: string;
71
71
  target: string;
@@ -82,9 +82,9 @@ export declare const DatasetSchema: import("zod").ZodObject<{
82
82
  }, "strip", import("zod").ZodTypeAny, {
83
83
  captchas: {
84
84
  items: {
85
- type: import("./captcha.js").CaptchaItemTypes;
86
- data: string;
87
85
  hash: string;
86
+ data: string;
87
+ type: import("./captcha.js").CaptchaItemTypes;
88
88
  }[];
89
89
  salt: string;
90
90
  target: string;
@@ -103,9 +103,9 @@ export declare const DatasetSchema: import("zod").ZodObject<{
103
103
  }, {
104
104
  captchas: {
105
105
  items: {
106
- type: import("./captcha.js").CaptchaItemTypes;
107
- data: string;
108
106
  hash: string;
107
+ data: string;
108
+ type: import("./captcha.js").CaptchaItemTypes;
109
109
  }[];
110
110
  salt: string;
111
111
  target: string;
@@ -135,13 +135,13 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<{
135
135
  data: import("zod").ZodString;
136
136
  type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
137
137
  }, "strip", import("zod").ZodTypeAny, {
138
- type: import("./captcha.js").CaptchaItemTypes;
139
- data: string;
140
138
  hash: string;
141
- }, {
142
- type: import("./captcha.js").CaptchaItemTypes;
143
139
  data: string;
140
+ type: import("./captcha.js").CaptchaItemTypes;
141
+ }, {
144
142
  hash: string;
143
+ data: string;
144
+ type: import("./captcha.js").CaptchaItemTypes;
145
145
  }>, "many">;
146
146
  captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
147
147
  captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
@@ -152,9 +152,9 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<{
152
152
  unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodNumber, "many">>;
153
153
  }, "strip", import("zod").ZodTypeAny, {
154
154
  items: {
155
- type: import("./captcha.js").CaptchaItemTypes;
156
- data: string;
157
155
  hash: string;
156
+ data: string;
157
+ type: import("./captcha.js").CaptchaItemTypes;
158
158
  }[];
159
159
  salt: string;
160
160
  target: string;
@@ -165,9 +165,9 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<{
165
165
  unlabelled?: number[] | undefined;
166
166
  }, {
167
167
  items: {
168
- type: import("./captcha.js").CaptchaItemTypes;
169
- data: string;
170
168
  hash: string;
169
+ data: string;
170
+ type: import("./captcha.js").CaptchaItemTypes;
171
171
  }[];
172
172
  salt: string;
173
173
  target: string;
@@ -180,9 +180,9 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<{
180
180
  }, "strip", import("zod").ZodTypeAny, {
181
181
  captchas: {
182
182
  items: {
183
- type: import("./captcha.js").CaptchaItemTypes;
184
- data: string;
185
183
  hash: string;
184
+ data: string;
185
+ type: import("./captcha.js").CaptchaItemTypes;
186
186
  }[];
187
187
  salt: string;
188
188
  target: string;
@@ -201,9 +201,9 @@ export declare const DatasetWithNumericSolutionSchema: import("zod").ZodObject<{
201
201
  }, {
202
202
  captchas: {
203
203
  items: {
204
- type: import("./captcha.js").CaptchaItemTypes;
205
- data: string;
206
204
  hash: string;
205
+ data: string;
206
+ type: import("./captcha.js").CaptchaItemTypes;
207
207
  }[];
208
208
  salt: string;
209
209
  target: string;
@@ -229,13 +229,13 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
229
229
  data: import("zod").ZodString;
230
230
  type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
231
231
  }, "strip", import("zod").ZodTypeAny, {
232
- type: import("./captcha.js").CaptchaItemTypes;
233
- data: string;
234
232
  hash: string;
235
- }, {
236
- type: import("./captcha.js").CaptchaItemTypes;
237
233
  data: string;
234
+ type: import("./captcha.js").CaptchaItemTypes;
235
+ }, {
238
236
  hash: string;
237
+ data: string;
238
+ type: import("./captcha.js").CaptchaItemTypes;
239
239
  }>, "many">;
240
240
  captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
241
241
  captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
@@ -246,9 +246,9 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
246
246
  unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
247
247
  }, "strip", import("zod").ZodTypeAny, {
248
248
  items: {
249
- type: import("./captcha.js").CaptchaItemTypes;
250
- data: string;
251
249
  hash: string;
250
+ data: string;
251
+ type: import("./captcha.js").CaptchaItemTypes;
252
252
  }[];
253
253
  salt: string;
254
254
  target: string;
@@ -259,9 +259,9 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
259
259
  unlabelled?: string[] | undefined;
260
260
  }, {
261
261
  items: {
262
- type: import("./captcha.js").CaptchaItemTypes;
263
- data: string;
264
262
  hash: string;
263
+ data: string;
264
+ type: import("./captcha.js").CaptchaItemTypes;
265
265
  }[];
266
266
  salt: string;
267
267
  target: string;
@@ -277,9 +277,9 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
277
277
  }, "strip", import("zod").ZodTypeAny, {
278
278
  captchas: {
279
279
  items: {
280
- type: import("./captcha.js").CaptchaItemTypes;
281
- data: string;
282
280
  hash: string;
281
+ data: string;
282
+ type: import("./captcha.js").CaptchaItemTypes;
283
283
  }[];
284
284
  salt: string;
285
285
  target: string;
@@ -297,9 +297,9 @@ export declare const DatasetWithIdsSchema: import("zod").ZodObject<{
297
297
  }, {
298
298
  captchas: {
299
299
  items: {
300
- type: import("./captcha.js").CaptchaItemTypes;
301
- data: string;
302
300
  hash: string;
301
+ data: string;
302
+ type: import("./captcha.js").CaptchaItemTypes;
303
303
  }[];
304
304
  salt: string;
305
305
  target: string;
@@ -322,13 +322,13 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<{
322
322
  data: import("zod").ZodString;
323
323
  type: import("zod").ZodNativeEnum<typeof import("./captcha.js").CaptchaItemTypes>;
324
324
  }, "strip", import("zod").ZodTypeAny, {
325
- type: import("./captcha.js").CaptchaItemTypes;
326
- data: string;
327
325
  hash: string;
328
- }, {
329
- type: import("./captcha.js").CaptchaItemTypes;
330
326
  data: string;
327
+ type: import("./captcha.js").CaptchaItemTypes;
328
+ }, {
331
329
  hash: string;
330
+ data: string;
331
+ type: import("./captcha.js").CaptchaItemTypes;
332
332
  }>, "many">;
333
333
  captchaId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
334
334
  captchaContentId: import("zod").ZodUnion<[import("zod").ZodString, import("zod").ZodUndefined]>;
@@ -339,9 +339,9 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<{
339
339
  unlabelled: import("zod").ZodOptional<import("zod").ZodArray<import("zod").ZodString, "many">>;
340
340
  }, "strip", import("zod").ZodTypeAny, {
341
341
  items: {
342
- type: import("./captcha.js").CaptchaItemTypes;
343
- data: string;
344
342
  hash: string;
343
+ data: string;
344
+ type: import("./captcha.js").CaptchaItemTypes;
345
345
  }[];
346
346
  salt: string;
347
347
  target: string;
@@ -352,9 +352,9 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<{
352
352
  unlabelled?: string[] | undefined;
353
353
  }, {
354
354
  items: {
355
- type: import("./captcha.js").CaptchaItemTypes;
356
- data: string;
357
355
  hash: string;
356
+ data: string;
357
+ type: import("./captcha.js").CaptchaItemTypes;
358
358
  }[];
359
359
  salt: string;
360
360
  target: string;
@@ -372,9 +372,9 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<{
372
372
  }, "strip", import("zod").ZodTypeAny, {
373
373
  captchas: {
374
374
  items: {
375
- type: import("./captcha.js").CaptchaItemTypes;
376
- data: string;
377
375
  hash: string;
376
+ data: string;
377
+ type: import("./captcha.js").CaptchaItemTypes;
378
378
  }[];
379
379
  salt: string;
380
380
  target: string;
@@ -392,9 +392,9 @@ export declare const DatasetWithIdsAndTreeSchema: import("zod").ZodObject<{
392
392
  }, {
393
393
  captchas: {
394
394
  items: {
395
- type: import("./captcha.js").CaptchaItemTypes;
396
- data: string;
397
395
  hash: string;
396
+ data: string;
397
+ type: import("./captcha.js").CaptchaItemTypes;
398
398
  }[];
399
399
  salt: string;
400
400
  target: string;
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './api/index.js';
1
2
  export * from './config/index.js';
2
3
  export * from './contract/index.js';
3
4
  export * from './datasets/index.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACzD,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACzD,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,2CAA2C,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './api/index.js';
1
2
  export * from './config/index.js';
2
3
  export * from './contract/index.js';
3
4
  export * from './datasets/index.js';
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,mBAAmB,CAAA;AACjC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,qBAAqB,CAAA;AACnC,cAAc,uBAAuB,CAAA;AACrC,cAAc,8BAA8B,CAAA;AAC5C,OAAO,EAAE,OAAO,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA"}
@@ -1,35 +1,19 @@
1
- import { Captcha, MerkleProof } from '../index.js';
2
- export interface ProsopoRandomProviderResponse {
3
- providerId: string;
4
- blockNumber: string;
5
- provider: ProposoProvider;
6
- }
7
- export type ProsopoDappOperatorIsHumanUserResponse = boolean;
8
- export interface ProposoProvider {
9
- balance: string;
10
- datasetId: string;
11
- datasetIdContent: string;
12
- fee: string;
13
- payee: string;
14
- serviceOrigin: string;
15
- status: string;
16
- }
17
- export interface CaptchaResponseCaptcha {
18
- captcha: Omit<Captcha, 'solution'>;
19
- proof: MerkleProof;
20
- }
21
- export interface GetCaptchaResponse {
22
- captchas: CaptchaResponseCaptcha[];
23
- requestHash: string;
24
- }
25
- export interface GetVerificationResponse {
26
- status: string;
27
- solutionApproved: boolean;
28
- }
29
- export interface CaptchaSolutionResponse {
30
- captchas: CaptchaResponseCaptcha[];
31
- status: string;
32
- partialFee: string;
33
- solutionApproved: boolean;
1
+ import { CaptchaResponseBody } from '../provider/index.js';
2
+ import { CaptchaSolution } from '../datasets/index.js';
3
+ import { IProsopoCaptchaContract } from '../contract/interface.js';
4
+ import { ProviderApiInterface } from '../api/index.js';
5
+ import { RandomProvider } from '@prosopo/captcha-contract/types-returns';
6
+ import { Signer } from '@polkadot/api/types';
7
+ import { TCaptchaSubmitResult } from './client.js';
8
+ export interface ProsopoCaptchaApiInterface {
9
+ userAccount: string;
10
+ contract: IProsopoCaptchaContract;
11
+ provider: RandomProvider;
12
+ providerApi: ProviderApiInterface;
13
+ dappAccount: string;
14
+ web2: boolean;
15
+ getCaptchaChallenge(): Promise<CaptchaResponseBody>;
16
+ verifyCaptchaChallengeContent(provider: RandomProvider, captchaChallenge: CaptchaResponseBody): void;
17
+ submitCaptchaSolution(signer: Signer, requestHash: string, datasetId: string, solutions: CaptchaSolution[], salt: string): Promise<TCaptchaSubmitResult>;
34
18
  }
35
19
  //# sourceMappingURL=api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/procaptcha/api.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAElD,MAAM,WAAW,6BAA6B;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,eAAe,CAAA;CAC5B;AAED,MAAM,MAAM,sCAAsC,GAAG,OAAO,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QAAQ,EAAE,uBAAuB,CAAA;IACjC,QAAQ,EAAE,cAAc,CAAA;IACxB,WAAW,EAAE,oBAAoB,CAAA;IACjC,WAAW,EAAE,MAAM,CAAA;IACnB,IAAI,EAAE,OAAO,CAAA;IACb,mBAAmB,IAAI,OAAO,CAAC,mBAAmB,CAAC,CAAA;IACnD,6BAA6B,CAAC,QAAQ,EAAE,cAAc,EAAE,gBAAgB,EAAE,mBAAmB,GAAG,IAAI,CAAA;IACpG,qBAAqB,CACjB,MAAM,EAAE,MAAM,EACd,WAAW,EAAE,MAAM,EACnB,SAAS,EAAE,MAAM,EACjB,SAAS,EAAE,eAAe,EAAE,EAC5B,IAAI,EAAE,MAAM,GACb,OAAO,CAAC,oBAAoB,CAAC,CAAA;CACnC"}
@@ -0,0 +1,4 @@
1
+ import { CaptchaSolutionResponse, Hash } from '@prosopo/types';
2
+ import { ContractSubmittableResult } from '@polkadot/api-contract/base/Contract';
3
+ export type TCaptchaSubmitResult = [CaptchaSolutionResponse, Hash, ContractSubmittableResult?];
4
+ //# sourceMappingURL=client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/procaptcha/client.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,uBAAuB,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAC9D,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAEhF,MAAM,MAAM,oBAAoB,GAAG,CAAC,uBAAuB,EAAE,IAAI,EAAE,yBAAyB,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/procaptcha/client.ts"],"names":[],"mappings":""}
@@ -1,4 +1,7 @@
1
1
  export * from './api.js';
2
+ export * from './client.js';
2
3
  export * from './collector.js';
3
4
  export * from './manager.js';
5
+ export * from './props.js';
6
+ export * from './utils.js';
4
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procaptcha/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/procaptcha/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
@@ -1,4 +1,7 @@
1
1
  export * from './api.js';
2
+ export * from './client.js';
2
3
  export * from './collector.js';
3
4
  export * from './manager.js';
5
+ export * from './props.js';
6
+ export * from './utils.js';
4
7
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/procaptcha/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AACxB,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/procaptcha/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AACxB,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,cAAc,CAAA;AAC5B,cAAc,YAAY,CAAA;AAC1B,cAAc,YAAY,CAAA"}
@@ -1,8 +1,13 @@
1
+ /// <reference types="node" resolution-mode="require"/>
2
+ /// <reference types="node" resolution-mode="require"/>
3
+ import { CaptchaResponseBody } from '../provider/index.js';
1
4
  import { InjectedAccount, InjectedExtension } from '@polkadot/extension-inject/types';
5
+ import { ProsopoCaptchaApiInterface } from './api.js';
6
+ import { TCaptchaSubmitResult } from './client.js';
2
7
  import { infer as zInfer } from 'zod';
3
8
  export interface Account {
4
9
  account: InjectedAccount;
5
- extension: InjectedExtension;
10
+ extension?: InjectedExtension;
6
11
  }
7
12
  export declare const ProcaptchaOutputSchema: import("zod").ZodObject<{
8
13
  commitmentId: import("zod").ZodOptional<import("zod").ZodString>;
@@ -10,18 +15,21 @@ export declare const ProcaptchaOutputSchema: import("zod").ZodObject<{
10
15
  dapp: import("zod").ZodString;
11
16
  user: import("zod").ZodString;
12
17
  blockNumber: import("zod").ZodOptional<import("zod").ZodNumber>;
18
+ challenge: import("zod").ZodOptional<import("zod").ZodString>;
13
19
  }, "strip", import("zod").ZodTypeAny, {
14
20
  user: string;
15
21
  dapp: string;
16
22
  commitmentId?: string | undefined;
17
23
  providerUrl?: string | undefined;
18
24
  blockNumber?: number | undefined;
25
+ challenge?: string | undefined;
19
26
  }, {
20
27
  user: string;
21
28
  dapp: string;
22
29
  commitmentId?: string | undefined;
23
30
  providerUrl?: string | undefined;
24
31
  blockNumber?: number | undefined;
32
+ challenge?: string | undefined;
25
33
  }>;
26
34
  export type ProcaptchaOutput = zInfer<typeof ProcaptchaOutputSchema>;
27
35
  export declare const ProcaptchaResponse: import("zod").ZodObject<{
@@ -31,18 +39,21 @@ export declare const ProcaptchaResponse: import("zod").ZodObject<{
31
39
  dapp: import("zod").ZodString;
32
40
  user: import("zod").ZodString;
33
41
  blockNumber: import("zod").ZodOptional<import("zod").ZodNumber>;
42
+ challenge: import("zod").ZodOptional<import("zod").ZodString>;
34
43
  }, "strip", import("zod").ZodTypeAny, {
35
44
  user: string;
36
45
  dapp: string;
37
46
  commitmentId?: string | undefined;
38
47
  providerUrl?: string | undefined;
39
48
  blockNumber?: number | undefined;
49
+ challenge?: string | undefined;
40
50
  }, {
41
51
  user: string;
42
52
  dapp: string;
43
53
  commitmentId?: string | undefined;
44
54
  providerUrl?: string | undefined;
45
55
  blockNumber?: number | undefined;
56
+ challenge?: string | undefined;
46
57
  }>;
47
58
  }, "strip", import("zod").ZodTypeAny, {
48
59
  "procaptcha-response": {
@@ -51,6 +62,7 @@ export declare const ProcaptchaResponse: import("zod").ZodObject<{
51
62
  commitmentId?: string | undefined;
52
63
  providerUrl?: string | undefined;
53
64
  blockNumber?: number | undefined;
65
+ challenge?: string | undefined;
54
66
  };
55
67
  }, {
56
68
  "procaptcha-response": {
@@ -59,6 +71,7 @@ export declare const ProcaptchaResponse: import("zod").ZodObject<{
59
71
  commitmentId?: string | undefined;
60
72
  providerUrl?: string | undefined;
61
73
  blockNumber?: number | undefined;
74
+ challenge?: string | undefined;
62
75
  };
63
76
  }>;
64
77
  export type ProcaptchaCallbacks = Partial<ProcaptchaEvents>;
@@ -72,4 +85,21 @@ export interface ProcaptchaEvents {
72
85
  onOpen: () => void;
73
86
  onClose: () => void;
74
87
  }
88
+ export interface ProcaptchaState {
89
+ isHuman: boolean;
90
+ index: number;
91
+ solutions: string[][];
92
+ captchaApi: ProsopoCaptchaApiInterface | undefined;
93
+ challenge: CaptchaResponseBody | undefined;
94
+ showModal: boolean;
95
+ loading: boolean;
96
+ account: Account | undefined;
97
+ dappAccount: string | undefined;
98
+ submission: TCaptchaSubmitResult | undefined;
99
+ timeout: NodeJS.Timeout | undefined;
100
+ successfullChallengeTimeout: NodeJS.Timeout | undefined;
101
+ blockNumber: number | undefined;
102
+ sendData: boolean;
103
+ }
104
+ export type ProcaptchaStateUpdateFn = (state: Partial<ProcaptchaState>) => void;
75
105
  //# sourceMappingURL=manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/procaptcha/manager.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,EAA0B,KAAK,IAAI,MAAM,EAAE,MAAM,KAAK,CAAA;AAK7D,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,SAAS,EAAE,iBAAiB,CAAA;CAC/B;AAED,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;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export const ProcaptchaOutputSchema = object({
6
6
  [ApiParams.dapp]: string(),
7
7
  [ApiParams.user]: string(),
8
8
  [ApiParams.blockNumber]: number().optional(),
9
+ [ApiParams.challenge]: string().optional(),
9
10
  });
10
11
  export const ProcaptchaResponse = object({
11
12
  [ApiParams.procaptchaResponse]: ProcaptchaOutputSchema,
@@ -1 +1 @@
1
- {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/procaptcha/manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAEhD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAmB,MAAM,KAAK,CAAA;AAU7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;IACzC,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7C,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;IAC1B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;IAC1B,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC/C,CAAC,CAAA;AASF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;IACrC,CAAC,SAAS,CAAC,kBAAkB,CAAC,EAAE,sBAAsB;CACzD,CAAC,CAAA"}
1
+ {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/procaptcha/manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,SAAS,EAAuB,MAAM,sBAAsB,CAAA;AAIrE,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAmB,MAAM,KAAK,CAAA;AAU7D,MAAM,CAAC,MAAM,sBAAsB,GAAG,MAAM,CAAC;IACzC,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC7C,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;IAC1B,CAAC,SAAS,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE;IAC1B,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC5C,CAAC,SAAS,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC,QAAQ,EAAE;CAC7C,CAAC,CAAA;AASF,MAAM,CAAC,MAAM,kBAAkB,GAAG,MAAM,CAAC;IACrC,CAAC,SAAS,CAAC,kBAAkB,CAAC,EAAE,sBAAsB;CACzD,CAAC,CAAA"}
@@ -0,0 +1,7 @@
1
+ import { ProcaptchaCallbacks } from './manager.js';
2
+ import { ProcaptchaClientConfigInput } from '../config/index.js';
3
+ export interface ProcaptchaProps {
4
+ config: ProcaptchaClientConfigInput;
5
+ callbacks?: Partial<ProcaptchaCallbacks>;
6
+ }
7
+ //# sourceMappingURL=props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.d.ts","sourceRoot":"","sources":["../../src/procaptcha/props.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAA;AAClD,OAAO,EAAE,2BAA2B,EAAE,MAAM,oBAAoB,CAAA;AAKhE,MAAM,WAAW,eAAe;IAE5B,MAAM,EAAE,2BAA2B,CAAA;IAEnC,SAAS,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAA;CAC3C"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=props.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"props.js","sourceRoot":"","sources":["../../src/procaptcha/props.ts"],"names":[],"mappings":""}
@@ -0,0 +1,2 @@
1
+ export type Optional<T, K extends keyof T> = Omit<T, K> & Partial<T>;
2
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/procaptcha/utils.ts"],"names":[],"mappings":"AAaA,MAAM,MAAM,QAAQ,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/procaptcha/utils.ts"],"names":[],"mappings":""}