aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/src/types.ts
diff options
context:
space:
mode:
authorJacob Evans <jacob@dekz.net>2018-03-06 11:14:00 +0800
committerJacob Evans <jacob@dekz.net>2018-03-06 11:36:53 +0800
commit7bfc499ec8e50778dd33183646dd19ef66496052 (patch)
tree9db681f1cdc5494cda1c9e2364fce9fa28bcac95 /packages/subproviders/src/types.ts
parent71e7e9c9c3ed89c1c25f46085c0968a62099cb5a (diff)
downloaddexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.tar
dexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.tar.gz
dexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.tar.bz2
dexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.tar.lz
dexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.tar.xz
dexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.tar.zst
dexon-sol-tools-7bfc499ec8e50778dd33183646dd19ef66496052.zip
Nuke tests for now
Diffstat (limited to 'packages/subproviders/src/types.ts')
-rw-r--r--packages/subproviders/src/types.ts32
1 files changed, 6 insertions, 26 deletions
diff --git a/packages/subproviders/src/types.ts b/packages/subproviders/src/types.ts
index 785547a22..11a178f69 100644
--- a/packages/subproviders/src/types.ts
+++ b/packages/subproviders/src/types.ts
@@ -1,45 +1,25 @@
import * as _ from 'lodash';
-declare class LedgerTransport {
- // tslint:disable-next-line:async-suffix
- public static create(): Promise<LedgerTransport>;
- // tslint:disable-next-line:async-suffix
- public static close(): Promise<void>;
-}
-
export interface LedgerCommunicationClient {
close: () => Promise<void>;
}
+/*
+ * The LedgerEthereumClient sends Ethereum-specific requests to the Ledger Nano S
+ * It uses an internal LedgerCommunicationClient to relay these requests. Currently
+ * NodeJs and Browser communication are supported.
+ */
export interface LedgerEthereumClient {
getAddress: (
derivationPath: string,
askForDeviceConfirmation?: boolean,
shouldGetChainCode?: boolean,
- ) => Promise<{ publicKey: string; address: string; chainCode: string }>;
+ ) => Promise<LedgerGetAddressResult>;
signTransaction: (derivationPath: string, rawTxHex: string) => Promise<ECSignatureString>;
signPersonalMessage: (derivationPath: string, messageHex: string) => Promise<ECSignature>;
transport: LedgerCommunicationClient;
}
-/*
- * The LedgerEthereumClient sends Ethereum-specific requests to the Ledger Nano S
- * It uses an internal LedgerCommunicationClient to relay these requests. Currently
- * NodeJs and Browser communication are supported.
- */
-// export interface LedgerEthereumClient {
-// // shouldGetChainCode is defined as `true` instead of `boolean` because other types rely on the assumption
-// // that we get back the chain code and we don't have dependent types to express it properly
-// getAddress_async: (
-// derivationPath: string,
-// askForDeviceConfirmation: boolean,
-// shouldGetChainCode: true,
-// ) => Promise<LedgerGetAddressResult>;
-// signPersonalMessage_async: (derivationPath: string, messageHex: string) => Promise<ECSignature>;
-// signTransaction_async: (derivationPath: string, txHex: string) => Promise<ECSignatureString>;
-// comm: LedgerCommunicationClient;
-// }
-
export interface ECSignatureString {
v: string;
r: string;