import { Client } from './Client' ; import { Transaction } from './Transaction' ; import { Block } from './Block' ; import { WalletInfo } from './WalletInfo' ; import { Peer } from './Peer' ; export abstract class API { commands : Array < string > = new Array ( 'addMultiSigAddress' , 'backupWallet' , 'createRawTransaction' , 'decodeRawTransaction' , 'dumpPrivKey' , 'dumpWallet' , 'encryptWallet' , 'exportStealthAddress' , 'getAccount' , 'getAccountAddress' , 'getAddressesByAccount' , 'getAddressInfo' , 'getBalance' , 'getBlock' , 'getBlockCount' , 'getBlockHash' , 'getConnectionCount' , 'getDifficulty' , 'getGenerate' , 'getHashesPerSec' , 'getInfo' , 'getMemoryPool' , 'getMiningInfo' , 'getNewAddress' , 'getRawTransaction' , 'getReceivedByAccount' , 'getReceivedByAddress' , 'getTransaction' , 'getWork' , 'help' , 'importPubKey' , 'importPrivKey' , 'importAddress' , 'importStealthAddress' , 'keyPoolRefill' , 'listAccounts' , 'listReceivedByAccount' , 'listReceivedByAddress' , 'listSinceBlock' , 'listTransactions' , 'listUnspent' , 'listWallets' , 'move' , 'sendFrom' , 'sendMany' , 'sendRawTransaction' , 'sendToAddress' , 'sendToStealthAddress' , 'setAccount' , 'setGenerate' , 'setTxFee' , 'signMessage' , 'signRawTransaction' , 'stop' , 'validateAddress' , 'verifyMessage' , 'walletLock' , 'walletPassphrase' , 'walletPassphraseChange' ) ; isCommand ( command ) { const lowerCommand = command . toLowerCase ( ) ; var lowerCaseCommands = this . getCommands ( ) . map ( ( item ) => item . toLowerCase ( ) ) ; return lowerCaseCommands . indexOf ( lowerCommand ) !== - 1 ; } getCommands ( ) { return this . commands ; } abstract getBalance ( account ? ) ; abstract getInfo ( ) ; abstract getPeerInfo ( ) ; }