From d767431e7848314e6c7cf315feadc6907ecf21fa Mon Sep 17 00:00:00 2001 From: Aleksandr Volkov Date: Mon, 18 Oct 2021 16:25:12 +0700 Subject: [PATCH] added matic provider --- providers/matic/index.js | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 providers/matic/index.js diff --git a/providers/matic/index.js b/providers/matic/index.js new file mode 100644 index 0000000..8fcb06d --- /dev/null +++ b/providers/matic/index.js @@ -0,0 +1,24 @@ +'use strict'; + +const Provider = require('../provider'); +const EthereumRpc = require('../eth/clients/rpc'); + +module.exports = class Matic extends Provider { + + constructor(options) { + super(options.currency || 'matic'); + this.client = new EthereumRpc(options); + } + + async getBlock(height) { + return this.client.getBlock(height); + } + + async getHeight() { + return this.client.getCurrentHeight(); + } + + async getPool() { + return []; + } +};