UNPKG

opskins-trade-interface

Version:
25 lines (19 loc) 490 B
const Collection = require('./collection.js') class IEthereum extends Collection { constructor(api) { super(api) } } const schema = Collection.getSchema().IEthereum for(let key in schema) { IEthereum.prototype[key] = async function(params = {}) { try { this._validate(params, this.schema[key].params) const res = await this._exec(key, params, this.schema[key].method) return res } catch(err) { throw err } } } module.exports = IEthereum