
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@types/ledgerhq__hw-transport
Advanced tools
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<ReadonlyArray<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?: ReadonlyArray<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
Stub TypeScript definitions entry for @ledgerhq/hw-transport, which provides its own types definitions
We found that @types/ledgerhq__hw-transport demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.