@prosopo/keyring 2.6.4 → 2.8.7
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/CHANGELOG.md +91 -0
- package/README.md +8 -0
- package/dist/accounts/getPair.js +35 -39
- package/dist/accounts/index.js +10 -3
- package/dist/accounts/mnemonic.js +16 -15
- package/dist/accounts/testAccounts.js +44 -0
- package/dist/cjs/accounts/getPair.cjs +6 -12
- package/dist/cjs/accounts/index.cjs +3 -1
- package/dist/cjs/accounts/mnemonic.cjs +7 -9
- package/dist/cjs/accounts/testAccounts.cjs +44 -0
- package/dist/cjs/index.cjs +11 -1
- package/dist/cjs/keyring/index.cjs +7 -0
- package/dist/cjs/keyring/keyring.cjs +271 -0
- package/dist/cjs/keyring/pairs.cjs +28 -0
- package/dist/cjs/pair/decode.cjs +32 -0
- package/dist/cjs/pair/defaults.cjs +31 -0
- package/dist/cjs/pair/encode.cjs +18 -0
- package/dist/cjs/pair/index.cjs +156 -0
- package/dist/cjs/pair/toJson.cjs +14 -0
- package/dist/index.js +19 -2
- package/dist/keyring/index.js +7 -0
- package/dist/keyring/keyring.js +271 -0
- package/dist/keyring/pairs.js +28 -0
- package/dist/pair/decode.js +32 -0
- package/dist/pair/defaults.js +31 -0
- package/dist/pair/encode.js +18 -0
- package/dist/pair/index.js +156 -0
- package/dist/pair/toJson.js +14 -0
- package/package.json +28 -18
- package/vite.cjs.config.ts +4 -1
- package/vite.esm.config.ts +20 -0
- package/vite.test.config.ts +32 -0
- package/dist/accounts/getPair.d.ts +0 -6
- package/dist/accounts/getPair.d.ts.map +0 -1
- package/dist/accounts/getPair.js.map +0 -1
- package/dist/accounts/index.d.ts +0 -3
- package/dist/accounts/index.d.ts.map +0 -1
- package/dist/accounts/index.js.map +0 -1
- package/dist/accounts/mnemonic.d.ts +0 -5
- package/dist/accounts/mnemonic.d.ts.map +0 -1
- package/dist/accounts/mnemonic.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,96 @@
|
|
|
1
1
|
# @prosopo/keyring
|
|
2
2
|
|
|
3
|
+
## 2.8.7
|
|
4
|
+
### Patch Changes
|
|
5
|
+
|
|
6
|
+
- 93d5e50: ensure packages have @prosopo/config as dep for vite configs
|
|
7
|
+
- 3573f0b: fix npm scripts bundle command
|
|
8
|
+
- 3573f0b: build using vite, typecheck using tsc
|
|
9
|
+
- efd8102: Add tests for unwrap error helper
|
|
10
|
+
- 93d5e50: fix missing dep for @prosopo/config
|
|
11
|
+
- f29fc7e: Refining API error handling. Adding more language strings
|
|
12
|
+
- 3573f0b: standardise all vite based npm scripts for bundling
|
|
13
|
+
- Updated dependencies [93d5e50]
|
|
14
|
+
- Updated dependencies [3573f0b]
|
|
15
|
+
- Updated dependencies [8a64429]
|
|
16
|
+
- Updated dependencies [3573f0b]
|
|
17
|
+
- Updated dependencies [efd8102]
|
|
18
|
+
- Updated dependencies [93d5e50]
|
|
19
|
+
- Updated dependencies [63519d7]
|
|
20
|
+
- Updated dependencies [f29fc7e]
|
|
21
|
+
- Updated dependencies [3573f0b]
|
|
22
|
+
- Updated dependencies [2d0dd8a]
|
|
23
|
+
- Updated dependencies [6d604ad]
|
|
24
|
+
- @prosopo/util-crypto@13.5.2
|
|
25
|
+
- @prosopo/types@3.0.4
|
|
26
|
+
- @prosopo/common@3.1.0
|
|
27
|
+
- @prosopo/config@3.1.1
|
|
28
|
+
|
|
29
|
+
## 2.8.6
|
|
30
|
+
### Patch Changes
|
|
31
|
+
|
|
32
|
+
- Updated dependencies [b0d7207]
|
|
33
|
+
- @prosopo/types@3.0.3
|
|
34
|
+
|
|
35
|
+
## 2.8.5
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- Updated dependencies [f682f0c]
|
|
39
|
+
- @prosopo/types@3.0.2
|
|
40
|
+
- @prosopo/common@3.0.2
|
|
41
|
+
|
|
42
|
+
## 2.8.4
|
|
43
|
+
### Patch Changes
|
|
44
|
+
|
|
45
|
+
- @prosopo/common@3.0.1
|
|
46
|
+
- @prosopo/types@3.0.1
|
|
47
|
+
|
|
48
|
+
## 2.8.3
|
|
49
|
+
### Patch Changes
|
|
50
|
+
|
|
51
|
+
- Updated dependencies [64b5bcd]
|
|
52
|
+
- @prosopo/common@3.0.0
|
|
53
|
+
- @prosopo/types@3.0.0
|
|
54
|
+
|
|
55
|
+
## 2.8.2
|
|
56
|
+
### Patch Changes
|
|
57
|
+
|
|
58
|
+
- Updated dependencies [aee3efe]
|
|
59
|
+
- @prosopo/types@2.10.0
|
|
60
|
+
|
|
61
|
+
## 2.8.1
|
|
62
|
+
### Patch Changes
|
|
63
|
+
|
|
64
|
+
- 86c22b8: structured logging
|
|
65
|
+
- Updated dependencies [86c22b8]
|
|
66
|
+
- @prosopo/util-crypto@13.5.1
|
|
67
|
+
- @prosopo/common@2.7.2
|
|
68
|
+
- @prosopo/types@2.9.1
|
|
69
|
+
|
|
70
|
+
## 2.8.0
|
|
71
|
+
### Minor Changes
|
|
72
|
+
|
|
73
|
+
- 30bb383: Making sure verify works and derived accounts
|
|
74
|
+
|
|
75
|
+
### Patch Changes
|
|
76
|
+
|
|
77
|
+
- Updated dependencies [30bb383]
|
|
78
|
+
- @prosopo/util-crypto@13.5.0
|
|
79
|
+
- @prosopo/types@2.9.0
|
|
80
|
+
- @prosopo/common@2.7.1
|
|
81
|
+
|
|
82
|
+
## 2.7.0
|
|
83
|
+
### Minor Changes
|
|
84
|
+
|
|
85
|
+
- 8f0644a: Taking required functions from polkadot/keyring and polkadot/util-crypto in-house and removing WASM dependencies. Adding @scure JS-based sr25519 function instead.
|
|
86
|
+
|
|
87
|
+
### Patch Changes
|
|
88
|
+
|
|
89
|
+
- Updated dependencies [8f0644a]
|
|
90
|
+
- @prosopo/util-crypto@13.4.0
|
|
91
|
+
- @prosopo/common@2.7.0
|
|
92
|
+
- @prosopo/types@2.8.0
|
|
93
|
+
|
|
3
94
|
## 2.6.4
|
|
4
95
|
|
|
5
96
|
### Patch Changes
|
package/README.md
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
This is a selective clone
|
|
2
|
+
of [keyring](https://github.com/polkadot-js/common/tree/25fe5f4e27d6dfe0a26082925a49207f2bfcd9fd/packages/keyring)
|
|
3
|
+
from the Polkadot JS repository at `25fe5f4e27d6dfe0a26082925a49207f2bfcd9fd`. Modifications have been made as follows:
|
|
4
|
+
|
|
5
|
+
- tests switched to vitest
|
|
6
|
+
- package name changed to @prosopo/util-crypto
|
|
7
|
+
- WASM dropped and replaced with JS implementation of sr25519 from @scure/sr25519
|
|
8
|
+
- other account types (`ecdsa`, `ed25519`, `ethereum`) dropped
|
package/dist/accounts/getPair.js
CHANGED
|
@@ -1,47 +1,43 @@
|
|
|
1
|
-
import { Keyring } from "@polkadot/keyring";
|
|
2
|
-
import { cryptoWaitReady } from "@polkadot/util-crypto";
|
|
3
|
-
import { mnemonicValidate } from "@polkadot/util-crypto/mnemonic";
|
|
4
1
|
import { hexToU8a } from "@polkadot/util/hex";
|
|
5
2
|
import { isHex } from "@polkadot/util/is";
|
|
6
3
|
import { ProsopoEnvError } from "@prosopo/common";
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
4
|
+
import { mnemonicValidate } from "@prosopo/util-crypto";
|
|
5
|
+
import { Keyring } from "../keyring/keyring.js";
|
|
6
|
+
function getPair(secret, account, pairType, ss58Format) {
|
|
7
|
+
pairType = pairType || "sr25519";
|
|
8
|
+
ss58Format = ss58Format || 42;
|
|
9
|
+
const keyring = new Keyring({ type: pairType, ss58Format });
|
|
10
|
+
if (!secret && account) {
|
|
11
|
+
return keyring.addFromAddress(account);
|
|
12
|
+
}
|
|
13
|
+
if (secret && typeof secret === "string") {
|
|
14
|
+
if (mnemonicValidate(secret)) {
|
|
15
|
+
return keyring.addFromMnemonic(secret);
|
|
17
16
|
}
|
|
18
|
-
if (secret
|
|
19
|
-
|
|
20
|
-
return keyring.addFromMnemonic(secret);
|
|
21
|
-
}
|
|
22
|
-
if (isHex(secret)) {
|
|
23
|
-
return keyring.addFromSeed(hexToU8a(secret));
|
|
24
|
-
}
|
|
25
|
-
if (secret.startsWith("//")) {
|
|
26
|
-
return keyring.addFromUri(secret);
|
|
27
|
-
}
|
|
28
|
-
try {
|
|
29
|
-
const json = JSON.parse(secret);
|
|
30
|
-
const { encoding: { content }, } = json;
|
|
31
|
-
const keyring = new Keyring({ type: content[1], ss58Format });
|
|
32
|
-
return keyring.addFromJson(json);
|
|
33
|
-
}
|
|
34
|
-
catch (e) {
|
|
35
|
-
throw new ProsopoEnvError("GENERAL.NO_MNEMONIC_OR_SEED", {
|
|
36
|
-
context: { error: e },
|
|
37
|
-
});
|
|
38
|
-
}
|
|
17
|
+
if (isHex(secret)) {
|
|
18
|
+
return keyring.addFromSeed(hexToU8a(secret));
|
|
39
19
|
}
|
|
40
|
-
|
|
41
|
-
|
|
20
|
+
if (secret.includes("//")) {
|
|
21
|
+
return keyring.addFromUri(secret);
|
|
42
22
|
}
|
|
43
|
-
|
|
44
|
-
|
|
23
|
+
try {
|
|
24
|
+
const json = JSON.parse(secret);
|
|
25
|
+
const {
|
|
26
|
+
encoding: { content }
|
|
27
|
+
} = json;
|
|
28
|
+
const keyring2 = new Keyring({ type: content[1], ss58Format });
|
|
29
|
+
return keyring2.addFromJson(json);
|
|
30
|
+
} catch (e) {
|
|
31
|
+
throw new ProsopoEnvError("GENERAL.MISSING_SECRET_KEY", {
|
|
32
|
+
context: { error: e }
|
|
33
|
+
});
|
|
45
34
|
}
|
|
35
|
+
} else if (typeof secret === "object") {
|
|
36
|
+
return keyring.addFromJson(secret);
|
|
37
|
+
} else {
|
|
38
|
+
throw new ProsopoEnvError("GENERAL.MISSING_SECRET_KEY");
|
|
39
|
+
}
|
|
46
40
|
}
|
|
47
|
-
|
|
41
|
+
export {
|
|
42
|
+
getPair
|
|
43
|
+
};
|
package/dist/accounts/index.js
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import { generateMiniSecret, generateMnemonic } from "./mnemonic.js";
|
|
2
|
+
import { getPair } from "./getPair.js";
|
|
3
|
+
import { getDefaultProviders, getDefaultSiteKeys } from "./testAccounts.js";
|
|
4
|
+
export {
|
|
5
|
+
generateMiniSecret,
|
|
6
|
+
generateMnemonic,
|
|
7
|
+
getDefaultProviders,
|
|
8
|
+
getDefaultSiteKeys,
|
|
9
|
+
getPair
|
|
10
|
+
};
|
|
@@ -1,17 +1,18 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const account = keyring.addFromMnemonic(mnemonic);
|
|
11
|
-
return [mnemonic, account.address];
|
|
1
|
+
import { mnemonicGenerate, mnemonicToMiniSecret } from "@prosopo/util-crypto";
|
|
2
|
+
import { Keyring } from "../keyring/keyring.js";
|
|
3
|
+
async function generateMnemonic(keyring, pairType) {
|
|
4
|
+
if (!keyring) {
|
|
5
|
+
keyring = new Keyring({ type: pairType || "sr25519" });
|
|
6
|
+
}
|
|
7
|
+
const mnemonic = mnemonicGenerate();
|
|
8
|
+
const account = keyring.addFromMnemonic(mnemonic);
|
|
9
|
+
return [mnemonic, account.address];
|
|
12
10
|
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
async function generateMiniSecret(keyring, pairType) {
|
|
12
|
+
const [mnemonic, address] = await generateMnemonic(keyring, pairType);
|
|
13
|
+
return [mnemonicToMiniSecret(mnemonic), address];
|
|
16
14
|
}
|
|
17
|
-
|
|
15
|
+
export {
|
|
16
|
+
generateMiniSecret,
|
|
17
|
+
generateMnemonic
|
|
18
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { CaptchaType, ClientSettingsSchema } from "@prosopo/types";
|
|
2
|
+
import "../keyring/index.js";
|
|
3
|
+
import { getPair } from "./getPair.js";
|
|
4
|
+
import { DEV_PHRASE } from "../keyring/keyring.js";
|
|
5
|
+
function getDefaultSiteKeys() {
|
|
6
|
+
const captchaTypes = [
|
|
7
|
+
CaptchaType.image,
|
|
8
|
+
CaptchaType.pow,
|
|
9
|
+
CaptchaType.frictionless,
|
|
10
|
+
CaptchaType.invisible
|
|
11
|
+
];
|
|
12
|
+
const sites = [];
|
|
13
|
+
for (const captchaType of captchaTypes) {
|
|
14
|
+
const secret = `${DEV_PHRASE}//${captchaType}`;
|
|
15
|
+
const pair = getPair(secret);
|
|
16
|
+
sites.push({
|
|
17
|
+
pair,
|
|
18
|
+
address: pair.address,
|
|
19
|
+
secret,
|
|
20
|
+
settings: ClientSettingsSchema.parse({
|
|
21
|
+
captchaType
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return sites;
|
|
26
|
+
}
|
|
27
|
+
function getDefaultProviders() {
|
|
28
|
+
const pair = getPair(
|
|
29
|
+
"puppy cream effort carbon despair leg pyramid cotton endorse immense drill peasant"
|
|
30
|
+
);
|
|
31
|
+
return [
|
|
32
|
+
{
|
|
33
|
+
url: "http://localhost:9229",
|
|
34
|
+
pair,
|
|
35
|
+
address: pair.address,
|
|
36
|
+
datasetFile: "./dev/data/captchas.json",
|
|
37
|
+
captchaDatasetId: "0x3e067b8f6aeae82fdbe2b2557b9c2d90aaabff241df651bf0f36667d2ab0018d"
|
|
38
|
+
}
|
|
39
|
+
];
|
|
40
|
+
}
|
|
41
|
+
export {
|
|
42
|
+
getDefaultProviders,
|
|
43
|
+
getDefaultSiteKeys
|
|
44
|
+
};
|
|
@@ -1,15 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const keyring = require("@polkadot/keyring");
|
|
4
|
-
const utilCrypto = require("@polkadot/util-crypto");
|
|
5
|
-
const mnemonic = require("@polkadot/util-crypto/mnemonic");
|
|
6
3
|
const hex = require("@polkadot/util/hex");
|
|
7
4
|
const is = require("@polkadot/util/is");
|
|
8
5
|
const common = require("@prosopo/common");
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return getPair(secret, account, pairType, ss58Format);
|
|
12
|
-
}
|
|
6
|
+
const utilCrypto = require("@prosopo/util-crypto");
|
|
7
|
+
const keyring = require("../keyring/keyring.cjs");
|
|
13
8
|
function getPair(secret, account, pairType, ss58Format) {
|
|
14
9
|
pairType = pairType || "sr25519";
|
|
15
10
|
ss58Format = ss58Format || 42;
|
|
@@ -18,13 +13,13 @@ function getPair(secret, account, pairType, ss58Format) {
|
|
|
18
13
|
return keyring$1.addFromAddress(account);
|
|
19
14
|
}
|
|
20
15
|
if (secret && typeof secret === "string") {
|
|
21
|
-
if (
|
|
16
|
+
if (utilCrypto.mnemonicValidate(secret)) {
|
|
22
17
|
return keyring$1.addFromMnemonic(secret);
|
|
23
18
|
}
|
|
24
19
|
if (is.isHex(secret)) {
|
|
25
20
|
return keyring$1.addFromSeed(hex.hexToU8a(secret));
|
|
26
21
|
}
|
|
27
|
-
if (secret.
|
|
22
|
+
if (secret.includes("//")) {
|
|
28
23
|
return keyring$1.addFromUri(secret);
|
|
29
24
|
}
|
|
30
25
|
try {
|
|
@@ -35,15 +30,14 @@ function getPair(secret, account, pairType, ss58Format) {
|
|
|
35
30
|
const keyring2 = new keyring.Keyring({ type: content[1], ss58Format });
|
|
36
31
|
return keyring2.addFromJson(json);
|
|
37
32
|
} catch (e) {
|
|
38
|
-
throw new common.ProsopoEnvError("GENERAL.
|
|
33
|
+
throw new common.ProsopoEnvError("GENERAL.MISSING_SECRET_KEY", {
|
|
39
34
|
context: { error: e }
|
|
40
35
|
});
|
|
41
36
|
}
|
|
42
37
|
} else if (typeof secret === "object") {
|
|
43
38
|
return keyring$1.addFromJson(secret);
|
|
44
39
|
} else {
|
|
45
|
-
throw new common.ProsopoEnvError("GENERAL.
|
|
40
|
+
throw new common.ProsopoEnvError("GENERAL.MISSING_SECRET_KEY");
|
|
46
41
|
}
|
|
47
42
|
}
|
|
48
43
|
exports.getPair = getPair;
|
|
49
|
-
exports.getPairAsync = getPairAsync;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
const mnemonic = require("./mnemonic.cjs");
|
|
4
4
|
const getPair = require("./getPair.cjs");
|
|
5
|
+
const testAccounts = require("./testAccounts.cjs");
|
|
5
6
|
exports.generateMiniSecret = mnemonic.generateMiniSecret;
|
|
6
7
|
exports.generateMnemonic = mnemonic.generateMnemonic;
|
|
7
8
|
exports.getPair = getPair.getPair;
|
|
8
|
-
exports.
|
|
9
|
+
exports.getDefaultProviders = testAccounts.getDefaultProviders;
|
|
10
|
+
exports.getDefaultSiteKeys = testAccounts.getDefaultSiteKeys;
|
|
@@ -1,20 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
const
|
|
4
|
-
const
|
|
5
|
-
const mnemonic = require("@polkadot/util-crypto/mnemonic");
|
|
3
|
+
const utilCrypto = require("@prosopo/util-crypto");
|
|
4
|
+
const keyring = require("../keyring/keyring.cjs");
|
|
6
5
|
async function generateMnemonic(keyring$1, pairType) {
|
|
7
6
|
if (!keyring$1) {
|
|
8
7
|
keyring$1 = new keyring.Keyring({ type: pairType || "sr25519" });
|
|
9
8
|
}
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
return [mnemonic$1, account.address];
|
|
9
|
+
const mnemonic = utilCrypto.mnemonicGenerate();
|
|
10
|
+
const account = keyring$1.addFromMnemonic(mnemonic);
|
|
11
|
+
return [mnemonic, account.address];
|
|
14
12
|
}
|
|
15
13
|
async function generateMiniSecret(keyring2, pairType) {
|
|
16
|
-
const [mnemonic
|
|
17
|
-
return [
|
|
14
|
+
const [mnemonic, address] = await generateMnemonic(keyring2, pairType);
|
|
15
|
+
return [utilCrypto.mnemonicToMiniSecret(mnemonic), address];
|
|
18
16
|
}
|
|
19
17
|
exports.generateMiniSecret = generateMiniSecret;
|
|
20
18
|
exports.generateMnemonic = generateMnemonic;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const types = require("@prosopo/types");
|
|
4
|
+
require("../keyring/index.cjs");
|
|
5
|
+
const getPair = require("./getPair.cjs");
|
|
6
|
+
const keyring = require("../keyring/keyring.cjs");
|
|
7
|
+
function getDefaultSiteKeys() {
|
|
8
|
+
const captchaTypes = [
|
|
9
|
+
types.CaptchaType.image,
|
|
10
|
+
types.CaptchaType.pow,
|
|
11
|
+
types.CaptchaType.frictionless,
|
|
12
|
+
types.CaptchaType.invisible
|
|
13
|
+
];
|
|
14
|
+
const sites = [];
|
|
15
|
+
for (const captchaType of captchaTypes) {
|
|
16
|
+
const secret = `${keyring.DEV_PHRASE}//${captchaType}`;
|
|
17
|
+
const pair = getPair.getPair(secret);
|
|
18
|
+
sites.push({
|
|
19
|
+
pair,
|
|
20
|
+
address: pair.address,
|
|
21
|
+
secret,
|
|
22
|
+
settings: types.ClientSettingsSchema.parse({
|
|
23
|
+
captchaType
|
|
24
|
+
})
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
return sites;
|
|
28
|
+
}
|
|
29
|
+
function getDefaultProviders() {
|
|
30
|
+
const pair = getPair.getPair(
|
|
31
|
+
"puppy cream effort carbon despair leg pyramid cotton endorse immense drill peasant"
|
|
32
|
+
);
|
|
33
|
+
return [
|
|
34
|
+
{
|
|
35
|
+
url: "http://localhost:9229",
|
|
36
|
+
pair,
|
|
37
|
+
address: pair.address,
|
|
38
|
+
datasetFile: "./dev/data/captchas.json",
|
|
39
|
+
captchaDatasetId: "0x3e067b8f6aeae82fdbe2b2557b9c2d90aaabff241df651bf0f36667d2ab0018d"
|
|
40
|
+
}
|
|
41
|
+
];
|
|
42
|
+
}
|
|
43
|
+
exports.getDefaultProviders = getDefaultProviders;
|
|
44
|
+
exports.getDefaultSiteKeys = getDefaultSiteKeys;
|
package/dist/cjs/index.cjs
CHANGED
|
@@ -1,9 +1,19 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
3
|
require("./accounts/index.cjs");
|
|
4
|
+
require("./keyring/index.cjs");
|
|
5
|
+
const index = require("./pair/index.cjs");
|
|
4
6
|
const mnemonic = require("./accounts/mnemonic.cjs");
|
|
5
7
|
const getPair = require("./accounts/getPair.cjs");
|
|
8
|
+
const testAccounts = require("./accounts/testAccounts.cjs");
|
|
9
|
+
const keyring = require("./keyring/keyring.cjs");
|
|
10
|
+
const pairs = require("./keyring/pairs.cjs");
|
|
11
|
+
exports.createPair = index.createPair;
|
|
6
12
|
exports.generateMiniSecret = mnemonic.generateMiniSecret;
|
|
7
13
|
exports.generateMnemonic = mnemonic.generateMnemonic;
|
|
8
14
|
exports.getPair = getPair.getPair;
|
|
9
|
-
exports.
|
|
15
|
+
exports.getDefaultProviders = testAccounts.getDefaultProviders;
|
|
16
|
+
exports.getDefaultSiteKeys = testAccounts.getDefaultSiteKeys;
|
|
17
|
+
exports.DEV_PHRASE = keyring.DEV_PHRASE;
|
|
18
|
+
exports.Keyring = keyring.Keyring;
|
|
19
|
+
exports.Pairs = pairs.Pairs;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const keyring = require("./keyring.cjs");
|
|
4
|
+
const pairs = require("./pairs.cjs");
|
|
5
|
+
exports.DEV_PHRASE = keyring.DEV_PHRASE;
|
|
6
|
+
exports.Keyring = keyring.Keyring;
|
|
7
|
+
exports.Pairs = pairs.Pairs;
|