Commit ebeb995496ef4d8498153d040e7683fccdf8badc
Introduce Interface.exportTable
Alex Beregszaszi committed on 8/3/2016, 6:09:14 PMParent: c137aba03aa9981099698af3a30df2969c42a73b
Files changed
interface.js | changed |
interface.js | ||
---|---|---|
@@ -21,8 +21,18 @@ | ||
21 | 21 | constructor (environment) { |
22 | 22 | ENV = this.environment = environment |
23 | 23 | } |
24 | 24 | |
25 | + get exportTable () { | |
26 | + let exportMethods = [ | |
27 | + // include all the public methods according to the Ethereum Environment Interface (EEI) | |
28 | + ] | |
29 | + let ret = {} | |
30 | + exportMethods.forEach((method) => { | |
31 | + ret[method] = this[method].bind(this) | |
32 | + }) | |
33 | + return ret | |
34 | + } | |
25 | 35 | |
26 | 36 | // FIXME: this shouldn't be needed |
27 | 37 | get env () { |
28 | 38 | return ENV |
Built with git-ssb-web