@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,4 +1,4 @@
1
- import { Account } from '../types';
1
+ import { Account } from '../types/index.js';
2
2
  import { ProcaptchaClientConfig } from '@prosopo/types';
3
3
  /**
4
4
  * Class to interface with accounts.
@@ -1 +1 @@
1
- {"version":3,"file":"Extension.d.ts","sourceRoot":"","sources":["../../src/api/Extension.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAClC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAS;IACnC;;;;;;OAMG;aACa,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;CAC/E"}
1
+ {"version":3,"file":"Extension.d.ts","sourceRoot":"","sources":["../../src/api/Extension.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEvD;;GAEG;AACH,MAAM,CAAC,OAAO,CAAC,QAAQ,OAAO,SAAS;IACnC;;;;;;OAMG;aACa,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;CAC/E"}
@@ -1,9 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
1
  /**
4
2
  * Class to interface with accounts.
5
3
  */
6
- class Extension {
4
+ export default class Extension {
7
5
  }
8
- exports.default = Extension;
9
6
  //# sourceMappingURL=Extension.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Extension.js","sourceRoot":"","sources":["../../src/api/Extension.ts"],"names":[],"mappings":";;AAGA;;GAEG;AACH,MAA8B,SAAS;CAStC;AATD,4BASC"}
1
+ {"version":3,"file":"Extension.js","sourceRoot":"","sources":["../../src/api/Extension.ts"],"names":[],"mappings":"AAgBA;;GAEG;AACH,MAAM,CAAC,OAAO,OAAgB,SAAS;CAStC"}
@@ -1,6 +1,6 @@
1
- import { Account } from '../types';
1
+ import { Account } from '../types/index.js';
2
2
  import { ProcaptchaClientConfig } from '@prosopo/types';
3
- import Extension from './Extension';
3
+ import Extension from './Extension.js';
4
4
  /**
5
5
  * Class for interfacing with web3 accounts.
6
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionWeb2.d.ts","sourceRoot":"","sources":["../../src/api/ExtensionWeb2.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAMlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAQvD,OAAO,SAAS,MAAM,aAAa,CAAA;AAMnC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAC7B,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;YAa3D,eAAe;YAiCf,aAAa;YAmCb,cAAc;CAU/B"}
1
+ {"version":3,"file":"ExtensionWeb2.d.ts","sourceRoot":"","sources":["../../src/api/ExtensionWeb2.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAM3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAQvD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAMtC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAC7B,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;YAa3D,eAAe;YAiCf,aAAa;YAmCb,cAAc;CAU/B"}
@@ -1,24 +1,21 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const api_1 = require("@polkadot/api");
5
- const ws_1 = require("@polkadot/rpc-provider/ws");
6
- const util_crypto_1 = require("@polkadot/util-crypto");
7
- const bip39_1 = require("@polkadot/util-crypto/mnemonic/bip39");
8
- const Manager_1 = require("../modules/Manager");
9
- const common_1 = require("@prosopo/common");
10
- const canvas_1 = require("../modules/canvas");
11
- const util_1 = require("@polkadot/util");
12
- const Extension_1 = tslib_1.__importDefault(require("./Extension"));
13
- const fingerprintjs_1 = tslib_1.__importStar(require("@fingerprintjs/fingerprintjs"));
14
- const Signer_1 = tslib_1.__importDefault(require("@polkadot/extension-base/page/Signer"));
1
+ import { ApiPromise, Keyring } from '@polkadot/api';
2
+ import { WsProvider } from '@polkadot/rpc-provider/ws';
3
+ import { cryptoWaitReady, decodeAddress, encodeAddress } from '@polkadot/util-crypto';
4
+ import { entropyToMnemonic } from '@polkadot/util-crypto/mnemonic/bip39';
5
+ import { getNetwork } from '../modules/Manager.js';
6
+ import { hexHash } from '@prosopo/common';
7
+ import { picassoCanvas } from '../modules/canvas.js';
8
+ import { stringToU8a, u8aToHex } from '@polkadot/util';
9
+ import Extension from './Extension.js';
10
+ import FingerprintJS, { hashComponents } from '@fingerprintjs/fingerprintjs';
11
+ import Signer from '@polkadot/extension-base/page/Signer';
15
12
  /**
16
13
  * Class for interfacing with web3 accounts.
17
14
  */
18
- class ExtWeb2 extends Extension_1.default {
15
+ export default class ExtWeb2 extends Extension {
19
16
  async getAccount(config) {
20
- const network = (0, Manager_1.getNetwork)(config);
21
- const wsProvider = new ws_1.WsProvider(network.endpoint);
17
+ const network = getNetwork(config);
18
+ const wsProvider = new WsProvider(network.endpoint);
22
19
  const account = await this.createAccount(wsProvider);
23
20
  const extension = await this.createExtension(account);
24
21
  return {
@@ -27,7 +24,7 @@ class ExtWeb2 extends Extension_1.default {
27
24
  };
28
25
  }
29
26
  async createExtension(account) {
30
- const signer = new Signer_1.default(async () => {
27
+ const signer = new Signer(async () => {
31
28
  return;
32
29
  });
33
30
  // signing carried out by the keypair. Signs the data with the private key, creating a signature. Other people can verify this signature given the message and the public key, proving that the message was indeed signed by account and proving ownership of the account.
@@ -35,7 +32,7 @@ class ExtWeb2 extends Extension_1.default {
35
32
  const signature = account.keypair.sign(payload.data);
36
33
  return {
37
34
  id: 1,
38
- signature: (0, util_1.u8aToHex)(signature),
35
+ signature: u8aToHex(signature),
39
36
  };
40
37
  };
41
38
  return {
@@ -67,18 +64,18 @@ class ExtWeb2 extends Extension_1.default {
67
64
  seed: 42,
68
65
  };
69
66
  const browserEntropy = await this.getFingerprint();
70
- const canvasEntropy = (0, canvas_1.picassoCanvas)(params.numberOfRounds, params.seed, params);
71
- const entropy = (0, common_1.hexHash)([canvasEntropy, browserEntropy].join(''), 128).slice(2);
72
- const u8Entropy = (0, util_1.stringToU8a)(entropy);
73
- const mnemonic = (0, bip39_1.entropyToMnemonic)(u8Entropy);
74
- const api = await api_1.ApiPromise.create({ provider: wsProvider });
67
+ const canvasEntropy = picassoCanvas(params.numberOfRounds, params.seed, params);
68
+ const entropy = hexHash([canvasEntropy, browserEntropy].join(''), 128).slice(2);
69
+ const u8Entropy = stringToU8a(entropy);
70
+ const mnemonic = entropyToMnemonic(u8Entropy);
71
+ const api = await ApiPromise.create({ provider: wsProvider });
75
72
  const type = 'sr25519';
76
- const keyring = new api_1.Keyring({ type, ss58Format: api.registry.chainSS58 });
77
- await (0, util_crypto_1.cryptoWaitReady)();
73
+ const keyring = new Keyring({ type, ss58Format: api.registry.chainSS58 });
74
+ await cryptoWaitReady();
78
75
  const keypair = keyring.addFromMnemonic(mnemonic);
79
76
  const address = keypair.address.length === 42
80
77
  ? keypair.address
81
- : (0, util_crypto_1.encodeAddress)((0, util_crypto_1.decodeAddress)(keypair.address), api.registry.chainSS58);
78
+ : encodeAddress(decodeAddress(keypair.address), api.registry.chainSS58);
82
79
  return {
83
80
  address,
84
81
  type,
@@ -88,14 +85,13 @@ class ExtWeb2 extends Extension_1.default {
88
85
  }
89
86
  async getFingerprint() {
90
87
  // Initialize an agent at application startup.
91
- const fpPromise = fingerprintjs_1.default.load();
88
+ const fpPromise = FingerprintJS.load();
92
89
  // Get the visitor identifier when you need it.
93
90
  const fp = await fpPromise;
94
91
  const result = await fp.get();
95
92
  // strip out the components that change in incognito mode
96
93
  const { screenFrame, ...componentsReduced } = result.components;
97
- return (0, fingerprintjs_1.hashComponents)(componentsReduced);
94
+ return hashComponents(componentsReduced);
98
95
  }
99
96
  }
100
- exports.default = Ex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eAAe,EAAE,CAAA;QACvB,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAA;QACjD,MAAM,OAAO,GACT,OAAO,CAAC,OAAO,CAAC,MAAM,KAAK,EAAE;YACzB,CAAC,CAAC,OAAO,CAAC,OAAO;YACjB,CAAC,CAAC,aAAa,CAAC,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,GAAG,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAA;QAC/E,OAAO;YACH,OAAO;YACP,IAAI;YACJ,IAAI,EAAE,OAAO;YACb,OAAO;SACV,CAAA;IACL,CAAC;IAEO,KAAK,CAAC,cAAc;QACxB,8CAA8C;QAC9C,MAAM,SAAS,GAAG,aAAa,CAAC,IAAI,EAAE,CAAA;QACtC,+CAA+C;QAC/C,MAAM,EAAE,GAAG,MAAM,SAAS,CAAA;QAC1B,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,EAAE,CAAA;QAC7B,yDAAyD;QACzD,MAAM,EAAE,WAAW,EAAE,GAAG,iBAAiB,EAAE,GAAG,MAAM,CAAC,UAAU,CAAA;QAC/D,OAAO,cAAc,CAAC,iBAAiB,CAAC,CAAA;IAC5C,CAAC;CACJ"}
@@ -1,6 +1,6 @@
1
- import { Account } from '../types';
1
+ import { Account } from '../types/index.js';
2
2
  import { ProcaptchaClientConfig } from '@prosopo/types';
3
- import Extension from './Extension';
3
+ import Extension from './Extension.js';
4
4
  /**
5
5
  * Class for interfacing with web3 accounts.
6
6
  */
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionWeb3.d.ts","sourceRoot":"","sources":["../../src/api/ExtensionWeb3.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,UAAU,CAAA;AAGlC,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,OAAO,SAAS,MAAM,aAAa,CAAA;AAEnC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAC7B,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;CAwB5E"}
1
+ {"version":3,"file":"ExtensionWeb3.d.ts","sourceRoot":"","sources":["../../src/api/ExtensionWeb3.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAG3C,OAAO,EAAE,sBAAsB,EAAE,MAAM,gBAAgB,CAAA;AAEvD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IAC7B,UAAU,CAAC,MAAM,EAAE,sBAAsB,GAAG,OAAO,CAAC,OAAO,CAAC;CAwB5E"}
@@ -1,22 +1,19 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- const errors_1 = require("./errors");
5
- const extension_dapp_1 = require("@polkadot/extension-dapp");
6
- const Extension_1 = tslib_1.__importDefault(require("./Extension"));
1
+ import { AccountNotFoundError, ExtensionNotFoundError } from './errors.js';
2
+ import { web3Enable } from '@polkadot/extension-dapp';
3
+ import Extension from './Extension.js';
7
4
  /**
8
5
  * Class for interfacing with web3 accounts.
9
6
  */
10
- class ExtWeb3 extends Extension_1.default {
7
+ export default class ExtWeb3 extends Extension {
11
8
  async getAccount(config) {
12
9
  const { dappName, userAccountAddress: address } = config;
13
10
  if (!address) {
14
- throw new errors_1.AccountNotFoundError('No account address provided');
11
+ throw new AccountNotFoundError('No account address provided');
15
12
  }
16
13
  // enable access to all extensions
17
- const extensions = await (0, extension_dapp_1.web3Enable)(dappName);
14
+ const extensions = await web3Enable(dappName);
18
15
  if (extensions.length === 0) {
19
- throw new errors_1.ExtensionNotFoundError();
16
+ throw new ExtensionNotFoundError();
20
17
  }
21
18
  // search through all extensions for the one that has the account
22
19
  for (const extension of extensions) {
@@ -26,8 +23,7 @@ class ExtWeb3 extends Extension_1.default {
26
23
  return { account, extension };
27
24
  }
28
25
  }
29
- throw new errors_1.AccountNotFoundError('No account found matching ' + address);
26
+ throw new AccountNotFoundError('No account found matching ' + address);
30
27
  }
31
28
  }
32
- exports.default = ExtWeb3;
33
29
  //# sourceMappingURL=ExtensionWeb3.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionWeb3.js","sourceRoot":"","sources":["../../src/api/ExtensionWeb3.ts"],"names":[],"mappings":";;;AACA,qCAAuE;AAGvE,6DAAqD;AACrD,oEAAmC;AAEnC;;GAEG;AACH,MAAqB,OAAQ,SAAQ,mBAAS;IACnC,KAAK,CAAC,UAAU,CAAC,MAA8B;QAClD,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QAExD,IAAI,CAAC,OAAO,EAAE;YACV,MAAM,IAAI,6BAAoB,CAAC,6BAA6B,CAAC,CAAA;SAChE;QAED,kCAAkC;QAClC,MAAM,UAAU,GAAwB,MAAM,IAAA,2BAAU,EAAC,QAAQ,CAAC,CAAA;QAClE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,MAAM,IAAI,+BAAsB,EAAE,CAAA;SACrC;QAED,iEAAiE;QACjE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAChC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;YAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,CAAA;YACvE,IAAI,OAAO,EAAE;gBACT,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;aAChC;SACJ;QAED,MAAM,IAAI,6BAAoB,CAAC,4BAA4B,GAAG,OAAO,CAAC,CAAA;IAC1E,CAAC;CACJ;AAzBD,0BAyBC"}
1
+ {"version":3,"file":"ExtensionWeb3.js","sourceRoot":"","sources":["../../src/api/ExtensionWeb3.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,oBAAoB,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAG1E,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AACrD,OAAO,SAAS,MAAM,gBAAgB,CAAA;AAEtC;;GAEG;AACH,MAAM,CAAC,OAAO,OAAO,OAAQ,SAAQ,SAAS;IACnC,KAAK,CAAC,UAAU,CAAC,MAA8B;QAClD,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,GAAG,MAAM,CAAA;QAExD,IAAI,CAAC,OAAO,EAAE;YACV,MAAM,IAAI,oBAAoB,CAAC,6BAA6B,CAAC,CAAA;SAChE;QAED,kCAAkC;QAClC,MAAM,UAAU,GAAwB,MAAM,UAAU,CAAC,QAAQ,CAAC,CAAA;QAClE,IAAI,UAAU,CAAC,MAAM,KAAK,CAAC,EAAE;YACzB,MAAM,IAAI,sBAAsB,EAAE,CAAA;SACrC;QAED,iEAAiE;QACjE,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE;YAChC,MAAM,QAAQ,GAAG,MAAM,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAA;YAC/C,MAAM,OAAO,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,KAAK,OAAO,CAAC,CAAA;YACvE,IAAI,OAAO,EAAE;gBACT,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE,CAAA;aAChC;SACJ;QAED,MAAM,IAAI,oBAAoB,CAAC,4BAA4B,GAAG,OAAO,CAAC,CAAA;IAC1E,CAAC;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"HttpClientBase.d.ts","sourceRoot":"","sources":["../../src/api/HttpClientBase.ts"],"names":[],"mappings":"AAeA,OAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE3D,qBAAa,cAAc;IACvB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;gBAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK;IAMxC,SAAS,CAAC,eAAe,aAAc,aAAa,SAGnD;IAED,SAAS,CAAC,YAAY,UAAW,GAAG,oBAAmC;CAC1E;AAED,eAAe,cAAc,CAAA"}
1
+ {"version":3,"file":"HttpClientBase.d.ts","sourceRoot":"","sources":["../../src/api/HttpClientBase.ts"],"names":[],"mappings":"AAaA,OAAc,EAAE,aAAa,EAAE,aAAa,EAAE,MAAM,OAAO,CAAA;AAE3D,qBAAa,cAAc;IACvB,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAA;gBAE3B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAK;IAMxC,SAAS,CAAC,eAAe,aAAc,aAAa,SAGnD;IAED,SAAS,CAAC,YAAY,UAAW,GAAG,oBAAmC;CAC1E;AAED,eAAe,cAAc,CAAA"}
@@ -1,28 +1,22 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.HttpClientBase = void 0;
4
- const tslib_1 = require("tslib");
5
- // Copyright (C) 2021-2022 Prosopo (UK) Ltd.
6
- // This file is part of procaptcha <https://github.com/prosopo/procaptcha>.
1
+ // Copyright 2021-2023 Prosopo (UK) Ltd.
7
2
  //
8
- // procaptcha is free software: you can redistribute it and/or modify
9
- // it under the terms of the GNU General Public License as published by
10
- // the Free Software Foundation, either version 3 of the License, or
11
- // (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
12
6
  //
13
- // procaptcha is distributed in the hope that it will be useful,
14
- // but WITHOUT ANY WARRANTY; without even the implied warranty of
15
- // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
- // GNU General Public License for more details.
7
+ // http://www.apache.org/licenses/LICENSE-2.0
17
8
  //
18
- // You should have received a copy of the GNU General Public License
19
- // along with procaptcha. If not, see <http://www.gnu.org/licenses/>.
20
- const axios_1 = tslib_1.__importDefault(require("axios"));
21
- class HttpClientBase {
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
+ import axios from 'axios';
15
+ export class HttpClientBase {
22
16
  axios;
23
17
  constructor(baseURL, prefix = '') {
24
18
  baseURL = baseURL + prefix;
25
- this.axios = axios_1.default.create({ baseURL });
19
+ this.axios = axios.default.create({ baseURL });
26
20
  this.axios.interceptors.response.use(this.responseHandler, this.errorHandler);
27
21
  }
28
22
  responseHandler = (response) => {
@@ -31,6 +25,5 @@ class HttpClientBase {
31
25
  };
32
26
  errorHandler = (error) => Promise.reject(error.response);
33
27
  }
34
- exports.HttpClientBase = HttpClientBase;
35
- exports.default = HttpClientBase;
28
+ export default HttpClientBase;
36
29
  //# sourceMappingURL=HttpClientBase.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"HttpClientBase.js","sourceRoot":"","sources":["../../src/api/HttpClientBase.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,0DAA2D;AAE3D,MAAa,cAAc;IACJ,KAAK,CAAe;IAEvC,YAAY,OAAe,EAAE,MAAM,GAAG,EAAE;QACpC,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;QAC1B,IAAI,CAAC,KAAK,GAAG,eAAK,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QACtC,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ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AAA;IAES,YAAY,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAA;CAC1E;AAED,eAAe,cAAc,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":"AAAA,qBAAa,sBAAuB,SAAQ,KAAK;gBACjC,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,+BAAgC,SAAQ,KAAK;gBAC1C,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBAC/B,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBACjC,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACvB,GAAG,CAAC,EAAE,MAAM;CAG3B"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":"AAaA,qBAAa,sBAAuB,SAAQ,KAAK;gBACjC,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,+BAAgC,SAAQ,KAAK;gBAC1C,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBAC/B,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,sBAAuB,SAAQ,KAAK;gBACjC,GAAG,CAAC,EAAE,MAAM;CAG3B;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACvB,GAAG,CAAC,EAAE,MAAM;CAG3B"}
@@ -1,34 +1,39 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ExpiredError = exports.ExtensionNotFoundError = exports.AccountNotFoundError = exports.AccountCreationUnsupportedError = exports.NoExtensionsFoundError = void 0;
4
- class NoExtensionsFoundError extends Error {
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 class NoExtensionsFoundError extends Error {
5
15
  constructor(msg) {
6
16
  super(msg || 'No extensions found');
7
17
  }
8
18
  }
9
- exports.NoExtensionsFoundError = NoExtensionsFoundError;
10
- class AccountCreationUnsupportedError extends Error {
19
+ export class AccountCreationUnsupportedError extends Error {
11
20
  constructor(msg) {
12
21
  super(msg || 'Account creation is not supported');
13
22
  }
14
23
  }
15
- exports.AccountCreationUnsupportedError = AccountCreationUnsupportedError;
16
- class AccountNotFoundError extends Error {
24
+ export class AccountNotFoundError extends Error {
17
25
  constructor(msg) {
18
26
  super(msg || 'No account found');
19
27
  }
20
28
  }
21
- exports.AccountNotFoundError = AccountNotFoundError;
22
- class ExtensionNotFoundError extends Error {
29
+ export class ExtensionNotFoundError extends Error {
23
30
  constructor(msg) {
24
31
  super(msg || 'No extensions found');
25
32
  }
26
33
  }
27
- exports.ExtensionNotFoundError = ExtensionNotFoundError;
28
- class ExpiredError extends Error {
34
+ export class ExpiredError extends Error {
29
35
  constructor(msg) {
30
36
  super(msg || 'The challenge has expired');
31
37
  }
32
38
  }
33
- exports.ExpiredError = ExpiredError;
34
39
  //# sourceMappingURL=errors.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/api/errors.ts"],"names":[],"mappings":";;;AAAA,MAAa,sBAAuB,SAAQ,KAAK;IAC7C,YAAY,GAAY;QACpB,KAAK,CAAC,GAAG,IAAI,qBAAqB,CAAC,CAAA;IACvC,CAAC;CACJ;AAJD,w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K,CAAC,GAAG,IAAI,qBAAqB,CAAC,CAAA;IACvC,CAAC;CACJ;AAED,MAAM,OAAO,YAAa,SAAQ,KAAK;IACnC,YAAY,GAAY;QACpB,KAAK,CAAC,GAAG,IAAI,2BAA2B,CAAC,CAAA;IAC7C,CAAC;CACJ"}
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/api/handlers.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,qBAAa,eAAgB,SAAQ,KAAK;gBAC1B,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;CAQpE"}
1
+ {"version":3,"file":"handlers.d.ts","sourceRoot":"","sources":["../../src/api/handlers.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAA;AAElC,qBAAa,eAAgB,SAAQ,KAAK;gBAC1B,KAAK,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE,GAAG,EAAE;CAQpE"}
@@ -1,7 +1,4 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ProsopoApiError = void 0;
4
- class ProsopoApiError extends Error {
1
+ export class ProsopoApiError extends Error {
5
2
  constructor(error, context, ...params) {
6
3
  super(error ? error.message : 'Unknown API Error');
7
4
  this.name = (context && `${ProsopoApiError.name}@${context}`) || ProsopoApiError.name;
@@ -9,5 +6,4 @@ class ProsopoApiError extends Error {
9
6
  console.error(this.cause, this.stack, ...params);
10
7
  }
11
8
  }
12
- exports.ProsopoApiError = ProsopoApiError;
13
9
  //# sourceMappingURL=handlers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../src/api/handlers.ts"],"names":[],"mappings":";;;AAiBA,MAAa,eAAgB,SAAQ,KAAK;IACtC,YAAY,KAAiB,EAAE,OAAgB,EAAE,GAAG,MAAa;QAC7D,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAA;QAElD,IAAI,CAAC,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,eAAe,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,IAAI,eAAe,CAAC,IAAI,CAAA;QAErF,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAA;QACtE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,CAAA;IACpD,CAAC;CACJ;AATD,0CASC"}
1
+ {"version":3,"file":"handlers.js","sourceRoot":"","sources":["../../src/api/handlers.ts"],"names":[],"mappings":"AAeA,MAAM,OAAO,eAAgB,SAAQ,KAAK;IACtC,YAAY,KAAiB,EAAE,OAAgB,EAAE,GAAG,MAAa;QAC7D,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAA;QAElD,IAAI,CAAC,IAAI,GAAG,CAAC,OAAO,IAAI,GAAG,eAAe,CAAC,IAAI,IAAI,OAAO,EAAE,CAAC,IAAI,eAAe,CAAC,IAAI,CAAA;QAErF,OAAO,CAAC,KAAK,CAAC,uDAAuD,CAAC,CAAA;QACtE,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,GAAG,MAAM,CAAC,CAAA;IACpD,CAAC;CACJ"}
@@ -1,4 +1,4 @@
1
- export * from './ExtensionWeb3';
2
- export * from './ExtensionWeb2';
3
- export * from './HttpClientBase';
1
+ export * from './ExtensionWeb3.js';
2
+ export * from './ExtensionWeb2.js';
3
+ export * from './HttpClientBase.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAeA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,kBAAkB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAaA,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
package/dist/api/index.js CHANGED
@@ -1,22 +1,17 @@
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("./ExtensionWeb3"), exports);
20
- tslib_1.__exportStar(require("./ExtensionWeb2"), exports);
21
- tslib_1.__exportStar(require("./HttpClientBase"), 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 './ExtensionWeb3.js';
15
+ export * from './ExtensionWeb2.js';
16
+ export * from './HttpClientBase.js';
22
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/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,0DAA+B;AAC/B,0DAA+B;AAC/B,2DAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/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,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,qBAAqB,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../src/api/sign.ts"],"names":[],"mappings":"AAIA,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAOzF"}
1
+ {"version":3,"file":"sign.d.ts","sourceRoot":"","sources":["../../src/api/sign.ts"],"names":[],"mappings":"AAiBA,wBAAgB,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,KAAA,GAAG;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAA;CAAE,CAOzF"}
package/dist/api/sign.js CHANGED
@@ -1,16 +1,25 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.sign = void 0;
4
- const keyring_1 = require("@polkadot/keyring");
5
- const util_crypto_1 = require("@polkadot/util-crypto");
6
- const util_1 = require("@polkadot/util");
7
- function sign(message, account) {
8
- const keyring = new keyring_1.Keyring({ type: 'ecdsa' });
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
+ import { Keyring } from '@polkadot/keyring';
15
+ import { blake2AsHex } from '@polkadot/util-crypto';
16
+ import { u8aToHex } from '@polkadot/util';
17
+ export function sign(message, account) {
18
+ const keyring = new Keyring({ type: 'ecdsa' });
9
19
  const pair = keyring.addFromUri('//Alice');
10
20
  const sig = pair.sign(message);
11
- const signature = (0, util_1.u8aToHex)(sig);
12
- const messageHash = (0, util_crypto_1.blake2AsHex)(message);
21
+ const signature = u8aToHex(sig);
22
+ const messageHash = blake2AsHex(message);
13
23
  return { messageHash, signature };
14
24
  }
15
- exports.sign = sign;
16
25
  //# sourceMappingURL=sign.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/api/sign.ts"],"names":[],"mappings":";;;AAAA,+CAA2C;AAC3C,uDAAmD;AACnD,yCAAyC;AAEzC,SAAgB,IAAI,CAAC,OAAe,EAAE,OAAO;IACzC,MAAM,OAAO,GAAG,IAAI,iBAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC9B,MAAM,SAAS,GAAG,IAAA,eAAQ,EAAC,GAAG,CAAC,CAAA;IAC/B,MAAM,WAAW,GAAG,IAAA,yBAAW,EAAC,OAAO,CAAC,CAAA;IACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAA;AACrC,CAAC;AAPD,oBAOC"}
1
+ {"version":3,"file":"sign.js","sourceRoot":"","sources":["../../src/api/sign.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,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAA;AAC3C,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAA;AAEzC,MAAM,UAAU,IAAI,CAAC,OAAe,EAAE,OAAO;IACzC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IAC9C,MAAM,IAAI,GAAG,OAAO,CAAC,UAAU,CAAC,SAAS,CAAC,CAAA;IAC1C,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAA;IAC9B,MAAM,SAAS,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAA;IAC/B,MAAM,WAAW,GAAG,WAAW,CAAC,OAAO,CAAC,CAAA;IACxC,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,CAAA;AACrC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- export * from './api';
2
- export * from './modules';
3
- export * from './types';
4
- export * from './utils';
1
+ export * from './api/index.js';
2
+ export * from './modules/index.js';
3
+ export * from './types/index.js';
4
+ export * from './utils/index.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAeA,cAAc,OAAO,CAAA;AACrB,cAAc,WAAW,CAAA;AACzB,cAAc,SAAS,CAAA;AACvB,cAAc,SAAS,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA"}
package/dist/index.js CHANGED
@@ -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("./modules"), exports);
21
- tslib_1.__exportStar(require("./types"), exports);
22
- tslib_1.__exportStar(require("./utils"), 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/index.js';
15
+ export * from './modules/index.js';
16
+ export * from './types/index.js';
17
+ export * from './utils/index.js';
23
18
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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,oDAAyB;AACzB,kDAAuB;AACvB,kDAAuB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/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,gBAAgB,CAAA;AAC9B,cAAc,oBAAoB,CAAA;AAClC,cAAc,kBAAkB,CAAA;AAChC,cAAc,kBAAkB,CAAA"}
@@ -1,4 +1,4 @@
1
- import { ProcaptchaCallbacks, ProcaptchaConfigOptional, ProcaptchaState, ProcaptchaStateUpdateFn } from '../types/manager';
1
+ import { ProcaptchaCallbacks, ProcaptchaConfigOptional, ProcaptchaState, ProcaptchaStateUpdateFn } from '../types/manager.js';
2
2
  import { ProsopoClientConfig } from '@prosopo/types';
3
3
  export declare const defaultState: () => Partial<ProcaptchaState>;
4
4
  export declare const getNetwork: (config: ProsopoClientConfig) => {
@@ -12,7 +12,7 @@ export declare const getNetwork: (config: ProsopoClientConfig) => {
12
12
  /**
13
13
  * The state operator. This is used to mutate the state of Procaptcha during the captcha process. State updates are published via the onStateUpdate callback. This should be used by frontends, e.g. react, to maintain the state of Procaptcha across renders.
14
14
  */
15
- export declare const Manager: (configOptional: ProcaptchaConfigOptional, state: ProcaptchaState, onStateUpdate: ProcaptchaStateUpdateFn, callbacks: ProcaptchaCallbacks) => {
15
+ export declare function Manager(configOptional: ProcaptchaConfigOptional, state: ProcaptchaState, onStateUpdate: ProcaptchaStateUpdateFn, callbacks: ProcaptchaCallbacks): {
16
16
  start: () => Promise<void>;
17
17
  cancel: () => Promise<void>;
18
18
  submit: () => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"Manager.d.ts","sourceRoot":"","sources":["../../src/modules/Manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAEH,mBAAmB,EACnB,wBAAwB,EAExB,eAAe,EACf,uBAAuB,EAC1B,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAIH,mBAAmB,EAEtB,MAAM,gBAAgB,CAAA;AAevB,eAAO,MAAM,YAAY,QAAO,QAAQ,eAAe,CAatD,CAAA;AAkBD,eAAO,MAAM,UAAU,WAAY,mBAAmB;;;;;;;CAMrD,CAAA;AAED;;GAEG;AACH,eAAO,MAAM,OAAO,mBACA,wBAAwB,SACjC,eAAe,iBACP,uBAAuB,aAC3B,mBAAmB;;;;mBA2RR,MAAM;;CA0J/B,CAAA"}
1
+ {"version":3,"file":"Manager.d.ts","sourceRoot":"","sources":["../../src/modules/Manager.ts"],"names":[],"mappings":"AAaA,OAAO,EAEH,mBAAmB,EACnB,wBAAwB,EAExB,eAAe,EACf,uBAAuB,EAC1B,MAAM,qBAAqB,CAAA;AAE5B,OAAO,EAIH,mBAAmB,EAEtB,MAAM,gBAAgB,CAAA;AAevB,eAAO,MAAM,YAAY,QAAO,QAAQ,eAAe,CAatD,CAAA;AAkBD,eAAO,MAAM,UAAU,WAAY,mBAAmB;;;;;;;CAMrD,CAAA;AAED;;GAEG;AACH,wBAAgB,OAAO,CACnB,cAAc,EAAE,wBAAwB,EACxC,KAAK,EAAE,eAAe,EACtB,aAAa,EAAE,uBAAuB,EACtC,SAAS,EAAE,mBAAmB;;;;mBAkSR,MAAM;;EA4J/B"}