@prosopo/account 2.0.1 → 2.0.3

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.
@@ -12,11 +12,9 @@ const hash = require("./hash.cjs");
12
12
  const asyncFactory = require("./asyncFactory.cjs");
13
13
  const string = require("./string.cjs");
14
14
  const UrlConverter = require("./node/UrlConverter.cjs");
15
+ exports.TranslationKeysSchema = utils.TranslationKeysSchema;
15
16
  exports.isClientSide = utils.isClientSide;
16
17
  exports.reverseHexString = utils.reverseHexString;
17
- exports.snakeToCamelCase = utils.snakeToCamelCase;
18
- exports.translationKeys = utils.translationKeys;
19
- exports.trimProviderUrl = utils.trimProviderUrl;
20
18
  exports.ProsopoApiError = error.ProsopoApiError;
21
19
  exports.ProsopoBaseError = error.ProsopoBaseError;
22
20
  exports.ProsopoCliError = error.ProsopoCliError;
@@ -112,6 +112,7 @@ const CAPTCHA = {
112
112
  INVALID_ITEM_HASH: "Invalid item hash",
113
113
  DIFFERENT_DATASET_IDS: "Dataset ids do not match",
114
114
  INVALID_BLOCK_NO: "Invalid block number",
115
+ INVALID_TIMESTAMP: "Invalid timestamp",
115
116
  ID_MISMATCH: "captcha id mismatch",
116
117
  MISSING_ITEM_HASH: "missing item hash",
117
118
  INVALID_LEAF_HASH: "Invalid leaf hash",
@@ -120,7 +121,9 @@ const CAPTCHA = {
120
121
  DAPP_USER_SOLUTION_NOT_FOUND: "Dapp user solution not found",
121
122
  INVALID_PROVIDER_URL: "Invalid provider url",
122
123
  NO_CAPTCHA: "No captcha found",
123
- INVALID_TOKEN: "Invalid token"
124
+ INVALID_TOKEN: "Invalid token",
125
+ IP_ADDRESS_MISMATCH: "IP address mismatch",
126
+ INVALID_SOLUTION: "Invalid solution"
124
127
  };
125
128
  const API = {
126
129
  BODY_UNDEFINED: "Body must be defined in API POST call",
@@ -134,6 +137,7 @@ const API = {
134
137
  USER_NOT_VERIFIED: "User not verified",
135
138
  USER_NOT_VERIFIED_TIME_EXPIRED: "User not verified. Captcha solution has expired.",
136
139
  USER_NOT_VERIFIED_NO_SOLUTION: "User not verified. No captcha solution found.",
140
+ USER_ALREADY_VERIFIED: "This solution has already been verified. User should complete a new captcha.",
137
141
  UNKNOWN: "Unknown API error"
138
142
  };
139
143
  const CLI = {
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
- const hex = require("@polkadot/util/hex");
4
3
  const error = require("./error.cjs");
5
4
  const en = require("./locales/en.json.cjs");
5
+ const zod = require("zod");
6
6
  function isClientSide() {
7
7
  return !!(typeof window !== "undefined" && window.document && window.document.createElement);
8
8
  }
9
9
  function getLeafFieldPath(obj) {
10
10
  if (typeof obj === "string") {
11
- return [obj];
11
+ return [];
12
12
  }
13
13
  return Object.keys(obj).reduce((arr, key) => {
14
14
  const value = obj[key];
@@ -23,18 +23,11 @@ function getLeafFieldPath(obj) {
23
23
  }));
24
24
  }, []);
25
25
  }
26
- const translationKeys = getLeafFieldPath(en.default);
27
- const trimProviderUrl = (url) => {
28
- return hex.hexToString(url);
29
- };
30
- function snakeToCamelCase(str) {
31
- return str.replace(/([-_][a-z])/g, (group) => group.toUpperCase().replace("-", "").replace("_", ""));
32
- }
26
+ const TranslationKeysSchema = zod.z.enum(getLeafFieldPath(en.default));
27
+ const TranslationFileSchema = zod.z.record(TranslationKeysSchema, zod.z.record(TranslationKeysSchema, zod.z.string()));
33
28
  function reverseHexString(str) {
34
29
  return `0x${str.match(/.{1,2}/g)?.reverse().join("") || ""}`;
35
30
  }
31
+ exports.TranslationKeysSchema = TranslationKeysSchema;
36
32
  exports.isClientSide = isClientSide;
37
33
  exports.reverseHexString = reverseHexString;
38
- exports.snakeToCamelCase = snakeToCamelCase;
39
- exports.translationKeys = translationKeys;
40
- exports.trimProviderUrl = trimProviderUrl;
@@ -10,25 +10,10 @@ require("../common/dist/index.cjs");
10
10
  const index = require("../detector/src/index.cjs");
11
11
  require("../util/dist/index.cjs");
12
12
  const Extension = require("./Extension.cjs");
13
- const error = require("../common/dist/error.cjs");
14
13
  const version = require("../util/dist/version.cjs");
15
14
  const canvas = require("../util/dist/canvas.cjs");
16
15
  const hash = require("../common/dist/hash.cjs");
17
16
  class ExtensionWeb2 extends Extension.Extension {
18
- constructor() {
19
- super(...arguments);
20
- this.getNetwork = (config) => {
21
- const network = config.networks[config.defaultNetwork];
22
- if (!network) {
23
- throw new error.ProsopoEnvError("DEVELOPER.NETWORK_NOT_FOUND", {
24
- context: {
25
- error: `No network found for environment ${config.defaultEnvironment}`
26
- }
27
- });
28
- }
29
- return network;
30
- };
31
- }
32
17
  async getAccount(config) {
33
18
  const account = await this.createAccount(config);
34
19
  const extension = await this.createExtension(account);
@@ -90,8 +75,7 @@ class ExtensionWeb2 extends Extension.Extension {
90
75
  const mnemonic = bip39.entropyToMnemonic(u8Entropy);
91
76
  const type = "sr25519";
92
77
  const keyring$1 = new keyring.Keyring({
93
- type,
94
- ss58Format: config.networks[config.defaultNetwork].ss58Format
78
+ type
95
79
  });
96
80
  const keypair = keyring$1.addFromMnemonic(mnemonic);
97
81
  const address = keypair.address;
@@ -16,6 +16,7 @@ const permutations = require("./permutations.cjs");
16
16
  const version = require("./version.cjs");
17
17
  const hex = require("./hex.cjs");
18
18
  const checks = require("./checks.cjs");
19
+ const verifyRecency = require("./verifyRecency.cjs");
19
20
  exports.flatten = util.flatten;
20
21
  exports.getCurrentFileDirectory = util.getCurrentFileDirectory;
21
22
  exports.kebabCase = util.kebabCase;
@@ -40,3 +41,4 @@ exports.hashToHex = hex.hashToHex;
40
41
  exports.u8aToHex = hex.u8aToHex;
41
42
  exports.isArray = checks.isArray;
42
43
  exports.isObject = checks.isObject;
44
+ exports.verifyRecency = verifyRecency.verifyRecency;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const verifyRecency = (challenge, maxVerifiedTime) => {
4
+ const timestamp = challenge.split("___")[0];
5
+ if (!timestamp) {
6
+ return false;
7
+ }
8
+ const currentTimestamp = Date.now();
9
+ const challengeTimestamp = Number.parseInt(timestamp, 10);
10
+ return currentTimestamp - challengeTimestamp <= maxVerifiedTime;
11
+ };
12
+ exports.verifyRecency = verifyRecency;
@@ -4,14 +4,5 @@ export declare class ExtensionWeb2 extends Extension {
4
4
  getAccount(config: ProcaptchaClientConfigOutput): Promise<Account>;
5
5
  private createExtension;
6
6
  private createAccount;
7
- getNetwork: (config: ProcaptchaClientConfigOutput) => {
8
- contract: {
9
- name: string;
10
- address: string;
11
- };
12
- endpoint: string[];
13
- pairType: "ed25519" | "sr25519" | "ecdsa" | "ethereum";
14
- ss58Format: number;
15
- };
16
7
  }
17
8
  //# sourceMappingURL=ExtensionWeb2.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionWeb2.d.ts","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAO3C,qBAAa,aAAc,SAAQ,SAAS;IAC9B,UAAU,CACtB,MAAM,EAAE,4BAA4B,GAClC,OAAO,CAAC,OAAO,CAAC;YAUL,eAAe;YAmCf,aAAa;IAwC3B,UAAU,WAAY,4BAA4B;;;;;;;;MAUhD;CACF"}
1
+ {"version":3,"file":"ExtensionWeb2.d.ts","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"AA0BA,OAAO,KAAK,EAAE,OAAO,EAAE,4BAA4B,EAAE,MAAM,gBAAgB,CAAC;AAG5E,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAO3C,qBAAa,aAAc,SAAQ,SAAS;IAC9B,UAAU,CACtB,MAAM,EAAE,4BAA4B,GAClC,OAAO,CAAC,OAAO,CAAC;YAUL,eAAe;YAmCf,aAAa;CAuC3B"}
@@ -4,26 +4,12 @@ import { cryptoWaitReady } from "@polkadot/util-crypto";
4
4
  import { entropyToMnemonic } from "@polkadot/util-crypto/mnemonic/bip39";
5
5
  import { stringToU8a } from "@polkadot/util/string";
6
6
  import { u8aToHex } from "@polkadot/util/u8a";
7
- import { ProsopoEnvError, hexHash } from "@prosopo/common";
7
+ import { hexHash } from "@prosopo/common";
8
8
  import { getFingerprint } from "@prosopo/detector";
9
9
  import { picassoCanvas } from "@prosopo/util";
10
10
  import { version } from "@prosopo/util";
11
11
  import { Extension } from "./Extension.js";
12
12
  export class ExtensionWeb2 extends Extension {
13
- constructor() {
14
- super(...arguments);
15
- this.getNetwork = (config) => {
16
- const network = config.networks[config.defaultNetwork];
17
- if (!network) {
18
- throw new ProsopoEnvError("DEVELOPER.NETWORK_NOT_FOUND", {
19
- context: {
20
- error: `No network found for environment ${config.defaultEnvironment}`,
21
- },
22
- });
23
- }
24
- return network;
25
- };
26
- }
27
13
  async getAccount(config) {
28
14
  const account = await this.createAccount(config);
29
15
  const extension = await this.createExtension(account);
@@ -78,7 +64,6 @@ export class ExtensionWeb2 extends Extension {
78
64
  const type = "sr25519";
79
65
  const keyring = new Keyring({
80
66
  type,
81
- ss58Format: config.networks[config.defaultNetwork].ss58Format,
82
67
  });
83
68
  const keypair = keyring.addFromMnemonic(mnemonic);
84
69
  const address = keypair.address;
@@ -1 +1 @@
1
- {"version":3,"file":"ExtensionWeb2.js","sourceRoot":"","sources":["../../src/extension/ExtensionWeb2.ts"],"names":[],"mappings":"AAcA,OAAO,EAAE,OAAO,IAAI,MAAM,EAAE,MAAM,sCAAsC,CAAC;AAGzE,OAAO,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAE5C,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAEzE,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACpD,O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CAAC,EAAE,CAAC,EACxC,GAAG,CACH,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QACX,MAAM,SAAS,GAAG,WAAW,CAAC,OAAO,CAAC,CAAC;QACvC,MAAM,QAAQ,GAAG,iBAAiB,CAAC,SAAS,CAAC,CAAC;QAC9C,MAAM,IAAI,GAAgB,SAAS,CAAC;QACpC,MAAM,OAAO,GAAG,IAAI,OAAO,CAAC;YAC3B,IAAI;SACJ,CAAC,CAAC;QACH,MAAM,OAAO,GAAG,OAAO,CAAC,eAAe,CAAC,QAAQ,CAAC,CAAC;QAClD,MAAM,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;QAChC,OAAO;YACN,OAAO;YACP,IAAI,EAAE,OAAO;YACb,OAAO;SACP,CAAC;IACH,CAAC;CAED"}
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
1
  {
2
- "name": "@prosopo/account",
3
- "version": "2.0.1",
4
- "description": "Services and Utils for Prosopo account gen and management",
5
- "main": "dist/index.js",
6
- "type": "module",
7
- "engines": {
8
- "node": ">=20",
9
- "npm": ">=9"
10
- },
11
- "exports": {
12
- ".": {
13
- "import": "./dist/index.js",
14
- "require": "./dist/cjs/index.cjs"
15
- }
16
- },
17
- "scripts": {
18
- "test": "echo \"No test specified\"",
19
- "clean": "tsc --build --clean",
20
- "build": "tsc --build --verbose",
21
- "build:cjs": "npx vite --config vite.cjs.config.ts build"
22
- },
23
- "repository": {
24
- "type": "git",
25
- "url": "git+ssh://git@github.com/prosopo/types.git"
26
- },
27
- "author": "Prosopo Limited",
28
- "license": "Apache-2.0",
29
- "bugs": {
30
- "url": "https://github.com/prosopo/captcha/issues"
31
- },
32
- "homepage": "https://github.com/prosopo/captcha#readme",
33
- "dependencies": {
34
- "react": "^18.3.1",
35
- "@fingerprintjs/fingerprintjs": "^3.3.6",
36
- "@polkadot/api": "10.13.1",
37
- "@polkadot/extension-base": "0.46.9",
38
- "@polkadot/extension-dapp": "0.46.9",
39
- "@polkadot/extension-inject": "0.46.9",
40
- "@polkadot/keyring": "12.6.2",
41
- "@polkadot/rpc-provider": "10.13.1",
42
- "@polkadot/util": "12.6.2",
43
- "@polkadot/util-crypto": "12.6.2",
44
- "@prosopo/common": "2.0.1",
45
- "@prosopo/detector": "2.0.1",
46
- "@prosopo/types": "2.0.1",
47
- "@prosopo/util": "2.0.1"
48
- },
49
- "devDependencies": {
50
- "@prosopo/config": "2.0.1",
51
- "tslib": "2.6.2",
52
- "typescript": "5.1.6"
53
- },
54
- "sideEffects": false
2
+ "name": "@prosopo/account",
3
+ "version": "2.0.3",
4
+ "description": "Services and Utils for Prosopo account gen and management",
5
+ "main": "dist/index.js",
6
+ "type": "module",
7
+ "engines": {
8
+ "node": ">=20",
9
+ "npm": ">=9"
10
+ },
11
+ "exports": {
12
+ ".": {
13
+ "import": "./dist/index.js",
14
+ "require": "./dist/cjs/index.cjs"
15
+ }
16
+ },
17
+ "scripts": {
18
+ "test": "echo \"No test specified\"",
19
+ "clean": "tsc --build --clean",
20
+ "build": "tsc --build --verbose",
21
+ "build:cjs": "npx vite --config vite.cjs.config.ts build"
22
+ },
23
+ "repository": {
24
+ "type": "git",
25
+ "url": "git+ssh://git@github.com/prosopo/types.git"
26
+ },
27
+ "author": "Prosopo Limited",
28
+ "license": "Apache-2.0",
29
+ "bugs": {
30
+ "url": "https://github.com/prosopo/captcha/issues"
31
+ },
32
+ "homepage": "https://github.com/prosopo/captcha#readme",
33
+ "dependencies": {
34
+ "react": "^18.3.1",
35
+ "@fingerprintjs/fingerprintjs": "^3.3.6",
36
+ "@polkadot/api": "10.13.1",
37
+ "@polkadot/extension-base": "0.46.9",
38
+ "@polkadot/extension-dapp": "0.46.9",
39
+ "@polkadot/extension-inject": "0.46.9",
40
+ "@polkadot/keyring": "12.6.2",
41
+ "@polkadot/rpc-provider": "10.13.1",
42
+ "@polkadot/util": "12.6.2",
43
+ "@polkadot/util-crypto": "12.6.2",
44
+ "@prosopo/common": "2.0.3",
45
+ "@prosopo/detector": "2.0.3",
46
+ "@prosopo/types": "2.0.3",
47
+ "@prosopo/util": "2.0.3"
48
+ },
49
+ "devDependencies": {
50
+ "@prosopo/config": "2.0.3",
51
+ "tslib": "2.6.2",
52
+ "typescript": "5.1.6"
53
+ },
54
+ "sideEffects": false
55
55
  }