@pezkuwi/util-crypto 14.0.5 → 14.0.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.
Files changed (67) hide show
  1. package/README.md +4 -4
  2. package/address/encodeDerived.d.ts +1 -1
  3. package/address/encodeMulti.d.ts +1 -1
  4. package/address/eq.d.ts +1 -1
  5. package/address/keyDerived.d.ts +1 -1
  6. package/address/keyMulti.d.ts +1 -1
  7. package/base32/bs32.d.ts +1 -1
  8. package/base32/helpers.d.ts +2 -2
  9. package/base58/bs58.d.ts +1 -1
  10. package/base64/bs64.d.ts +1 -1
  11. package/blake2/asU8a.d.ts +2 -2
  12. package/{bundle-polkadot-util-crypto.js → bundle-pezkuwi-util-crypto.js} +6 -6
  13. package/bundleInit.d.ts +1 -1
  14. package/cjs/address/encodeDerived.d.ts +1 -1
  15. package/cjs/address/encodeMulti.d.ts +1 -1
  16. package/cjs/address/eq.d.ts +1 -1
  17. package/cjs/address/keyDerived.d.ts +1 -1
  18. package/cjs/address/keyMulti.d.ts +1 -1
  19. package/cjs/base32/bs32.d.ts +1 -1
  20. package/cjs/base32/helpers.d.ts +2 -2
  21. package/cjs/base58/bs58.d.ts +1 -1
  22. package/cjs/base64/bs64.d.ts +1 -1
  23. package/cjs/blake2/asU8a.d.ts +2 -2
  24. package/cjs/bundleInit.d.ts +1 -1
  25. package/cjs/crypto.d.ts +1 -1
  26. package/cjs/ed25519/pair/fromRandom.d.ts +1 -1
  27. package/cjs/ed25519/pair/fromSecret.d.ts +1 -1
  28. package/cjs/ed25519/pair/fromSeed.d.ts +1 -1
  29. package/cjs/ed25519/pair/fromString.d.ts +1 -1
  30. package/cjs/ed25519/sign.d.ts +1 -1
  31. package/cjs/ed25519/verify.d.ts +1 -1
  32. package/cjs/ethereum/encode.d.ts +1 -1
  33. package/cjs/helpers.d.ts +2 -2
  34. package/cjs/keccak/asU8a.d.ts +2 -2
  35. package/cjs/key/DeriveJunction.d.ts +1 -1
  36. package/cjs/mnemonic/generate.d.ts +1 -1
  37. package/cjs/mnemonic/toLegacySeed.d.ts +1 -1
  38. package/cjs/mnemonic/validate.d.ts +1 -1
  39. package/cjs/nacl/decrypt.d.ts +1 -1
  40. package/cjs/nacl/encrypt.d.ts +1 -1
  41. package/cjs/networks.d.ts +1 -1
  42. package/cjs/packageInfo.js +1 -1
  43. package/cjs/random/asNumber.d.ts +1 -1
  44. package/cjs/random/asU8a.d.ts +2 -2
  45. package/cjs/xxhash/asU8a.d.ts +2 -2
  46. package/crypto.d.ts +1 -1
  47. package/ed25519/pair/fromRandom.d.ts +1 -1
  48. package/ed25519/pair/fromSecret.d.ts +1 -1
  49. package/ed25519/pair/fromSeed.d.ts +1 -1
  50. package/ed25519/pair/fromString.d.ts +1 -1
  51. package/ed25519/sign.d.ts +1 -1
  52. package/ed25519/verify.d.ts +1 -1
  53. package/ethereum/encode.d.ts +1 -1
  54. package/helpers.d.ts +2 -2
  55. package/keccak/asU8a.d.ts +2 -2
  56. package/key/DeriveJunction.d.ts +1 -1
  57. package/mnemonic/generate.d.ts +1 -1
  58. package/mnemonic/toLegacySeed.d.ts +1 -1
  59. package/mnemonic/validate.d.ts +1 -1
  60. package/nacl/decrypt.d.ts +1 -1
  61. package/nacl/encrypt.d.ts +1 -1
  62. package/networks.d.ts +1 -1
  63. package/package.json +12 -12
  64. package/packageInfo.js +1 -1
  65. package/random/asNumber.d.ts +1 -1
  66. package/random/asU8a.d.ts +2 -2
  67. package/xxhash/asU8a.d.ts +2 -2
package/README.md CHANGED
@@ -1,17 +1,17 @@
1
- # @polkadot/util-crypto
1
+ # @pezkuwi/util-crypto
2
2
 
3
- Various useful cyrpto utility functions that are used across all projects in the [@polkadot](https://polkadot.js.org) namespace. It provides utility functions with additional safety checks, allowing not only for consistent coding, but also reducing the general boilerplate.
3
+ Various useful cyrpto utility functions that are used across all projects in the [@pezkuwi](https://pezkuwi.js.org) namespace. It provides utility functions with additional safety checks, allowing not only for consistent coding, but also reducing the general boilerplate.
4
4
 
5
5
  ## Usage
6
6
 
7
7
  Installation -
8
8
 
9
9
  ```
10
- yarn add @polkadot/util-crypto
10
+ yarn add @pezkuwi/util-crypto
11
11
  ```
12
12
 
13
13
  Functions can be imported as follows:
14
14
 
15
15
  ```js
16
- import { mnemonicGenerate } from '@polkadot/util-crypto';
16
+ import { mnemonicGenerate } from '@pezkuwi/util-crypto';
17
17
  ```
@@ -1,4 +1,4 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  import type { Prefix } from './types.js';
3
3
  /**
4
4
  * @name encodeDerivedAddress
@@ -1,4 +1,4 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  import type { Prefix } from './types.js';
3
3
  /**
4
4
  * @name encodeMultiAddress
package/address/eq.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { u8aEq } from '@polkadot/util';
10
+ * import { u8aEq } from '@pezkuwi/util';
11
11
  *
12
12
  * u8aEq(new Uint8Array([0x68, 0x65]), new Uint8Array([0x68, 0x65])); // true
13
13
  * ```
@@ -1,2 +1,2 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  export declare function createKeyDerived(who: string | Uint8Array, index: bigint | BN | number): Uint8Array;
@@ -1,2 +1,2 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  export declare function createKeyMulti(who: (string | Uint8Array)[], threshold: bigint | BN | number): Uint8Array;
package/base32/bs32.d.ts CHANGED
@@ -23,4 +23,4 @@ export declare const base32Decode: (value: string, ipfsCompat?: boolean) => Uint
23
23
  * @description
24
24
  * From the provided input, create the base32 and return the result as a string.
25
25
  */
26
- export declare const base32Encode: (value: import("@polkadot/util/types").U8aLike, ipfsCompat?: boolean) => string;
26
+ export declare const base32Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
@@ -1,5 +1,5 @@
1
- import type { U8aLike } from '@polkadot/util/types';
2
- export type { U8aLike } from '@polkadot/util/types';
1
+ import type { U8aLike } from '@pezkuwi/util/types';
2
+ export type { U8aLike } from '@pezkuwi/util/types';
3
3
  interface Coder {
4
4
  decode: (value: string) => Uint8Array;
5
5
  encode: (value: Uint8Array) => string;
package/base58/bs58.d.ts CHANGED
@@ -18,7 +18,7 @@ export declare const base58Decode: (value: string, ipfsCompat?: boolean) => Uint
18
18
  * @description
19
19
  * From the provided input, create the base58 and return the result as a string.
20
20
  */
21
- export declare const base58Encode: (value: import("@polkadot/util/types").U8aLike, ipfsCompat?: boolean) => string;
21
+ export declare const base58Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
22
22
  /**
23
23
  * @name isBase58
24
24
  * @description Checks if the input is in base58, returning true/false
package/base64/bs64.d.ts CHANGED
@@ -23,4 +23,4 @@ export declare const base64Decode: (value: string, ipfsCompat?: boolean) => Uint
23
23
  * @description
24
24
  * From the provided input, create the base64 and return the result as a string.
25
25
  */
26
- export declare const base64Encode: (value: import("@polkadot/util/types").U8aLike, ipfsCompat?: boolean) => string;
26
+ export declare const base64Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
package/blake2/asU8a.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { blake2AsU8a } from '@polkadot/util-crypto';
10
+ * import { blake2AsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * blake2AsU8a('abc'); // => [0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d]
13
13
  * ```
@@ -17,4 +17,4 @@ export declare function blake2AsU8a(data: string | Uint8Array, bitLength?: 64 |
17
17
  * @name blake2AsHex
18
18
  * @description Creates a blake2b hex from the input.
19
19
  */
20
- export declare const blake2AsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | undefined, key?: Uint8Array | null | undefined, onlyJs?: boolean | undefined) => import("@polkadot/util/types").HexString;
20
+ export declare const blake2AsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | undefined, key?: Uint8Array | null | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;
@@ -1,13 +1,13 @@
1
1
  (function (global, factory) {
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@pezkuwi/util')) :
3
3
  typeof define === 'function' && define.amd ? define(['exports', '@pezkuwi/util'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.polkadotUtilCrypto = {}, global.polkadotUtil));
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.pezkuwiUtilCrypto = {}, global.pezkuwiUtil));
5
5
  })(this, (function (exports, util) { 'use strict';
6
6
 
7
7
  const global = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : window;
8
8
 
9
9
  var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
10
- const packageInfo$2 = { name: '@pezkuwi/x-global', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-util-crypto.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-util-crypto.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.src || new URL('bundle-polkadot-util-crypto.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.src || new URL('bundle-polkadot-util-crypto.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.1' };
10
+ const packageInfo$2 = { name: '@pezkuwi/x-global', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-util-crypto.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-util-crypto.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.src || new URL('bundle-pezkuwi-util-crypto.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.src || new URL('bundle-pezkuwi-util-crypto.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.6' };
11
11
 
12
12
  function evaluateThis(fn) {
13
13
  return fn('return this');
@@ -84,7 +84,7 @@
84
84
 
85
85
  Object.defineProperty(packageInfo$1, "__esModule", { value: true });
86
86
  packageInfo$1.packageInfo = void 0;
87
- packageInfo$1.packageInfo = { name: '@pezkuwi/x-randomvalues', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.1' };
87
+ packageInfo$1.packageInfo = { name: '@pezkuwi/x-randomvalues', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.6' };
88
88
 
89
89
  (function (exports) {
90
90
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -687,7 +687,7 @@
687
687
  cryptoWaitReady().catch(() => {
688
688
  });
689
689
 
690
- const packageInfo = { name: '@pezkuwi/util-crypto', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-util-crypto.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-util-crypto.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.src || new URL('bundle-polkadot-util-crypto.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.src || new URL('bundle-polkadot-util-crypto.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.1' };
690
+ const packageInfo = { name: '@pezkuwi/util-crypto', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-util-crypto.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-pezkuwi-util-crypto.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.src || new URL('bundle-pezkuwi-util-crypto.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.src || new URL('bundle-pezkuwi-util-crypto.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '14.0.6' };
691
691
 
692
692
  /*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */
693
693
  function assertNumber(n) {
@@ -1578,7 +1578,7 @@
1578
1578
  return [isValid, length, ss58Length, ss58Decoded];
1579
1579
  }
1580
1580
 
1581
- const knownSubstrate = [
1581
+ const knownBizinikiwi = [
1582
1582
  {
1583
1583
  "prefix": 0,
1584
1584
  "network": "polkadot",
@@ -3790,7 +3790,7 @@
3790
3790
  ? -1
3791
3791
  : 1;
3792
3792
  }
3793
- const allNetworks = knownSubstrate.map(toExpanded);
3793
+ const allNetworks = knownBizinikiwi.map(toExpanded);
3794
3794
  const availableNetworks = allNetworks.filter(filterAvailable).sort(sortNetworks);
3795
3795
  const selectableNetworks = availableNetworks.filter(filterSelectable);
3796
3796
 
package/bundleInit.d.ts CHANGED
@@ -1 +1 @@
1
- import '@polkadot/x-bigint/shim';
1
+ import '@pezkuwi/x-bigint/shim';
@@ -1,4 +1,4 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  import type { Prefix } from './types.js';
3
3
  /**
4
4
  * @name encodeDerivedAddress
@@ -1,4 +1,4 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  import type { Prefix } from './types.js';
3
3
  /**
4
4
  * @name encodeMultiAddress
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { u8aEq } from '@polkadot/util';
10
+ * import { u8aEq } from '@pezkuwi/util';
11
11
  *
12
12
  * u8aEq(new Uint8Array([0x68, 0x65]), new Uint8Array([0x68, 0x65])); // true
13
13
  * ```
@@ -1,2 +1,2 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  export declare function createKeyDerived(who: string | Uint8Array, index: bigint | BN | number): Uint8Array;
@@ -1,2 +1,2 @@
1
- import type { BN } from '@polkadot/util';
1
+ import type { BN } from '@pezkuwi/util';
2
2
  export declare function createKeyMulti(who: (string | Uint8Array)[], threshold: bigint | BN | number): Uint8Array;
@@ -23,4 +23,4 @@ export declare const base32Decode: (value: string, ipfsCompat?: boolean) => Uint
23
23
  * @description
24
24
  * From the provided input, create the base32 and return the result as a string.
25
25
  */
26
- export declare const base32Encode: (value: import("@polkadot/util/types").U8aLike, ipfsCompat?: boolean) => string;
26
+ export declare const base32Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
@@ -1,5 +1,5 @@
1
- import type { U8aLike } from '@polkadot/util/types';
2
- export type { U8aLike } from '@polkadot/util/types';
1
+ import type { U8aLike } from '@pezkuwi/util/types';
2
+ export type { U8aLike } from '@pezkuwi/util/types';
3
3
  interface Coder {
4
4
  decode: (value: string) => Uint8Array;
5
5
  encode: (value: Uint8Array) => string;
@@ -18,7 +18,7 @@ export declare const base58Decode: (value: string, ipfsCompat?: boolean) => Uint
18
18
  * @description
19
19
  * From the provided input, create the base58 and return the result as a string.
20
20
  */
21
- export declare const base58Encode: (value: import("@polkadot/util/types").U8aLike, ipfsCompat?: boolean) => string;
21
+ export declare const base58Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
22
22
  /**
23
23
  * @name isBase58
24
24
  * @description Checks if the input is in base58, returning true/false
@@ -23,4 +23,4 @@ export declare const base64Decode: (value: string, ipfsCompat?: boolean) => Uint
23
23
  * @description
24
24
  * From the provided input, create the base64 and return the result as a string.
25
25
  */
26
- export declare const base64Encode: (value: import("@polkadot/util/types").U8aLike, ipfsCompat?: boolean) => string;
26
+ export declare const base64Encode: (value: import("@pezkuwi/util/types").U8aLike, ipfsCompat?: boolean) => string;
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { blake2AsU8a } from '@polkadot/util-crypto';
10
+ * import { blake2AsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * blake2AsU8a('abc'); // => [0xba, 0x80, 0xa5, 0x3f, 0x98, 0x1c, 0x4d, 0x0d]
13
13
  * ```
@@ -17,4 +17,4 @@ export declare function blake2AsU8a(data: string | Uint8Array, bitLength?: 64 |
17
17
  * @name blake2AsHex
18
18
  * @description Creates a blake2b hex from the input.
19
19
  */
20
- export declare const blake2AsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | undefined, key?: Uint8Array | null | undefined, onlyJs?: boolean | undefined) => import("@polkadot/util/types").HexString;
20
+ export declare const blake2AsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | undefined, key?: Uint8Array | null | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;
@@ -1 +1 @@
1
- import '@polkadot/x-bigint/shim';
1
+ import '@pezkuwi/x-bigint/shim';
package/cjs/crypto.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { isReady } from '@polkadot/wasm-crypto';
1
+ import { isReady } from '@pezkuwi/wasm-crypto';
2
2
  export declare const cryptoIsReady: typeof isReady;
3
3
  export declare function cryptoWaitReady(): Promise<boolean>;
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromRandom } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromRandom } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromRandom(); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromSecret } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromSecret } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromSecret(...); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromSeed } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromSeed } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromSeed(...); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromString } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromString } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromString('test'); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519Sign } from '@polkadot/util-crypto';
11
+ * import { ed25519Sign } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519Sign([...], [...]); // => [...]
14
14
  * ```
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { ed25519Verify } from '@polkadot/util-crypto';
10
+ * import { ed25519Verify } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * ed25519Verify([...], [...], [...]); // => true/false
13
13
  * ```
@@ -1,2 +1,2 @@
1
- import type { HexString } from '@polkadot/util/types';
1
+ import type { HexString } from '@pezkuwi/util/types';
2
2
  export declare function ethereumEncode(addressOrPublic?: string | Uint8Array): HexString;
package/cjs/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { HexString } from '@polkadot/util/types';
2
- export type { HexString } from '@polkadot/util/types';
1
+ import type { HexString } from '@pezkuwi/util/types';
2
+ export type { HexString } from '@pezkuwi/util/types';
3
3
  interface DualHash {
4
4
  256: (u8a: Uint8Array) => Uint8Array;
5
5
  512: (u8a: Uint8Array) => Uint8Array;
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { keccakAsU8a } from '@polkadot/util-crypto';
10
+ * import { keccakAsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * keccakAsU8a('123'); // => Uint8Array
13
13
  * ```
@@ -27,4 +27,4 @@ export declare const keccak512AsU8a: (data: string | Uint8Array, onlyJs?: boolea
27
27
  * @name keccakAsHex
28
28
  * @description Creates a keccak hex string from the input.
29
29
  */
30
- export declare const keccakAsHex: (value: string | Uint8Array, bitLength?: 256 | 512 | undefined, onlyJs?: boolean | undefined) => import("@polkadot/util/types").HexString;
30
+ export declare const keccakAsHex: (value: string | Uint8Array, bitLength?: 256 | 512 | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;
@@ -1,4 +1,4 @@
1
- import { BN } from '@polkadot/util';
1
+ import { BN } from '@pezkuwi/util';
2
2
  export declare class DeriveJunction {
3
3
  #private;
4
4
  static from(value: string): DeriveJunction;
@@ -5,7 +5,7 @@
5
5
  * <BR>
6
6
  *
7
7
  * ```javascript
8
- * import { mnemonicGenerate } from '@polkadot/util-crypto';
8
+ * import { mnemonicGenerate } from '@pezkuwi/util-crypto';
9
9
  *
10
10
  * const mnemonic = mnemonicGenerate(); // => string
11
11
  * ```
@@ -5,7 +5,7 @@
5
5
  * <BR>
6
6
  *
7
7
  * ```javascript
8
- * import { mnemonicGenerate, mnemonicToLegacySeed, mnemonicValidate } from '@polkadot/util-crypto';
8
+ * import { mnemonicGenerate, mnemonicToLegacySeed, mnemonicValidate } from '@pezkuwi/util-crypto';
9
9
  *
10
10
  * const mnemonic = mnemonicGenerate(); // => string
11
11
  * const isValidMnemonic = mnemonicValidate(mnemonic); // => boolean
@@ -5,7 +5,7 @@
5
5
  * <BR>
6
6
  *
7
7
  * ```javascript
8
- * import { mnemonicGenerate, mnemonicValidate } from '@polkadot/util-crypto';
8
+ * import { mnemonicGenerate, mnemonicValidate } from '@pezkuwi/util-crypto';
9
9
  *
10
10
  * const mnemonic = mnemonicGenerate(); // => string
11
11
  * const isValidMnemonic = mnemonicValidate(mnemonic); // => boolean
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { naclDecrypt } from '@polkadot/util-crypto';
10
+ * import { naclDecrypt } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * naclDecrypt([...], [...], [...]); // => [...]
13
13
  * ```
@@ -11,7 +11,7 @@ interface Encrypted {
11
11
  * <BR>
12
12
  *
13
13
  * ```javascript
14
- * import { naclEncrypt } from '@polkadot/util-crypto';
14
+ * import { naclEncrypt } from '@pezkuwi/util-crypto';
15
15
  *
16
16
  * naclEncrypt([...], [...]); // => [...]
17
17
  * ```
package/cjs/networks.d.ts CHANGED
@@ -1 +1 @@
1
- export { allNetworks, availableNetworks, selectableNetworks } from '@polkadot/networks';
1
+ export { allNetworks, availableNetworks, selectableNetworks } from '@pezkuwi/networks';
@@ -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/util-crypto', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.1' };
4
+ exports.packageInfo = { name: '@pezkuwi/util-crypto', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '14.0.6' };
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { randomAsNumber } from '@polkadot/util-crypto';
10
+ * import { randomAsNumber } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * randomAsNumber(); // => <random number>
13
13
  * ```
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { randomAsU8a } from '@polkadot/util-crypto';
10
+ * import { randomAsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * randomAsU8a(); // => Uint8Array([...])
13
13
  * ```
@@ -17,4 +17,4 @@ export declare function randomAsU8a(length?: number): Uint8Array;
17
17
  * @name randomAsHex
18
18
  * @description Creates a hex string filled with random bytes.
19
19
  */
20
- export declare const randomAsHex: (length?: number | undefined) => import("@polkadot/util/types").HexString;
20
+ export declare const randomAsHex: (length?: number | undefined) => import("@pezkuwi/util/types").HexString;
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { xxhashAsU8a } from '@polkadot/util-crypto';
10
+ * import { xxhashAsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * xxhashAsU8a('abc'); // => 0x44bc2cf5ad770999
13
13
  * ```
@@ -17,4 +17,4 @@ export declare function xxhashAsU8a(data: string | Uint8Array, bitLength?: 64 |
17
17
  * @name xxhashAsHex
18
18
  * @description Creates a xxhash64 hex from the input.
19
19
  */
20
- export declare const xxhashAsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | 320 | 192 | 448 | undefined, onlyJs?: boolean | undefined) => import("@polkadot/util/types").HexString;
20
+ export declare const xxhashAsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | 320 | 192 | 448 | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;
package/crypto.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import { isReady } from '@polkadot/wasm-crypto';
1
+ import { isReady } from '@pezkuwi/wasm-crypto';
2
2
  export declare const cryptoIsReady: typeof isReady;
3
3
  export declare function cryptoWaitReady(): Promise<boolean>;
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromRandom } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromRandom } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromRandom(); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromSecret } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromSecret } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromSecret(...); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromSeed } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromSeed } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromSeed(...); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
@@ -8,7 +8,7 @@ import type { Keypair } from '../../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519PairFromString } from '@polkadot/util-crypto';
11
+ * import { ed25519PairFromString } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519PairFromString('test'); // => { secretKey: [...], publicKey: [...] }
14
14
  * ```
package/ed25519/sign.d.ts CHANGED
@@ -8,7 +8,7 @@ import type { Keypair } from '../types.js';
8
8
  * <BR>
9
9
  *
10
10
  * ```javascript
11
- * import { ed25519Sign } from '@polkadot/util-crypto';
11
+ * import { ed25519Sign } from '@pezkuwi/util-crypto';
12
12
  *
13
13
  * ed25519Sign([...], [...]); // => [...]
14
14
  * ```
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { ed25519Verify } from '@polkadot/util-crypto';
10
+ * import { ed25519Verify } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * ed25519Verify([...], [...], [...]); // => true/false
13
13
  * ```
@@ -1,2 +1,2 @@
1
- import type { HexString } from '@polkadot/util/types';
1
+ import type { HexString } from '@pezkuwi/util/types';
2
2
  export declare function ethereumEncode(addressOrPublic?: string | Uint8Array): HexString;
package/helpers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import type { HexString } from '@polkadot/util/types';
2
- export type { HexString } from '@polkadot/util/types';
1
+ import type { HexString } from '@pezkuwi/util/types';
2
+ export type { HexString } from '@pezkuwi/util/types';
3
3
  interface DualHash {
4
4
  256: (u8a: Uint8Array) => Uint8Array;
5
5
  512: (u8a: Uint8Array) => Uint8Array;
package/keccak/asU8a.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { keccakAsU8a } from '@polkadot/util-crypto';
10
+ * import { keccakAsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * keccakAsU8a('123'); // => Uint8Array
13
13
  * ```
@@ -27,4 +27,4 @@ export declare const keccak512AsU8a: (data: string | Uint8Array, onlyJs?: boolea
27
27
  * @name keccakAsHex
28
28
  * @description Creates a keccak hex string from the input.
29
29
  */
30
- export declare const keccakAsHex: (value: string | Uint8Array, bitLength?: 256 | 512 | undefined, onlyJs?: boolean | undefined) => import("@polkadot/util/types").HexString;
30
+ export declare const keccakAsHex: (value: string | Uint8Array, bitLength?: 256 | 512 | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;
@@ -1,4 +1,4 @@
1
- import { BN } from '@polkadot/util';
1
+ import { BN } from '@pezkuwi/util';
2
2
  export declare class DeriveJunction {
3
3
  #private;
4
4
  static from(value: string): DeriveJunction;
@@ -5,7 +5,7 @@
5
5
  * <BR>
6
6
  *
7
7
  * ```javascript
8
- * import { mnemonicGenerate } from '@polkadot/util-crypto';
8
+ * import { mnemonicGenerate } from '@pezkuwi/util-crypto';
9
9
  *
10
10
  * const mnemonic = mnemonicGenerate(); // => string
11
11
  * ```
@@ -5,7 +5,7 @@
5
5
  * <BR>
6
6
  *
7
7
  * ```javascript
8
- * import { mnemonicGenerate, mnemonicToLegacySeed, mnemonicValidate } from '@polkadot/util-crypto';
8
+ * import { mnemonicGenerate, mnemonicToLegacySeed, mnemonicValidate } from '@pezkuwi/util-crypto';
9
9
  *
10
10
  * const mnemonic = mnemonicGenerate(); // => string
11
11
  * const isValidMnemonic = mnemonicValidate(mnemonic); // => boolean
@@ -5,7 +5,7 @@
5
5
  * <BR>
6
6
  *
7
7
  * ```javascript
8
- * import { mnemonicGenerate, mnemonicValidate } from '@polkadot/util-crypto';
8
+ * import { mnemonicGenerate, mnemonicValidate } from '@pezkuwi/util-crypto';
9
9
  *
10
10
  * const mnemonic = mnemonicGenerate(); // => string
11
11
  * const isValidMnemonic = mnemonicValidate(mnemonic); // => boolean
package/nacl/decrypt.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { naclDecrypt } from '@polkadot/util-crypto';
10
+ * import { naclDecrypt } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * naclDecrypt([...], [...], [...]); // => [...]
13
13
  * ```
package/nacl/encrypt.d.ts CHANGED
@@ -11,7 +11,7 @@ interface Encrypted {
11
11
  * <BR>
12
12
  *
13
13
  * ```javascript
14
- * import { naclEncrypt } from '@polkadot/util-crypto';
14
+ * import { naclEncrypt } from '@pezkuwi/util-crypto';
15
15
  *
16
16
  * naclEncrypt([...], [...]); // => [...]
17
17
  * ```
package/networks.d.ts CHANGED
@@ -1 +1 @@
1
- export { allNetworks, availableNetworks, selectableNetworks } from '@polkadot/networks';
1
+ export { allNetworks, availableNetworks, selectableNetworks } from '@pezkuwi/networks';
package/package.json CHANGED
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "author": "Jaco Greeff <jacogr@gmail.com>",
3
- "bugs": "https://github.com/polkadot-js/common/issues",
4
- "description": "A collection of useful crypto utilities for @polkadot",
3
+ "bugs": "https://github.com/pezkuwichain/pezkuwi-common/issues",
4
+ "description": "A collection of useful crypto utilities for @pezkuwi",
5
5
  "engines": {
6
6
  "node": ">=18"
7
7
  },
8
- "homepage": "https://github.com/polkadot-js/common/tree/master/packages/util-crypto#readme",
8
+ "homepage": "https://github.com/pezkuwichain/pezkuwi-common/tree/master/packages/util-crypto#readme",
9
9
  "license": "Apache-2.0",
10
10
  "name": "@pezkuwi/util-crypto",
11
11
  "repository": {
12
12
  "directory": "packages/util-crypto",
13
13
  "type": "git",
14
- "url": "https://github.com/polkadot-js/common.git"
14
+ "url": "https://github.com/pezkuwichain/pezkuwi-common.git"
15
15
  },
16
16
  "sideEffects": [
17
17
  "./bundleInit.js",
@@ -20,7 +20,7 @@
20
20
  "./cjs/packageDetect.js"
21
21
  ],
22
22
  "type": "module",
23
- "version": "14.0.5",
23
+ "version": "14.0.7",
24
24
  "main": "./cjs/index.js",
25
25
  "module": "./index.js",
26
26
  "browser": {
@@ -2041,17 +2041,17 @@
2041
2041
  "dependencies": {
2042
2042
  "@noble/curves": "^1.3.0",
2043
2043
  "@noble/hashes": "^1.3.3",
2044
- "@pezkuwi/networks": "14.0.5",
2045
- "@pezkuwi/util": "14.0.5",
2046
- "@pezkuwi/wasm-crypto": "^7.5.3",
2047
- "@pezkuwi/wasm-util": "^7.5.3",
2048
- "@pezkuwi/x-bigint": "14.0.5",
2049
- "@pezkuwi/x-randomvalues": "14.0.5",
2044
+ "@pezkuwi/networks": "14.0.1",
2045
+ "@pezkuwi/util": "14.0.1",
2046
+ "@pezkuwi/wasm-crypto": "^7.5.4",
2047
+ "@pezkuwi/wasm-util": "^7.5.4",
2048
+ "@pezkuwi/x-bigint": "14.0.1",
2049
+ "@pezkuwi/x-randomvalues": "14.0.1",
2050
2050
  "@scure/base": "^1.1.7",
2051
2051
  "@scure/sr25519": "^0.2.0",
2052
2052
  "tslib": "^2.8.0"
2053
2053
  },
2054
2054
  "peerDependencies": {
2055
- "@pezkuwi/util": "14.0.5"
2055
+ "@pezkuwi/util": "14.0.1"
2056
2056
  }
2057
2057
  }
package/packageInfo.js CHANGED
@@ -1 +1 @@
1
- export const packageInfo = { name: '@pezkuwi/util-crypto', 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' };
1
+ export const packageInfo = { name: '@pezkuwi/util-crypto', 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.6' };
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { randomAsNumber } from '@polkadot/util-crypto';
10
+ * import { randomAsNumber } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * randomAsNumber(); // => <random number>
13
13
  * ```
package/random/asU8a.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { randomAsU8a } from '@polkadot/util-crypto';
10
+ * import { randomAsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * randomAsU8a(); // => Uint8Array([...])
13
13
  * ```
@@ -17,4 +17,4 @@ export declare function randomAsU8a(length?: number): Uint8Array;
17
17
  * @name randomAsHex
18
18
  * @description Creates a hex string filled with random bytes.
19
19
  */
20
- export declare const randomAsHex: (length?: number | undefined) => import("@polkadot/util/types").HexString;
20
+ export declare const randomAsHex: (length?: number | undefined) => import("@pezkuwi/util/types").HexString;
package/xxhash/asU8a.d.ts CHANGED
@@ -7,7 +7,7 @@
7
7
  * <BR>
8
8
  *
9
9
  * ```javascript
10
- * import { xxhashAsU8a } from '@polkadot/util-crypto';
10
+ * import { xxhashAsU8a } from '@pezkuwi/util-crypto';
11
11
  *
12
12
  * xxhashAsU8a('abc'); // => 0x44bc2cf5ad770999
13
13
  * ```
@@ -17,4 +17,4 @@ export declare function xxhashAsU8a(data: string | Uint8Array, bitLength?: 64 |
17
17
  * @name xxhashAsHex
18
18
  * @description Creates a xxhash64 hex from the input.
19
19
  */
20
- export declare const xxhashAsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | 320 | 192 | 448 | undefined, onlyJs?: boolean | undefined) => import("@polkadot/util/types").HexString;
20
+ export declare const xxhashAsHex: (data: string | Uint8Array, bitLength?: 256 | 512 | 64 | 128 | 384 | 320 | 192 | 448 | undefined, onlyJs?: boolean | undefined) => import("@pezkuwi/util/types").HexString;