@atomicfinance/provider 3.5.0 → 3.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/lib/Provider.js +23 -0
- package/lib/index.js +8 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/lib/Provider.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
class Provider {
|
|
4
|
+
/**
|
|
5
|
+
* Set client to a provider instance.
|
|
6
|
+
* @param client - The client instance
|
|
7
|
+
*/
|
|
8
|
+
setClient(client) {
|
|
9
|
+
this.client = client;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Get method for the provider
|
|
13
|
+
* @param {!string} method - Name of the method
|
|
14
|
+
* @return {function} Returns a method from a provider above current Provider
|
|
15
|
+
* in the stack.
|
|
16
|
+
*/
|
|
17
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
18
|
+
getMethod(method, requestor = this) {
|
|
19
|
+
return this.client.getMethod(method, requestor).bind(this);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = Provider;
|
|
23
|
+
//# sourceMappingURL=Provider.js.map
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const Provider_1 = __importDefault(require("./Provider"));
|
|
7
|
+
exports.default = Provider_1.default;
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atomicfinance/provider",
|
|
3
3
|
"umdName": "Provider",
|
|
4
|
-
"version": "3.5.
|
|
4
|
+
"version": "3.5.1",
|
|
5
5
|
"description": "Bitcoin Abstraction Layer Provider",
|
|
6
6
|
"author": "Atomic Finance <info@atomic.finance>",
|
|
7
7
|
"homepage": "",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
"lint:fix": "../../node_modules/.bin/eslint --fix --ignore-path ../../.eslintignore -c ../../.eslintrc.js ."
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@atomicfinance/types": "^3.5.
|
|
18
|
+
"@atomicfinance/types": "^3.5.1",
|
|
19
19
|
"lodash": "^4.17.20"
|
|
20
20
|
},
|
|
21
21
|
"devDependencies": {
|