@taquito/signer 16.1.2 → 16.2.0

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,34 +1,48 @@
1
- export declare class InvalidDerivationPathError extends Error {
2
- message: string;
3
- name: string;
4
- constructor(message: string);
1
+ import { ParameterValidationError, UnsupportedActionError } from '@taquito/core';
2
+ /**
3
+ * @category Error
4
+ * @description Error indicates an invalid Mnemonic being passed or used
5
+ */
6
+ export declare class InvalidMnemonicError extends ParameterValidationError {
7
+ mnemonic: string;
8
+ constructor(mnemonic: string);
5
9
  }
6
- export declare class InvalidMnemonicError extends Error {
10
+ /**
11
+ * @category Error
12
+ * @description Error indicates a curve with incorrect bit size being passed or used
13
+ */
14
+ export declare class InvalidBitSize extends ParameterValidationError {
7
15
  message: string;
8
- name: string;
9
16
  constructor(message: string);
10
17
  }
11
- export declare class InvalidBitSize extends Error {
18
+ /**
19
+ * @category Error
20
+ * @description Error indicates an unsupported cureve being passed or used
21
+ */
22
+ export declare class InvalidCurveError extends ParameterValidationError {
12
23
  message: string;
13
- name: string;
14
24
  constructor(message: string);
15
25
  }
16
- export declare class InvalidCurveError extends Error {
17
- curve: string;
18
- name: string;
19
- constructor(curve: string);
20
- }
21
- export declare class InvalidSeedLengthError extends Error {
26
+ /**
27
+ * @category Error
28
+ * @description Error indicates a seed with invalid length being passed or used
29
+ */
30
+ export declare class InvalidSeedLengthError extends ParameterValidationError {
22
31
  seedLength: number;
23
- name: string;
24
32
  constructor(seedLength: number);
25
33
  }
26
- export declare class PrivateKeyError extends Error {
34
+ /**
35
+ * @category Error
36
+ * @description Error indicates a feature still under developement
37
+ */
38
+ export declare class ToBeImplemented extends UnsupportedActionError {
39
+ constructor();
40
+ }
41
+ /**
42
+ * @category Error
43
+ * @description Error indicates an invalid passphrase being passed or used
44
+ */
45
+ export declare class InvalidPassphraseError extends ParameterValidationError {
27
46
  message: string;
28
- name: string;
29
47
  constructor(message: string);
30
48
  }
31
- export declare class ToBeImplemented extends Error {
32
- name: string;
33
- constructor();
34
- }
@@ -5,5 +5,6 @@ export declare type Curves = 'ed25519' | 'secp256k1' | 'p256' | 'bip25519';
5
5
  * @param derivationPath Tezos Requirement 44'/1729' for HD key address default 44'/1729'/0'/0'
6
6
  * @param curve 'ed25519' | 'secp256k1' | 'p256''
7
7
  * @returns final Derivation of HD keys tezos Secret key
8
+ * @throws {@link InvalidCurveError} | {@link ToBeImplemented}
8
9
  */
9
10
  export declare const generateSecretKey: (seed: Uint8Array, derivationPath: string, curve: Curves) => string;
@@ -3,15 +3,7 @@ export * from './import-key';
3
3
  export { VERSION } from './version';
4
4
  export * from './derivation-tools';
5
5
  export * from './helpers';
6
- /**
7
- * @category Error
8
- * @description Error that indicates an invalid passphrase being passed or used
9
- */
10
- export declare class InvalidPassphraseError extends Error {
11
- message: string;
12
- name: string;
13
- constructor(message: string);
14
- }
6
+ export { InvalidPassphraseError } from './errors';
15
7
  export interface FromMnemonicParams {
16
8
  mnemonic: string;
17
9
  password?: string;
@@ -22,7 +14,7 @@ export interface FromMnemonicParams {
22
14
  * @description A local implementation of the signer. Will represent a Tezos account and be able to produce signature in its behalf
23
15
  *
24
16
  * @warn If running in production and dealing with tokens that have real value, it is strongly recommended to use a HSM backed signer so that private key material is not stored in memory or on disk
25
- *
17
+ * @throws {@link InvalidMnemonicError}
26
18
  */
27
19
  export declare class InMemorySigner {
28
20
  private _key;
@@ -36,12 +28,14 @@ export declare class InMemorySigner {
36
28
  * @param derivationPath default 44'/1729'/0'/0' (44'/1729' mandatory)
37
29
  * @param curve currently only supported for tz1, tz2, tz3 addresses. soon bip25519
38
30
  * @returns InMemorySigner
31
+ * @throws {@link InvalidMnemonicError}
39
32
  */
40
- static fromMnemonic({ mnemonic, password, derivationPath, curve }: FromMnemonicParams): InMemorySigner;
33
+ static fromMnemonic({ mnemonic, password, derivationPath, curve, }: FromMnemonicParams): InMemorySigner;
41
34
  /**
42
35
  *
43
36
  * @param key Encoded private key
44
37
  * @param passphrase Passphrase to decrypt the private key if it is encrypted
38
+ * @throws {@link InvalidKeyError}
45
39
  *
46
40
  */
47
41
  constructor(key: string, passphrase?: string);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@taquito/signer",
3
- "version": "16.1.2",
3
+ "version": "16.2.0",
4
4
  "description": "Provide signing functionality to be with taquito",
5
5
  "keywords": [
6
6
  "tezos",
@@ -73,10 +73,10 @@
73
73
  "@stablelib/nacl": "^1.0.4",
74
74
  "@stablelib/pbkdf2": "^1.0.1",
75
75
  "@stablelib/sha512": "^1.0.1",
76
- "@taquito/taquito": "^16.1.2",
77
- "@taquito/utils": "^16.1.2",
76
+ "@taquito/taquito": "^16.2.0",
77
+ "@taquito/utils": "^16.2.0",
78
78
  "@types/bn.js": "^5.1.1",
79
- "bip39": "^3.0.4",
79
+ "bip39": "3.0.4",
80
80
  "elliptic": "^6.5.4",
81
81
  "pbkdf2": "^3.1.2",
82
82
  "typedarray-to-buffer": "^4.0.0"
@@ -112,5 +112,5 @@
112
112
  "typedoc": "^0.20.36",
113
113
  "typescript": "~4.1.5"
114
114
  },
115
- "gitHead": "f44e0fa20e017142543cf0ad49fc8220021f6d1c"
115
+ "gitHead": "148b11675d2c3d3a10ce20c02dcece388ef59414"
116
116
  }