Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
import Transport from '@ledgerhq/hw-transport';
// $ExpectType Promise
Transport.isSupported();
// $ExpectType Promise>
Transport.list();
// $ExpectType Promise>
Transport.open('test');
const test = Transport.open('test').then(transport => {
// $ExpectType void
transport.setScrambleKey('test');
// $ExpectType Promise
transport.exchange(Buffer.from('test', 'hex'));
// $ExpectType Promise
transport.send(0, 1, 2, 3);
// $ExpectType Promise
transport.send(0, 1, 2, 3, Buffer.from('abcd', 'hex'));
// $ExpectType Promise
transport.send(0, 1, 2, 3, Buffer.from('abcd', 'hex'), [0x1111, 0x9000]);