UNPKG

@taquito/ledger-signer

Version:

Ledger hardware wallet signer integration for Taquito.

55 lines (54 loc) 2.08 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.InvalidDerivationTypeError = exports.PublicKeyHashRetrievalError = exports.PublicKeyRetrievalError = exports.InvalidLedgerResponseError = void 0; const core_1 = require("@taquito/core"); /** * @category Error * Error that indicates an invalid or unparseable ledger response */ class InvalidLedgerResponseError extends core_1.TaquitoError { constructor(message) { super(); this.message = message; this.name = 'InvalidLedgerResponseError'; } } exports.InvalidLedgerResponseError = InvalidLedgerResponseError; /** * @category Error * Error that indicates a failure when trying to retrieve a Public Key from Ledger signer */ class PublicKeyRetrievalError extends core_1.TaquitoError { constructor(cause) { super(); this.cause = cause; this.name = 'PublicKeyRetrievalError'; this.message = `Unable to retrieve Public Key from Ledger`; } } exports.PublicKeyRetrievalError = PublicKeyRetrievalError; /** * @category Error * Error that indicates a failure when trying to retrieve a Public Key Hash from Ledger signer */ class PublicKeyHashRetrievalError extends core_1.TaquitoError { constructor() { super(); this.name = 'PublicKeyHashRetrievalError'; this.message = 'Unable to retrieve Public Key Hash from Ledger'; } } exports.PublicKeyHashRetrievalError = PublicKeyHashRetrievalError; /** * @category Error * Error that indicates an invalid derivation type being passed or used */ class InvalidDerivationTypeError extends core_1.ParameterValidationError { constructor(derivationType) { super(); this.derivationType = derivationType; this.name = 'InvalidDerivationTypeError'; this.message = `Invalid derivation type ${derivationType} expecting one of the following: DerivationType.ED25519, DerivationType.SECP256K1, DerivationType.P256 or DerivationType.BIP32_ED25519`; } } exports.InvalidDerivationTypeError = InvalidDerivationTypeError;