|
1 | 1 | import { AdapterConfig } from '@chainlink/external-adapter-framework/config'
|
2 | 2 |
|
3 |
| -export const config = new AdapterConfig({ |
4 |
| - API_KEY: { |
5 |
| - description: 'An API key for Data Provider', |
6 |
| - type: 'string', |
7 |
| - required: true, |
8 |
| - sensitive: true, |
| 3 | +export const config = new AdapterConfig( |
| 4 | + { |
| 5 | + API_KEY: { |
| 6 | + description: 'An API key for Data Provider', |
| 7 | + type: 'string', |
| 8 | + required: true, |
| 9 | + sensitive: true, |
| 10 | + }, |
| 11 | + SECRET_KEY: { |
| 12 | + description: 'A key for Data Provider used in hashing the API key', |
| 13 | + type: 'string', |
| 14 | + required: true, |
| 15 | + sensitive: true, |
| 16 | + }, |
| 17 | + API_ENDPOINT: { |
| 18 | + description: 'An API endpoint for Data Provider', |
| 19 | + type: 'string', |
| 20 | + default: 'https://api.navfundservices.com', |
| 21 | + }, |
| 22 | + MAX_RETRIES: { |
| 23 | + description: 'Maximum attempts of sending a request', |
| 24 | + type: 'number', |
| 25 | + default: 3, |
| 26 | + }, |
| 27 | + BACKGROUND_EXECUTE_MS: { |
| 28 | + description: |
| 29 | + 'The amount of time the background execute should sleep before performing the next request', |
| 30 | + type: 'number', |
| 31 | + default: 120_000, // one call per two minute |
| 32 | + }, |
9 | 33 | },
|
10 |
| - SECRET_KEY: { |
11 |
| - description: 'A key for Data Provider used in hashing the API key', |
12 |
| - type: 'string', |
13 |
| - required: true, |
14 |
| - sensitive: true, |
| 34 | + { |
| 35 | + envDefaultOverrides: { |
| 36 | + CACHE_MAX_AGE: 900_000, // 15 minute cache |
| 37 | + RETRY: 0, // Disables retry on Framework |
| 38 | + }, |
15 | 39 | },
|
16 |
| - API_ENDPOINT: { |
17 |
| - description: 'An API endpoint for Data Provider', |
18 |
| - type: 'string', |
19 |
| - default: 'https://api.navfundservices.com', |
20 |
| - }, |
21 |
| - MAX_RETRIES: { |
22 |
| - description: 'Maximum attempts of sending a request', |
23 |
| - type: 'number', |
24 |
| - default: 3, |
25 |
| - }, |
26 |
| - BACKGROUND_EXECUTE_MS: { |
27 |
| - description: |
28 |
| - 'The amount of time the background execute should sleep before performing the next request', |
29 |
| - type: 'number', |
30 |
| - default: 120_000, // one call per two minute |
31 |
| - }, |
32 |
| -}) |
| 40 | +) |
0 commit comments