@types/ledgerhq__hw-transport
Advanced tools
Comparing version 4.21.3 to 4.21.4
@@ -45,3 +45,3 @@ // Type definitions for @ledgerhq/hw-transport 4.21 | ||
descriptor: Descriptor; | ||
device?: Device; | ||
device?: Device | undefined; | ||
} | ||
@@ -48,0 +48,0 @@ export interface Observer<Ev> { |
{ | ||
"name": "@types/ledgerhq__hw-transport", | ||
"version": "4.21.3", | ||
"version": "4.21.4", | ||
"description": "TypeScript definitions for @ledgerhq/hw-transport", | ||
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ledgerhq__hw-transport", | ||
"license": "MIT", | ||
@@ -24,4 +25,4 @@ "contributors": [ | ||
}, | ||
"typesPublisherContentHash": "a804ab87abe6f54b6ed2a4096927f7ebd7a51a4b9970332ede680c08ddecd402", | ||
"typeScriptVersion": "3.2" | ||
"typesPublisherContentHash": "a6efd9c3918ede1e3ecedf2f129028f0aa3d3040f56d9267811d6b8972f37897", | ||
"typeScriptVersion": "3.6" | ||
} |
@@ -9,5 +9,67 @@ # Installation | ||
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ledgerhq__hw-transport. | ||
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/ledgerhq__hw-transport/index.d.ts) | ||
````ts | ||
// Type definitions for @ledgerhq/hw-transport 4.21 | ||
// Project: https://github.com/LedgerHQ/ledgerjs/tree/master/packages/hw-transport, https://github.com/ledgerhq/ledgerjs | ||
// Definitions by: Daniel Byrne <https://github.com/danwbyrne> | ||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
// TypeScript Version: 2.3 | ||
/// <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; | ||
```` | ||
### Additional Details | ||
* Last updated: Fri, 25 Sep 2020 23:56:06 GMT | ||
* Last updated: Thu, 08 Jul 2021 16:23:40 GMT | ||
* Dependencies: [@types/node](https://npmjs.com/package/@types/node) | ||
@@ -14,0 +76,0 @@ * Global values: none |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
7314
0
79