@prosopo/api 0.1.17 → 0.1.18
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/package.json +4 -3
- package/dist/api/HttpClientBase.d.ts +0 -9
- package/dist/api/HttpClientBase.d.ts.map +0 -1
- package/dist/api/HttpClientBase.js +0 -29
- package/dist/api/HttpClientBase.js.map +0 -1
- package/dist/api/ProviderApi.d.ts +0 -15
- package/dist/api/ProviderApi.d.ts.map +0 -1
- package/dist/api/ProviderApi.js +0 -63
- package/dist/api/ProviderApi.js.map +0 -1
- package/dist/api/index.d.ts +0 -3
- package/dist/api/index.d.ts.map +0 -1
- package/dist/api/index.js +0 -16
- package/dist/api/index.js.map +0 -1
- package/dist/index.d.ts +0 -3
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js +0 -16
- package/dist/index.js.map +0 -1
- package/dist/types/api.d.ts +0 -63
- package/dist/types/api.d.ts.map +0 -1
- package/dist/types/api.js +0 -15
- package/dist/types/api.js.map +0 -1
- package/dist/types/index.d.ts +0 -2
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -15
- package/dist/types/index.js.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prosopo/api",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.18",
|
|
4
4
|
"description": "Wrapper for the provider API",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -21,11 +21,12 @@
|
|
|
21
21
|
},
|
|
22
22
|
"homepage": "https://github.com/prosopo/captcha#readme",
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@prosopo/types": "^0.1.
|
|
24
|
+
"@prosopo/types": "^0.1.18",
|
|
25
25
|
"axios": "^0.27.2"
|
|
26
26
|
},
|
|
27
27
|
"devDependencies": {
|
|
28
|
-
"
|
|
28
|
+
"tslib": "^2.6.2",
|
|
29
|
+
"typescript": "^5.1.6"
|
|
29
30
|
},
|
|
30
31
|
"sideEffects": false
|
|
31
32
|
}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { AxiosInstance, AxiosResponse } from 'axios';
|
|
2
|
-
export declare class HttpClientBase {
|
|
3
|
-
protected readonly axios: AxiosInstance;
|
|
4
|
-
constructor(baseURL: string, prefix?: string);
|
|
5
|
-
protected responseHandler: (response: AxiosResponse) => any;
|
|
6
|
-
protected errorHandler: (error: any) => Promise<never>;
|
|
7
|
-
}
|
|
8
|
-
export default HttpClientBase;
|
|
9
|
-
//# sourceMappingURL=HttpClientBase.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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,29 +0,0 @@
|
|
|
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 axios from 'axios';
|
|
15
|
-
export class HttpClientBase {
|
|
16
|
-
axios;
|
|
17
|
-
constructor(baseURL, prefix = '') {
|
|
18
|
-
baseURL = baseURL + prefix;
|
|
19
|
-
this.axios = axios.default.create({ baseURL });
|
|
20
|
-
this.axios.interceptors.response.use(this.responseHandler, this.errorHandler);
|
|
21
|
-
}
|
|
22
|
-
responseHandler = (response) => {
|
|
23
|
-
console.log('API REQUEST', response.request);
|
|
24
|
-
return response.data;
|
|
25
|
-
};
|
|
26
|
-
errorHandler = (error) => Promise.reject(error);
|
|
27
|
-
}
|
|
28
|
-
export default HttpClientBase;
|
|
29
|
-
//# sourceMappingURL=HttpClientBase.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,15 +0,0 @@
|
|
|
1
|
-
import { AccountId, CaptchaSolution, Provider, RandomProvider } from '@prosopo/types';
|
|
2
|
-
import { CaptchaSolutionResponse, GetCaptchaResponse, ProviderRegistered, VerificationResponse } from '../types/index.js';
|
|
3
|
-
import { NetworkConfig } from '@prosopo/types';
|
|
4
|
-
import HttpClientBase from './HttpClientBase.js';
|
|
5
|
-
export default class ProviderApi extends HttpClientBase {
|
|
6
|
-
private network;
|
|
7
|
-
private account;
|
|
8
|
-
constructor(network: NetworkConfig, providerUrl: string, account: AccountId);
|
|
9
|
-
getCaptchaChallenge(userAccount: string, randomProvider: RandomProvider): Promise<GetCaptchaResponse>;
|
|
10
|
-
submitCaptchaSolution(captchas: CaptchaSolution[], requestHash: string, userAccount: string, salt: string, signature?: string): Promise<CaptchaSolutionResponse>;
|
|
11
|
-
verifyDappUser(userAccount: string, commitmentId?: string): Promise<VerificationResponse>;
|
|
12
|
-
getProviderStatus(): Promise<ProviderRegistered>;
|
|
13
|
-
getProviderDetails(): Promise<Provider>;
|
|
14
|
-
}
|
|
15
|
-
//# sourceMappingURL=ProviderApi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
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 { ApiPaths, CaptchaSolutionBody, } from '@prosopo/types';
|
|
15
|
-
import HttpClientBase from './HttpClientBase.js';
|
|
16
|
-
export default class ProviderApi extends HttpClientBase {
|
|
17
|
-
network;
|
|
18
|
-
account;
|
|
19
|
-
constructor(network, providerUrl, account) {
|
|
20
|
-
if (!providerUrl.startsWith('http')) {
|
|
21
|
-
providerUrl = `https://${providerUrl}`;
|
|
22
|
-
}
|
|
23
|
-
console.log('ProviderApi', providerUrl);
|
|
24
|
-
super(providerUrl);
|
|
25
|
-
this.network = network;
|
|
26
|
-
this.account = account;
|
|
27
|
-
}
|
|
28
|
-
getCaptchaChallenge(userAccount, randomProvider) {
|
|
29
|
-
const { provider } = randomProvider;
|
|
30
|
-
const { blockNumber } = randomProvider;
|
|
31
|
-
const dappAccount = this.account;
|
|
32
|
-
const url = `${ApiPaths.GetCaptchaChallenge}/${provider.datasetId}/${userAccount}/${dappAccount}/${blockNumber
|
|
33
|
-
.toString()
|
|
34
|
-
.replace(/,/g, '')}`;
|
|
35
|
-
console.log(url);
|
|
36
|
-
return this.axios.get(url);
|
|
37
|
-
}
|
|
38
|
-
submitCaptchaSolution(captchas, requestHash, userAccount, salt, signature) {
|
|
39
|
-
const captchaSolutionBody = CaptchaSolutionBody.parse({
|
|
40
|
-
captchas,
|
|
41
|
-
requestHash,
|
|
42
|
-
user: userAccount,
|
|
43
|
-
dapp: this.account,
|
|
44
|
-
salt,
|
|
45
|
-
signature,
|
|
46
|
-
});
|
|
47
|
-
return this.axios.post(ApiPaths.SubmitCaptchaSolution, captchaSolutionBody);
|
|
48
|
-
}
|
|
49
|
-
verifyDappUser(userAccount, commitmentId) {
|
|
50
|
-
const payload = { user: userAccount };
|
|
51
|
-
if (commitmentId) {
|
|
52
|
-
payload['commitmentId'] = commitmentId;
|
|
53
|
-
}
|
|
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);
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=ProviderApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
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,WAAW,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YACjC,WAAW,GAAG,WAAW,WAAW,EAAE,CAAA;SACzC;QACD,OAAO,CAAC,GAAG,CAAC,aAAa,EAAE,WAAW,CAAC,CAAA;QACvC,KAAK,CAAC,WAAW,CAAC,CAAA;QAClB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;QACtB,IAAI,CAAC,OAAO,GAAG,OAAO,CAAA;IAC1B,CAAC;IAEM,mBAAmB,CAAC,WAAmB,EAAE,cAA8B;QAC1E,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,CAAA;QACnC,MAAM,EAAE,WAAW,EAAE,GAAG,cAAc,CAAA;QACtC,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAA;QAChC,MAAM,GAAG,GAAG,GAAG,QAAQ,CAAC,mBAAmB,IAAI,QAAQ,CAAC,SAAS,IAAI,WAAW,IAAI,WAAW,IAAI,WAAW;aACzG,QAAQ,EAAE;aACV,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,EAAE,CAAA;QACxB,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;QAChB,OAAO,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,GAAG,CAAC,CAAA;IAC9B,CAAC;IAEM,qBAAqB,CACxB,QAA2B,EAC3B,WAAmB,EACnB,WAAmB,EACnB,IAAY,EACZ,SAAkB;QAElB,MAAM,mBAAmB,GAA4B,mBAAmB,CAAC,KAAK,CAAC;YAC3E,QAAQ;YACR,WAAW;YACX,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,IAAI,CAAC,OAAO;YAClB,IAAI;YACJ,SAAS;SACZ,CAAC,CAAA;QACF,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,qBAAqB,EAAE,mBAAmB,CAAC,CAAA;IAC/E,CAAC;IAEM,cAAc,CAAC,WAAmB,EAAE,YAAqB;QAC5D,MAAM,OAAO,GAAG,EAAE,IAAI,EAAE,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
DELETED
package/dist/api/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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 './HttpClientBase.js';
|
|
15
|
-
export { default as ProviderApi } from './ProviderApi.js';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/dist/api/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
package/dist/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
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 './api/index.js';
|
|
15
|
-
export * from './types/index.js';
|
|
16
|
-
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { Captcha, MerkleProof } from '@prosopo/types';
|
|
2
|
-
export interface ProsopoRandomProviderResponse {
|
|
3
|
-
providerId: string;
|
|
4
|
-
blockNumber: string;
|
|
5
|
-
provider: ProposoProvider;
|
|
6
|
-
}
|
|
7
|
-
export type CaptchaSolutionCommitmentId = string;
|
|
8
|
-
export type ProsopoDappOperatorIsHumanUserResponse = boolean;
|
|
9
|
-
export interface ProposoProvider {
|
|
10
|
-
balance: string;
|
|
11
|
-
datasetId: string;
|
|
12
|
-
datasetIdContent: string;
|
|
13
|
-
fee: string;
|
|
14
|
-
payee: string;
|
|
15
|
-
serviceOrigin: string;
|
|
16
|
-
status: string;
|
|
17
|
-
}
|
|
18
|
-
export interface CaptchaResponseCaptcha {
|
|
19
|
-
captcha: Omit<Captcha, 'solution'>;
|
|
20
|
-
proof: MerkleProof;
|
|
21
|
-
}
|
|
22
|
-
export interface GetCaptchaResponse {
|
|
23
|
-
captchas: CaptchaResponseCaptcha[];
|
|
24
|
-
requestHash: string;
|
|
25
|
-
}
|
|
26
|
-
export interface VerificationResponse {
|
|
27
|
-
status: string;
|
|
28
|
-
solutionApproved: boolean;
|
|
29
|
-
commitmentId: CaptchaSolutionCommitmentId;
|
|
30
|
-
}
|
|
31
|
-
export interface CaptchaSolutionResponse {
|
|
32
|
-
captchas: CaptchaResponseCaptcha[];
|
|
33
|
-
status: string;
|
|
34
|
-
partialFee: string;
|
|
35
|
-
solutionApproved: boolean;
|
|
36
|
-
}
|
|
37
|
-
export interface AccountCreatorConfig {
|
|
38
|
-
area: {
|
|
39
|
-
width: number;
|
|
40
|
-
height: number;
|
|
41
|
-
};
|
|
42
|
-
offsetParameter: number;
|
|
43
|
-
multiplier: number;
|
|
44
|
-
fontSizeFactor: number;
|
|
45
|
-
maxShadowBlur: number;
|
|
46
|
-
numberOfRounds: number;
|
|
47
|
-
seed: number;
|
|
48
|
-
}
|
|
49
|
-
export interface ProsopoNetwork {
|
|
50
|
-
endpoint: string;
|
|
51
|
-
contract: {
|
|
52
|
-
address: string;
|
|
53
|
-
name: string;
|
|
54
|
-
};
|
|
55
|
-
dappAccount: {
|
|
56
|
-
address: string;
|
|
57
|
-
name: string;
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
export interface ProviderRegistered {
|
|
61
|
-
status: 'Registered' | 'Unregistered';
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=api.d.ts.map
|
package/dist/types/api.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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;IACxB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,EAAE,MAAM,CAAA;IACrB,MAAM,EAAE,MAAM,CAAA;CACjB;AAED,MAAM,WAAW,sBAAsB;IACnC,OAAO,EAAE,IAAI,CAAC,OAAO,EAAE,UAAU,CAAC,CAAA;IAClC,KAAK,EAAE,WAAW,CAAA;CACrB;AAED,MAAM,WAAW,kBAAkB;IAC/B,QAAQ,EAAE,sBAAsB,EAAE,CAAA;IAClC,WAAW,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,oBAAoB;IACjC,MAAM,EAAE,MAAM,CAAA;IACd,gBAAgB,EAAE,OAAO,CAAA;IACzB,YAAY,EAAE,2BAA2B,CAAA;CAC5C;AAED,MAAM,WAAW,uBAAuB;IACpC,QAAQ,EAAE,sBAAsB,EAAE,CAAA;IAClC,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,OAAO,CAAA;CAC5B;AAED,MAAM,WAAW,oBAAoB;IACjC,IAAI,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAA;IACvC,eAAe,EAAE,MAAM,CAAA;IACvB,UAAU,EAAE,MAAM,CAAA;IAClB,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,cAAc;IAC3B,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;IACD,WAAW,EAAE;QACT,OAAO,EAAE,MAAM,CAAA;QACf,IAAI,EAAE,MAAM,CAAA;KACf,CAAA;CACJ;AAED,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,YAAY,GAAG,cAAc,CAAA;CACxC"}
|
package/dist/types/api.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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 {};
|
|
15
|
-
//# sourceMappingURL=api.js.map
|
package/dist/types/api.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAaA,cAAc,UAAU,CAAA"}
|
package/dist/types/index.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
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 './api.js';
|
|
15
|
-
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
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"}
|