@zondax/ledger-js
Version:
TS / Node API for apps running on Ledger devices
84 lines (83 loc) • 2.91 kB
TypeScript
/******************************************************************************
* (c) 2018 - 2024 Zondax AG
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*****************************************************************************/
export declare const HARDENED = 2147483648;
export declare const LEDGER_DASHBOARD_CLA = 176;
export declare const PAYLOAD_TYPE: Readonly<Record<string, number>>;
export type LedgerCustomError = number;
export declare enum LedgerError {
U2FUnknown = 1,
U2FBadRequest = 2,
U2FConfigurationUnsupported = 3,
U2FDeviceIneligible = 4,
U2FTimeout = 5,
Timeout = 14,
GpAuthFailed = 25344,
PinRemainingAttempts = 25536,
ExecutionError = 25600,
WrongLength = 26368,
IncorrectLength = 26368,
MissingCriticalParameter = 26624,
ErrorDerivingKeys = 26626,
EmptyBuffer = 27010,
SecurityStatusNotSatisfied = 27010,
OutputBufferTooSmall = 27011,
DataIsInvalid = 27012,
ConditionsOfUseNotSatisfied = 27013,
CommandIncompatibleFileStructure = 27009,
TransactionRejected = 27014,
BadKeyHandle = 27264,
IncorrectData = 27264,
ReferencedDataNotFound = 27272,
NotEnoughMemorySpace = 27268,
FileAlreadyExists = 27273,
InvalidP1P2 = 27392,
IncorrectP1P2 = 27392,
InstructionNotSupported = 27904,
InsNotSupported = 27904,
UnknownApdu = 27906,
DeviceNotOnboarded = 27911,
DeviceNotOnboarded2 = 26129,
CustomImageBootloader = 26159,
CustomImageEmpty = 26158,
AppDoesNotSeemToBeOpen = 28161,
ClaNotSupported = 28160,
Licensing = 28482,
UnknownError = 28416,
TechnicalProblem = 28416,
SignVerifyError = 28417,
Halted = 28586,
NoErrors = 36864,
DeviceIsBusy = 36865,
UnknownTransportError = 65535,
AccessConditionNotFulfilled = 38916,
AlgorithmNotSupported = 38020,
CodeBlocked = 38976,
CodeNotInitialized = 38914,
ContradictionInvalidation = 38928,
ContradictionSecretCodeStatus = 38920,
InvalidKcv = 38021,
InvalidOffset = 37890,
LockedDevice = 21781,
MaxValueReached = 38992,
MemoryProblem = 37440,
NoEfSelected = 37888,
InconsistentFile = 37896,
FileNotFound = 37892,
UserRefusedOnDevice = 21761,
NotEnoughSpace = 20738,
GenericError = 4294967295
}
export declare const ERROR_DESCRIPTION_OVERRIDE: Readonly<Record<LedgerError, string>>;