@prosopo/api 0.1.15 → 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/HttpClientBase.d.ts.map +1 -1
- package/dist/api/HttpClientBase.js +14 -21
- package/dist/api/HttpClientBase.js.map +1 -1
- package/dist/api/ProviderApi.d.ts +5 -3
- package/dist/api/ProviderApi.d.ts.map +1 -1
- package/dist/api/ProviderApi.js +23 -23
- package/dist/api/ProviderApi.js.map +1 -1
- package/dist/api/index.d.ts +2 -2
- package/dist/api/index.d.ts.map +1 -1
- package/dist/api/index.js +12 -19
- package/dist/api/index.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -17
- package/dist/index.js.map +1 -1
- package/dist/types/api.d.ts +3 -0
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/api.js +11 -14
- package/dist/types/api.js.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +11 -16
- package/dist/types/index.js.map +1 -1
- package/package.json +29 -29
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"HttpClientBase.d.ts","sourceRoot":"","sources":["../../src/api/HttpClientBase.ts"],"names":[],"mappings":"
|
|
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,oBAA0B;CACjE;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,28 +1,22 @@
|
|
|
1
|
-
|
|
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
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
19
|
-
//
|
|
20
|
-
|
|
21
|
-
|
|
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 =
|
|
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);
|
|
33
27
|
}
|
|
34
|
-
|
|
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":"
|
|
1
|
+
{"version":3,"file":"HttpClientBase.js","sourceRoot":"","sources":["../../src/api/HttpClientBase.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,KAAuC,MAAM,OAAO,CAAA;AAE3D,MAAM,OAAO,cAAc;IACJ,KAAK,CAAe;IAEvC,YAAY,OAAe,EAAE,MAAM,GAAG,EAAE;QACpC,OAAO,GAAG,OAAO,GAAG,MAAM,CAAA;QAC1B,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,CAAC,CAAA;QAC9C,IAAI,CAAC,KAAK,CAAC,YAAY,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,eAAe,EAAE,IAAI,CAAC,YAAY,CAAC,CAAA;IACjF,CAAC;IAES,eAAe,GAAG,CAAC,QAAuB,EAAE,EAAE;QACpD,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAA;QAC5C,OAAO,QAAQ,CAAC,IAAI,CAAA;IACxB,CAAC,CAAA;IAES,YAAY,GAAG,CAAC,KAAU,EAAE,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAA;CACjE;AAED,eAAe,cAAc,CAAA"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { AccountId, CaptchaSolution, RandomProvider } from '@prosopo/types';
|
|
2
|
-
import { CaptchaSolutionResponse, GetCaptchaResponse, VerificationResponse } from '../types';
|
|
1
|
+
import { AccountId, CaptchaSolution, Provider, RandomProvider } from '@prosopo/types';
|
|
2
|
+
import { CaptchaSolutionResponse, GetCaptchaResponse, ProviderRegistered, VerificationResponse } from '../types/index.js';
|
|
3
3
|
import { NetworkConfig } from '@prosopo/types';
|
|
4
|
-
import HttpClientBase from './HttpClientBase';
|
|
4
|
+
import HttpClientBase from './HttpClientBase.js';
|
|
5
5
|
export default class ProviderApi extends HttpClientBase {
|
|
6
6
|
private network;
|
|
7
7
|
private account;
|
|
@@ -9,5 +9,7 @@ export default class ProviderApi extends HttpClientBase {
|
|
|
9
9
|
getCaptchaChallenge(userAccount: string, randomProvider: RandomProvider): Promise<GetCaptchaResponse>;
|
|
10
10
|
submitCaptchaSolution(captchas: CaptchaSolution[], requestHash: string, userAccount: string, salt: string, signature?: string): Promise<CaptchaSolutionResponse>;
|
|
11
11
|
verifyDappUser(userAccount: string, commitmentId?: string): Promise<VerificationResponse>;
|
|
12
|
+
getProviderStatus(): Promise<ProviderRegistered>;
|
|
13
|
+
getProviderDetails(): Promise<Provider>;
|
|
12
14
|
}
|
|
13
15
|
//# sourceMappingURL=ProviderApi.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderApi.d.ts","sourceRoot":"","sources":["../../src/api/ProviderApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProviderApi.d.ts","sourceRoot":"","sources":["../../src/api/ProviderApi.ts"],"names":[],"mappings":"AAaA,OAAO,EACH,SAAS,EAET,eAAe,EAGf,QAAQ,EACR,cAAc,EAEjB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACH,uBAAuB,EACvB,kBAAkB,EAClB,kBAAkB,EAClB,oBAAoB,EACvB,MAAM,mBAAmB,CAAA;AAC1B,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAC9C,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IACnD,OAAO,CAAC,OAAO,CAAe;IAC9B,OAAO,CAAC,OAAO,CAAW;gBAEd,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,EAAE,SAAS;IAUpE,mBAAmB,CAAC,WAAW,EAAE,MAAM,EAAE,cAAc,EAAE,cAAc,GAAG,OAAO,CAAC,kBAAkB,CAAC;IAWrG,qBAAqB,CACxB,QAAQ,EAAE,eAAe,EAAE,EAC3B,WAAW,EAAE,MAAM,EACnB,WAAW,EAAE,MAAM,EACnB,IAAI,EAAE,MAAM,EACZ,SAAS,CAAC,EAAE,MAAM,GACnB,OAAO,CAAC,uBAAuB,CAAC;IAY5B,cAAc,CAAC,WAAW,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,oBAAoB,CAAC;IAQzF,iBAAiB,IAAI,OAAO,CAAC,kBAAkB,CAAC;IAIhD,kBAAkB,IAAI,OAAO,CAAC,QAAQ,CAAC;CAGjD"}
|
package/dist/api/ProviderApi.js
CHANGED
|
@@ -1,24 +1,19 @@
|
|
|
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
|
-
|
|
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 { ApiPaths, CaptchaSolutionBody, } from '@prosopo/types';
|
|
15
|
+
import HttpClientBase from './HttpClientBase.js';
|
|
16
|
+
export default class ProviderApi extends HttpClientBase {
|
|
22
17
|
network;
|
|
23
18
|
account;
|
|
24
19
|
constructor(network, providerUrl, account) {
|
|
@@ -34,14 +29,14 @@ class ProviderApi extends HttpClientBase_1.default {
|
|
|
34
29
|
const { provider } = randomProvider;
|
|
35
30
|
const { blockNumber } = randomProvider;
|
|
36
31
|
const dappAccount = this.account;
|
|
37
|
-
const url = `${
|
|
32
|
+
const url = `${ApiPaths.GetCaptchaChallenge}/${provider.datasetId}/${userAccount}/${dappAccount}/${blockNumber
|
|
38
33
|
.toString()
|
|
39
34
|
.replace(/,/g, '')}`;
|
|
40
35
|
console.log(url);
|
|
41
36
|
return this.axios.get(url);
|
|
42
37
|
}
|
|
43
38
|
submitCaptchaSolution(captchas, requestHash, userAccount, salt, signature) {
|
|
44
|
-
const captchaSolutionBody =
|
|
39
|
+
const captchaSolutionBody = CaptchaSolutionBody.parse({
|
|
45
40
|
captchas,
|
|
46
41
|
requestHash,
|
|
47
42
|
user: userAccount,
|
|
@@ -49,15 +44,20 @@ class ProviderApi extends HttpClientBase_1.default {
|
|
|
49
44
|
salt,
|
|
50
45
|
signature,
|
|
51
46
|
});
|
|
52
|
-
return this.axios.post(
|
|
47
|
+
return this.axios.post(ApiPaths.SubmitCaptchaSolution, captchaSolutionBody);
|
|
53
48
|
}
|
|
54
49
|
verifyDappUser(userAccount, commitmentId) {
|
|
55
50
|
const payload = { user: userAccount };
|
|
56
51
|
if (commitmentId) {
|
|
57
52
|
payload['commitmentId'] = commitmentId;
|
|
58
53
|
}
|
|
59
|
-
return this.axios.post(
|
|
54
|
+
return this.axios.post(ApiPaths.VerifyCaptchaSolution, payload);
|
|
55
|
+
}
|
|
56
|
+
getProviderStatus() {
|
|
57
|
+
return this.axios.get(ApiPaths.GetProviderStatus);
|
|
58
|
+
}
|
|
59
|
+
getProviderDetails() {
|
|
60
|
+
return this.axios.get(ApiPaths.GetProviderDetails);
|
|
60
61
|
}
|
|
61
62
|
}
|
|
62
|
-
exports.default = ProviderApi;
|
|
63
63
|
//# sourceMappingURL=ProviderApi.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProviderApi.js","sourceRoot":"","sources":["../../src/api/ProviderApi.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"ProviderApi.js","sourceRoot":"","sources":["../../src/api/ProviderApi.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,EAEH,QAAQ,EAER,mBAAmB,GAKtB,MAAM,gBAAgB,CAAA;AAQvB,OAAO,cAAc,MAAM,qBAAqB,CAAA;AAEhD,MAAM,CAAC,OAAO,OAAO,WAAY,SAAQ,cAAc;IAC3C,OAAO,CAAe;IACtB,OAAO,CAAW;IAE1B,YAAY,OAAsB,EAAE,WAAmB,EAAE,OAAkB;QACvE,IAAI,CAAC,WA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WAAW,EAAE,CAAA;QACrC,IAAI,YAAY,EAAE;YACd,OAAO,CAAC,cAAc,CAAC,GAAG,YAAY,CAAA;SACzC;QACD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,OAAiC,CAAC,CAAA;IAC7F,CAAC;IAEM,iBAAiB;QACpB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,iBAAiB,CAAC,CAAA;IACrD,CAAC;IAEM,kBAAkB;QACrB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,CAAC,kBAAkB,CAAC,CAAA;IACtD,CAAC;CACJ"}
|
package/dist/api/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './HttpClientBase';
|
|
2
|
-
export { default as ProviderApi } from './ProviderApi';
|
|
1
|
+
export * from './HttpClientBase.js';
|
|
2
|
+
export { default as ProviderApi } from './ProviderApi.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/api/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"AAaA,cAAc,qBAAqB,CAAA;AACnC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/api/index.js
CHANGED
|
@@ -1,23 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ProviderApi = 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
|
-
//
|
|
9
|
-
//
|
|
10
|
-
//
|
|
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
|
-
//
|
|
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
|
-
//
|
|
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 './HttpClientBase.js';
|
|
15
|
+
export { default as ProviderApi } from './ProviderApi.js';
|
|
23
16
|
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/api/index.ts"],"names":[],"mappings":"
|
|
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,qBAAqB,CAAA;AACnC,OAAO,EAAE,OAAO,IAAI,WAAW,EAAE,MAAM,kBAAkB,CAAA"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './api';
|
|
2
|
-
export * from './types';
|
|
1
|
+
export * from './api/index.js';
|
|
2
|
+
export * from './types/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA"}
|
package/dist/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 './api/index.js';
|
|
15
|
+
export * from './types/index.js';
|
|
21
16
|
//# 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":"
|
|
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,kBAAkB,CAAA"}
|
package/dist/types/api.d.ts
CHANGED
package/dist/types/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAErD,MAAM,WAAW,6BAA6B;IAC1C,UAAU,EAAE,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,QAAQ,EAAE,eAAe,CAAA;CAC5B;AAED,MAAM,MAAM,2BAA2B,GAAG,MAAM,CAAA;AAEhD,MAAM,MAAM,sCAAsC,GAAG,OAAO,CAAA;AAE5D,MAAM,WAAW,eAAe;IAC5B,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB,EAAE,MAAM,CAAA;IAC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,CAAA;CACxC"}
|
package/dist/types/api.js
CHANGED
|
@@ -1,18 +1,15 @@
|
|
|
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.
|
|
14
|
+
export {};
|
|
18
15
|
//# 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,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"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './api';
|
|
1
|
+
export * from './api.js';
|
|
2
2
|
//# 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"}
|
package/dist/types/index.js
CHANGED
|
@@ -1,20 +1,15 @@
|
|
|
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
|
-
|
|
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';
|
|
20
15
|
//# 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"}
|
package/package.json
CHANGED
|
@@ -1,31 +1,31 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
"
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
2
|
+
"name": "@prosopo/api",
|
|
3
|
+
"version": "0.1.17",
|
|
4
|
+
"description": "Wrapper for the provider API",
|
|
5
|
+
"main": "dist/index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"clean": "tsc --build --clean",
|
|
9
|
+
"build": "tsc --build --verbose",
|
|
10
|
+
"lint": "npx eslint .",
|
|
11
|
+
"lint:fix": "npx eslint . --fix --config ../../.eslintrc.js"
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/prosopo/captcha.git"
|
|
16
|
+
},
|
|
17
|
+
"author": "PROSOPO LIMITED <info@prosopo.io>",
|
|
18
|
+
"license": "Apache-2.0",
|
|
19
|
+
"bugs": {
|
|
20
|
+
"url": "https://github.com/prosopo/captcha/issues"
|
|
21
|
+
},
|
|
22
|
+
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
23
|
+
"dependencies": {
|
|
24
|
+
"@prosopo/types": "^0.1.17",
|
|
25
|
+
"axios": "^0.27.2"
|
|
26
|
+
},
|
|
27
|
+
"devDependencies": {
|
|
28
|
+
"typescript": "^4.9.5"
|
|
29
|
+
},
|
|
30
|
+
"sideEffects": false
|
|
31
31
|
}
|