Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@types/ledgerhq__hw-transport
Advanced tools
TypeScript definitions for @ledgerhq/hw-transport
npm install --save @types/ledgerhq__hw-transport
This package contains type definitions for @ledgerhq/hw-transport (https://github.com/LedgerHQ/ledgerjs/tree/master/packages/hw-transport).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ledgerhq__hw-transport.
/// <reference types="node" />
declare class Transport<TDescriptor extends Descriptor = string> {
constructor();
static isSupported(): Promise<boolean>;
static list(): Promise<readonly Descriptor[]>;
static listen(observer: Observer<DescriptorEvent<Descriptor>>): Subscription;
static open(descriptor: Descriptor, timeout?: number): Promise<Transport<typeof descriptor>>;
static create(openTimeout?: number, listenTimeout?: number): Promise<Transport<Descriptor>>;
exchange(apdu: Buffer): Promise<Buffer>;
setScrambleKey(key: string): void;
close(): Promise<void>;
on(eventName: string, cb: any): void;
off(eventName: string, cb: any): void;
setDebugMode(debug: boolean | ((log: string) => void)): void;
setExchangeTimeout(exchangeTimeout: number): void;
/**
* A wrapper around exchange to simplify work of the implementation.
* @param data The data to be sent. Defaults to a zero-length Buffer.
* @param statusList A list of accepted status code (shorts). [0x9000] by default.
* @return A Promise of the response Buffer
*/
send(
cla: number,
ins: number,
p1: number,
p2: number,
data?: Buffer,
statusList?: readonly number[],
): Promise<Buffer>;
decorateAppAPIMethods(self: any, methods: string[], scrambleKey: string): void;
}
export type Device = any;
export type Descriptor = string; // ?
export interface DescriptorEvent<Descriptor> {
type: "add" | "remove";
descriptor: Descriptor;
device?: Device | undefined;
}
export interface Observer<Ev> {
readonly next: (event: Ev) => any;
readonly error: (e: any) => any;
readonly complete: () => any;
}
export interface Subscription {
readonly unsubscribe: () => void;
}
export function getAltStatusMessage(code: number): string;
export const StatusCodes: { [k in string]: number };
export default Transport;
These definitions were written by Daniel Byrne.
FAQs
TypeScript definitions for @ledgerhq/hw-transport
We found that @types/ledgerhq__hw-transport demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.