import * as eventemitter2 from "eventemitter2" ; import { Keyring } from "./keyring" ; export abstract class Transport extends eventemitter2 . EventEmitter2 { public keyring : Keyring ; constructor ( keyring ) { super ( ) ; this . keyring = keyring ; } public abstract getDeviceID ( ) ; /**
     * Must emit outgoing message events and communicate with underlying interface
     */ public abstract call ( ... args ) ; /**
     * Optional method to bootstrap connection to device
     */ public async connect ( ) { } /**
     * Optional function that gets called to clean up connection to device
     */ public async disconnect ( ) { } }