@taquito/signer
Version:
Provide signing functionality to be with taquito
79 lines (78 loc) • 2.61 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidPassphraseError = exports.ToBeImplemented = exports.InvalidSeedLengthError = exports.InvalidCurveError = exports.InvalidBitSize = exports.InvalidMnemonicError = void 0;
const core_1 = require("@taquito/core");
/**
* @category Error
* @description Error that indicates an invalid Mnemonic being passed or used
*/
class InvalidMnemonicError extends core_1.ParameterValidationError {
constructor(mnemonic) {
super();
this.mnemonic = mnemonic;
this.name = 'InvalidMnemonicError';
this.message = `Invalid mnemonic "${mnemonic}"`;
}
}
exports.InvalidMnemonicError = InvalidMnemonicError;
/**
* @category Error
* @description Error that indicates a curve with incorrect bit size being passed or used
*/
class InvalidBitSize extends core_1.ParameterValidationError {
constructor(message) {
super();
this.message = message;
this.name = 'InvalidBitSize';
}
}
exports.InvalidBitSize = InvalidBitSize;
/**
* @category Error
* @description Error that indicates an unsupported cureve being passed or used
*/
class InvalidCurveError extends core_1.ParameterValidationError {
constructor(message) {
super();
this.message = message;
this.name = 'InvalidCurveError';
}
}
exports.InvalidCurveError = InvalidCurveError;
/**
* @category Error
* @description Error that indicates a seed with invalid length being passed or used
*/
class InvalidSeedLengthError extends core_1.ParameterValidationError {
constructor(seedLength) {
super();
this.seedLength = seedLength;
this.name = 'InvalidSeedLengthError';
this.message = `Invalid seed length "${seedLength}" expecting length between 16 to 64.`;
}
}
exports.InvalidSeedLengthError = InvalidSeedLengthError;
/**
* @category Error
* @description Error that indicates a feature still under developement
*/
class ToBeImplemented extends core_1.UnsupportedActionError {
constructor() {
super();
this.name = 'ToBeImplemented';
this.message = 'This feature is under developement';
}
}
exports.ToBeImplemented = ToBeImplemented;
/**
* @category Error
* @description Error that indicates an invalid passphrase being passed or used
*/
class InvalidPassphraseError extends core_1.ParameterValidationError {
constructor(message) {
super();
this.message = message;
this.name = 'InvalidPassphraseError';
}
}
exports.InvalidPassphraseError = InvalidPassphraseError;