@chainlink/external-adapter-framework 0.0.46 → 0.0.56

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.
Files changed (139) hide show
  1. package/adapter.d.ts +18 -1
  2. package/adapter.js +69 -3
  3. package/adapter.js.map +1 -0
  4. package/background-executor.js +31 -0
  5. package/background-executor.js.map +1 -0
  6. package/cache/factory.d.ts +2 -2
  7. package/cache/factory.js +11 -46
  8. package/cache/factory.js.map +1 -0
  9. package/cache/index.js +3 -2
  10. package/cache/index.js.map +1 -0
  11. package/cache/local.js.map +1 -0
  12. package/cache/metrics.js.map +1 -0
  13. package/cache/redis.js.map +1 -0
  14. package/config/index.d.ts +34 -0
  15. package/config/index.js +40 -62
  16. package/config/index.js.map +1 -0
  17. package/config/provider-limits.js.map +1 -0
  18. package/examples/bank-frick/accounts.d.ts +15 -1
  19. package/examples/bank-frick/accounts.js.map +1 -0
  20. package/examples/bank-frick/config/index.d.ts +15 -2
  21. package/examples/bank-frick/config/index.js.map +1 -0
  22. package/examples/bank-frick/index.d.ts +15 -1
  23. package/examples/bank-frick/index.js.map +1 -0
  24. package/examples/bank-frick/util.js.map +1 -0
  25. package/examples/coingecko/batch-warming.d.ts +7 -0
  26. package/examples/coingecko/batch-warming.js +54 -0
  27. package/examples/coingecko/batch-warming.js.map +1 -0
  28. package/examples/coingecko/index.d.ts +2 -0
  29. package/examples/coingecko/index.js +12 -0
  30. package/examples/coingecko/index.js.map +1 -0
  31. package/examples/coingecko/rest.d.ts +12 -0
  32. package/examples/coingecko/rest.js +55 -0
  33. package/examples/coingecko/rest.js.map +1 -0
  34. package/examples/coingecko/src/config/index.js.map +1 -0
  35. package/examples/coingecko/src/crypto-utils.d.ts +31 -0
  36. package/examples/coingecko/src/crypto-utils.js +60 -0
  37. package/examples/coingecko/src/crypto-utils.js.map +1 -0
  38. package/examples/coingecko/src/endpoint/coins.js +3 -1
  39. package/examples/coingecko/src/endpoint/coins.js.map +1 -0
  40. package/examples/coingecko/src/endpoint/crypto-marketcap.d.ts +1 -1
  41. package/examples/coingecko/src/endpoint/crypto-marketcap.js +4 -4
  42. package/examples/coingecko/src/endpoint/crypto-marketcap.js.map +1 -0
  43. package/examples/coingecko/src/endpoint/crypto-volume.d.ts +1 -1
  44. package/examples/coingecko/src/endpoint/crypto-volume.js +4 -4
  45. package/examples/coingecko/src/endpoint/crypto-volume.js.map +1 -0
  46. package/examples/coingecko/src/endpoint/crypto.d.ts +1 -1
  47. package/examples/coingecko/src/endpoint/crypto.js +4 -4
  48. package/examples/coingecko/src/endpoint/crypto.js.map +1 -0
  49. package/examples/coingecko/src/endpoint/dominance.d.ts +1 -1
  50. package/examples/coingecko/src/endpoint/dominance.js +4 -4
  51. package/examples/coingecko/src/endpoint/dominance.js.map +1 -0
  52. package/examples/coingecko/src/endpoint/global-marketcap.d.ts +1 -1
  53. package/examples/coingecko/src/endpoint/global-marketcap.js +4 -4
  54. package/examples/coingecko/src/endpoint/global-marketcap.js.map +1 -0
  55. package/examples/coingecko/src/endpoint/index.js.map +1 -0
  56. package/examples/coingecko/src/global-utils.d.ts +27 -0
  57. package/examples/coingecko/src/global-utils.js +46 -0
  58. package/examples/coingecko/src/global-utils.js.map +1 -0
  59. package/examples/coingecko/src/index.d.ts +1 -1
  60. package/examples/coingecko/src/index.js.map +1 -0
  61. package/examples/coingecko-old/batch-warming.js.map +1 -0
  62. package/examples/coingecko-old/index.js.map +1 -0
  63. package/examples/coingecko-old/rest.js +4 -1
  64. package/examples/coingecko-old/rest.js.map +1 -0
  65. package/examples/genesis/config/index.d.ts +7 -0
  66. package/examples/genesis/config/index.js +10 -0
  67. package/examples/genesis/config/index.js.map +1 -0
  68. package/examples/genesis/index.d.ts +2 -0
  69. package/examples/genesis/index.js +12 -0
  70. package/examples/genesis/index.js.map +1 -0
  71. package/examples/genesis/sseStream.d.ts +16 -0
  72. package/examples/genesis/sseStream.js +141 -0
  73. package/examples/genesis/sseStream.js.map +1 -0
  74. package/examples/ncfx/config/index.js.map +1 -0
  75. package/examples/ncfx/index.js.map +1 -0
  76. package/examples/ncfx/websocket.js.map +1 -0
  77. package/index.js.map +1 -0
  78. package/metrics/constants.js.map +1 -0
  79. package/metrics/index.d.ts +2 -0
  80. package/metrics/index.js +12 -1
  81. package/metrics/index.js.map +1 -0
  82. package/metrics/util.js.map +1 -0
  83. package/package.json +7 -5
  84. package/rate-limiting/background/fixed-frequency.js +0 -3
  85. package/rate-limiting/background/fixed-frequency.js.map +1 -0
  86. package/rate-limiting/index.d.ts +1 -0
  87. package/rate-limiting/index.js +3 -2
  88. package/rate-limiting/index.js.map +1 -0
  89. package/rate-limiting/metrics.js.map +1 -0
  90. package/rate-limiting/request/simple-counting.js.map +1 -0
  91. package/transports/batch-warming.d.ts +2 -2
  92. package/transports/batch-warming.js +13 -6
  93. package/transports/batch-warming.js.map +1 -0
  94. package/transports/index.d.ts +2 -1
  95. package/transports/index.js +27 -0
  96. package/transports/index.js.map +1 -0
  97. package/transports/metrics.d.ts +3 -0
  98. package/transports/metrics.js +17 -1
  99. package/transports/metrics.js.map +1 -0
  100. package/transports/rest.d.ts +8 -2
  101. package/transports/rest.js +13 -13
  102. package/transports/rest.js.map +1 -0
  103. package/transports/sse.d.ts +41 -0
  104. package/transports/sse.js +95 -0
  105. package/transports/sse.js.map +1 -0
  106. package/transports/util.js.map +1 -0
  107. package/transports/websocket.d.ts +2 -2
  108. package/transports/websocket.js +12 -11
  109. package/transports/websocket.js.map +1 -0
  110. package/util/censor/censor-list.d.ts +9 -0
  111. package/util/censor/censor-list.js +12 -0
  112. package/util/censor/censor-list.js.map +1 -0
  113. package/util/index.d.ts +1 -0
  114. package/util/index.js +3 -1
  115. package/util/index.js.map +1 -0
  116. package/util/logger.d.ts +3 -0
  117. package/util/logger.js +20 -1
  118. package/util/logger.js.map +1 -0
  119. package/util/request.d.ts +52 -6
  120. package/util/request.js.map +1 -0
  121. package/util/subscription-set/expiring-sorted-set.d.ts +0 -1
  122. package/util/subscription-set/expiring-sorted-set.js +0 -12
  123. package/util/subscription-set/expiring-sorted-set.js.map +1 -0
  124. package/util/subscription-set/redis-sorted-set.d.ts +9 -0
  125. package/util/subscription-set/redis-sorted-set.js +28 -0
  126. package/util/subscription-set/redis-sorted-set.js.map +1 -0
  127. package/util/subscription-set/subscription-set.d.ts +5 -4
  128. package/util/subscription-set/subscription-set.js +13 -5
  129. package/util/subscription-set/subscription-set.js.map +1 -0
  130. package/util/test-payload-loader.js.map +1 -0
  131. package/validation/error.js.map +1 -0
  132. package/validation/index.js +10 -9
  133. package/validation/index.js.map +1 -0
  134. package/validation/input-params.d.ts +1 -1
  135. package/validation/input-params.js.map +1 -0
  136. package/validation/input-validator.d.ts +16 -0
  137. package/validation/input-validator.js +123 -0
  138. package/validation/input-validator.js.map +1 -0
  139. package/validation/override-functions.js.map +1 -0
@@ -36,4 +36,18 @@ export declare class BankFrickAccountsTransport implements Transport<AdapterInpu
36
36
  */
37
37
  setup(req: AdapterRequest<AdapterInputParameters>, config: AdapterConfig<typeof customSettings>): Promise<AdapterResponse<number>>;
38
38
  }
39
- export declare const accountsRestEndpoint: AdapterEndpoint<AdapterInputParameters, number, import("../../config").SettingsMap>;
39
+ export declare const accountsRestEndpoint: AdapterEndpoint<AdapterInputParameters, number, {
40
+ readonly PAGE_SIZE: {
41
+ readonly description: "The number of accounts to fetch per call to /accounts. Must be >= 1 and <= 500.";
42
+ readonly type: "number";
43
+ readonly required: false;
44
+ readonly default: 500;
45
+ readonly validate: (value?: number | undefined) => string | undefined;
46
+ };
47
+ readonly PRIVATE_KEY: {
48
+ readonly description: "";
49
+ readonly type: "string";
50
+ readonly required: true;
51
+ readonly validate: (value: string) => string | undefined;
52
+ };
53
+ }>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"accounts.js","sourceRoot":"","sources":["../../../../src/examples/bank-frick/accounts.ts"],"names":[],"mappings":";;;;;;AAAA,kDAAgE;AAUhE,iCAAoC;AACpC,qCAA+E;AAE/E,kD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
- import { SettingsMap } from '../../../config';
2
1
  import { SigningAlgorithm } from '../types';
3
2
  export declare const signingAlgorithms: SigningAlgorithm[];
4
- export declare const customSettings: SettingsMap;
3
+ export declare const customSettings: {
4
+ readonly PAGE_SIZE: {
5
+ readonly description: "The number of accounts to fetch per call to /accounts. Must be >= 1 and <= 500.";
6
+ readonly type: "number";
7
+ readonly required: false;
8
+ readonly default: 500;
9
+ readonly validate: (value?: number | undefined) => string | undefined;
10
+ };
11
+ readonly PRIVATE_KEY: {
12
+ readonly description: "";
13
+ readonly type: "string";
14
+ readonly required: true;
15
+ readonly validate: (value: string) => string | undefined;
16
+ };
17
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/examples/bank-frick/config/index.ts"],"names":[],"mappings":";;;;;;AAAA,oDAA2B;AAE3B,wCAA0C;AAE1C,MAAM,MAAM,GAAG,IAAA,iBAAU,EAAC,iBAAiB,CAAC,CAAA;AAE5C,uCAAuC;AAC1B,QAAA,iBAAiB,GAAuB,CAAC,YAAY,EAAE,YAAY,EAAE,YAAY,CAAC,CAAA;AAC/F,MAAM,aAAa,GAAG,GAAG,CAAA;AAEZ,QAAA,cAAc,GAAG;IAC5B,SAAS,EAAE;QACT,WAAW,EAAE,iFAAiF;QAC9F,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,CAAC,KAAc,EAAE,EAAE;YAC3B,IAAI,CAAC,KAAK,EAAE;gBACV,OAAO,EAAE,CAAA;aACV;iBAAM,IAAI,KAAK,GAAG,CAAC,EAAE;gBACpB,OAAO,wCAAwC,KAAK,EAAE,CAAA;aACvD;iBAAM,IAAI,KAAK,GAAG,aAAa,EAAE;gBAChC,OAAO,iCAAiC,KAAK,EAAE,CAAA;aAChD;QACH,CAAC;KACF;IACD,WAAW,EAAE;QACX,WAAW,EAAE,EAAE;QACf,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,CAAC,KAAa,EAAE,EAAE;YAC1B,MAAM,WAAW,GAAuB,EAAE,CAAA;YAC1C,KAAK,MAAM,SAAS,IAAI,yBAAiB,EAAE;gBACzC,MAAM,IAAI,GAAG,EAAE,OAAO,EAAE,GAAG,EAAE,CAAA;gBAC7B,IAAI;oBACF,gBAAM,CAAC,IAAI,CAAC,SAAS,EAAE,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,EAAE,KAAK,CAAC,CAAA;oBAChE,MAAM,CAAC,KAAK,CAAC,gEAAgE,EAAE,SAAS,CAAC,CAAA;iBAC1F;gBAAC,MAAM;oBACN,MAAM,CAAC,KAAK,CAAC,wDAAwD,EAAE,SAAS,CAAC,CAAA;oBACjF,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAA;iBAC5B;aACF;YAED,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;gBAC1B,OAAO,gFAAgF,WAAW,CAAC,IAAI,CACrG,GAAG,CACJ,EAAE,CAAA;aACJ;YACD,MAAM,CAAC,KAAK,CAAC,6EAA6E,CAAC,CAAA;QAC7F,CAAC;KACF;CACO,CAAA"}
@@ -1,2 +1,16 @@
1
1
  import { Adapter } from '../../adapter';
2
- export declare const adapter: Adapter<import("../../config").SettingsMap>;
2
+ export declare const adapter: Adapter<{
3
+ readonly PAGE_SIZE: {
4
+ readonly description: "The number of accounts to fetch per call to /accounts. Must be >= 1 and <= 500.";
5
+ readonly type: "number";
6
+ readonly required: false;
7
+ readonly default: 500;
8
+ readonly validate: (value?: number | undefined) => string | undefined;
9
+ };
10
+ readonly PRIVATE_KEY: {
11
+ readonly description: "";
12
+ readonly type: "string";
13
+ readonly required: true;
14
+ readonly validate: (value: string) => string | undefined;
15
+ };
16
+ }>;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/examples/bank-frick/index.ts"],"names":[],"m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AAS,CAAC,QAAQ,CAAC,QAAQ,CAAC;YACvC,SAAS,EAAE,gBAAgB;SAC5B;QACD,IAAI;KACL,CAAA;IAED,MAAM,QAAQ,GAAG,MAAM,eAAK,CAAC,OAAO,CAAoB,OAAO,CAAC,CAAA;IAEhE,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAA;AAC5B,CAAC,CAAA;AApCY,QAAA,WAAW,eAoCvB"}
@@ -0,0 +1,7 @@
1
+ import { AdapterEndpoint } from '../../adapter';
2
+ interface AdapterRequestParams {
3
+ base: string;
4
+ quote: string;
5
+ }
6
+ export declare const batchEndpoint: AdapterEndpoint<AdapterRequestParams, unknown, import("../../config").SettingsMap>;
7
+ export {};
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.batchEndpoint = void 0;
4
+ const adapter_1 = require("../../adapter");
5
+ const batch_warming_1 = require("../../transports/batch-warming");
6
+ const DEFAULT_URL = 'https://pro-api.coingecko.com/api/v3';
7
+ const inputParameters = {
8
+ coinid: {
9
+ description: 'The CoinGecko id or array of ids of the coin(s) to query (Note: because of current limitations to use a dummy base will need to be supplied)',
10
+ required: false,
11
+ },
12
+ base: {
13
+ aliases: ['from', 'coin'],
14
+ description: 'The symbol or array of symbols of the currency to query',
15
+ required: true,
16
+ },
17
+ quote: {
18
+ aliases: ['to', 'market'],
19
+ description: 'The symbol of the currency to convert to',
20
+ required: true,
21
+ },
22
+ };
23
+ const batchEndpointTransport = new batch_warming_1.BatchWarmingTransport({
24
+ prepareRequest: (params, context) => {
25
+ return {
26
+ baseURL: DEFAULT_URL,
27
+ url: '/simple/price',
28
+ method: 'GET',
29
+ params: {
30
+ ids: [...new Set(params.map((p) => p.base))].join(','),
31
+ vs_currencies: [...new Set(params.map((p) => p.quote))].join(','),
32
+ x_cg_pro_api_key: context.adapterConfig.API_KEY,
33
+ },
34
+ };
35
+ },
36
+ parseResponse: (res) => {
37
+ const entries = [];
38
+ for (const [base, entry] of Object.entries(res.data)) {
39
+ for (const [quote, price] of Object.entries(entry)) {
40
+ entries.push({
41
+ params: { base, quote },
42
+ value: price,
43
+ });
44
+ }
45
+ }
46
+ return entries;
47
+ },
48
+ });
49
+ exports.batchEndpoint = new adapter_1.AdapterEndpoint({
50
+ name: 'batch',
51
+ transport: batchEndpointTransport,
52
+ inputParameters,
53
+ });
54
+ //# sourceMappingURL=batch-warming.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"batch-warming.js","sourceRoot":"","sources":["../../../../src/examples/coingecko/batch-warming.ts"],"names":[],"mappings":";;;AACA,2CAA+D;AAC/D,kEAAsE;AAItE,MAAM,WAAW,GAAG,sCAAsC,CAAA;AAO1D,MAAM,eAAe,GAAoB;IACvC,MAAM,EAAE;QACN,WAAW,EACT,8IAA8I;QAChJ,QAAQ,EAAE,KAAK;KAChB;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE,IAAI;KACf;IACD,KAAK,EAAE;QACL,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;QACzB,WAAW,EAAE,0CAA0C;QACvD,QAAQ,EAAE,IAAI;KACf;CACF,CAAA;AAYD,MAAM,sBAAsB,GAAG,IAAI,qCAAqB,CAAC;IACvD,cAAc,EAAE,CACd,MAA8B,EAC9B,OAAuB,EACkB,EAAE;QAC3C,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,GAAG,EAAE,eAAe;YACpB,MAAM,EAAE,KAAK;YACb,MAAM,EAAE;gBACN,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;gBACtD,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;gBACjE,gBAAgB,EAAE,OAAO,CAAC,aAAa,CAAC,OAAO;aAChD;SACF,CAAA;IACH,CAAC;IACD,aAAa,EAAE,CACb,GAAwC,EACA,EAAE;QAC1C,MAAM,OAAO,GAAG,EAA4C,CAAA;QAC5D,KAAK,MAAM,CAAC,IAAI,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAE;YACpD,KAAK,MAAM,CAAC,KAAK,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;gBAClD,OAAO,CAAC,IAAI,CAAC;oBACX,MAAM,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE;oBACvB,KAAK,EAAE,KAAK;iBACb,CAAC,CAAA;aACH;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAC,CAAA;AAEW,QAAA,aAAa,GAAG,IAAI,yBAAe,CAAC;IAC/C,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,sBAAsB;IACjC,eAAe;CAChB,CAAC,CAAA"}
@@ -0,0 +1,2 @@
1
+ import { Adapter } from '../../adapter';
2
+ export declare const adapter: Adapter<import("../../config").SettingsMap>;
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.adapter = void 0;
4
+ const adapter_1 = require("../../adapter");
5
+ const batch_warming_1 = require("./batch-warming");
6
+ const rest_1 = require("./rest");
7
+ exports.adapter = new adapter_1.Adapter({
8
+ name: 'coingecko',
9
+ defaultEndpoint: 'batch',
10
+ endpoints: [rest_1.restEndpoint, batch_warming_1.batchEndpoint],
11
+ });
12
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/examples/coingecko/index.ts"],"names":[],"mappings":";;;AAAA,2CAAuC;AACvC,mDAA+C;AAC/C,iCAAqC;AAExB,QAAA,OAAO,GAAG,IAAI,iBAAO,CAAC;IACjC,IAAI,EAAE,WAAW;IACjB,eAAe,EAAE,OAAO;IACxB,SAAS,EAAE,CAAC,mBAAY,EAAE,6BAAa,CAAC;CACzC,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ import { AdapterEndpoint } from '../../adapter';
2
+ interface AdapterRequestParams {
3
+ base: string;
4
+ quote: string;
5
+ }
6
+ interface ProviderResponseBody {
7
+ [base: string]: {
8
+ [quote: string]: number;
9
+ };
10
+ }
11
+ export declare const restEndpoint: AdapterEndpoint<AdapterRequestParams, ProviderResponseBody, import("../../config").SettingsMap>;
12
+ export {};
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.restEndpoint = void 0;
4
+ const adapter_1 = require("../../adapter");
5
+ const transports_1 = require("../../transports");
6
+ const DEFAULT_URL = 'https://api.coingecko.com/api/v3';
7
+ const inputParameters = {
8
+ coinid: {
9
+ description: 'The CoinGecko id or array of ids of the coin(s) to query (Note: because of current limitations to use a dummy base will need to be supplied)',
10
+ required: false,
11
+ },
12
+ base: {
13
+ aliases: ['from', 'coin'],
14
+ description: 'The symbol or array of symbols of the currency to query',
15
+ required: true,
16
+ },
17
+ quote: {
18
+ aliases: ['to', 'market'],
19
+ description: 'The symbol of the currency to convert to',
20
+ required: true,
21
+ },
22
+ };
23
+ const restEndpointTransport = new transports_1.RestTransport({
24
+ prepareRequest: (req) => {
25
+ return {
26
+ baseURL: DEFAULT_URL,
27
+ url: '/simple/price',
28
+ method: 'GET',
29
+ params: {
30
+ ids: req.requestContext.data.base,
31
+ vs_currencies: req.requestContext.data.quote,
32
+ },
33
+ };
34
+ },
35
+ parseResponse: (req, res) => {
36
+ return {
37
+ data: res.data,
38
+ statusCode: 200,
39
+ result: res.data[req.requestContext.data.base]?.[req.requestContext.data.quote],
40
+ };
41
+ },
42
+ options: {
43
+ requestCoalescing: {
44
+ enabled: true,
45
+ entropyMax: 0,
46
+ },
47
+ },
48
+ });
49
+ exports.restEndpoint = new adapter_1.AdapterEndpoint({
50
+ name: 'rest',
51
+ aliases: ['qwe'],
52
+ transport: restEndpointTransport,
53
+ inputParameters,
54
+ });
55
+ //# sourceMappingURL=rest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rest.js","sourceRoot":"","sources":["../../../../src/examples/coingecko/rest.ts"],"names":[],"mappings":";;;AACA,2CAA+C;AAC/C,iDAAgD;AAIhD,MAAM,WAAW,GAAG,kCAAkC,CAAA;AAOtD,MAAM,eAAe,GAAoB;IACvC,MAAM,EAAE;QACN,WAAW,EACT,8IAA8I;QAChJ,QAAQ,EAAE,KAAK;KAChB;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACzB,WAAW,EAAE,yDAAyD;QACtE,QAAQ,EAAE,IAAI;KACf;IACD,KAAK,EAAE;QACL,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;QACzB,WAAW,EAAE,0CAA0C;QACvD,QAAQ,EAAE,IAAI;KACf;CACF,CAAA;AAaD,MAAM,qBAAqB,GAAG,IAAI,0BAAa,CAAC;IAC9C,cAAc,EAAE,CACd,GAAyC,EACA,EAAE;QAC3C,OAAO;YACL,OAAO,EAAE,WAAW;YACpB,GAAG,EAAE,eAAe;YACpB,MAAM,EAAE,KAAK;YACb,MAAM,EAAE;gBACN,GAAG,EAAE,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI;gBACjC,aAAa,EAAE,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK;aAC7C;SACF,CAAA;IACH,CAAC;IACD,aAAa,EAAE,CACb,GAAyC,EACzC,GAAwC,EACD,EAAE;QACzC,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,UAAU,EAAE,GAAG;YACf,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,CAAC;SAChF,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE;YACjB,OAAO,EAAE,IAAI;YACb,UAAU,EAAE,CAAC;SACd;KACF;CACF,CAAC,CAAA;AAEW,QAAA,YAAY,GAAG,IAAI,yBAAe,CAAC;IAC9C,IAAI,EAAE,MAAM;IACZ,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,SAAS,EAAE,qBAAqB;IAChC,eAAe;CAChB,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/config/index.ts"],"names":[],"mappings":";;;AAAa,QAAA,oBAAoB,GAAG,kCAAkC,CAAA;AACzD,QAAA,gBAAgB,GAAG,sCAAsC,CAAA"}
@@ -0,0 +1,31 @@
1
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
+ import { AdapterConfig } from '../../../config';
3
+ import { InputParameters } from '../../../validation';
4
+ export interface CryptoRequestParams {
5
+ coinid?: string;
6
+ base?: string;
7
+ quote: string;
8
+ }
9
+ export declare const cryptoInputParams: InputParameters;
10
+ export interface ProviderRequestBody {
11
+ ids: string;
12
+ vs_currencies: string;
13
+ include_market_cap?: boolean;
14
+ include_24hr_vol?: boolean;
15
+ }
16
+ export interface ProviderResponseBody {
17
+ [base: string]: {
18
+ [quote: string]: number;
19
+ };
20
+ }
21
+ interface ResultEntryWithoutOverrides {
22
+ value: number;
23
+ params: {
24
+ quote: string;
25
+ base?: string;
26
+ coinid?: string;
27
+ };
28
+ }
29
+ export declare const buildBatchedRequestBody: (params: CryptoRequestParams[], config: AdapterConfig) => AxiosRequestConfig<ProviderRequestBody>;
30
+ export declare const constructEntry: (res: AxiosResponse<ProviderResponseBody>, requestPayload: CryptoRequestParams, resultPath: string) => ResultEntryWithoutOverrides | undefined;
31
+ export {};
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.constructEntry = exports.buildBatchedRequestBody = exports.cryptoInputParams = void 0;
4
+ const config_1 = require("./config");
5
+ const logger_1 = require("../../../util/logger");
6
+ exports.cryptoInputParams = {
7
+ coinid: {
8
+ description: 'The CoinGecko id or to query',
9
+ type: 'string',
10
+ required: false,
11
+ },
12
+ base: {
13
+ aliases: ['from', 'coin'],
14
+ type: 'string',
15
+ description: 'The symbol of symbols of the currency to query',
16
+ required: false,
17
+ },
18
+ quote: {
19
+ aliases: ['to', 'market'],
20
+ type: 'string',
21
+ description: 'The symbol of the currency to convert to',
22
+ required: true,
23
+ },
24
+ };
25
+ const buildBatchedRequestBody = (params, config) => {
26
+ return {
27
+ baseURL: config.API_KEY ? config_1.PRO_API_ENDPOINT : config_1.DEFAULT_API_ENDPOINT,
28
+ url: '/simple/price',
29
+ method: 'GET',
30
+ params: {
31
+ ids: [...new Set(params.map((p) => p.coinid ?? p.base))].join(','),
32
+ vs_currencies: [...new Set(params.map((p) => p.quote))].join(','),
33
+ x_cg_pro_api_key: config.API_KEY,
34
+ },
35
+ };
36
+ };
37
+ exports.buildBatchedRequestBody = buildBatchedRequestBody;
38
+ const logger = (0, logger_1.makeLogger)('CoinGecko Crypto Batched');
39
+ const constructEntry = (res, requestPayload, resultPath) => {
40
+ const coinId = requestPayload.coinid ?? requestPayload.base;
41
+ const dataForCoin = res.data[coinId];
42
+ const dataForQuote = dataForCoin ? dataForCoin[resultPath] : undefined;
43
+ if (!dataForQuote) {
44
+ logger.warn(`Data for "${requestPayload.quote}" not found for token "${coinId}`);
45
+ return;
46
+ }
47
+ const entry = {
48
+ params: requestPayload,
49
+ value: dataForQuote,
50
+ };
51
+ if (requestPayload.coinid) {
52
+ entry.params.coinid = requestPayload.coinid;
53
+ }
54
+ else {
55
+ entry.params.base = requestPayload.base;
56
+ }
57
+ delete entry.params.overrides;
58
+ return entry;
59
+ };
60
+ exports.constructEntry = constructEntry;
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto-utils.js","sourceRoot":"","sources":["../../../../../src/examples/coingecko/src/crypto-utils.ts"],"names":[],"mappings":";;;AACA,qCAAiE;AAEjE,iDAAiD;AAWpC,QAAA,iBAAiB,GAAoB;IAChD,MAAM,EAAE;QACN,WAAW,EAAE,8BAA8B;QAC3C,IAAI,EAAE,QAAQ;QACd,QAAQ,EAAE,KAAK;KAChB;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC;QACzB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,KAAK;KAChB;IACD,KAAK,EAAE;QACL,OAAO,EAAE,CAAC,IAAI,EAAE,QAAQ,CAAC;QACzB,IAAI,EAAE,QAAQ;QACd,WAAW,EAAE,0CAA0C;QACvD,QAAQ,EAAE,IAAI;KACf;CACF,CAAA;AAkCM,MAAM,uBAAuB,GAAG,CACrC,MAA6B,EAC7B,MAAqB,EACoB,EAAE;IAC3C,OAAO;QACL,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAgB,CAAC,CAAC,CAAC,6BAAoB;QACjE,GAAG,EAAE,eAAe;QACpB,MAAM,EAAE,KAAK;QACb,MAAM,EAAE;YACN,GAAG,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YAClE,aAAa,EAAE,CAAC,GAAG,IAAI,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;YACjE,gBAAgB,EAAE,MAAM,CAAC,OAAO;SACjC;KACF,CAAA;AACH,CAAC,CAAA;AAdY,QAAA,uBAAuB,2BAcnC;AAED,MAAM,MAAM,GAAG,IAAA,mBAAU,EAAC,0BAA0B,CAAC,CAAA;AAE9C,MAAM,cAAc,GAAG,CAC5B,GAAwC,EACxC,cAAmC,EACnC,UAAkB,EACuB,EAAE;IAC3C,MAAM,MAAM,GAAG,cAAc,CAAC,MAAM,IAAK,cAAc,CAAC,IAAe,CAAA;IACvE,MAAM,WAAW,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACpC,MAAM,YAAY,GAAG,WAAW,CAAC,CAAC,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAA;IACtE,IAAI,CAAC,YAAY,EAAE;QACjB,MAAM,CAAC,IAAI,CAAC,aAAa,cAAc,CAAC,KAAK,0BAA0B,MAAM,EAAE,CAAC,CAAA;QAChF,OAAM;KACP;IACD,MAAM,KAAK,GAAG;QACZ,MAAM,EAAE,cAAc;QACtB,KAAK,EAAE,YAAY;KACL,CAAA;IAChB,IAAI,cAAc,CAAC,MAAM,EAAE;QACzB,KAAK,CAAC,MAAM,CAAC,MAAM,GAAG,cAAc,CAAC,MAAM,CAAA;KAC5C;SAAM;QACL,KAAK,CAAC,MAAM,CAAC,IAAI,GAAG,cAAc,CAAC,IAAI,CAAA;KACxC;IACD,OAAO,KAAK,CAAC,MAAM,CAAC,SAAS,CAAA;IAC7B,OAAO,KAAK,CAAA;AACd,CAAC,CAAA;AAvBY,QAAA,cAAc,kBAuB1B"}
@@ -24,7 +24,9 @@ const restEndpointTransport = new transports_1.RestTransport({
24
24
  };
25
25
  },
26
26
  options: {
27
- coalescing: true,
27
+ requestCoalescing: {
28
+ enabled: true,
29
+ },
28
30
  },
29
31
  });
30
32
  exports.endpoint = new adapter_1.AdapterEndpoint({
@@ -0,0 +1 @@
1
+ {"version":3,"file":"coins.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/coins.ts"],"names":[],"mappings":";;;AAEA,wDAA4D;AAC5D,8DAA6D;AAG7D,sCAAkE;AAErD,QAAA,eAAe,GAAoB,EAAE,CAAA;AAQlD,MAAM,qBAAqB,GAAG,IAAI,0BAAa,CAAC;IAC9C,cAAc,EAAE,CAAC,CAAiB,EAAE,MAAqB,EAAqC,EAAE;QAC9F,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,yBAAgB,CAAC,CAAC,CAAC,6BAAoB,CAAA;QACxE,MAAM,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,gBAAgB,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,SAAS,CAAA;QAChF,OAAO;YACL,OAAO;YACP,GAAG,EAAE,aAAa;YAClB,MAAM,EAAE,KAAK;YACb,MAAM;SACP,CAAA;IACH,CAAC;IACD,aAAa,EAAE,CACb,GAAmB,EACnB,GAAmC,EACD,EAAE;QACpC,OAAO;YACL,IAAI,EAAE,GAAG,CAAC,IAAI;YACd,UAAU,EAAE,GAAG;YACf,MAAM,EAAE,GAAG,CAAC,IAAI;SACjB,CAAA;IACH,CAAC;IACD,OAAO,EAAE;QACP,iBAAiB,EAAE;YACjB,OAAO,EAAE,IAAI;SACd;KACF;CACF,CAAC,CAAA;AAEW,QAAA,QAAQ,GAAG,IAAI,yBAAe,CAAC;IAC1C,IAAI,EAAE,OAAO;IACb,SAAS,EAAE,qBAAqB;IAChC,eAAe,EAAf,uBAAe;CAChB,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { AdapterEndpoint } from '../../../../adapter';
2
- import { CryptoRequestParams } from '../cryptoUtils';
2
+ import { CryptoRequestParams } from '../crypto-utils';
3
3
  export declare const endpoint: AdapterEndpoint<CryptoRequestParams, unknown, import("../../../../config").SettingsMap>;
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.endpoint = void 0;
4
4
  const adapter_1 = require("../../../../adapter");
5
5
  const batch_warming_1 = require("../../../../transports/batch-warming");
6
- const cryptoUtils_1 = require("../cryptoUtils");
6
+ const crypto_utils_1 = require("../crypto-utils");
7
7
  const batchEndpointTransport = new batch_warming_1.BatchWarmingTransport({
8
8
  prepareRequest: (params, context) => {
9
- const requestBody = (0, cryptoUtils_1.buildBatchedRequestBody)(params, context.adapterConfig);
9
+ const requestBody = (0, crypto_utils_1.buildBatchedRequestBody)(params, context.adapterConfig);
10
10
  requestBody.params.include_market_cap = true;
11
11
  return requestBody;
12
12
  },
13
13
  parseResponse: (params, res) => {
14
14
  const entries = [];
15
15
  for (const requestPayload of params) {
16
- const entry = (0, cryptoUtils_1.constructEntry)(res, requestPayload, `${requestPayload.quote.toLowerCase()}_market_cap`);
16
+ const entry = (0, crypto_utils_1.constructEntry)(res, requestPayload, `${requestPayload.quote.toLowerCase()}_market_cap`);
17
17
  if (entry) {
18
18
  entries.push(entry);
19
19
  }
@@ -25,5 +25,5 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
25
25
  name: 'marketcap',
26
26
  aliases: ['crypto-marketcap'],
27
27
  transport: batchEndpointTransport,
28
- inputParameters: cryptoUtils_1.cryptoInputParams,
28
+ inputParameters: crypto_utils_1.cryptoInputParams,
29
29
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto-marketcap.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/crypto-marketcap.ts"],"names":[],"mappings":";;;AACA,iDAAqE;AACrE,wEAA4E;AAE5E,kDAOwB;AAExB,MAAM,sBAAsB,GAAG,IAAI,qCAAqB,CAAC;IACvD,cAAc,EAAE,CACd,MAA6B,EAC7B,OAAuB,EACkB,EAAE;QAC3C,MAAM,WAAW,GAAG,IAAA,sCAAuB,EAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;QAC1E,WAAW,CAAC,MAAM,CAAC,kBAAkB,GAAG,IAAI,CAAA;QAC5C,OAAO,WAAW,CAAA;IACpB,CAAC;IACD,aAAa,EAAE,CACb,MAA6B,EAC7B,GAAwC,EACD,EAAE;QACzC,MAAM,OAAO,GAAG,EAA2C,CAAA;QAC3D,KAAK,MAAM,cAAc,IAAI,MAAM,EAAE;YACnC,MAAM,KAAK,GAAG,IAAA,6BAAc,EAC1B,GAAG,EACH,cAAc,EACd,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,aAAa,CACnD,CAAA;YACD,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACpB;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAC,CAAA;AAEW,QAAA,QAAQ,GAAG,IAAI,yBAAe,CAAC;IAC1C,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,kBAAkB,CAAC;IAC7B,SAAS,EAAE,sBAAsB;IACjC,eAAe,EAAE,gCAAiB;CACnC,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { AdapterEndpoint } from '../../../../adapter';
2
- import { CryptoRequestParams } from '../cryptoUtils';
2
+ import { CryptoRequestParams } from '../crypto-utils';
3
3
  export declare const endpoint: AdapterEndpoint<CryptoRequestParams, unknown, import("../../../../config").SettingsMap>;
@@ -3,17 +3,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.endpoint = void 0;
4
4
  const adapter_1 = require("../../../../adapter");
5
5
  const batch_warming_1 = require("../../../../transports/batch-warming");
6
- const cryptoUtils_1 = require("../cryptoUtils");
6
+ const crypto_utils_1 = require("../crypto-utils");
7
7
  const batchEndpointTransport = new batch_warming_1.BatchWarmingTransport({
8
8
  prepareRequest: (params, context) => {
9
- const requestBody = (0, cryptoUtils_1.buildBatchedRequestBody)(params, context.adapterConfig);
9
+ const requestBody = (0, crypto_utils_1.buildBatchedRequestBody)(params, context.adapterConfig);
10
10
  requestBody.params.include_24hr_vol = true;
11
11
  return requestBody;
12
12
  },
13
13
  parseResponse: (params, res) => {
14
14
  const entries = [];
15
15
  for (const requestPayload of params) {
16
- const entry = (0, cryptoUtils_1.constructEntry)(res, requestPayload, `${requestPayload.quote.toLowerCase()}_24h_vol`);
16
+ const entry = (0, crypto_utils_1.constructEntry)(res, requestPayload, `${requestPayload.quote.toLowerCase()}_24h_vol`);
17
17
  if (entry) {
18
18
  entries.push(entry);
19
19
  }
@@ -25,5 +25,5 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
25
25
  name: 'volume',
26
26
  aliases: ['crypto-volume'],
27
27
  transport: batchEndpointTransport,
28
- inputParameters: cryptoUtils_1.cryptoInputParams,
28
+ inputParameters: crypto_utils_1.cryptoInputParams,
29
29
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto-volume.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/crypto-volume.ts"],"names":[],"mappings":";;;AACA,iDAAqE;AACrE,wEAA4E;AAE5E,kDAOwB;AAExB,MAAM,sBAAsB,GAAG,IAAI,qCAAqB,CAAC;IACvD,cAAc,EAAE,CACd,MAA6B,EAC7B,OAAuB,EACkB,EAAE;QAC3C,MAAM,WAAW,GAAG,IAAA,sCAAuB,EAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;QAC1E,WAAW,CAAC,MAAM,CAAC,gBAAgB,GAAG,IAAI,CAAA;QAC1C,OAAO,WAAW,CAAA;IACpB,CAAC;IACD,aAAa,EAAE,CACb,MAA6B,EAC7B,GAAwC,EACD,EAAE;QACzC,MAAM,OAAO,GAAG,EAA2C,CAAA;QAC3D,KAAK,MAAM,cAAc,IAAI,MAAM,EAAE;YACnC,MAAM,KAAK,GAAG,IAAA,6BAAc,EAC1B,GAAG,EACH,cAAc,EACd,GAAG,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,UAAU,CAChD,CAAA;YACD,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACpB;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAC,CAAA;AAEW,QAAA,QAAQ,GAAG,IAAI,yBAAe,CAAC;IAC1C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,eAAe,CAAC;IAC1B,SAAS,EAAE,sBAAsB;IACjC,eAAe,EAAE,gCAAiB;CACnC,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { AdapterEndpoint } from '../../../../adapter';
2
- import { CryptoRequestParams } from '../cryptoUtils';
2
+ import { CryptoRequestParams } from '../crypto-utils';
3
3
  export declare const endpoint: AdapterEndpoint<CryptoRequestParams, unknown, import("../../../../config").SettingsMap>;
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.endpoint = void 0;
4
4
  const adapter_1 = require("../../../../adapter");
5
5
  const batch_warming_1 = require("../../../../transports/batch-warming");
6
- const cryptoUtils_1 = require("../cryptoUtils");
6
+ const crypto_utils_1 = require("../crypto-utils");
7
7
  const batchEndpointTransport = new batch_warming_1.BatchWarmingTransport({
8
8
  prepareRequest: (params, context) => {
9
- return (0, cryptoUtils_1.buildBatchedRequestBody)(params, context.adapterConfig);
9
+ return (0, crypto_utils_1.buildBatchedRequestBody)(params, context.adapterConfig);
10
10
  },
11
11
  parseResponse: (params, res) => {
12
12
  const entries = [];
13
13
  for (const requestPayload of params) {
14
- const entry = (0, cryptoUtils_1.constructEntry)(res, requestPayload, requestPayload.quote.toLowerCase());
14
+ const entry = (0, crypto_utils_1.constructEntry)(res, requestPayload, requestPayload.quote.toLowerCase());
15
15
  if (entry) {
16
16
  entries.push(entry);
17
17
  }
@@ -23,5 +23,5 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
23
23
  name: 'crypto',
24
24
  aliases: ['crypto-batched', 'batched', 'batch'],
25
25
  transport: batchEndpointTransport,
26
- inputParameters: cryptoUtils_1.cryptoInputParams,
26
+ inputParameters: crypto_utils_1.cryptoInputParams,
27
27
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"crypto.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/crypto.ts"],"names":[],"mappings":";;;AACA,iDAAqE;AACrE,wEAA4E;AAE5E,kDAOwB;AAExB,MAAM,sBAAsB,GAAG,IAAI,qCAAqB,CAAC;IACvD,cAAc,EAAE,CACd,MAA6B,EAC7B,OAAuB,EACkB,EAAE;QAC3C,OAAO,IAAA,sCAAuB,EAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,CAAA;IAC/D,CAAC;IACD,aAAa,EAAE,CACb,MAA6B,EAC7B,GAAwC,EACD,EAAE;QACzC,MAAM,OAAO,GAAG,EAA2C,CAAA;QAC3D,KAAK,MAAM,cAAc,IAAI,MAAM,EAAE;YACnC,MAAM,KAAK,GAAG,IAAA,6BAAc,EAAC,GAAG,EAAE,cAAc,EAAE,cAAc,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAA;YACrF,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACpB;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAC,CAAA;AAEW,QAAA,QAAQ,GAAG,IAAI,yBAAe,CAAC;IAC1C,IAAI,EAAE,QAAQ;IACd,OAAO,EAAE,CAAC,gBAAgB,EAAE,SAAS,EAAE,OAAO,CAAC;IAC/C,SAAS,EAAE,sBAAsB;IACjC,eAAe,EAAE,gCAAiB;CACnC,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { AdapterEndpoint } from '../../../../adapter';
2
- import { AdapterRequestParams } from '../globalUtils';
2
+ import { AdapterRequestParams } from '../global-utils';
3
3
  export declare const endpoint: AdapterEndpoint<AdapterRequestParams, unknown, import("../../../../config").SettingsMap>;
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.endpoint = void 0;
4
4
  const adapter_1 = require("../../../../adapter");
5
5
  const batch_warming_1 = require("../../../../transports/batch-warming");
6
- const globalUtils_1 = require("../globalUtils");
6
+ const global_utils_1 = require("../global-utils");
7
7
  const batchEndpointTransport = new batch_warming_1.BatchWarmingTransport({
8
8
  prepareRequest: (params, context) => {
9
- return (0, globalUtils_1.buildGlobalRequestBody)(context.adapterConfig.API_KEY);
9
+ return (0, global_utils_1.buildGlobalRequestBody)(context.adapterConfig.API_KEY);
10
10
  },
11
11
  parseResponse: (params, res) => {
12
12
  const entries = [];
13
13
  for (const requestPayload of params) {
14
- const entry = (0, globalUtils_1.constructEntry)(res, requestPayload, 'market_cap_percentage');
14
+ const entry = (0, global_utils_1.constructEntry)(res, requestPayload, 'market_cap_percentage');
15
15
  if (entry) {
16
16
  entries.push(entry);
17
17
  }
@@ -23,5 +23,5 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
23
23
  name: 'dominance',
24
24
  aliases: ['market_cap_percentage'],
25
25
  transport: batchEndpointTransport,
26
- inputParameters: globalUtils_1.inputParameters,
26
+ inputParameters: global_utils_1.inputParameters,
27
27
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dominance.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/dominance.ts"],"names":[],"mappings":";;;AACA,iDAAqE;AACrE,wEAA4E;AAE5E,kDAMwB;AAExB,MAAM,sBAAsB,GAAG,IAAI,qCAAqB,CAAC;IACvD,cAAc,EAAE,CACd,MAA8B,EAC9B,OAAuB,EACI,EAAE;QAC7B,OAAO,IAAA,qCAAsB,EAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IAC9D,CAAC;IACD,aAAa,EAAE,CACb,MAA8B,EAC9B,GAAwC,EACA,EAAE;QAC1C,MAAM,OAAO,GAAG,EAA4C,CAAA;QAC5D,KAAK,MAAM,cAAc,IAAI,MAAM,EAAE;YACnC,MAAM,KAAK,GAAG,IAAA,6BAAc,EAAC,GAAG,EAAE,cAAc,EAAE,uBAAuB,CAAC,CAAA;YAC1E,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACpB;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAC,CAAA;AAEW,QAAA,QAAQ,GAAG,IAAI,yBAAe,CAAC;IAC1C,IAAI,EAAE,WAAW;IACjB,OAAO,EAAE,CAAC,uBAAuB,CAAC;IAClC,SAAS,EAAE,sBAAsB;IACjC,eAAe,EAAf,8BAAe;CAChB,CAAC,CAAA"}
@@ -1,3 +1,3 @@
1
1
  import { AdapterEndpoint } from '../../../../adapter';
2
- import { AdapterRequestParams } from '../globalUtils';
2
+ import { AdapterRequestParams } from '../global-utils';
3
3
  export declare const endpoint: AdapterEndpoint<AdapterRequestParams, unknown, import("../../../../config").SettingsMap>;
@@ -3,15 +3,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.endpoint = void 0;
4
4
  const adapter_1 = require("../../../../adapter");
5
5
  const batch_warming_1 = require("../../../../transports/batch-warming");
6
- const globalUtils_1 = require("../globalUtils");
6
+ const global_utils_1 = require("../global-utils");
7
7
  const batchEndpointTransport = new batch_warming_1.BatchWarmingTransport({
8
8
  prepareRequest: (params, context) => {
9
- return (0, globalUtils_1.buildGlobalRequestBody)(context.adapterConfig.API_KEY);
9
+ return (0, global_utils_1.buildGlobalRequestBody)(context.adapterConfig.API_KEY);
10
10
  },
11
11
  parseResponse: (params, res) => {
12
12
  const entries = [];
13
13
  for (const requestPayload of params) {
14
- const entry = (0, globalUtils_1.constructEntry)(res, requestPayload, 'total_market_cap');
14
+ const entry = (0, global_utils_1.constructEntry)(res, requestPayload, 'total_market_cap');
15
15
  if (entry) {
16
16
  entries.push(entry);
17
17
  }
@@ -23,5 +23,5 @@ exports.endpoint = new adapter_1.AdapterEndpoint({
23
23
  name: 'globalmarketcap',
24
24
  aliases: ['total_market_cap'],
25
25
  transport: batchEndpointTransport,
26
- inputParameters: globalUtils_1.inputParameters,
26
+ inputParameters: global_utils_1.inputParameters,
27
27
  });
@@ -0,0 +1 @@
1
+ {"version":3,"file":"global-marketcap.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/global-marketcap.ts"],"names":[],"mappings":";;;AACA,iDAAqE;AACrE,wEAA4E;AAE5E,kDAMwB;AAExB,MAAM,sBAAsB,GAAG,IAAI,qCAAqB,CAAC;IACvD,cAAc,EAAE,CACd,MAA8B,EAC9B,OAAuB,EACI,EAAE;QAC7B,OAAO,IAAA,qCAAsB,EAAC,OAAO,CAAC,aAAa,CAAC,OAAO,CAAC,CAAA;IAC9D,CAAC;IACD,aAAa,EAAE,CACb,MAA8B,EAC9B,GAAwC,EACA,EAAE;QAC1C,MAAM,OAAO,GAAG,EAA4C,CAAA;QAC5D,KAAK,MAAM,cAAc,IAAI,MAAM,EAAE;YACnC,MAAM,KAAK,GAAG,IAAA,6BAAc,EAAC,GAAG,EAAE,cAAc,EAAE,kBAAkB,CAAC,CAAA;YACrE,IAAI,KAAK,EAAE;gBACT,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;aACpB;SACF;QACD,OAAO,OAAO,CAAA;IAChB,CAAC;CACF,CAAC,CAAA;AAEW,QAAA,QAAQ,GAAG,IAAI,yBAAe,CAAC;IAC1C,IAAI,EAAE,iBAAiB;IACvB,OAAO,EAAE,CAAC,kBAAkB,CAAC;IAC7B,SAAS,EAAE,sBAAsB;IACjC,eAAe,EAAf,8BAAe;CAChB,CAAC,CAAA"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../src/examples/coingecko/src/endpoint/index.ts"],"names":[],"mappings":";;;AAAA,iCAA2C;AAAlC,8FAAA,QAAQ,OAAS;AAC1B,mCAA6C;AAApC,gGAAA,QAAQ,OAAU;AAC3B,uDAAgE;AAAvD,mHAAA,QAAQ,OAAmB;AACpC,uDAAgE;AAAvD,mHAAA,QAAQ,OAAmB;AACpC,yCAAmD;AAA1C,sGAAA,QAAQ,OAAa;AAC9B,iDAA0D;AAAjD,6GAAA,QAAQ,OAAgB"}
@@ -0,0 +1,27 @@
1
+ import { AxiosRequestConfig, AxiosResponse } from 'axios';
2
+ import { InputParameters } from '../../../validation';
3
+ export declare const inputParameters: InputParameters;
4
+ export interface AdapterRequestParams {
5
+ market: string;
6
+ }
7
+ export interface ProviderResponseBody {
8
+ data: {
9
+ active_cryptocurrencies: number;
10
+ upcoming_icos: number;
11
+ ongoing_icos: number;
12
+ ended_icos: number;
13
+ markets: number;
14
+ total_market_cap: Record<string, number>;
15
+ total_volume: Record<string, number>;
16
+ market_cap_percentage: Record<string, number>;
17
+ market_cap_change_percentage_24h_usd: number;
18
+ updated_at: number;
19
+ };
20
+ }
21
+ interface ResultEntry {
22
+ value: number;
23
+ params: AdapterRequestParams;
24
+ }
25
+ export declare const buildGlobalRequestBody: (apiKey?: string | undefined) => AxiosRequestConfig<never>;
26
+ export declare const constructEntry: (res: AxiosResponse<ProviderResponseBody>, requestPayload: AdapterRequestParams, resultPath: 'total_market_cap' | 'market_cap_percentage') => ResultEntry | undefined;
27
+ export {};