@pezkuwi/keyring 14.0.22 → 14.0.23
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/build/LICENSE +201 -0
- package/build/README.md +17 -0
- package/build/bundle.d.ts +7 -0
- package/build/bundle.js +7 -0
- package/build/cjs/bundle.d.ts +7 -0
- package/build/cjs/bundle.js +19 -0
- package/build/cjs/defaults.d.ts +2 -0
- package/build/cjs/defaults.js +5 -0
- package/build/cjs/index.d.ts +4 -0
- package/build/cjs/index.js +7 -0
- package/build/cjs/keyring.d.ts +145 -0
- package/build/cjs/keyring.js +261 -0
- package/build/cjs/package.json +3 -0
- package/build/cjs/packageDetect.d.ts +1 -0
- package/build/cjs/packageDetect.js +7 -0
- package/build/cjs/packageInfo.d.ts +6 -0
- package/build/cjs/packageInfo.js +4 -0
- package/build/cjs/pair/decode.d.ts +12 -0
- package/build/cjs/pair/decode.js +45 -0
- package/build/cjs/pair/defaults.d.ts +12 -0
- package/build/cjs/pair/defaults.js +15 -0
- package/build/cjs/pair/encode.d.ts +5 -0
- package/build/cjs/pair/encode.js +22 -0
- package/build/cjs/pair/index.d.ts +40 -0
- package/build/cjs/pair/index.js +183 -0
- package/build/cjs/pair/nobody.d.ts +2 -0
- package/build/cjs/pair/nobody.js +43 -0
- package/build/cjs/pair/toJson.d.ts +8 -0
- package/build/cjs/pair/toJson.js +11 -0
- package/build/cjs/pair/types.d.ts +5 -0
- package/build/cjs/pair/types.js +2 -0
- package/build/cjs/pairs.d.ts +8 -0
- package/build/cjs/pairs.js +28 -0
- package/build/cjs/testing.d.ts +20 -0
- package/build/cjs/testing.js +126 -0
- package/build/cjs/testingPairs.d.ts +25 -0
- package/build/cjs/testingPairs.js +16 -0
- package/build/cjs/types.d.ts +111 -0
- package/build/cjs/types.js +2 -0
- package/build/defaults.d.ts +2 -0
- package/build/defaults.js +2 -0
- package/build/index.d.ts +4 -0
- package/build/index.js +4 -0
- package/build/keyring.d.ts +145 -0
- package/build/keyring.js +257 -0
- package/build/package.json +294 -0
- package/build/packageDetect.d.ts +1 -0
- package/build/packageDetect.js +5 -0
- package/build/packageInfo.d.ts +6 -0
- package/build/packageInfo.js +1 -0
- package/build/pair/decode.d.ts +12 -0
- package/build/pair/decode.js +42 -0
- package/build/pair/defaults.d.ts +12 -0
- package/build/pair/defaults.js +12 -0
- package/build/pair/encode.d.ts +5 -0
- package/build/pair/encode.js +19 -0
- package/build/pair/index.d.ts +40 -0
- package/build/pair/index.js +180 -0
- package/build/pair/nobody.d.ts +2 -0
- package/build/pair/nobody.js +40 -0
- package/build/pair/toJson.d.ts +8 -0
- package/build/pair/toJson.js +8 -0
- package/build/pair/types.d.ts +5 -0
- package/build/pair/types.js +1 -0
- package/build/pairs.d.ts +8 -0
- package/build/pairs.js +24 -0
- package/build/testing.d.ts +20 -0
- package/build/testing.js +122 -0
- package/build/testingPairs.d.ts +25 -0
- package/build/testingPairs.js +13 -0
- package/build/types.d.ts +111 -0
- package/build/types.js +1 -0
- package/build-deno/README.md +17 -0
- package/build-deno/bundle.ts +10 -0
- package/build-deno/defaults.ts +4 -0
- package/build-deno/index.ts +8 -0
- package/build-deno/keyring.ts +305 -0
- package/build-deno/mod.ts +2 -0
- package/build-deno/packageDetect.ts +9 -0
- package/build-deno/packageInfo.ts +3 -0
- package/build-deno/pair/decode.ts +54 -0
- package/build-deno/pair/defaults.ts +18 -0
- package/build-deno/pair/encode.ts +28 -0
- package/build-deno/pair/index.ts +218 -0
- package/build-deno/pair/nobody.ts +58 -0
- package/build-deno/pair/toJson.ts +18 -0
- package/build-deno/pair/types.ts +6 -0
- package/build-deno/pairs.ts +39 -0
- package/build-deno/testing.ts +150 -0
- package/build-deno/testingPairs.ts +54 -0
- package/build-deno/types.ts +129 -0
- package/build-tsc/bundle.d.ts +7 -0
- package/build-tsc/defaults.d.ts +2 -0
- package/build-tsc/index.d.ts +4 -0
- package/build-tsc/keyring.d.ts +145 -0
- package/build-tsc/packageDetect.d.ts +1 -0
- package/build-tsc/packageInfo.d.ts +6 -0
- package/build-tsc/pair/decode.d.ts +12 -0
- package/build-tsc/pair/defaults.d.ts +12 -0
- package/build-tsc/pair/encode.d.ts +5 -0
- package/build-tsc/pair/index.d.ts +40 -0
- package/build-tsc/pair/nobody.d.ts +2 -0
- package/build-tsc/pair/toJson.d.ts +8 -0
- package/build-tsc/pair/types.d.ts +5 -0
- package/build-tsc/pairs.d.ts +8 -0
- package/build-tsc/testing.d.ts +20 -0
- package/build-tsc/testingPairs.d.ts +25 -0
- package/build-tsc/types.d.ts +111 -0
- package/build-tsc-cjs/bundle.js +19 -0
- package/build-tsc-cjs/defaults.js +5 -0
- package/build-tsc-cjs/index.js +7 -0
- package/build-tsc-cjs/keyring.js +261 -0
- package/build-tsc-cjs/packageDetect.js +7 -0
- package/build-tsc-cjs/packageInfo.js +4 -0
- package/build-tsc-cjs/pair/decode.js +45 -0
- package/build-tsc-cjs/pair/defaults.js +15 -0
- package/build-tsc-cjs/pair/encode.js +22 -0
- package/build-tsc-cjs/pair/index.js +183 -0
- package/build-tsc-cjs/pair/nobody.js +43 -0
- package/build-tsc-cjs/pair/toJson.js +11 -0
- package/build-tsc-cjs/pair/types.js +2 -0
- package/build-tsc-cjs/pairs.js +28 -0
- package/build-tsc-cjs/testing.js +126 -0
- package/build-tsc-cjs/testingPairs.js +16 -0
- package/build-tsc-cjs/types.js +2 -0
- package/build-tsc-esm/bundle.js +7 -0
- package/build-tsc-esm/defaults.js +2 -0
- package/build-tsc-esm/index.js +4 -0
- package/build-tsc-esm/keyring.js +257 -0
- package/build-tsc-esm/packageDetect.js +5 -0
- package/build-tsc-esm/packageInfo.js +1 -0
- package/build-tsc-esm/pair/decode.js +42 -0
- package/build-tsc-esm/pair/defaults.js +12 -0
- package/build-tsc-esm/pair/encode.js +19 -0
- package/build-tsc-esm/pair/index.js +180 -0
- package/build-tsc-esm/pair/nobody.js +40 -0
- package/build-tsc-esm/pair/toJson.js +8 -0
- package/build-tsc-esm/pair/types.js +1 -0
- package/build-tsc-esm/pairs.js +24 -0
- package/build-tsc-esm/testing.js +122 -0
- package/build-tsc-esm/testingPairs.js +13 -0
- package/build-tsc-esm/types.js +1 -0
- package/bundle-pezkuwi-keyring.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/cjs/pair/defaults.d.ts +2 -2
- package/package.json +11 -11
- package/packageInfo.js +1 -1
- package/pair/defaults.d.ts +2 -2
- package/src/bundle.ts +16 -0
- package/src/defaults.ts +8 -0
- package/src/index.spec.ts +609 -0
- package/src/index.ts +10 -0
- package/src/keyring.ts +307 -0
- package/src/mod.ts +4 -0
- package/src/packageDetect.ts +13 -0
- package/src/packageInfo.ts +6 -0
- package/src/pair/decode.spec.ts +26 -0
- package/src/pair/decode.ts +56 -0
- package/src/pair/defaults.ts +20 -0
- package/src/pair/encode.spec.ts +28 -0
- package/src/pair/encode.ts +30 -0
- package/src/pair/index.spec.ts +189 -0
- package/src/pair/index.ts +220 -0
- package/src/pair/nobody.ts +62 -0
- package/src/pair/toJson.spec.ts +42 -0
- package/src/pair/toJson.ts +20 -0
- package/src/pair/types.ts +8 -0
- package/src/pair/vrf.spec.ts +47 -0
- package/src/pairs.ts +41 -0
- package/src/suri.spec.ts +109 -0
- package/src/testing.ts +156 -0
- package/src/testingPairs.spec.ts +79 -0
- package/src/testingPairs.ts +56 -0
- package/src/types.ts +131 -0
- package/tsconfig.build.json +16 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.spec.json +18 -0
- package/tsconfig.spec.tsbuildinfo +1 -0
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { hexToU8a } from '@pezkuwi/util';
|
|
2
|
+
import { createPair } from './pair/index.js';
|
|
3
|
+
import { Keyring } from './keyring.js';
|
|
4
|
+
export const PAIRSSR25519 = [
|
|
5
|
+
{
|
|
6
|
+
p: '0xd43593c715fdd31c61141abd04a99fd6822c8558854ccde39a5684e7a56da27d',
|
|
7
|
+
s: '0x98319d4ff8a9508c4bb0cf0b5a78d760a0b2082c02775e6e82370816fedfff48925a225d97aa00682d6a59b95b18780c10d7032336e88f3442b42361f4a66011', // nosemgrep
|
|
8
|
+
seed: 'Alice',
|
|
9
|
+
type: 'sr25519'
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
p: '0xbe5ddb1579b72e84524fc29e78609e3caf42e85aa118ebfe0b0ad404b5bdd25f',
|
|
13
|
+
s: '0xe8da6c9d810e020f5e3c7f5af2dea314cbeaa0d72bc6421e92c0808a0c584a6046ab28e97c3ffc77fe12b5a4d37e8cd4afbfebbf2391ffc7cb07c0f38c023efd', // nosemgrep
|
|
14
|
+
seed: 'Alice//stash',
|
|
15
|
+
type: 'sr25519'
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
p: '0x8eaf04151687736326c9fea17e25fc5287613693c912909cb226aa4794f26a48',
|
|
19
|
+
s: '0x081ff694633e255136bdb456c20a5fc8fed21f8b964c11bb17ff534ce80ebd5941ae88f85d0c1bfc37be41c904e1dfc01de8c8067b0d6d5df25dd1ac0894a325', // nosemgrep
|
|
20
|
+
seed: 'Bob',
|
|
21
|
+
type: 'sr25519'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
p: '0xfe65717dad0447d715f660a0a58411de509b42e6efb8375f562f58a554d5860e',
|
|
25
|
+
s: '0xc006507cdfc267a21532394c49ca9b754ca71de21e15a1cdf807c7ceab6d0b6c3ed408d9d35311540dcd54931933e67cf1ea10d46f75408f82b789d9bd212fde', // nosemgrep
|
|
26
|
+
seed: 'Bob//stash',
|
|
27
|
+
type: 'sr25519'
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
p: '0x90b5ab205c6974c9ea841be688864633dc9ca8a357843eeacf2314649965fe22',
|
|
31
|
+
s: '0xa8f2d83016052e5d6d77b2f6fd5d59418922a09024cda701b3c34369ec43a7668faf12ff39cd4e5d92bb773972f41a7a5279ebc2ed92264bed8f47d344f8f18c', // nosemgrep
|
|
32
|
+
seed: 'Charlie',
|
|
33
|
+
type: 'sr25519'
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
p: '0x306721211d5404bd9da88e0204360a1a9ab8b87c66c1bc2fcdd37f3c2222cc20',
|
|
37
|
+
s: '0x20e05482ca4677e0edbc58ae9a3a59f6ed3b1a9484ba17e64d6fe8688b2b7b5d108c4487b9323b98b11fe36cb301b084e920f7b7895536809a6d62a451b25568', // nosemgrep
|
|
38
|
+
seed: 'Dave',
|
|
39
|
+
type: 'sr25519'
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
p: '0xe659a7a1628cdd93febc04a4e0646ea20e9f5f0ce097d9a05290d4a9e054df4e',
|
|
43
|
+
s: '0x683576abfd5dc35273e4264c23095a1bf21c14517bece57c7f0cc5c0ed4ce06a3dbf386b7828f348abe15d76973a72009e6ef86a5c91db2990cb36bb657c6587', // nosemgrep
|
|
44
|
+
seed: 'Eve',
|
|
45
|
+
type: 'sr25519'
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
p: '0x1cbd2d43530a44705ad088af313e18f80b53ef16b36177cd4b77b846f2a5f07c',
|
|
49
|
+
s: '0xb835c20f450079cf4f513900ae9faf8df06ad86c681884122c752a4b2bf74d4303e4f21bc6cc62bb4eeed5a9cce642c25e2d2ac1464093b50f6196d78e3a7426', // nosemgrep
|
|
50
|
+
seed: 'Ferdie',
|
|
51
|
+
type: 'sr25519'
|
|
52
|
+
}
|
|
53
|
+
];
|
|
54
|
+
export const PAIRSETHEREUM = [
|
|
55
|
+
{
|
|
56
|
+
name: 'Alith',
|
|
57
|
+
p: '0x02509540919faacf9ab52146c9aa40db68172d83777250b28e4679176e49ccdd9f',
|
|
58
|
+
s: '0x5fb92d6e98884f76de468fa3f6278f8807c48bebc13595d45af5bdc4da702133', // nosemgrep
|
|
59
|
+
type: 'ethereum'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
name: 'Baltathar',
|
|
63
|
+
p: '0x033bc19e36ff1673910575b6727a974a9abd80c9a875d41ab3e2648dbfb9e4b518',
|
|
64
|
+
s: '0x8075991ce870b93a8870eca0c0f91913d12f47948ca0fd25b49c6fa7cdbeee8b', // nosemgrep
|
|
65
|
+
type: 'ethereum'
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
name: 'Charleth',
|
|
69
|
+
p: '0x0234637bdc0e89b5d46543bcbf8edff329d2702bc995e27e9af4b1ba009a3c2a5e',
|
|
70
|
+
s: '0x0b6e18cafb6ed99687ec547bd28139cafdd2bffe70e6b688025de6b445aa5c5b', // nosemgrep
|
|
71
|
+
type: 'ethereum'
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
name: 'Dorothy',
|
|
75
|
+
p: '0x02a00d60b2b408c2a14c5d70cdd2c205db8985ef737a7e55ad20ea32cc9e7c417c',
|
|
76
|
+
s: '0x39539ab1876910bbf3a223d84a29e28f1cb4e2e456503e7e91ed39b2e7223d68', // nosemgrep
|
|
77
|
+
type: 'ethereum'
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
name: 'Ethan',
|
|
81
|
+
p: '0x025cdc005b752651cd3f728fb9192182acb3a9c89e19072cbd5b03f3ee1f1b3ffa',
|
|
82
|
+
s: '0x7dce9bc8babb68fec1409be38c8e1a52650206a7ed90ff956ae8a6d15eeaaef4', // nosemgrep
|
|
83
|
+
type: 'ethereum'
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: 'Faith',
|
|
87
|
+
p: '0x037964b6c9d546da4646ada28a99e34acaa1d14e7aba861a9055f9bd200c8abf74',
|
|
88
|
+
s: '0xb9d2ea9a615f3165812e8d44de0d24da9bbd164b65c4f0573e1ce2c8dbd9c8df', // nosemgrep
|
|
89
|
+
type: 'ethereum'
|
|
90
|
+
}
|
|
91
|
+
];
|
|
92
|
+
function createMeta(name, seed) {
|
|
93
|
+
if (!name && !seed) {
|
|
94
|
+
throw new Error('Testing pair should have either a name or a seed');
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
isTesting: true,
|
|
98
|
+
name: name || seed?.replace('//', '_').toLowerCase()
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* @name testKeyring
|
|
103
|
+
* @summary Create an instance of Keyring pre-populated with locked test accounts
|
|
104
|
+
* @description The test accounts (i.e. alice, bob, dave, eve, ferdie)
|
|
105
|
+
* are available on the dev chain and each test account is initialized with DOT funds.
|
|
106
|
+
*/
|
|
107
|
+
export function createTestKeyring(options = {}, isDerived = true) {
|
|
108
|
+
const keyring = new Keyring(options);
|
|
109
|
+
const pairs = options.type === 'ethereum'
|
|
110
|
+
? PAIRSETHEREUM
|
|
111
|
+
: PAIRSSR25519;
|
|
112
|
+
for (const { name, p, s, seed, type } of pairs) {
|
|
113
|
+
const meta = createMeta(name, seed);
|
|
114
|
+
const pair = !isDerived && !name && seed
|
|
115
|
+
? keyring.addFromUri(seed, meta, options.type)
|
|
116
|
+
: keyring.addPair(createPair({ toSS58: keyring.encodeAddress, type }, { publicKey: hexToU8a(p), secretKey: hexToU8a(s) }, meta));
|
|
117
|
+
pair.lock = () => {
|
|
118
|
+
// we don't have lock/unlock functionality here
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
return keyring;
|
|
122
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { nobody } from './pair/nobody.js';
|
|
2
|
+
import { createTestKeyring } from './testing.js';
|
|
3
|
+
export function createTestPairs(options, isDerived = true) {
|
|
4
|
+
const keyring = createTestKeyring(options, isDerived);
|
|
5
|
+
const pairs = keyring.getPairs();
|
|
6
|
+
const map = { nobody: nobody() };
|
|
7
|
+
for (const p of pairs) {
|
|
8
|
+
if (p.meta.name) {
|
|
9
|
+
map[p.meta.name] = p;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return map;
|
|
13
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -363,7 +363,7 @@
|
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
365
|
|
|
366
|
-
const packageInfo = { name: '@pezkuwi/keyring', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.
|
|
366
|
+
const packageInfo = { name: '@pezkuwi/keyring', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.tagName.toUpperCase() === 'SCRIPT' && _documentCurrentScript.src || new URL('bundle-pezkuwi-keyring.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.10' };
|
|
367
367
|
|
|
368
368
|
const PAIRSSR25519 = [
|
|
369
369
|
{
|
package/cjs/packageInfo.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.packageInfo = void 0;
|
|
4
|
-
exports.packageInfo = { name: '@pezkuwi/keyring', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.
|
|
4
|
+
exports.packageInfo = { name: '@pezkuwi/keyring', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.10' };
|
package/cjs/pair/defaults.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** public/secret section divider (generation 1-3, will change in 4, don't rely on value) */
|
|
2
|
-
export declare const PAIR_DIV: Uint8Array
|
|
2
|
+
export declare const PAIR_DIV: Uint8Array;
|
|
3
3
|
/** public/secret start block (generation 1-3, will change in 4, don't rely on value) */
|
|
4
|
-
export declare const PAIR_HDR: Uint8Array
|
|
4
|
+
export declare const PAIR_HDR: Uint8Array;
|
|
5
5
|
/** length of a public key */
|
|
6
6
|
export declare const PUB_LENGTH = 32;
|
|
7
7
|
/** length of a salt */
|
package/package.json
CHANGED
|
@@ -18,13 +18,11 @@
|
|
|
18
18
|
"./cjs/packageDetect.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"
|
|
21
|
+
"types": "./index.d.ts",
|
|
22
|
+
"version": "14.0.23",
|
|
22
23
|
"main": "./cjs/index.js",
|
|
23
|
-
"module": "./
|
|
24
|
-
"types": "./cjs/index.d.ts",
|
|
24
|
+
"module": "./index.js",
|
|
25
25
|
"exports": {
|
|
26
|
-
"./cjs/package.json": "./cjs/package.json",
|
|
27
|
-
"./cjs/*": "./cjs/*.js",
|
|
28
26
|
".": {
|
|
29
27
|
"module": {
|
|
30
28
|
"types": "./index.d.ts",
|
|
@@ -53,6 +51,8 @@
|
|
|
53
51
|
"default": "./bundle.js"
|
|
54
52
|
}
|
|
55
53
|
},
|
|
54
|
+
"./cjs/*": "./cjs/*.js",
|
|
55
|
+
"./cjs/package.json": "./cjs/package.json",
|
|
56
56
|
"./defaults": {
|
|
57
57
|
"module": {
|
|
58
58
|
"types": "./defaults.d.ts",
|
|
@@ -99,7 +99,7 @@
|
|
|
99
99
|
"default": "./packageDetect.js"
|
|
100
100
|
}
|
|
101
101
|
},
|
|
102
|
-
"./packageInfo
|
|
102
|
+
"./packageInfo": {
|
|
103
103
|
"module": {
|
|
104
104
|
"types": "./packageInfo.d.ts",
|
|
105
105
|
"default": "./packageInfo.js"
|
|
@@ -113,7 +113,7 @@
|
|
|
113
113
|
"default": "./packageInfo.js"
|
|
114
114
|
}
|
|
115
115
|
},
|
|
116
|
-
"./packageInfo": {
|
|
116
|
+
"./packageInfo.js": {
|
|
117
117
|
"module": {
|
|
118
118
|
"types": "./packageInfo.d.ts",
|
|
119
119
|
"default": "./packageInfo.js"
|
|
@@ -283,12 +283,12 @@
|
|
|
283
283
|
}
|
|
284
284
|
},
|
|
285
285
|
"dependencies": {
|
|
286
|
-
"@pezkuwi/util": "14.0.
|
|
287
|
-
"@pezkuwi/util-crypto": "14.0.
|
|
286
|
+
"@pezkuwi/util": "14.0.23",
|
|
287
|
+
"@pezkuwi/util-crypto": "14.0.23",
|
|
288
288
|
"tslib": "^2.8.0"
|
|
289
289
|
},
|
|
290
290
|
"peerDependencies": {
|
|
291
|
-
"@pezkuwi/util": "14.0.
|
|
292
|
-
"@pezkuwi/util-crypto": "14.0.
|
|
291
|
+
"@pezkuwi/util": "14.0.23",
|
|
292
|
+
"@pezkuwi/util-crypto": "14.0.23"
|
|
293
293
|
}
|
|
294
294
|
}
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@pezkuwi/keyring', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.
|
|
1
|
+
export const packageInfo = { name: '@pezkuwi/keyring', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.10' };
|
package/pair/defaults.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** public/secret section divider (generation 1-3, will change in 4, don't rely on value) */
|
|
2
|
-
export declare const PAIR_DIV: Uint8Array
|
|
2
|
+
export declare const PAIR_DIV: Uint8Array;
|
|
3
3
|
/** public/secret start block (generation 1-3, will change in 4, don't rely on value) */
|
|
4
|
-
export declare const PAIR_HDR: Uint8Array
|
|
4
|
+
export declare const PAIR_HDR: Uint8Array;
|
|
5
5
|
/** length of a public key */
|
|
6
6
|
export declare const PUB_LENGTH = 32;
|
|
7
7
|
/** length of a salt */
|
package/src/bundle.ts
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
// Copyright 2017-2025 @pezkuwi/keyring authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// all external
|
|
5
|
+
// eslint-disable-next-line deprecation/deprecation
|
|
6
|
+
export { decodeAddress, encodeAddress, setSS58Format } from '@pezkuwi/util-crypto';
|
|
7
|
+
|
|
8
|
+
// all named
|
|
9
|
+
export { Keyring } from './keyring.js';
|
|
10
|
+
export { packageInfo } from './packageInfo.js';
|
|
11
|
+
export { createPair } from './pair/index.js';
|
|
12
|
+
export { createTestKeyring } from './testing.js';
|
|
13
|
+
export { createTestPairs } from './testingPairs.js';
|
|
14
|
+
|
|
15
|
+
// all starred
|
|
16
|
+
export * from './defaults.js';
|
package/src/defaults.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
// Copyright 2017-2025 @pezkuwi/keyring authors & contributors
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
// default substrate dev phrase
|
|
5
|
+
export const DEV_PHRASE = 'bottom drive obey lake curtain smoke basket hold race lonely fit walk';
|
|
6
|
+
|
|
7
|
+
// seed from the above phrase
|
|
8
|
+
export const DEV_SEED = '0xfac7959dbfe72f052e5a0c3c8d6530f202b02fd8f9f5ca3580ec8deb7797479e';
|