@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.
- package/dist/api/Extension.d.ts +1 -1
- package/dist/api/Extension.d.ts.map +1 -1
- package/dist/api/Extension.js +1 -4
- package/dist/api/Extension.js.map +1 -1
- package/dist/api/ExtensionWeb2.d.ts +2 -2
- package/dist/api/ExtensionWeb2.d.ts.map +1 -1
- package/dist/api/ExtensionWeb2.js +26 -30
- package/dist/api/ExtensionWeb2.js.map +1 -1
- package/dist/api/ExtensionWeb3.d.ts +2 -2
- package/dist/api/ExtensionWeb3.d.ts.map +1 -1
- package/dist/api/ExtensionWeb3.js +8 -12
- package/dist/api/ExtensionWeb3.js.map +1 -1
- package/dist/api/HttpClientBase.d.ts.map +1 -1
- package/dist/api/HttpClientBase.js +14 -21
- package/dist/api/HttpClientBase.js.map +1 -1
- package/dist/api/errors.d.ts.map +1 -1
- package/dist/api/errors.js +18 -13
- package/dist/api/errors.js.map +1 -1
- package/dist/api/handlers.d.ts.map +1 -1
- package/dist/api/handlers.js +1 -5
- package/dist/api/handlers.js.map +1 -1
- package/dist/api/index.d.ts +3 -3
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +13 -18
- package/dist/api/index.js.map +1 -1
- package/dist/api/sign.d.ts.map +1 -1
- package/dist/api/sign.js +20 -11
- package/dist/api/sign.js.map +1 -1
- package/dist/index.d.ts +4 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +14 -19
- package/dist/index.js.map +1 -1
- package/dist/modules/Manager.d.ts +2 -2
- package/dist/modules/Manager.d.ts.map +1 -1
- package/dist/modules/Manager.js +43 -41
- package/dist/modules/Manager.js.map +1 -1
- package/dist/modules/ProsopoCaptchaApi.d.ts +2 -2
- package/dist/modules/ProsopoCaptchaApi.d.ts.map +1 -1
- package/dist/modules/ProsopoCaptchaApi.js +27 -33
- package/dist/modules/ProsopoCaptchaApi.js.map +1 -1
- package/dist/modules/canvas.d.ts.map +1 -1
- package/dist/modules/canvas.js +16 -7
- package/dist/modules/canvas.js.map +1 -1
- package/dist/modules/index.d.ts +2 -2
- package/dist/modules/index.d.ts.map +1 -1
- package/dist/modules/index.js +12 -17
- package/dist/modules/index.js.map +1 -1
- package/dist/modules/storage.d.ts.map +1 -1
- package/dist/modules/storage.js +11 -15
- package/dist/modules/storage.js.map +1 -1
- package/dist/types/api.js +1 -2
- package/dist/types/api.js.map +1 -1
- package/dist/types/client.d.ts +1 -1
- package/dist/types/client.d.ts.map +1 -1
- package/dist/types/client.js +1 -2
- package/dist/types/contract.d.ts.map +1 -1
- package/dist/types/contract.js +1 -2
- package/dist/types/index.d.ts +4 -4
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +14 -19
- package/dist/types/index.js.map +1 -1
- package/dist/types/manager.d.ts +5 -3
- package/dist/types/manager.d.ts.map +1 -1
- package/dist/types/manager.js +8 -2
- package/dist/types/manager.js.map +1 -1
- package/dist/types/utils.d.ts.map +1 -1
- package/dist/types/utils.js +1 -2
- package/dist/utils/index.d.ts +1 -1
- package/dist/utils/index.d.ts.map +1 -1
- package/dist/utils/index.js +14 -4
- package/dist/utils/index.js.map +1 -1
- package/dist/utils/utils.d.ts.map +1 -1
- package/dist/utils/utils.js +14 -5
- package/dist/utils/utils.js.map +1 -1
- package/package.json +18 -7
package/dist/modules/index.js
CHANGED
|
@@ -1,21 +1,16 @@
|
|
|
1
|
-
|
|
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
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
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":"
|
|
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":"
|
|
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"}
|
package/dist/modules/storage.js
CHANGED
|
@@ -1,20 +1,16 @@
|
|
|
1
|
-
|
|
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
|
-
//
|
|
6
|
-
//
|
|
7
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
16
|
-
//
|
|
17
|
-
|
|
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
|
-
|
|
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":"
|
|
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
|
-
|
|
20
|
+
export {};
|
|
22
21
|
//# sourceMappingURL=api.js.map
|
package/dist/types/api.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/types/client.d.ts
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/types/client.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract.d.ts","sourceRoot":"","sources":["../../src/types/contract.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/types/contract.js
CHANGED
package/dist/types/index.d.ts
CHANGED
|
@@ -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":"
|
|
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"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
|
|
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
|
-
//
|
|
8
|
-
//
|
|
9
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
18
|
-
//
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
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
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"
|
|
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"}
|
package/dist/types/manager.d.ts
CHANGED
|
@@ -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":";
|
|
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,iCAAiC,CAAA;AACnE,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAClD;;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,EAAE,MAAM,GAAG,SAAS,CAAA;IAC/B,UAAU,EAAE,oBAAoB,GAAG,SAAS,CAAA;IAC5C,OAAO,EAAE,MAAM,CAAC,OAAO,GAAG,SAAS,CAAA;IACnC,WAAW,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC;AAED;;;;;GAKG;AACH,MAAM,MAAM,uBAAuB,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,eAAe,CAAC,KAAK,IAAI,CAAA;AAE/E;;;GAGG;AACH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAAA;AAE3D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC7B,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAC/B,iBAAiB,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IAC5C,OAAO,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAA;IAC3C,mBAAmB,EAAE,MAAM,IAAI,CAAA;IAC/B,SAAS,EAAE,MAAM,IAAI,CAAA;IACrB,QAAQ,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,MAAM,MAAM,qBAAqB,GAAG,MAAM,gBAAgB,CAAA;AAE1D,eAAO,MAAM,mBAAmB,EAAE,qBAAqB,EAOtD,CAAA"}
|
package/dist/types/manager.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
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":"
|
|
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"}
|
package/dist/types/utils.js
CHANGED
package/dist/utils/index.d.ts
CHANGED
|
@@ -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":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAaA,cAAc,YAAY,CAAA"}
|
package/dist/utils/index.js
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
package/dist/utils/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"
|
|
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":"
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"AAaA,eAAO,MAAM,KAAK,+BAEjB,CAAA"}
|
package/dist/utils/utils.js
CHANGED
|
@@ -1,8 +1,17 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
package/dist/utils/utils.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/utils/utils.ts"],"names":[],"mappings":"
|
|
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.
|
|
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.
|
|
28
|
-
"@prosopo/contract": "^0.1.
|
|
29
|
-
"@prosopo/types": "^0.1.
|
|
30
|
-
"@prosopo/common": "^0.1.
|
|
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.
|
|
47
|
+
"typescript": "^4.9.5"
|
|
37
48
|
},
|
|
38
49
|
"keywords": [],
|
|
39
50
|
"repository": {
|