@prosopo/procaptcha 0.1.16 → 0.1.17

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 (75) hide show
  1. package/dist/api/Extension.d.ts +1 -1
  2. package/dist/api/Extension.d.ts.map +1 -1
  3. package/dist/api/Extension.js +1 -4
  4. package/dist/api/Extension.js.map +1 -1
  5. package/dist/api/ExtensionWeb2.d.ts +2 -2
  6. package/dist/api/ExtensionWeb2.d.ts.map +1 -1
  7. package/dist/api/ExtensionWeb2.js +26 -30
  8. package/dist/api/ExtensionWeb2.js.map +1 -1
  9. package/dist/api/ExtensionWeb3.d.ts +2 -2
  10. package/dist/api/ExtensionWeb3.d.ts.map +1 -1
  11. package/dist/api/ExtensionWeb3.js +8 -12
  12. package/dist/api/ExtensionWeb3.js.map +1 -1
  13. package/dist/api/HttpClientBase.d.ts.map +1 -1
  14. package/dist/api/HttpClientBase.js +14 -21
  15. package/dist/api/HttpClientBase.js.map +1 -1
  16. package/dist/api/errors.d.ts.map +1 -1
  17. package/dist/api/errors.js +18 -13
  18. package/dist/api/errors.js.map +1 -1
  19. package/dist/api/handlers.d.ts.map +1 -1
  20. package/dist/api/handlers.js +1 -5
  21. package/dist/api/handlers.js.map +1 -1
  22. package/dist/api/index.d.ts +3 -3
  23. package/dist/api/index.d.ts.map +1 -1
  24. package/dist/api/index.js +13 -18
  25. package/dist/api/index.js.map +1 -1
  26. package/dist/api/sign.d.ts.map +1 -1
  27. package/dist/api/sign.js +20 -11
  28. package/dist/api/sign.js.map +1 -1
  29. package/dist/index.d.ts +4 -4
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +14 -19
  32. package/dist/index.js.map +1 -1
  33. package/dist/modules/Manager.d.ts +2 -2
  34. package/dist/modules/Manager.d.ts.map +1 -1
  35. package/dist/modules/Manager.js +43 -41
  36. package/dist/modules/Manager.js.map +1 -1
  37. package/dist/modules/ProsopoCaptchaApi.d.ts +2 -2
  38. package/dist/modules/ProsopoCaptchaApi.d.ts.map +1 -1
  39. package/dist/modules/ProsopoCaptchaApi.js +27 -33
  40. package/dist/modules/ProsopoCaptchaApi.js.map +1 -1
  41. package/dist/modules/canvas.d.ts.map +1 -1
  42. package/dist/modules/canvas.js +16 -7
  43. package/dist/modules/canvas.js.map +1 -1
  44. package/dist/modules/index.d.ts +2 -2
  45. package/dist/modules/index.d.ts.map +1 -1
  46. package/dist/modules/index.js +12 -17
  47. package/dist/modules/index.js.map +1 -1
  48. package/dist/modules/storage.d.ts.map +1 -1
  49. package/dist/modules/storage.js +11 -15
  50. package/dist/modules/storage.js.map +1 -1
  51. package/dist/types/api.js +1 -2
  52. package/dist/types/api.js.map +1 -1
  53. package/dist/types/client.d.ts +1 -1
  54. package/dist/types/client.d.ts.map +1 -1
  55. package/dist/types/client.js +1 -2
  56. package/dist/types/contract.d.ts.map +1 -1
  57. package/dist/types/contract.js +1 -2
  58. package/dist/types/index.d.ts +4 -4
  59. package/dist/types/index.d.ts.map +1 -1
  60. package/dist/types/index.js +14 -19
  61. package/dist/types/index.js.map +1 -1
  62. package/dist/types/manager.d.ts +5 -3
  63. package/dist/types/manager.d.ts.map +1 -1
  64. package/dist/types/manager.js +8 -2
  65. package/dist/types/manager.js.map +1 -1
  66. package/dist/types/utils.d.ts.map +1 -1
  67. package/dist/types/utils.js +1 -2
  68. package/dist/utils/index.d.ts +1 -1
  69. package/dist/utils/index.d.ts.map +1 -1
  70. package/dist/utils/index.js +14 -4
  71. package/dist/utils/index.js.map +1 -1
  72. package/dist/utils/utils.d.ts.map +1 -1
  73. package/dist/utils/utils.js +14 -5
  74. package/dist/utils/utils.js.map +1 -1
  75. package/package.json +18 -7
@@ -1,21 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- // Copyright (C) 2021-2022 Prosopo (UK) Ltd.
5
- // This file is part of procaptcha <https://github.com/prosopo/procaptcha>.
1
+ // Copyright 2021-2023 Prosopo (UK) Ltd.
6
2
  //
7
- // procaptcha is free software: you can redistribute it and/or modify
8
- // it under the terms of the GNU General Public License as published by
9
- // the Free Software Foundation, either version 3 of the License, or
10
- // (at your option) any later version.
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
11
6
  //
12
- // procaptcha is distributed in the hope that it will be useful,
13
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- // GNU General Public License for more details.
7
+ // http://www.apache.org/licenses/LICENSE-2.0
16
8
  //
17
- // You should have received a copy of the GNU General Public License
18
- // along with procaptcha. If not, see <http://www.gnu.org/licenses/>.
19
- tslib_1.__exportStar(require("./Manager"), exports);
20
- tslib_1.__exportStar(require("./ProsopoCaptchaApi"), exports);
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 './Manager.js';
15
+ export * from './ProsopoCaptchaApi.js';
21
16
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,oDAAyB;AACzB,8DAAmC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/modules/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,cAAc,cAAc,CAAA;AAC5B,cAAc,wBAAwB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/modules/storage.ts"],"names":[],"mappings":"AAmBA;;GAEG;AACH,iBAAS,UAAU,CAAC,OAAO,EAAE,MAAM,QAElC;AAED;;GAEG;AACH,iBAAS,UAAU,IAAI,MAAM,GAAG,IAAI,CAEnC;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,WAAW,EAAE,MAAM,QAE1C;AAED;;GAEG;AACH,iBAAS,cAAc,IAAI,MAAM,GAAG,IAAI,CAEvC;;;;;;;AAED,wBAKC"}
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../src/modules/storage.ts"],"names":[],"mappings":"AAiBA;;GAEG;AACH,iBAAS,UAAU,CAAC,OAAO,EAAE,MAAM,QAElC;AAED;;GAEG;AACH,iBAAS,UAAU,IAAI,MAAM,GAAG,IAAI,CAEnC;AAED;;GAEG;AACH,iBAAS,cAAc,CAAC,WAAW,EAAE,MAAM,QAE1C;AAED;;GAEG;AACH,iBAAS,cAAc,IAAI,MAAM,GAAG,IAAI,CAEvC;;;;;;;AAED,wBAKC"}
@@ -1,20 +1,16 @@
1
- "use strict";
2
- // Copyright (C) 2021-2022 Prosopo (UK) Ltd.
3
- // This file is part of procaptcha <https://github.com/prosopo/procaptcha>.
1
+ // Copyright 2021-2023 Prosopo (UK) Ltd.
4
2
  //
5
- // procaptcha is free software: you can redistribute it and/or modify
6
- // it under the terms of the GNU General Public License as published by
7
- // the Free Software Foundation, either version 3 of the License, or
8
- // (at your option) any later version.
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
9
6
  //
10
- // procaptcha is distributed in the hope that it will be useful,
11
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
12
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
- // GNU General Public License for more details.
7
+ // http://www.apache.org/licenses/LICENSE-2.0
14
8
  //
15
- // You should have received a copy of the GNU General Public License
16
- // along with procaptcha. If not, see <http://www.gnu.org/licenses/>.
17
- Object.defineProperty(exports, "__esModule", { value: true });
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.
18
14
  const CURRENT_ACCOUNT_KEY = '@prosopo/current_account';
19
15
  const PROVIDER_URL_KEY = '@prosopo/provider';
20
16
  /**
@@ -41,7 +37,7 @@ function setProviderUrl(providerUrl) {
41
37
  function getProviderUrl() {
42
38
  return localStorage.getItem(PROVIDER_URL_KEY);
43
39
  }
44
- exports.default = {
40
+ export default {
45
41
  setAccount,
46
42
  getAccount,
47
43
  setProviderUrl,
@@ -1 +1 @@
1
- {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/modules/storage.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;;AAEtE,MAAM,mBAAmB,GAAG,0BAA0B,CAAA;AACtD,MAAM,gBAAgB,GAAG,mBAAmB,CAAA;AAE5C;;GAEG;AACH,SAAS,UAAU,CAAC,OAAe;IAC/B,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;AACtD,CAAC;AAED;;GAEG;AACH,SAAS,UAAU;IACf,OAAO,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;AACpD,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,WAAmB;IACvC,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAA;AACvD,CAAC;AAED;;GAEG;AACH,SAAS,cAAc;IACnB,OAAO,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;AACjD,CAAC;AAED,kBAAe;IACX,UAAU;IACV,UAAU;IACV,cAAc;IACd,cAAc;CACjB,CAAA"}
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/modules/storage.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,MAAM,mBAAmB,GAAG,0BAA0B,CAAA;AACtD,MAAM,gBAAgB,GAAG,mBAAmB,CAAA;AAE5C;;GAEG;AACH,SAAS,UAAU,CAAC,OAAe;IAC/B,YAAY,CAAC,OAAO,CAAC,mBAAmB,EAAE,OAAO,CAAC,CAAA;AACtD,CAAC;AAED;;GAEG;AACH,SAAS,UAAU;IACf,OAAO,YAAY,CAAC,OAAO,CAAC,mBAAmB,CAAC,CAAA;AACpD,CAAC;AAED;;GAEG;AACH,SAAS,cAAc,CAAC,WAAmB;IACvC,YAAY,CAAC,OAAO,CAAC,gBAAgB,EAAE,WAAW,CAAC,CAAA;AACvD,CAAC;AAED;;GAEG;AACH,SAAS,cAAc;IACnB,OAAO,YAAY,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAA;AACjD,CAAC;AAED,eAAe;IACX,UAAU;IACV,UAAU;IACV,cAAc;IACd,cAAc;CACjB,CAAA"}
package/dist/types/api.js CHANGED
@@ -1,4 +1,3 @@
1
- "use strict";
2
1
  // Copyright (C) 2021-2022 Prosopo (UK) Ltd.
3
2
  // This file is part of procaptcha <https://github.com/prosopo/procaptcha>.
4
3
  //
@@ -18,5 +17,5 @@
18
17
  // const value: any;
19
18
  // export default value;
20
19
  // }
21
- Object.defineProperty(exports, "__esModule", { value: true });
20
+ export {};
22
21
  //# sourceMappingURL=api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,4BAA4B;AAC5B,sBAAsB;AACtB,0BAA0B;AAC1B,IAAI"}
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,4BAA4B;AAC5B,sBAAsB;AACtB,0BAA0B;AAC1B,IAAI"}
@@ -1,5 +1,5 @@
1
1
  import { CaptchaSolutionCommitmentId } from '@prosopo/api';
2
- import { CaptchaSolutionResponse } from '../types/api';
2
+ import { CaptchaSolutionResponse } from '../types/api.js';
3
3
  import { ContractSubmittableResult } from '@polkadot/api-contract/base/Contract';
4
4
  export type TCaptchaSubmitResult = [CaptchaSolutionResponse, CaptchaSolutionCommitmentId, ContractSubmittableResult?];
5
5
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAA;AACtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAEhF,MAAM,MAAM,oBAAoB,GAAG,CAAC,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,CAAC,CAAC,CAAA"}
1
+ {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/types/client.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAA;AAC1D,OAAO,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AACzD,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAA;AAEhF,MAAM,MAAM,oBAAoB,GAAG,CAAC,uBAAuB,EAAE,2BAA2B,EAAE,yBAAyB,CAAC,CAAC,CAAA"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/types/contract.ts"],"names":[],"mappings":"AAeA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
1
+ {"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/types/contract.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAA;AAEjE,MAAM,MAAM,mBAAmB,GAAG,sBAAsB,GAAG;IACvD,SAAS,CAAC,EAAE,MAAM,CAAA;CACrB,CAAA"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=contract.js.map
@@ -1,5 +1,5 @@
1
- export * from './api';
2
- export * from './contract';
3
- export * from './manager';
4
- export * from './client';
1
+ export * from './api.js';
2
+ export * from './contract.js';
3
+ export * from './manager.js';
4
+ export * from './client.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAeA,cAAc,OAAO,CAAA;AACrB,cAAc,YAAY,CAAA;AAC1B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
@@ -1,23 +1,18 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- // Copyright (C) 2021-2022 Prosopo (UK) Ltd.
5
- // This file is part of procaptcha <https://github.com/prosopo/procaptcha>.
1
+ // Copyright 2021-2023 Prosopo (UK) Ltd.
6
2
  //
7
- // procaptcha is free software: you can redistribute it and/or modify
8
- // it under the terms of the GNU General Public License as published by
9
- // the Free Software Foundation, either version 3 of the License, or
10
- // (at your option) any later version.
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
11
6
  //
12
- // procaptcha is distributed in the hope that it will be useful,
13
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
14
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
- // GNU General Public License for more details.
7
+ // http://www.apache.org/licenses/LICENSE-2.0
16
8
  //
17
- // You should have received a copy of the GNU General Public License
18
- // along with procaptcha. If not, see <http://www.gnu.org/licenses/>.
19
- tslib_1.__exportStar(require("./api"), exports);
20
- tslib_1.__exportStar(require("./contract"), exports);
21
- tslib_1.__exportStar(require("./manager"), exports);
22
- tslib_1.__exportStar(require("./client"), exports);
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 './api.js';
15
+ export * from './contract.js';
16
+ export * from './manager.js';
17
+ export * from './client.js';
23
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";;;AAAA,4CAA4C;AAC5C,2EAA2E;AAC3E,EAAE;AACF,qEAAqE;AACrE,uEAAuE;AACvE,oEAAoE;AACpE,sCAAsC;AACtC,EAAE;AACF,gEAAgE;AAChE,iEAAiE;AACjE,gEAAgE;AAChE,+CAA+C;AAC/C,EAAE;AACF,oEAAoE;AACpE,sEAAsE;AACtE,gDAAqB;AACrB,qDAA0B;AAC1B,oDAAyB;AACzB,mDAAwB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,cAAc,UAAU,CAAA;AACxB,cAAc,eAAe,CAAA;AAC7B,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA"}
@@ -1,9 +1,9 @@
1
- /// <reference types="node" />
1
+ /// <reference types="node" resolution-mode="require"/>
2
2
  import { GetCaptchaResponse } from '@prosopo/api';
3
3
  import { InjectedAccount, InjectedExtension } from '@polkadot/extension-inject/types';
4
4
  import { ProcaptchaClientConfig, ProcaptchaOutput } from '@prosopo/types';
5
- import { ProsopoCaptchaApi } from '../modules/ProsopoCaptchaApi';
6
- import { TCaptchaSubmitResult } from './client';
5
+ import { ProsopoCaptchaApi } from '../modules/ProsopoCaptchaApi.js';
6
+ import { TCaptchaSubmitResult } from './client.js';
7
7
  /**
8
8
  * House the account and associated extension.
9
9
  */
@@ -57,4 +57,6 @@ export interface ProcaptchaEvents {
57
57
  onExpired: () => void;
58
58
  onFailed: () => void;
59
59
  }
60
+ export type TProcaptchaEventNames = keyof ProcaptchaEvents;
61
+ export declare const ProcapchaEventNames: TProcaptchaEventNames[];
60
62
  //# sourceMappingURL=manager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"manager.d.ts","sourceRoot":"","sources":["../../src/types/manager.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAA;AACjD,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,kCAAkC,CAAA;AACrF,OAAO,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACzE,OAAO,EAAE,iBAAiB,EAAE,MAAM,8BAA8B,CAAA;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAC/C;;GAEG;AACH,MAAM,WAAW,OAAO;IACpB,OAAO,EAAE,eAAe,CAAA;IACxB,SAAS,EAAE,iBAAiB,CAAA;CAC/B;AAED;;;GAGG;AACH,MAAM,MAAM,wBAAwB,GAAG,sBAAsB,CAAA;AAE7D;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,MAAM,CAAA;IACb,SAAS,EAAE,MAAM,EAAE,EAAE,CAAA;IACrB,UAAU,EAAE,iBAAiB,GAAG,SAAS,CAAA;IACzC,SAAS,EAAE,kBAAkB,GAAG,SAAS,CAAA;IACzC,SAAS,EAAE,OAAO,CAAA;IAClB,OAAO,EAAE,OAAO,CAAA;IAChB,OAAO,EAAE,OAAO,GAAG,SAAS,CAAA;IAC5B,WAAW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", { value: true });
1
+ export const ProcapchaEventNames = [
2
+ 'onError',
3
+ 'onAccountNotFound',
4
+ 'onHuman',
5
+ 'onExtensionNotFound',
6
+ 'onExpired',
7
+ 'onFailed',
8
+ ];
3
9
  //# sourceMappingURL=manager.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/types/manager.ts"],"names":[],"mappings":""}
1
+ {"version":3,"file":"manager.js","sourceRoot":"","sources":["../../src/types/manager.ts"],"names":[],"mappings":"AA+EA,MAAM,CAAC,MAAM,mBAAmB,GAA4B;IACxD,SAAS;IACT,mBAAmB;IACnB,SAAS;IACT,qBAAqB;IACrB,WAAW;IACX,UAAU;CACb,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/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"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/types/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"}
@@ -1,3 +1,2 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ export {};
3
2
  //# sourceMappingURL=utils.js.map
@@ -1,2 +1,2 @@
1
- export * from './utils';
1
+ export * from './utils.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAA"}
@@ -1,5 +1,15 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./utils"), exports);
1
+ // Copyright 2021-2023 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 './utils.js';
5
15
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":";;;AAAA,kDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,cAAc,YAAY,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,KAAK,+BAEjB,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,KAAK,+BAEjB,CAAA"}
@@ -1,8 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sleep = void 0;
4
- const sleep = (ms) => {
1
+ // Copyright 2021-2023 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 const sleep = (ms) => {
5
15
  return new Promise((resolve) => setTimeout(resolve, ms));
6
16
  };
7
- exports.sleep = sleep;
8
17
  //# sourceMappingURL=utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":";;;AAAO,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;AAC5D,CAAC,CAAA;AAFY,QAAA,KAAK,SAEjB"}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAAA,wCAAwC;AACxC,EAAE;AACF,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,iDAAiD;AACjD,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AACjC,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,EAAE,EAAE,EAAE;IACxB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAA;AAC5D,CAAC,CAAA"}
package/package.json CHANGED
@@ -1,16 +1,27 @@
1
1
  {
2
2
  "name": "@prosopo/procaptcha",
3
- "version": "0.1.16",
3
+ "version": "0.1.17",
4
4
  "author": "PROSOPO LIMITED <info@prosopo.io>",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
7
+ "type": "module",
7
8
  "types": "./dist/index.d.ts",
8
9
  "scripts": {
9
10
  "test": "NODE_ENV=test ts-mocha \"tests/**/*.test.ts\" && exit 0",
10
11
  "clean": "tsc --build --clean",
11
12
  "build": "tsc --build --verbose",
12
13
  "lint": "npx eslint .",
13
- "lint:fix": "npx eslint . --fix"
14
+ "lint:fix": "npx eslint . --fix --config ../../.eslintrc.js"
15
+ },
16
+ "exports": {
17
+ ".": {
18
+ "import": "./dist/index.js",
19
+ "require": "./dist/index.js"
20
+ },
21
+ "./modules/Manager": {
22
+ "import": "./dist/modules/Manager.js",
23
+ "require": "./dist/modules/Manager.js"
24
+ }
14
25
  },
15
26
  "dependencies": {
16
27
  "@fingerprintjs/fingerprintjs": "^3.3.6",
@@ -24,16 +35,16 @@
24
35
  "@polkadot/types": "10.9.1",
25
36
  "@polkadot/util": "12.3.2",
26
37
  "@polkadot/util-crypto": "12.3.2",
27
- "@prosopo/api": "^0.1.16",
28
- "@prosopo/contract": "^0.1.16",
29
- "@prosopo/types": "^0.1.16",
30
- "@prosopo/common": "^0.1.16",
38
+ "@prosopo/api": "^0.1.17",
39
+ "@prosopo/contract": "^0.1.17",
40
+ "@prosopo/types": "^0.1.17",
41
+ "@prosopo/common": "^0.1.17",
31
42
  "axios": "^0.27.2"
32
43
  },
33
44
  "devDependencies": {
34
45
  "mocha": "^10.0.0",
35
46
  "ts-mocha": "^10.0.0",
36
- "typescript": "^4.9.4"
47
+ "typescript": "^4.9.5"
37
48
  },
38
49
  "keywords": [],
39
50
  "repository": {