UNPKG

@avalabs/hw-app-avalanche

Version:

Node API for Avalanche App (Ledger Nano S/X/S+)

96 lines (95 loc) 2.66 kB
import Transport from "@ledgerhq/hw-transport"; export declare const CLA = 128; export declare const CLA_ETH = 224; export declare const CHUNK_SIZE = 250; export declare const APP_KEY = "AVAX"; export declare const FIRST_MESSAGE = 1; export declare const LAST_MESSAGE = 2; export declare const NEXT_MESSAGE = 3; export declare const HASH_LEN = 32; export declare const COLLECTION_NAME_MAX_LEN = 70; export declare const CHAIN_ID_SIZE = 8; export declare const CONTRACT_ADDRESS_LEN = 20; export declare const TYPE_1 = 1; export declare const VERSION_1 = 1; export declare const ADDRESS_LENGTH = 20; export declare const ALGORITHM_ID_1 = 1; export declare const ALGORITHM_ID_SIZE = 1; export declare const TYPE_SIZE = 1; export declare const VERSION_SIZE = 1; export declare const SIGNATURE_LENGTH_SIZE = 1; export declare const ED25519_PK_SIZE = 32; export declare const INS: { GET_VERSION: number; WALLET_ID: number; GET_ADDR: number; GET_EXTENDED_PUBLIC_KEY: number; SIGN_HASH: number; SIGN: number; SIGN_MSG: number; ETH_PROVIDE_NFT_INFO: number; }; export declare const PAYLOAD_TYPE: { INIT: number; ADD: number; LAST: number; }; export declare const P1_VALUES: { ONLY_RETRIEVE: number; SHOW_ADDRESS_IN_DEVICE: number; }; export declare const P2_VALUES: { SECP256K1: number; ED25519: number; }; export declare enum LedgerError { U2FUnknown = 1, U2FBadRequest = 2, U2FConfigurationUnsupported = 3, U2FDeviceIneligible = 4, U2FTimeout = 5, Timeout = 14, NoErrors = 36864, DeviceIsBusy = 36865, ErrorDerivingKeys = 26626, ExecutionError = 25600, WrongLength = 26368, EmptyBuffer = 27010, OutputBufferTooSmall = 27011, DataIsInvalid = 27264, ConditionsNotSatisfied = 27013, TransactionRejected = 27014, BadKeyHandle = 27265, InvalidP1P2 = 27392, InstructionNotSupported = 27904, AppDoesNotSeemToBeOpen = 28161, UnknownError = 28416, SignVerifyError = 28417 } export declare const ERROR_DESCRIPTION: { 1: string; 2: string; 3: string; 4: string; 5: string; 14: string; 36864: string; 36865: string; 26626: string; 25600: string; 26368: string; 27010: string; 27011: string; 27264: string; 27013: string; 27014: string; 27265: string; 27392: string; 27904: string; 28161: string; 28416: string; 28417: string; }; export declare function errorCodeToString(statusCode: LedgerError): string; export declare function processErrorResponse(response?: any): any; export declare function getVersion(transport: Transport): Promise<any>;