Skip to content

Commit

Permalink
feat(connection): add test connection command
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Dec 11, 2018
1 parent 9037bd3 commit ae7a7d2
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/GridcoinRPC.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import assert from 'assert'
import JsonRPC, { IParameters } from './JsonRPC'
import IDifficulty from './contracts/difficulty'
import ICpid from './contracts/cpid'
Expand Down Expand Up @@ -60,6 +61,18 @@ class GridcoinRPC {
return this.client.request(command, filteredParameters).then((result: any) => result.result)
}

/**
* Test connection
*
* @throws {Error}
* @returns bool
* @memberof GridcoinRPC
*/
public async testConnection() {
assert.strictEqual(null, await this.call('nonExistsTestConnectionCommand'))
return true
}

/**
* Add a nrequired-to-sign multisignature address to the wallet.
* @description
Expand Down

0 comments on commit ae7a7d2

Please sign in to comment.