@cardano-sdk/crypto 0.1.23 → 0.1.24

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.
@@ -1,5 +1,5 @@
1
1
  import { InvalidArgumentError } from '@cardano-sdk/util';
2
- import { add256bits, add28Mul8 } from './arithmetic';
2
+ import { add256bits, add28Mul8 } from './arithmetic.js';
3
3
  import { crypto_auth_hmacsha512, crypto_core_ed25519_add, crypto_scalarmult_ed25519_base_noclamp } from 'libsodium-wrappers-sumo';
4
4
  const isHardenedDerivation = (index) => index >= 2147483648;
5
5
  const deriveHardened = (index, scalar, iv, chainCode) => {
@@ -1,8 +1,8 @@
1
1
  /// <reference types="pouchdb-core" />
2
2
  /// <reference types="node" />
3
- import { Bip32PrivateKeyHex } from '../hexTypes';
4
- import { Bip32PublicKey } from './Bip32PublicKey';
5
- import { Ed25519PrivateKey } from '../Ed25519e';
3
+ import { Bip32PrivateKeyHex } from '../hexTypes.js';
4
+ import { Bip32PublicKey } from './Bip32PublicKey.js';
5
+ import { Ed25519PrivateKey } from '../Ed25519e/index.js';
6
6
  export declare const BIP32_ED25519_PRIVATE_KEY_LENGTH = 96;
7
7
  export declare class Bip32PrivateKey {
8
8
  #private;
@@ -10,10 +10,10 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _Bip32PrivateKey_key;
13
- import * as Bip32KeyDerivation from './Bip32KeyDerivation';
14
- import { Bip32PrivateKeyHex } from '../hexTypes';
15
- import { Bip32PublicKey } from './Bip32PublicKey';
16
- import { EXTENDED_ED25519_PRIVATE_KEY_LENGTH, Ed25519PrivateKey } from '../Ed25519e';
13
+ import * as Bip32KeyDerivation from './Bip32KeyDerivation.js';
14
+ import { Bip32PrivateKeyHex } from '../hexTypes.js';
15
+ import { Bip32PublicKey } from './Bip32PublicKey.js';
16
+ import { EXTENDED_ED25519_PRIVATE_KEY_LENGTH, Ed25519PrivateKey } from '../Ed25519e/index.js';
17
17
  import { InvalidArgumentError } from '@cardano-sdk/util';
18
18
  import { crypto_scalarmult_ed25519_base_noclamp, ready } from 'libsodium-wrappers-sumo';
19
19
  import { pbkdf2 } from 'pbkdf2';
@@ -1,5 +1,5 @@
1
- import { Bip32PublicKeyHashHex, Bip32PublicKeyHex } from '../hexTypes';
2
- import { Ed25519PublicKey } from '../Ed25519e';
1
+ import { Bip32PublicKeyHashHex, Bip32PublicKeyHex } from '../hexTypes.js';
2
+ import { Ed25519PublicKey } from '../Ed25519e/index.js';
3
3
  export declare const BIP32_ED25519_PUBLIC_KEY_LENGTH = 64;
4
4
  export declare class Bip32PublicKey {
5
5
  #private;
@@ -10,9 +10,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _Bip32PublicKey_key;
13
- import * as Bip32KeyDerivation from './Bip32KeyDerivation';
14
- import { BIP32_PUBLIC_KEY_HASH_LENGTH, Bip32PublicKeyHashHex, Bip32PublicKeyHex } from '../hexTypes';
15
- import { ED25519_PUBLIC_KEY_LENGTH, Ed25519PublicKey } from '../Ed25519e';
13
+ import * as Bip32KeyDerivation from './Bip32KeyDerivation.js';
14
+ import { BIP32_PUBLIC_KEY_HASH_LENGTH, Bip32PublicKeyHashHex, Bip32PublicKeyHex } from '../hexTypes.js';
15
+ import { ED25519_PUBLIC_KEY_LENGTH, Ed25519PublicKey } from '../Ed25519e/index.js';
16
16
  import { InvalidArgumentError } from '@cardano-sdk/util';
17
17
  import { crypto_generichash, ready } from 'libsodium-wrappers-sumo';
18
18
  export const BIP32_ED25519_PUBLIC_KEY_LENGTH = 64;
@@ -1,4 +1,4 @@
1
- export * from './Bip32PrivateKey';
2
- export * from './Bip32PublicKey';
3
- export * from './arithmetic';
1
+ export * from './Bip32PrivateKey.js';
2
+ export * from './Bip32PublicKey.js';
3
+ export * from './arithmetic.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,4 +1,4 @@
1
- export * from './Bip32PrivateKey';
2
- export * from './Bip32PublicKey';
3
- export * from './arithmetic';
1
+ export * from './Bip32PrivateKey.js';
2
+ export * from './Bip32PublicKey.js';
3
+ export * from './arithmetic.js';
4
4
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  /// <reference types="pouchdb-core" />
2
2
  /// <reference types="node" />
3
- import { BIP32Path } from './types';
4
- import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from './hexTypes';
3
+ import { BIP32Path } from './types.js';
4
+ import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from './hexTypes.js';
5
5
  import { HexBlob } from '@cardano-sdk/util';
6
6
  export interface Bip32Ed25519 {
7
7
  fromBip39Entropy(entropy: Buffer, passphrase: string): Promise<Bip32PrivateKeyHex>;
@@ -1,4 +1,4 @@
1
- import { Ed25519KeyHashHex } from '../hexTypes';
1
+ import { Ed25519KeyHashHex } from '../hexTypes.js';
2
2
  export declare const ED25519_PUBLIC_KEY_HASH_LENGTH = 28;
3
3
  export declare class Ed25519KeyHash {
4
4
  #private;
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _Ed25519KeyHash_hash;
13
- import { Ed25519KeyHashHex } from '../hexTypes';
13
+ import { Ed25519KeyHashHex } from '../hexTypes.js';
14
14
  import { InvalidArgumentError } from '@cardano-sdk/util';
15
15
  export const ED25519_PUBLIC_KEY_HASH_LENGTH = 28;
16
16
  export class Ed25519KeyHash {
@@ -1,6 +1,6 @@
1
- import { Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex } from '../hexTypes';
2
- import { Ed25519PublicKey } from './Ed25519PublicKey';
3
- import { Ed25519Signature } from './Ed25519Signature';
1
+ import { Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex } from '../hexTypes.js';
2
+ import { Ed25519PublicKey } from './Ed25519PublicKey.js';
3
+ import { Ed25519Signature } from './Ed25519Signature.js';
4
4
  import { HexBlob } from '@cardano-sdk/util';
5
5
  export declare const NORMAL_ED25519_PRIVATE_KEY_LENGTH = 32;
6
6
  export declare const EXTENDED_ED25519_PRIVATE_KEY_LENGTH = 64;
@@ -10,9 +10,9 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _Ed25519PrivateKey_keyMaterial;
13
- import { Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex } from '../hexTypes';
14
- import { Ed25519PublicKey } from './Ed25519PublicKey';
15
- import { Ed25519Signature } from './Ed25519Signature';
13
+ import { Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex } from '../hexTypes.js';
14
+ import { Ed25519PublicKey } from './Ed25519PublicKey.js';
15
+ import { Ed25519Signature } from './Ed25519Signature.js';
16
16
  import { InvalidArgumentError } from '@cardano-sdk/util';
17
17
  import { crypto_core_ed25519_scalar_add, crypto_core_ed25519_scalar_mul, crypto_core_ed25519_scalar_reduce, crypto_hash_sha512, crypto_scalarmult_ed25519_base_noclamp, crypto_sign_detached, crypto_sign_seed_keypair, ready } from 'libsodium-wrappers-sumo';
18
18
  const SCALAR_INDEX = 0;
@@ -1,6 +1,6 @@
1
- import { Ed25519KeyHash } from './Ed25519KeyHash';
2
- import { Ed25519PublicKeyHex } from '../hexTypes';
3
- import { Ed25519Signature } from './Ed25519Signature';
1
+ import { Ed25519KeyHash } from './Ed25519KeyHash.js';
2
+ import { Ed25519PublicKeyHex } from '../hexTypes.js';
3
+ import { Ed25519Signature } from './Ed25519Signature.js';
4
4
  import { HexBlob } from '@cardano-sdk/util';
5
5
  export declare const ED25519_PUBLIC_KEY_LENGTH = 32;
6
6
  export declare class Ed25519PublicKey {
@@ -10,8 +10,8 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _Ed25519PublicKey_keyMaterial;
13
- import { ED25519_PUBLIC_KEY_HASH_LENGTH, Ed25519KeyHash } from './Ed25519KeyHash';
14
- import { Ed25519PublicKeyHex } from '../hexTypes';
13
+ import { ED25519_PUBLIC_KEY_HASH_LENGTH, Ed25519KeyHash } from './Ed25519KeyHash.js';
14
+ import { Ed25519PublicKeyHex } from '../hexTypes.js';
15
15
  import { InvalidArgumentError } from '@cardano-sdk/util';
16
16
  import { crypto_generichash, crypto_sign_verify_detached, ready } from 'libsodium-wrappers-sumo';
17
17
  export const ED25519_PUBLIC_KEY_LENGTH = 32;
@@ -1,4 +1,4 @@
1
- import { Ed25519SignatureHex } from '../hexTypes';
1
+ import { Ed25519SignatureHex } from '../hexTypes.js';
2
2
  export declare const ED25519_SIGNATURE_LENGTH = 64;
3
3
  export declare class Ed25519Signature {
4
4
  #private;
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _Ed25519Signature_signature;
13
- import { Ed25519SignatureHex } from '../hexTypes';
13
+ import { Ed25519SignatureHex } from '../hexTypes.js';
14
14
  import { InvalidArgumentError } from '@cardano-sdk/util';
15
15
  export const ED25519_SIGNATURE_LENGTH = 64;
16
16
  export class Ed25519Signature {
@@ -1,5 +1,5 @@
1
- export * from './Ed25519PrivateKey';
2
- export * from './Ed25519PublicKey';
3
- export * from './Ed25519Signature';
4
- export * from './Ed25519KeyHash';
1
+ export * from './Ed25519PrivateKey.js';
2
+ export * from './Ed25519PublicKey.js';
3
+ export * from './Ed25519Signature.js';
4
+ export * from './Ed25519KeyHash.js';
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1,5 +1,5 @@
1
- export * from './Ed25519PrivateKey';
2
- export * from './Ed25519PublicKey';
3
- export * from './Ed25519Signature';
4
- export * from './Ed25519KeyHash';
1
+ export * from './Ed25519PrivateKey.js';
2
+ export * from './Ed25519PublicKey.js';
3
+ export * from './Ed25519Signature.js';
4
+ export * from './Ed25519KeyHash.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  import blake2b from 'blake2b';
2
2
  export { blake2b };
3
- export * from './Bip32';
4
- export * from './Bip32Ed25519';
5
- export * from './Ed25519e';
6
- export * from './strategies';
7
- export * from './hexTypes';
8
- export * from './types';
3
+ export * from './Bip32/index.js';
4
+ export * from './Bip32Ed25519.js';
5
+ export * from './Ed25519e/index.js';
6
+ export * from './strategies/index.js';
7
+ export * from './hexTypes.js';
8
+ export * from './types.js';
9
9
  //# sourceMappingURL=index.d.ts.map
package/dist/esm/index.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import blake2b from 'blake2b';
2
2
  export { blake2b };
3
- export * from './Bip32';
4
- export * from './Bip32Ed25519';
5
- export * from './Ed25519e';
6
- export * from './strategies';
7
- export * from './hexTypes';
8
- export * from './types';
3
+ export * from './Bip32/index.js';
4
+ export * from './Bip32Ed25519.js';
5
+ export * from './Ed25519e/index.js';
6
+ export * from './strategies/index.js';
7
+ export * from './hexTypes.js';
8
+ export * from './types.js';
9
9
  //# sourceMappingURL=index.js.map
@@ -1,9 +1,9 @@
1
1
  /// <reference types="pouchdb-core" />
2
2
  /// <reference types="node" />
3
- import { BIP32Path } from '../types';
4
- import { Bip32Ed25519 } from '../Bip32Ed25519';
5
- import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from '../hexTypes';
6
- import { CardanoMultiplatformLib } from './CML';
3
+ import { BIP32Path } from '../types.js';
4
+ import { Bip32Ed25519 } from '../Bip32Ed25519.js';
5
+ import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from '../hexTypes.js';
6
+ import { CardanoMultiplatformLib } from './CML.js';
7
7
  import { HexBlob } from '@cardano-sdk/util';
8
8
  export declare class CmlBip32Ed25519 implements Bip32Ed25519 {
9
9
  #private;
@@ -10,7 +10,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
10
10
  return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
11
11
  };
12
12
  var _CmlBip32Ed25519_CML;
13
- import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from '../hexTypes';
13
+ import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from '../hexTypes.js';
14
14
  import { usingAutoFree } from '@cardano-sdk/util';
15
15
  const EXTENDED_KEY_HEX_LENGTH = 128;
16
16
  export class CmlBip32Ed25519 {
@@ -1,8 +1,8 @@
1
1
  /// <reference types="pouchdb-core" />
2
2
  /// <reference types="node" />
3
- import { BIP32Path } from '../types';
4
- import { Bip32Ed25519 } from '../Bip32Ed25519';
5
- import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from '../hexTypes';
3
+ import { BIP32Path } from '../types.js';
4
+ import { Bip32Ed25519 } from '../Bip32Ed25519.js';
5
+ import { Bip32PrivateKeyHex, Bip32PublicKeyHex, Ed25519KeyHashHex, Ed25519PrivateExtendedKeyHex, Ed25519PrivateNormalKeyHex, Ed25519PublicKeyHex, Ed25519SignatureHex } from '../hexTypes.js';
6
6
  import { HexBlob } from '@cardano-sdk/util';
7
7
  export declare class SodiumBip32Ed25519 implements Bip32Ed25519 {
8
8
  fromBip39Entropy(entropy: Buffer, passphrase: string): Promise<Bip32PrivateKeyHex>;
@@ -1,5 +1,5 @@
1
- import { Bip32PrivateKey, Bip32PublicKey } from '../Bip32';
2
- import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from '../Ed25519e';
1
+ import { Bip32PrivateKey, Bip32PublicKey } from '../Bip32/index.js';
2
+ import { Ed25519PrivateKey, Ed25519PublicKey, Ed25519Signature } from '../Ed25519e/index.js';
3
3
  const EXTENDED_KEY_HEX_LENGTH = 128;
4
4
  export class SodiumBip32Ed25519 {
5
5
  async fromBip39Entropy(entropy, passphrase) {
@@ -1,3 +1,3 @@
1
- export * from './CmlBip32Ed25519';
2
- export * from './SodiumBip32Ed25519';
1
+ export * from './CmlBip32Ed25519.js';
2
+ export * from './SodiumBip32Ed25519.js';
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,3 @@
1
- export * from './CmlBip32Ed25519';
2
- export * from './SodiumBip32Ed25519';
1
+ export * from './CmlBip32Ed25519.js';
2
+ export * from './SodiumBip32Ed25519.js';
3
3
  //# sourceMappingURL=index.js.map