@chainlink/external-adapter-framework 0.0.10 → 0.0.12
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/.c8rc.json +3 -0
- package/.eslintignore +9 -0
- package/.eslintrc.js +96 -0
- package/.github/README.MD +17 -0
- package/.github/actions/setup/action.yaml +13 -0
- package/.github/workflows/main.yaml +39 -0
- package/.github/workflows/publish.yaml +20 -0
- package/.prettierignore +13 -0
- package/.yarnrc +0 -0
- package/README.md +103 -0
- package/dist/src/adapter.d.ts +135 -0
- package/dist/src/adapter.js +145 -0
- package/dist/src/background-executor.d.ts +11 -0
- package/{background-executor.js → dist/src/background-executor.js} +0 -0
- package/{cache → dist/src/cache}/factory.d.ts +0 -0
- package/dist/src/cache/factory.js +55 -0
- package/dist/src/cache/index.d.ts +94 -0
- package/dist/src/cache/index.js +173 -0
- package/{cache → dist/src/cache}/local.d.ts +0 -0
- package/{cache → dist/src/cache}/local.js +0 -0
- package/{cache → dist/src/cache}/metrics.d.ts +0 -0
- package/{cache → dist/src/cache}/metrics.js +0 -0
- package/{cache → dist/src/cache}/redis.d.ts +0 -0
- package/dist/src/cache/redis.js +100 -0
- package/dist/src/chainlink-external-adapter-framework-0.0.6.tgz +0 -0
- package/dist/src/config/index.d.ts +214 -0
- package/dist/src/config/index.js +380 -0
- package/{config → dist/src/config}/provider-limits.d.ts +0 -0
- package/{config → dist/src/config}/provider-limits.js +1 -1
- package/dist/src/examples/bank-frick/accounts.d.ts +39 -0
- package/dist/src/examples/bank-frick/accounts.js +192 -0
- package/dist/src/examples/bank-frick/config/index.d.ts +4 -0
- package/dist/src/examples/bank-frick/config/index.js +54 -0
- package/dist/src/examples/bank-frick/index.d.ts +2 -0
- package/dist/src/examples/bank-frick/index.js +15 -0
- package/dist/src/examples/bank-frick/util.d.ts +4 -0
- package/dist/src/examples/bank-frick/util.js +39 -0
- package/dist/src/examples/coingecko/batch-warming.d.ts +7 -0
- package/dist/src/examples/coingecko/batch-warming.js +53 -0
- package/dist/src/examples/coingecko/index.d.ts +2 -0
- package/dist/src/examples/coingecko/index.js +11 -0
- package/dist/src/examples/coingecko/rest.d.ts +12 -0
- package/dist/src/examples/coingecko/rest.js +51 -0
- package/{examples → dist/src/examples}/ncfx/config/index.d.ts +0 -0
- package/{examples → dist/src/examples}/ncfx/config/index.js +0 -0
- package/dist/src/examples/ncfx/index.d.ts +13 -0
- package/dist/src/examples/ncfx/index.js +11 -0
- package/dist/src/examples/ncfx/websocket.d.ts +47 -0
- package/dist/src/examples/ncfx/websocket.js +73 -0
- package/dist/src/index.d.ts +11 -0
- package/dist/src/index.js +128 -0
- package/{metrics → dist/src/metrics}/constants.d.ts +0 -0
- package/{metrics → dist/src/metrics}/constants.js +0 -0
- package/{metrics → dist/src/metrics}/index.d.ts +0 -0
- package/dist/src/metrics/index.js +122 -0
- package/dist/src/metrics/util.d.ts +7 -0
- package/dist/src/metrics/util.js +9 -0
- package/{adapter.d.ts → dist/src/package/adapter.d.ts} +0 -0
- package/{adapter.js → dist/src/package/adapter.js} +0 -0
- package/{background-executor.d.ts → dist/src/package/background-executor.d.ts} +0 -0
- package/dist/src/package/background-executor.js +45 -0
- package/dist/src/package/cache/factory.d.ts +6 -0
- package/{cache → dist/src/package/cache}/factory.js +0 -0
- package/{cache → dist/src/package/cache}/index.d.ts +0 -0
- package/{cache → dist/src/package/cache}/index.js +0 -0
- package/dist/src/package/cache/local.d.ts +23 -0
- package/dist/src/package/cache/local.js +83 -0
- package/dist/src/package/cache/metrics.d.ts +27 -0
- package/dist/src/package/cache/metrics.js +120 -0
- package/dist/src/package/cache/redis.d.ts +16 -0
- package/{cache → dist/src/package/cache}/redis.js +0 -0
- package/{config → dist/src/package/config}/index.d.ts +0 -0
- package/{config → dist/src/package/config}/index.js +0 -0
- package/dist/src/package/config/provider-limits.d.ts +31 -0
- package/dist/src/package/config/provider-limits.js +76 -0
- package/{examples → dist/src/package/examples}/coingecko/batch-warming.d.ts +0 -0
- package/{examples → dist/src/package/examples}/coingecko/batch-warming.js +0 -0
- package/{examples → dist/src/package/examples}/coingecko/index.d.ts +0 -0
- package/{examples → dist/src/package/examples}/coingecko/index.js +0 -0
- package/{examples → dist/src/package/examples}/coingecko/rest.d.ts +0 -0
- package/{examples → dist/src/package/examples}/coingecko/rest.js +0 -0
- package/dist/src/package/examples/ncfx/config/index.d.ts +12 -0
- package/dist/src/package/examples/ncfx/config/index.js +15 -0
- package/{examples → dist/src/package/examples}/ncfx/index.d.ts +0 -0
- package/{examples → dist/src/package/examples}/ncfx/index.js +0 -0
- package/{examples → dist/src/package/examples}/ncfx/websocket.d.ts +0 -0
- package/{examples → dist/src/package/examples}/ncfx/websocket.js +0 -0
- package/{index.d.ts → dist/src/package/index.d.ts} +0 -0
- package/{index.js → dist/src/package/index.js} +0 -0
- package/dist/src/package/metrics/constants.d.ts +16 -0
- package/dist/src/package/metrics/constants.js +25 -0
- package/dist/src/package/metrics/index.d.ts +15 -0
- package/{metrics → dist/src/package/metrics}/index.js +0 -0
- package/{metrics → dist/src/package/metrics}/util.d.ts +0 -0
- package/{metrics → dist/src/package/metrics}/util.js +0 -0
- package/dist/src/package/package.json +72 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/background/fixed-frequency.d.ts +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/background/fixed-frequency.js +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/index.d.ts +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/index.js +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/metrics.d.ts +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/metrics.js +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/request/simple-counting.d.ts +0 -0
- package/{rate-limiting → dist/src/package/rate-limiting}/request/simple-counting.js +0 -0
- package/{test.d.ts → dist/src/package/test.d.ts} +0 -0
- package/{test.js → dist/src/package/test.js} +0 -0
- package/{transports → dist/src/package/transports}/batch-warming.d.ts +0 -0
- package/{transports → dist/src/package/transports}/batch-warming.js +0 -0
- package/{transports → dist/src/package/transports}/index.d.ts +0 -0
- package/{transports → dist/src/package/transports}/index.js +0 -0
- package/{transports → dist/src/package/transports}/metrics.d.ts +0 -0
- package/{transports → dist/src/package/transports}/metrics.js +0 -0
- package/{transports → dist/src/package/transports}/rest.d.ts +0 -0
- package/{transports → dist/src/package/transports}/rest.js +0 -0
- package/{transports → dist/src/package/transports}/util.d.ts +0 -0
- package/{transports → dist/src/package/transports}/util.js +0 -0
- package/{transports → dist/src/package/transports}/websocket.d.ts +0 -0
- package/{transports → dist/src/package/transports}/websocket.js +0 -0
- package/{util → dist/src/package/util}/expiring-sorted-set.d.ts +0 -0
- package/{util → dist/src/package/util}/expiring-sorted-set.js +0 -0
- package/{util → dist/src/package/util}/index.d.ts +0 -0
- package/{util → dist/src/package/util}/index.js +0 -0
- package/{util → dist/src/package/util}/logger.d.ts +0 -0
- package/{util → dist/src/package/util}/logger.js +0 -0
- package/{util → dist/src/package/util}/request.d.ts +0 -0
- package/{util → dist/src/package/util}/request.js +0 -0
- package/{validation → dist/src/package/validation}/error.d.ts +0 -0
- package/{validation → dist/src/package/validation}/error.js +0 -0
- package/{validation → dist/src/package/validation}/index.d.ts +0 -0
- package/{validation → dist/src/package/validation}/index.js +0 -0
- package/{validation → dist/src/package/validation}/input-params.d.ts +0 -0
- package/{validation → dist/src/package/validation}/input-params.js +0 -0
- package/{validation → dist/src/package/validation}/override-functions.d.ts +0 -0
- package/{validation → dist/src/package/validation}/override-functions.js +0 -0
- package/{validation → dist/src/package/validation}/preset-tokens.json +0 -0
- package/{validation → dist/src/package/validation}/validator.d.ts +0 -0
- package/{validation → dist/src/package/validation}/validator.js +0 -0
- package/dist/src/package.json +72 -0
- package/dist/src/rate-limiting/background/fixed-frequency.d.ts +11 -0
- package/dist/src/rate-limiting/background/fixed-frequency.js +35 -0
- package/dist/src/rate-limiting/index.d.ts +55 -0
- package/dist/src/rate-limiting/index.js +63 -0
- package/dist/src/rate-limiting/metrics.d.ts +3 -0
- package/dist/src/rate-limiting/metrics.js +44 -0
- package/dist/src/rate-limiting/request/simple-counting.d.ts +21 -0
- package/dist/src/rate-limiting/request/simple-counting.js +62 -0
- package/dist/src/test.d.ts +1 -0
- package/dist/src/test.js +6 -0
- package/dist/src/transports/batch-warming.d.ts +35 -0
- package/dist/src/transports/batch-warming.js +101 -0
- package/dist/src/transports/index.d.ts +70 -0
- package/dist/src/transports/index.js +87 -0
- package/dist/src/transports/metrics.d.ts +22 -0
- package/dist/src/transports/metrics.js +105 -0
- package/dist/src/transports/rest.d.ts +44 -0
- package/dist/src/transports/rest.js +131 -0
- package/dist/src/transports/util.d.ts +8 -0
- package/dist/src/transports/util.js +85 -0
- package/dist/src/transports/websocket.d.ts +80 -0
- package/dist/src/transports/websocket.js +166 -0
- package/dist/src/util/expiring-sorted-set.d.ts +21 -0
- package/dist/src/util/expiring-sorted-set.js +47 -0
- package/dist/src/util/index.d.ts +12 -0
- package/dist/src/util/index.js +35 -0
- package/dist/src/util/logger.d.ts +42 -0
- package/dist/src/util/logger.js +62 -0
- package/dist/src/util/request.d.ts +57 -0
- package/dist/src/util/request.js +2 -0
- package/dist/src/util/subscription-set/expiring-sorted-set.d.ts +22 -0
- package/dist/src/util/subscription-set/expiring-sorted-set.js +47 -0
- package/dist/src/util/subscription-set/subscription-set.d.ts +18 -0
- package/dist/src/util/subscription-set/subscription-set.js +19 -0
- package/dist/src/util/test-payload-loader.d.ts +25 -0
- package/dist/src/util/test-payload-loader.js +83 -0
- package/dist/src/validation/error.d.ts +50 -0
- package/dist/src/validation/error.js +79 -0
- package/dist/src/validation/index.d.ts +5 -0
- package/dist/src/validation/index.js +91 -0
- package/dist/src/validation/input-params.d.ts +15 -0
- package/dist/src/validation/input-params.js +30 -0
- package/dist/src/validation/override-functions.d.ts +3 -0
- package/dist/src/validation/override-functions.js +40 -0
- package/dist/src/validation/preset-tokens.json +23 -0
- package/dist/src/validation/validator.d.ts +47 -0
- package/dist/src/validation/validator.js +303 -0
- package/docker-compose.yaml +35 -0
- package/env.sh +54 -0
- package/env2.sh +55 -0
- package/package.json +5 -3
- package/publish.sh +0 -0
- package/src/adapter.ts +263 -0
- package/src/background-executor.ts +52 -0
- package/src/cache/factory.ts +26 -0
- package/src/cache/index.ts +258 -0
- package/src/cache/local.ts +73 -0
- package/src/cache/metrics.ts +112 -0
- package/src/cache/redis.ts +93 -0
- package/src/config/index.ts +517 -0
- package/src/config/provider-limits.ts +130 -0
- package/src/examples/bank-frick/README.MD +10 -0
- package/src/examples/bank-frick/accounts.ts +246 -0
- package/src/examples/bank-frick/config/index.ts +53 -0
- package/src/examples/bank-frick/index.ts +13 -0
- package/src/examples/bank-frick/types.d.ts +38 -0
- package/src/examples/bank-frick/util.ts +55 -0
- package/src/examples/coingecko/batch-warming.ts +78 -0
- package/src/examples/coingecko/index.ts +9 -0
- package/src/examples/coingecko/rest.ts +77 -0
- package/src/examples/ncfx/config/index.ts +12 -0
- package/src/examples/ncfx/index.ts +9 -0
- package/src/examples/ncfx/websocket.ts +99 -0
- package/src/index.ts +149 -0
- package/src/metrics/constants.ts +23 -0
- package/src/metrics/index.ts +115 -0
- package/src/metrics/util.ts +18 -0
- package/src/rate-limiting/background/fixed-frequency.ts +45 -0
- package/src/rate-limiting/index.ts +100 -0
- package/src/rate-limiting/metrics.ts +18 -0
- package/src/rate-limiting/request/simple-counting.ts +76 -0
- package/src/test.ts +5 -0
- package/src/transports/batch-warming.ts +122 -0
- package/src/transports/index.ts +152 -0
- package/src/transports/metrics.ts +95 -0
- package/src/transports/rest.ts +164 -0
- package/src/transports/util.ts +63 -0
- package/src/transports/websocket.ts +245 -0
- package/src/util/index.ts +22 -0
- package/src/util/logger.ts +69 -0
- package/src/util/request.ts +117 -0
- package/src/util/subscription-set/expiring-sorted-set.ts +54 -0
- package/src/util/subscription-set/subscription-set.ts +35 -0
- package/src/util/test-payload-loader.ts +87 -0
- package/src/validation/error.ts +116 -0
- package/src/validation/index.ts +110 -0
- package/src/validation/input-params.ts +45 -0
- package/src/validation/override-functions.ts +44 -0
- package/src/validation/preset-tokens.json +23 -0
- package/src/validation/validator.ts +384 -0
- package/test/adapter.test.ts +27 -0
- package/test/background-executor.test.ts +108 -0
- package/test/cache/cache-key.test.ts +114 -0
- package/test/cache/helper.ts +100 -0
- package/test/cache/local.test.ts +54 -0
- package/test/cache/redis.test.ts +89 -0
- package/test/correlation.test.ts +114 -0
- package/test/index.test.ts +37 -0
- package/test/metrics/feed-id.test.ts +38 -0
- package/test/metrics/helper.ts +14 -0
- package/test/metrics/labels.test.ts +36 -0
- package/test/metrics/metrics.test.ts +267 -0
- package/test/metrics/redis-metrics.test.ts +113 -0
- package/test/metrics/warmer-metrics.test.ts +192 -0
- package/test/metrics/ws-metrics.test.ts +225 -0
- package/test/rate-limit-config.test.ts +242 -0
- package/test/smoke.test.ts +166 -0
- package/test/transports/batch.test.ts +465 -0
- package/test/transports/rest.test.ts +242 -0
- package/test/transports/websocket.test.ts +183 -0
- package/test/tsconfig.json +5 -0
- package/test/util.ts +77 -0
- package/test/validation.test.ts +178 -0
- package/test-payload-fail.json +3 -0
- package/test-payload.js +22 -0
- package/test-payload.json +7 -0
- package/test.sh +20 -0
- package/test2.sh +2 -0
- package/tsconfig.json +25 -0
- package/typedoc.json +6 -0
- package/webpack.config.js +23 -0
|
@@ -0,0 +1,303 @@
|
|
|
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
|
+
exports.Validator = void 0;
|
|
7
|
+
const error_1 = require("./error");
|
|
8
|
+
const input_params_1 = require("./input-params");
|
|
9
|
+
const util_1 = require("../util");
|
|
10
|
+
const preset_tokens_json_1 = __importDefault(require("./preset-tokens.json"));
|
|
11
|
+
// Don't want to get requester in just yet, only copying the static method 'errored'
|
|
12
|
+
const requesterErrored = (jobRunID = '1', error = undefined, statusCode = 500, feedID = undefined) => {
|
|
13
|
+
if (error instanceof error_1.AdapterError) {
|
|
14
|
+
error.jobRunID = jobRunID;
|
|
15
|
+
if (feedID) {
|
|
16
|
+
error.feedID = feedID;
|
|
17
|
+
}
|
|
18
|
+
return error.toJSONResponse();
|
|
19
|
+
}
|
|
20
|
+
if (error instanceof Error) {
|
|
21
|
+
return new error_1.AdapterError({
|
|
22
|
+
jobRunID,
|
|
23
|
+
statusCode,
|
|
24
|
+
message: error.message,
|
|
25
|
+
cause: error,
|
|
26
|
+
feedID,
|
|
27
|
+
}).toJSONResponse();
|
|
28
|
+
}
|
|
29
|
+
return new error_1.AdapterError({ jobRunID, statusCode, message: error, feedID }).toJSONResponse();
|
|
30
|
+
};
|
|
31
|
+
class Validator {
|
|
32
|
+
constructor(input = { id: '1', data: {} }, inputConfigs = {}, inputOptions = {}, validatorOptions = {}) {
|
|
33
|
+
// OverrideSymbol = (adapter: string, symbol?: string | string[]): string | string[] => {
|
|
34
|
+
// Const defaultSymbol = symbol || this.validated.data.base
|
|
35
|
+
// If (!defaultSymbol) this.throwInvalid(`Required parameter not supplied: base`)
|
|
36
|
+
// // TODO: Will never be reached, because the presetSymbols are used as default overrides
|
|
37
|
+
// If (!this.validated.overrides) return defaultSymbol
|
|
38
|
+
// If (!Array.isArray(defaultSymbol))
|
|
39
|
+
// Return (
|
|
40
|
+
// This.validated.overrides.get(adapter.toLowerCase())?.get(defaultSymbol.toLowerCase()) ||
|
|
41
|
+
// DefaultSymbol
|
|
42
|
+
// )
|
|
43
|
+
// Const multiple: string[] = []
|
|
44
|
+
// For (const sym of defaultSymbol) {
|
|
45
|
+
// Const overrided = this.validated.overrides.get(adapter.toLowerCase())?.get(sym.toLowerCase())
|
|
46
|
+
// If (!overrided) multiple.push(sym)
|
|
47
|
+
// Else multiple.push(overrided)
|
|
48
|
+
// }
|
|
49
|
+
// Return multiple
|
|
50
|
+
// }
|
|
51
|
+
// OverrideToken = (symbol: string, network = 'ethereum'): string | undefined => {
|
|
52
|
+
// Return this.validated.tokenOverrides?.get(network.toLowerCase())?.get(symbol.toLowerCase())
|
|
53
|
+
// }
|
|
54
|
+
// OverrideIncludes = (from: string, to: string): IncludePair | undefined => {
|
|
55
|
+
// // Search through `presetIncludes` to find matching override for adapter and to/from pairing.
|
|
56
|
+
// Const pairs = (
|
|
57
|
+
// This.validated.includes?.filter(
|
|
58
|
+
// (val: string | Includes) => typeof val !== 'string',
|
|
59
|
+
// ) as Includes[]
|
|
60
|
+
// ).filter(
|
|
61
|
+
// (pair) =>
|
|
62
|
+
// Pair.from.toLowerCase() === from.toLowerCase() &&
|
|
63
|
+
// Pair.to.toLowerCase() === to.toLowerCase(),
|
|
64
|
+
// )
|
|
65
|
+
// If (!pairs || !pairs[0] || !pairs[0].includes || !pairs[0].includes[0]) {
|
|
66
|
+
// Return
|
|
67
|
+
// }
|
|
68
|
+
// Return pairs[0].includes[0]
|
|
69
|
+
// }
|
|
70
|
+
// OverrideReverseLookup = (adapter: string, type: OverrideType, symbol: string): string => {
|
|
71
|
+
// Const overrides: Map<string, string> | undefined = this.validated?.[type]?.get(
|
|
72
|
+
// Adapter.toLowerCase(),
|
|
73
|
+
// )
|
|
74
|
+
// If (!overrides) return symbol
|
|
75
|
+
// Let originalSymbol: string | undefined
|
|
76
|
+
// Overrides.forEach((overridden, original) => {
|
|
77
|
+
// If (overridden.toLowerCase() === symbol.toLowerCase()) originalSymbol = original
|
|
78
|
+
// })
|
|
79
|
+
// Return originalSymbol || symbol
|
|
80
|
+
// }
|
|
81
|
+
this.formatOverride = (param) => {
|
|
82
|
+
const _throwInvalid = () => this.throwInvalid(`Parameter supplied with wrong format: "override"`);
|
|
83
|
+
if (!(0, util_1.isObject)(param)) {
|
|
84
|
+
_throwInvalid();
|
|
85
|
+
}
|
|
86
|
+
const _isValid = Object.values(param).every(util_1.isObject);
|
|
87
|
+
if (!_isValid) {
|
|
88
|
+
_throwInvalid();
|
|
89
|
+
}
|
|
90
|
+
const _keyToLowerCase = (entry) => {
|
|
91
|
+
return [entry[0].toLowerCase(), entry[1]];
|
|
92
|
+
};
|
|
93
|
+
return new Map(Object.entries(param)
|
|
94
|
+
.map(_keyToLowerCase)
|
|
95
|
+
.map(([key, value]) => [key, new Map(Object.entries(value).map(_keyToLowerCase))]));
|
|
96
|
+
};
|
|
97
|
+
this.formatIncludeOverrides = (param) => {
|
|
98
|
+
const _throwInvalid = () => this.throwInvalid(`Parameter supplied with wrong format: "includes"`);
|
|
99
|
+
if (!(0, util_1.isArray)(param)) {
|
|
100
|
+
_throwInvalid();
|
|
101
|
+
}
|
|
102
|
+
const _isValid = Object.values(param).every((val) => (0, util_1.isObject)(val) || typeof val === 'string');
|
|
103
|
+
if (!_isValid) {
|
|
104
|
+
_throwInvalid();
|
|
105
|
+
}
|
|
106
|
+
return param;
|
|
107
|
+
};
|
|
108
|
+
this.throwInvalid = (message) => {
|
|
109
|
+
throw new error_1.AdapterError({ jobRunID: this.validated.id, statusCode: 400, message });
|
|
110
|
+
};
|
|
111
|
+
this.input = { ...input };
|
|
112
|
+
if (!this.input.id) {
|
|
113
|
+
this.input.id = '1';
|
|
114
|
+
} // TODO Please remove these once "no any" strict typing is enabled
|
|
115
|
+
if (!this.input.data) {
|
|
116
|
+
this.input.data = {};
|
|
117
|
+
}
|
|
118
|
+
this.inputConfigs = { ...input_params_1.baseInputParameters, ...inputConfigs };
|
|
119
|
+
this.inputOptions = { ...inputOptions };
|
|
120
|
+
this.validatorOptions = {
|
|
121
|
+
shouldThrowError: true,
|
|
122
|
+
includes: [],
|
|
123
|
+
overrides: {},
|
|
124
|
+
...validatorOptions,
|
|
125
|
+
};
|
|
126
|
+
this.validated = { id: this.input.id, data: {} };
|
|
127
|
+
this.validateInput();
|
|
128
|
+
this.validateOverrides('overrides', this.validatorOptions.overrides);
|
|
129
|
+
this.validateOverrides('tokenOverrides', preset_tokens_json_1.default);
|
|
130
|
+
this.validateIncludeOverrides();
|
|
131
|
+
this.checkDuplicateInputParams(inputConfigs);
|
|
132
|
+
}
|
|
133
|
+
validateInput() {
|
|
134
|
+
try {
|
|
135
|
+
for (const key in this.inputConfigs) {
|
|
136
|
+
this.validateObjectParam(key, this.validatorOptions.shouldThrowError);
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
catch (e) {
|
|
140
|
+
this.parseError(e);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
validateOverrides(path, preset) {
|
|
144
|
+
try {
|
|
145
|
+
if (!this.input.data?.[path]) {
|
|
146
|
+
this.validated[path] = this.formatOverride(preset);
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
this.validated[path] = this.formatOverride({ ...preset, ...this.input.data[path] });
|
|
150
|
+
}
|
|
151
|
+
catch (e) {
|
|
152
|
+
this.parseError(e);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
checkDuplicateInputParams(inputConfig) {
|
|
156
|
+
let aliases = [];
|
|
157
|
+
for (const key in inputConfig) {
|
|
158
|
+
const param = inputConfig[key];
|
|
159
|
+
if (Array.isArray(param)) {
|
|
160
|
+
aliases = aliases.concat(param);
|
|
161
|
+
}
|
|
162
|
+
else if (typeof inputConfig === 'boolean') {
|
|
163
|
+
return;
|
|
164
|
+
}
|
|
165
|
+
else {
|
|
166
|
+
aliases.push(key);
|
|
167
|
+
if (typeof param === 'object' && 'aliases' in param && Array.isArray(param.aliases)) {
|
|
168
|
+
aliases = aliases.concat(param.aliases);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
if (aliases.length !== new Set(aliases).size) {
|
|
173
|
+
this.throwInvalid('Duplicate Input Aliases');
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
validateIncludeOverrides() {
|
|
177
|
+
try {
|
|
178
|
+
this.validated.includes = this.formatIncludeOverrides([
|
|
179
|
+
...(Array.isArray(this.input.data?.includes) ? this.input.data.includes : []),
|
|
180
|
+
...(this.validatorOptions.includes || []),
|
|
181
|
+
]);
|
|
182
|
+
}
|
|
183
|
+
catch (e) {
|
|
184
|
+
this.parseError(e);
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
parseError(error) {
|
|
188
|
+
if (!(error instanceof Error)) {
|
|
189
|
+
return;
|
|
190
|
+
}
|
|
191
|
+
const message = 'Error validating input.';
|
|
192
|
+
if (error instanceof error_1.AdapterError) {
|
|
193
|
+
this.error = error;
|
|
194
|
+
}
|
|
195
|
+
else {
|
|
196
|
+
this.error = new error_1.AdapterError({
|
|
197
|
+
jobRunID: this.validated.id,
|
|
198
|
+
statusCode: 400,
|
|
199
|
+
message,
|
|
200
|
+
cause: error,
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
this.errored = requesterErrored(this.validated.id, this.error);
|
|
204
|
+
if (this.validatorOptions.shouldThrowError) {
|
|
205
|
+
throw this.error;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
validateObjectParam(key, shouldThrowError = true) {
|
|
209
|
+
const inputConfig = this.inputConfigs[key];
|
|
210
|
+
const usedKey = this.getUsedKey(key, inputConfig.aliases ?? []);
|
|
211
|
+
const param = usedKey
|
|
212
|
+
? this.input.data[usedKey] ?? inputConfig.default
|
|
213
|
+
: inputConfig.default;
|
|
214
|
+
if (shouldThrowError) {
|
|
215
|
+
const paramIsDefined = !(param === undefined || param === null || param === '');
|
|
216
|
+
if (inputConfig.required && !paramIsDefined) {
|
|
217
|
+
this.throwInvalid(`Required parameter ${key} must be non-null and non-empty`);
|
|
218
|
+
}
|
|
219
|
+
if (paramIsDefined) {
|
|
220
|
+
if (inputConfig.type) {
|
|
221
|
+
const primitiveTypes = ['boolean', 'number', 'bigint', 'string'];
|
|
222
|
+
if (![...primitiveTypes, 'array', 'object'].includes(inputConfig.type)) {
|
|
223
|
+
this.throwInvalid(`${key} parameter has unrecognized type ${inputConfig.type}`);
|
|
224
|
+
}
|
|
225
|
+
if (primitiveTypes.includes(inputConfig.type) && typeof param !== inputConfig.type) {
|
|
226
|
+
this.throwInvalid(`${key} parameter must be of type ${inputConfig.type}`);
|
|
227
|
+
}
|
|
228
|
+
if (inputConfig.type === 'array' && (!Array.isArray(param) || param.length === 0)) {
|
|
229
|
+
this.throwInvalid(`${key} parameter must be a non-empty array`);
|
|
230
|
+
}
|
|
231
|
+
if (inputConfig.type === 'object' &&
|
|
232
|
+
(!param ||
|
|
233
|
+
Array.isArray(param) ||
|
|
234
|
+
typeof param !== inputConfig.type ||
|
|
235
|
+
Object.keys(param).length === 0)) {
|
|
236
|
+
this.throwInvalid(`${key} parameter must be an object with at least one property`);
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
// If (inputConfig.options) {
|
|
240
|
+
// Const tolcase = (o: any) => (typeof o === 'string' ? o.toLowerCase() : o)
|
|
241
|
+
// Const formattedOptions = inputConfig.options.map(tolcase)
|
|
242
|
+
// Const formattedParam = tolcase(param)
|
|
243
|
+
// If (!formattedOptions.includes(formattedParam))
|
|
244
|
+
// This.throwInvalid(
|
|
245
|
+
// `${key} parameter '${formattedParam}' is not in the set of available options: ${formattedOptions.join(
|
|
246
|
+
// ',',
|
|
247
|
+
// )}`,
|
|
248
|
+
// )
|
|
249
|
+
// }
|
|
250
|
+
// For (const dependency of inputConfig.dependsOn ?? []) {
|
|
251
|
+
// Const usedDependencyKey = this.getUsedKey(
|
|
252
|
+
// Dependency,
|
|
253
|
+
// (this.inputConfigs[dependency] as InputParameter).aliases ?? [],
|
|
254
|
+
// )
|
|
255
|
+
// If (!usedDependencyKey) this.throwInvalid(`${key} dependency ${dependency} not supplied`)
|
|
256
|
+
// }
|
|
257
|
+
// For (const exclusive of inputConfig.exclusive ?? []) {
|
|
258
|
+
// Const usedExclusiveKey = this.getUsedKey(
|
|
259
|
+
// Exclusive,
|
|
260
|
+
// (this.inputConfigs[exclusive] as InputParameter).aliases ?? [],
|
|
261
|
+
// )
|
|
262
|
+
// If (usedExclusiveKey)
|
|
263
|
+
// This.throwInvalid(`${key} cannot be supplied concurrently with ${exclusive}`)
|
|
264
|
+
// }
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
this.validated.data[key] = param;
|
|
268
|
+
}
|
|
269
|
+
validateOptionalParam(param, key, options) {
|
|
270
|
+
if (param && options) {
|
|
271
|
+
if (!Array.isArray(options)) {
|
|
272
|
+
this.throwInvalid(`Parameter options for ${key} must be of an Array type`);
|
|
273
|
+
}
|
|
274
|
+
if (!options.includes(param)) {
|
|
275
|
+
this.throwInvalid(`${param} is not a supported ${key} option. Must be one of ${options}`);
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
this.validated.data[key] = param;
|
|
279
|
+
}
|
|
280
|
+
validateRequiredParam(param, key, options) {
|
|
281
|
+
if (typeof param === 'undefined' || param === '') {
|
|
282
|
+
this.throwInvalid(`Required parameter not supplied: ${key}`);
|
|
283
|
+
}
|
|
284
|
+
if (options) {
|
|
285
|
+
if (!Array.isArray(options)) {
|
|
286
|
+
this.throwInvalid(`Parameter options for ${key} must be of an Array type`);
|
|
287
|
+
}
|
|
288
|
+
if (!options.includes(param)) {
|
|
289
|
+
this.throwInvalid(`${param} is not a supported ${key} option. Must be one of ${options.join(' || ')}`);
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
this.validated.data[key] = param;
|
|
293
|
+
}
|
|
294
|
+
getUsedKey(key, keyArray) {
|
|
295
|
+
const comparisonArray = [...keyArray];
|
|
296
|
+
if (!comparisonArray.includes(key)) {
|
|
297
|
+
comparisonArray.push(key);
|
|
298
|
+
}
|
|
299
|
+
const inputParamKeys = Object.keys(this.input.data);
|
|
300
|
+
return inputParamKeys.find((k) => comparisonArray.includes(k));
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
exports.Validator = Validator;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
# Very basic stack to demonstrate horizontal scaling
|
|
2
|
+
services:
|
|
3
|
+
redis:
|
|
4
|
+
image: redis
|
|
5
|
+
container_name: redis
|
|
6
|
+
|
|
7
|
+
coingecko-reader:
|
|
8
|
+
image: node:alpine
|
|
9
|
+
ports:
|
|
10
|
+
- 8080
|
|
11
|
+
deploy:
|
|
12
|
+
mode: replicated
|
|
13
|
+
replicas: 2
|
|
14
|
+
environment:
|
|
15
|
+
- DISABLE_BACKGROUND_EXECUTOR=true
|
|
16
|
+
volumes:
|
|
17
|
+
- ./:/home/node/app
|
|
18
|
+
command: node /home/node/app/dist/test.js
|
|
19
|
+
|
|
20
|
+
coingecko-writer:
|
|
21
|
+
image: node:alpine
|
|
22
|
+
volumes:
|
|
23
|
+
- ./:/home/node/app
|
|
24
|
+
environment:
|
|
25
|
+
- DISABLE_REST_API=true
|
|
26
|
+
command: node /home/node/app/dist/test.js
|
|
27
|
+
|
|
28
|
+
lb:
|
|
29
|
+
image: dockercloud/haproxy
|
|
30
|
+
links:
|
|
31
|
+
- coingecko-reader
|
|
32
|
+
ports:
|
|
33
|
+
- '80:80'
|
|
34
|
+
volumes:
|
|
35
|
+
- /var/run/docker.sock:/var/run/docker.sock
|
package/env.sh
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
export API_KEY=H49mG5VrVe7X9s8RJ1RhMw21W
|
|
3
|
+
export PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
|
|
4
|
+
MIIJKwIBAAKCAgEA0M45Kf922BFpP0iKeXRk3lFgQXQNBUV2+6hTxZZny+2eXs6c
|
|
5
|
+
vMPOBOhBvCAC1INsp+ytgNLfkqC+i51YBASkA2mtwH3NhPqVwj8IJh32XY4bZ7Y8
|
|
6
|
+
ZlvudFQP6CcoW6PLJEBTw6XDk9n0myvO0MfgszIjtwGTlDMTZggE5QXn9HtlGbZM
|
|
7
|
+
mI5VOWJ1TwbjTSWCck5wqLflM7AUzRQ56SN+9WSiH+jY7HDthvYJqjc3ldu92JwF
|
|
8
|
+
XdvTbm/fiYnwtu1S9aGmJggorMTBz1G03d9k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+
ls3sNONh81PzDECTz5/FBPDAZjQprKm+/VBvo1XakXMkXCZ3dwFIRy1N21RvEf04
|
|
52
|
+
dCaQxmbSZDkfkjW23A+3UCdkIUn5NupO/0WTnh6J+KUgFE4tBSx8MVyPDQwq930=
|
|
53
|
+
-----END RSA PRIVATE KEY-----"
|
|
54
|
+
export API_ENDPOINT="https://olb.bankfrick.li/webapi/v2/"
|
package/env2.sh
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
export API_KEY=pN4Fq2SPmKVyh74C68853KWjf
|
|
3
|
+
export PASSWORD=TKJ5tDz6
|
|
4
|
+
export PRIVATE_KEY="-----BEGIN RSA PRIVATE KEY-----
|
|
5
|
+
MIIJKQIBAAKCAgEA5YRKFCHAnTxKZ/bPor8y6vtm2O/IMS2TqlXYQsZviK3J6tEW
|
|
6
|
+
6t9RY4YkRVve+Ap2dqM7Pvco07HNQcpSOz4VzEscanEkfjHmyAry0S0OY/fjjIjr
|
|
7
|
+
whgO/0NFnJemZE9r3eePIRl7sNzkbVwE7vi8BO6R6aCviH2PpmhjAu82e5SUwj9J
|
|
8
|
+
JC/33t81iOeLgftL5oeTFmA2oz2U8NpLtcfiKoIpvsYE/ZP3Qradf3R2+O8rxdEu
|
|
9
|
+
fUbcIKAd+Q2ML3I2nZQJl0mvcb+ZwhzAlyX9faRdclm7fYlpsa0bokx5Wb1F6FWu
|
|
10
|
+
xkpq68fIAoaNyKIL2kmv2jSFSoKROjGqcss/oy3Y41x7Ny3lPf355ZUAKwNDOVAC
|
|
11
|
+
fQnC7e6tgEw0gVuS9GD1fH2QbpWW4Q0Pnl2mLYKotKt14tsUrcar9x+b73ltLhtF
|
|
12
|
+
ktSuSmMPIDXukg8K9zaLdDpkWurHke6AGexiuJCJ4SGaN6XDT37RSLq4Ai86jZKA
|
|
13
|
+
O5b52h4qbJ6ujADDtPLKWKoBLnyBhx+3gZMXABhdj1QGquhVhds5Z//b0gtcmtFf
|
|
14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6u8ig7mZIukqrb6RrJiRFvQ/iOE2A6wJZvf6sAH1xjN5x
|
|
43
|
+
oAhpAoIBAQDpJj1iU9SCBJ4ExOIy026p1Eie44OxjyFL5j4qq5XrCC/sfmNRBZXg
|
|
44
|
+
1QfO3hMKf0J1shAV2rXkGJNSLwXXYkuy6Yw6lvHXSQIU2CRIpRLheFd+xHe46KYS
|
|
45
|
+
AZ8iIkn6jtm5anYQMOOAbp8fsM4tv0s0Xq1nmRgGw2Sgb6+srG9R0ojKd1I5OlS7
|
|
46
|
+
yxUFPJV7hEFjfpGIuiD1Dz7bdno/7TfO0PyFl6ARj0YC/lzA+VZRKSYsygvJn7kA
|
|
47
|
+
0KrLKyqqIyO8SXNXOS3mlwvYpEGZhHZLMxkPJNgiVVfVax1VBqFwwNmb0juMzwrO
|
|
48
|
+
Ut/AETIe76ColVx5RBgArbXSRcQeQhihAoIBAQChvOJsqHmOnfjnMDC0J5bfYf4R
|
|
49
|
+
1pkVZmPL5mTx/02s3eb62VO+q7iEhvWL8LrXN64UuKrC6V4RbxZ0QuCeVSEyn6ux
|
|
50
|
+
8wkU5XnTqD1bCoDrvhKClz8dAONQb5mSfI/WZGwpn1mwEpnMe7Ifz0caCgWpWn7t
|
|
51
|
+
e4vwLxzLUiNGlLHo7QcOVjvDUQFz96idsY9hvG691QALGKpJEygjULYLvfMJYLtT
|
|
52
|
+
v2B6WQcQX+n59njO+CrJbA8iKW4Ry7HfmHoqgB5JAd4m9qUKZhJ2G562lpVgrUFu
|
|
53
|
+
8m3h6Kw/A9LftG+wkHrzOT+XJ1HDd5mXGaqq9s2NqIeptlLErTBfkWTd7m1z
|
|
54
|
+
-----END RSA PRIVATE KEY-----"
|
|
55
|
+
export BASE_URL="https://olbsandbox.bankfrick.li/webapi/v2/"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@chainlink/external-adapter-framework",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.12",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"dependencies": {
|
|
@@ -19,7 +19,8 @@
|
|
|
19
19
|
"test": "LOG_LEVEL=error EA_PORT=0 c8 ava",
|
|
20
20
|
"test-debug": "LOG_LEVEL=trace DEBUG=true EA_PORT=0 c8 ava --verbose",
|
|
21
21
|
"build": "tsc",
|
|
22
|
-
"lint": "eslint ./src"
|
|
22
|
+
"lint": "eslint ./src && prettier --check ./src/**/*.ts",
|
|
23
|
+
"dev": "NODE_ENV=develop tsnd --respawn --transpile-only --project tsconfig.json './src/test.ts'"
|
|
23
24
|
},
|
|
24
25
|
"devDependencies": {
|
|
25
26
|
"@sinonjs/fake-timers": "^9.1.2",
|
|
@@ -37,7 +38,8 @@
|
|
|
37
38
|
"nock": "^13.2.4",
|
|
38
39
|
"pino-pretty": "^7.6.0",
|
|
39
40
|
"prettier": "^2.6.1",
|
|
40
|
-
"typedoc": "^0.22.15"
|
|
41
|
+
"typedoc": "^0.22.15",
|
|
42
|
+
"ts-node-dev": "2.0.0"
|
|
41
43
|
},
|
|
42
44
|
"prettier": {
|
|
43
45
|
"semi": false,
|
package/publish.sh
ADDED
|
File without changes
|