@sonarwatch/portfolio-plugins 0.11.89 → 0.11.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +2 -2
  3. package/src/Cache.d.ts +1 -0
  4. package/src/Cache.js +12 -0
  5. package/src/Cache.js.map +1 -1
  6. package/src/plugins/circuit/constants.d.ts +1 -3
  7. package/src/plugins/circuit/constants.js +2 -17
  8. package/src/plugins/circuit/constants.js.map +1 -1
  9. package/src/plugins/circuit/depositsFetcher.js +10 -4
  10. package/src/plugins/circuit/depositsFetcher.js.map +1 -1
  11. package/src/plugins/circuit/filters.d.ts +1 -0
  12. package/src/plugins/circuit/filters.js +4 -1
  13. package/src/plugins/circuit/filters.js.map +1 -1
  14. package/src/plugins/circuit/index.js +2 -1
  15. package/src/plugins/circuit/index.js.map +1 -1
  16. package/src/plugins/circuit/types.d.ts +1 -47
  17. package/src/plugins/circuit/vaultsJob.d.ts +3 -0
  18. package/src/plugins/circuit/vaultsJob.js +42 -0
  19. package/src/plugins/circuit/vaultsJob.js.map +1 -0
  20. package/src/plugins/drift/deposits.js +1 -1
  21. package/src/plugins/drift/deposits.js.map +1 -1
  22. package/src/plugins/drift/helpers.d.ts +0 -1
  23. package/src/plugins/drift/helpers.js +1 -6
  24. package/src/plugins/drift/helpers.js.map +1 -1
  25. package/src/plugins/flash/poolJob.js +1 -2
  26. package/src/plugins/flash/poolJob.js.map +1 -1
  27. package/src/plugins/mango/banksJob.js +1 -1
  28. package/src/plugins/mango/banksJob.js.map +1 -1
  29. package/src/plugins/mango/boostBanksJob.d.ts +3 -0
  30. package/src/plugins/mango/boostBanksJob.js +42 -0
  31. package/src/plugins/mango/boostBanksJob.js.map +1 -0
  32. package/src/plugins/mango/boostFetcher.d.ts +3 -0
  33. package/src/plugins/mango/boostFetcher.js +113 -0
  34. package/src/plugins/mango/boostFetcher.js.map +1 -0
  35. package/src/plugins/mango/collateralFetcher.js +2 -3
  36. package/src/plugins/mango/collateralFetcher.js.map +1 -1
  37. package/src/plugins/mango/constants.d.ts +3 -1
  38. package/src/plugins/mango/constants.js +4 -2
  39. package/src/plugins/mango/constants.js.map +1 -1
  40. package/src/plugins/mango/filters.d.ts +2 -0
  41. package/src/plugins/mango/filters.js +31 -1
  42. package/src/plugins/mango/filters.js.map +1 -1
  43. package/src/plugins/mango/helpers.d.ts +0 -1
  44. package/src/plugins/mango/helpers.js +1 -7
  45. package/src/plugins/mango/helpers.js.map +1 -1
  46. package/src/plugins/mango/index.js +4 -2
  47. package/src/plugins/mango/index.js.map +1 -1
  48. package/src/plugins/mango/struct.d.ts +32 -0
  49. package/src/plugins/mango/struct.js +59 -1
  50. package/src/plugins/mango/struct.js.map +1 -1
  51. package/src/plugins/mango/types.d.ts +6 -0
  52. package/src/plugins/navi/collateralFetcher.js +20 -24
  53. package/src/plugins/navi/collateralFetcher.js.map +1 -1
  54. package/src/plugins/navi/constants.d.ts +0 -1
  55. package/src/plugins/navi/constants.js +10 -2
  56. package/src/plugins/navi/constants.js.map +1 -1
  57. package/src/plugins/navi/reservesJob.js +12 -50
  58. package/src/plugins/navi/reservesJob.js.map +1 -1
  59. package/src/plugins/navi/types.d.ts +42 -44
  60. package/src/utils/solana/index.d.ts +1 -0
  61. package/src/utils/solana/index.js +1 -0
  62. package/src/utils/solana/index.js.map +1 -1
  63. package/src/utils/solana/u8ArrayToString.d.ts +1 -0
  64. package/src/utils/solana/u8ArrayToString.js +11 -0
  65. package/src/utils/solana/u8ArrayToString.js.map +1 -0
package/CHANGELOG.md CHANGED
@@ -2,6 +2,14 @@
2
2
 
3
3
  This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
4
4
 
5
+ ## [0.11.91](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.90...plugins-0.11.91) (2024-03-01)
6
+
7
+
8
+
9
+ ## [0.11.90](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.89...plugins-0.11.90) (2024-02-28)
10
+
11
+
12
+
5
13
  ## [0.11.89](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.88...plugins-0.11.89) (2024-02-28)
6
14
 
7
15
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sonarwatch/portfolio-plugins",
3
- "version": "0.11.89",
3
+ "version": "0.11.91",
4
4
  "type": "commonjs",
5
5
  "generators": "./generators.json",
6
6
  "dependencies": {
@@ -41,7 +41,7 @@
41
41
  "web3-v1": "npm:web3@^1.5.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "@sonarwatch/portfolio-core": "0.11.89"
44
+ "@sonarwatch/portfolio-core": "0.11.91"
45
45
  },
46
46
  "main": "./src/index.js",
47
47
  "types": "./src/index.d.ts"
package/src/Cache.d.ts CHANGED
@@ -80,6 +80,7 @@ export declare class Cache {
80
80
  private setTokenPriceLocal;
81
81
  getTokenPrice(address: string, networkId: NetworkIdType): Promise<TokenPrice | undefined>;
82
82
  getTokenPrices(addresses: string[], networkId: NetworkIdType): Promise<(TokenPrice | undefined)[]>;
83
+ getTokenPricesAsMap(addresses: string[], networkId: NetworkIdType): Promise<Map<string, TokenPrice>>;
83
84
  private getTokenPriceSources;
84
85
  private getTokenPricesSources;
85
86
  getItems<K extends StorageValue>(keys: string[], opts: TransactionOptions): Promise<(K | undefined)[]>;
package/src/Cache.js CHANGED
@@ -135,6 +135,18 @@ class Cache {
135
135
  return fAddresses.map((address) => tokenPriceByAddress.get(address));
136
136
  });
137
137
  }
138
+ getTokenPricesAsMap(addresses, networkId) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const tokenPrices = yield this.getTokenPrices(addresses, networkId);
141
+ const tokenPricesMap = new Map();
142
+ tokenPrices.forEach((tp) => {
143
+ if (!tp)
144
+ return;
145
+ tokenPricesMap.set(tp.address, tp);
146
+ });
147
+ return tokenPricesMap;
148
+ });
149
+ }
138
150
  getTokenPriceSources(address, networkId) {
139
151
  return __awaiter(this, void 0, void 0, function* () {
140
152
  const fAddress = (0, portfolio_core_1.formatTokenAddress)(address, networkId);
package/src/Cache.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../packages/plugins/src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyE;AACzE,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,+DAUoC;AACpC,oEAA4C;AAC5C,+DAGwB;AAiBxB,MAAM,sBAAsB,GAAG,kBAAkB,CAAC;AAgElD,MAAa,KAAK;IAKhB,YAAY,WAAwB;QAClC,IAAI,CAAC,MAAM,GAAG,wBAAwB,CAAC,WAAW,CAAC,CAAC;QACpD,IAAI,CAAC,OAAO,GAAG,IAAA,yBAAa,EAAC;YAC3B,MAAM,EAAE,IAAI,CAAC,MAAM;SACpB,CAAC,CAAC;QACH,IAAI,CAAC,iBAAiB,GAAG,IAAA,yBAAa,EAAC;YACrC,MAAM,EAAE,IAAA,sBAAY,EAAC;gBACnB,GAAG,EAAE,KAAK;aACX,CAAC;SACH,CAAC,CAAC;IACL,CAAC;IAED,UAAU,CAAC,IAAyB;QAClC,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,oCAAqB,EAAE,CAAC;YAC9C,IAAI,CAAC,MAAuB,CAAC,UAAU,CAAC,IAAI,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,UAAU;QACR,IAAI,IAAI,CAAC,MAAM,CAAC,IAAI,KAAK,oCAAqB,EAAE,CAAC;YAC/C,OAAQ,IAAI,CAAC,MAAuB,CAAC,UAAU,EAAE,CAAC;QACpD,CAAC;QACD,OAAO,IAAI,GAAG,EAAE,CAAC;IACnB,CAAC;IAEK,OAAO,CAAC,GAAW,EAAE,IAAwB;;YACjD,MAAM,IAAI,GAAG,MAAM,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;YAC3C,OAAO,IAAI,KAAK,SAAS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} from './types';
4
3
  export declare const platformId = "circuit";
5
4
  export declare const platform: Platform;
6
5
  export declare const circuitPid: PublicKey;
7
6
  export declare const jitoSOLMint = "J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn";
8
- export declare const vaultKey = "vaults";
9
- export declare const nameOfVauilts: Map<string, VaultInfo>;
7
+ export declare const prefixVaults = "circuitVaults";
@@ -1,8 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.nameOfVauilts = exports.vaultKey = exports.jitoSOLMint = exports.circuitPid = exports.platform = exports.platformId = void 0;
3
+ exports.prefixVaults = exports.jitoSOLMint = exports.circuitPid = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
- const solana_1 = require("../../utils/solana");
6
5
  exports.platformId = 'circuit';
7
6
  exports.platform = {
8
7
  id: exports.platformId,
@@ -14,19 +13,5 @@ exports.platform = {
14
13
  };
15
14
  exports.circuitPid = new web3_js_1.PublicKey('vAuLTsyrvSfZRuRB3XgvkPwNGgYSs9YRYymVebLKoxR');
16
15
  exports.jitoSOLMint = 'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn';
17
- exports.vaultKey = 'vaults';
18
- exports.nameOfVauilts = new Map([
19
- [
20
- 'F3no8aqNZRSkxvMEARC4feHJfvvrST2ZrHzr2NBVyJUr',
21
- { name: 'Turbocharger', mint: solana_1.usdcSolanaMint, decimals: 6 },
22
- ],
23
- [
24
- 'GXyE3Snk3pPYX4Nz9QRVBrnBfbJRTAQYxuy5DRdnebAn',
25
- { name: 'Supercharger', mint: solana_1.usdcSolanaMint, decimals: 6 },
26
- ],
27
- [
28
- 'ACmnVY5gf1z9UGhzBgnr2bf3h2ZwXW2EDW1w8RC9cQk4',
29
- { name: 'JitoSol Basis', mint: exports.jitoSOLMint, decimals: 9 },
30
- ],
31
- ]);
16
+ exports.prefixVaults = 'circuitVaults';
32
17
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG5C,+CAAoD;AAEvC,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,+CAA+C;IACtD,qEAAqE;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,6CAA6C,CAC9C,CAAC;AACW,QAAA,WAAW,GAAG,8CAA8C,CAAC;AAC7D,QAAA,QAAQ,GAAG,QAAQ,CAAC;AAEpB,QAAA,aAAa,GAA2B,IAAI,GAAG,CAAC;IAC3D;QACE,8CAA8C;QAC9C,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,uBAAc,EAAE,QAAQ,EAAE,CAAC,EAAE;KAC5D;IACD;QACE,8CAA8C;QAC9C,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,uBAAc,EAAE,QAAQ,EAAE,CAAC,EAAE;KAC5D;IACD;QACE,8CAA8C;QAC9C,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,mBAAW,EAAE,QAAQ,EAAE,CAAC,EAAE;KAC1D;CACF,CAAC,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,SAAS;IACf,KAAK,EAAE,+CAA+C;IACtD,qEAAqE;IACrE,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG,IAAI,mBAAS,CACrC,6CAA6C,CAC9C,CAAC;AACW,QAAA,WAAW,GAAG,8CAA8C,CAAC;AAC7D,QAAA,YAAY,GAAG,eAAe,CAAC"}
@@ -25,7 +25,13 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
25
25
  const depositAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultDepositorStruct, constants_1.circuitPid, (0, filters_1.vaultDepositorFilter)(owner));
26
26
  if (depositAccounts.length === 0)
27
27
  return [];
28
- const tokenPrices = yield cache.getTokenPrices([solana_1.usdcSolanaMint, constants_1.jitoSOLMint], portfolio_core_1.NetworkId.solana);
28
+ const vaultsInfo = yield cache.getItems(depositAccounts.map((deposit) => deposit.vault.toString()), { prefix: constants_1.prefixVaults, networkId: portfolio_core_1.NetworkId.solana });
29
+ const vaultById = new Map();
30
+ for (const vaultInfo of vaultsInfo) {
31
+ if (vaultInfo)
32
+ vaultById.set(vaultInfo.pubkey, vaultInfo);
33
+ }
34
+ const tokenPrices = yield cache.getTokenPrices(vaultsInfo.map((vault) => (vault ? vault.mint : [])).flat(), portfolio_core_1.NetworkId.solana);
29
35
  const tokenPriceById = new Map();
30
36
  tokenPrices.forEach((tp) => tp ? tokenPriceById.set(tp.address, tp) : undefined);
31
37
  const elements = [];
@@ -34,7 +40,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
34
40
  if (depositAccount.lastWithdrawRequest.value.isZero() &&
35
41
  depositAccount.netDeposits.isZero())
36
42
  continue;
37
- const vaultInfo = constants_1.nameOfVauilts.get(depositAccount.vault.toString());
43
+ const vaultInfo = vaultById.get(depositAccount.vault.toString());
38
44
  if (!vaultInfo)
39
45
  continue;
40
46
  const { decimals, name, mint } = vaultInfo;
@@ -42,7 +48,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
42
48
  let amountLeft = depositAccount.netDeposits.plus(depositAccount.cumulativeProfitShareAmount);
43
49
  if (!depositAccount.lastWithdrawRequest.value.isZero()) {
44
50
  amountLeft = amountLeft.minus(depositAccount.lastWithdrawRequest.value);
45
- assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(solana_1.usdcSolanaMint, depositAccount.lastWithdrawRequest.value
51
+ assets.push(Object.assign(Object.assign({}, (0, tokenPriceToAssetToken_1.default)(mint, depositAccount.lastWithdrawRequest.value
46
52
  .dividedBy(Math.pow(10, decimals))
47
53
  .toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice)), { attributes: {
48
54
  lockedUntil: depositAccount.lastWithdrawRequest.ts
@@ -51,7 +57,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
51
57
  .toNumber(),
52
58
  } }));
53
59
  }
54
- assets.push((0, tokenPriceToAssetToken_1.default)(solana_1.usdcSolanaMint, amountLeft.dividedBy(Math.pow(10, decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice));
60
+ assets.push((0, tokenPriceToAssetToken_1.default)(mint, amountLeft.dividedBy(Math.pow(10, decimals)).toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice));
55
61
  if (assets.length === 0)
56
62
  continue;
57
63
  elements.push({
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AAGpC,2CAKqB;AACrB,iDAAsD;AACtD,+CAA8E;AAC9E,uCAAiD;AACjD,uCAAiD;AACjD,qGAA6E;AAC7E,8DAAsD;AAEtD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,eAAe,GAAG,MAAM,IAAA,iCAAwB,EACpD,MAAM,EACN,8BAAoB,EACpB,sBAAU,EACV,IAAA,8BAAoB,EAAC,KAAK,CAAC,CAC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,CAAC,EAAE;yBAC/C,KAAK,CAAC,IAAI,CAAC;yBACX,IAAI,CAAC,0BAAS,CAAC;yBACf,QAAQ,EAAE;iBACd,IACD,CAAC;QACL,CAAC;QACD,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,IAAI,EACJ,UAAU,CAAC,SAAS,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAA,CAAC,CAAC,QAAQ,EAAE,EAC/C,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CAAC;QACF,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAElC,QAAQ,CAAC,IAAI,CAAC;YACZ,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,IAAI;YACJ,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,3 +1,4 @@
1
1
  import { GetProgramAccountsFilter } from '@solana/web3.js';
2
2
  export declare const vaultsFilter: GetProgramAccountsFilter[];
3
3
  export declare const vaultDepositorFilter: (owner: string) => GetProgramAccountsFilter[];
4
+ export declare const vaultFilter: GetProgramAccountsFilter[];
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.vaultDepositorFilter = exports.vaultsFilter = void 0;
3
+ exports.vaultFilter = exports.vaultDepositorFilter = exports.vaultsFilter = void 0;
4
4
  const structs_1 = require("./structs");
5
5
  exports.vaultsFilter = [
6
6
  { dataSize: structs_1.vaultStruct.byteSize },
@@ -15,4 +15,7 @@ const vaultDepositorFilter = (owner) => [
15
15
  },
16
16
  ];
17
17
  exports.vaultDepositorFilter = vaultDepositorFilter;
18
+ exports.vaultFilter = [
19
+ { dataSize: structs_1.vaultStruct.byteSize },
20
+ ];
18
21
  //# sourceMappingURL=filters.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/filters.ts"],"names":[],"mappings":";;;AACA,uCAA8D;AAEjD,QAAA,YAAY,GAA+B;IACtD,EAAE,QAAQ,EAAE,qBAAW,CAAC,QAAQ,EAAE;CACnC,CAAC;AAEK,MAAM,oBAAoB,GAAG,CAClC,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,8BAAoB,CAAC,QAAQ,EAAE;IAC3C;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAVW,QAAA,oBAAoB,wBAU/B"}
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/filters.ts"],"names":[],"mappings":";;;AACA,uCAA8D;AAEjD,QAAA,YAAY,GAA+B;IACtD,EAAE,QAAQ,EAAE,qBAAW,CAAC,QAAQ,EAAE;CACnC,CAAC;AAEK,MAAM,oBAAoB,GAAG,CAClC,KAAa,EACe,EAAE,CAAC;IAC/B,EAAE,QAAQ,EAAE,8BAAoB,CAAC,QAAQ,EAAE;IAC3C;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;CACF,CAAC;AAVW,QAAA,oBAAoB,wBAU/B;AAEW,QAAA,WAAW,GAA+B;IACrD,EAAE,QAAQ,EAAE,qBAAW,CAAC,QAAQ,EAAE;CACnC,CAAC"}
@@ -6,7 +6,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.fetchers = exports.jobs = exports.platforms = void 0;
7
7
  const constants_1 = require("./constants");
8
8
  const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
9
+ const vaultsJob_1 = __importDefault(require("./vaultsJob"));
9
10
  exports.platforms = [constants_1.platform];
10
- exports.jobs = [];
11
+ exports.jobs = [vaultsJob_1.default];
11
12
  exports.fetchers = [depositsFetcher_1.default];
12
13
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,wEAAgD;AAEnC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,wEAAgD;AAChD,4DAAoC;AAEvB,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,mBAAS,CAAC,CAAC;AAC1B,QAAA,QAAQ,GAAc,CAAC,yBAAe,CAAC,CAAC"}
@@ -1,52 +1,6 @@
1
- /// <reference types="node" />
2
- type WithdrawRequest = {
3
- shares: string;
4
- value: string;
5
- ts: string;
6
- };
7
- type Vault = {
8
- buffer: Buffer;
9
- name: number[];
10
- pubkey: string;
11
- manager: string;
12
- tokenAccount: string;
13
- userStats: string;
14
- user: string;
15
- delegate: string;
16
- liquidationDelegate: string;
17
- userShares: string;
18
- totalShares: string;
19
- lastFeeUpdateTs: string;
20
- liquidationStartTs: string;
21
- redeemPeriod: string;
22
- totalWithdrawRequested: string;
23
- maxTokens: string;
24
- managementFee: string;
25
- initTs: string;
26
- netDeposits: string;
27
- managerNetDeposits: string;
28
- totalDeposits: string;
29
- totalWithdraws: string;
30
- managerTotalDeposits: string;
31
- managerTotalWithdraws: string;
32
- managerTotalFee: string;
33
- managerTotalProfitShare: string;
34
- minDepositAmount: string;
35
- lastManagerWithdrawRequest: WithdrawRequest;
36
- sharesBase: number;
37
- profitShare: number;
38
- hurdleRate: number;
39
- spotMarketIndex: number;
40
- bump: number;
41
- permissioned: boolean;
42
- padding: string[];
43
- };
44
- export type VaultEnhanced = Vault & {
45
- publicKey: string;
46
- };
47
1
  export type VaultInfo = {
2
+ pubkey: string;
48
3
  mint: string;
49
4
  decimals: number;
50
5
  name: string;
51
6
  };
52
- export {};
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const clients_1 = require("../../utils/clients");
14
+ const solana_1 = require("../../utils/solana");
15
+ const constants_1 = require("../drift/constants");
16
+ const constants_2 = require("./constants");
17
+ const filters_1 = require("./filters");
18
+ const structs_1 = require("./structs");
19
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
20
+ const client = (0, clients_1.getClientSolana)();
21
+ const vaults = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.vaultStruct, constants_2.circuitPid, filters_1.vaultFilter);
22
+ for (const vault of vaults) {
23
+ const name = (0, solana_1.u8ArrayToString)(vault.name);
24
+ const spotMarket = yield cache.getItem(vault.spotMarketIndex.toString(), {
25
+ prefix: constants_1.prefixSpotMarkets,
26
+ networkId: portfolio_core_1.NetworkId.solana,
27
+ });
28
+ if (!spotMarket)
29
+ continue;
30
+ const mint = spotMarket.mint.toString();
31
+ const { decimals } = spotMarket;
32
+ const pubkey = vault.pubkey.toString();
33
+ yield cache.setItem(pubkey, { pubkey, name, mint, decimals }, { prefix: constants_2.prefixVaults, networkId: portfolio_core_1.NetworkId.solana });
34
+ }
35
+ });
36
+ const job = {
37
+ id: `${constants_2.platformId}-vaults`,
38
+ executor,
39
+ label: 'normal',
40
+ };
41
+ exports.default = job;
42
+ //# sourceMappingURL=vaultsJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vaultsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/circuit/vaultsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA+E;AAC/E,kDAAuD;AACvD,2CAAmE;AACnE,uCAAwC;AACxC,uCAAwC;AAIxC,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,MAAM,GAAG,MAAM,IAAA,iCAAwB,EAC3C,MAAM,EACN,qBAAW,EACX,sBAAU,EACV,qBAAW,CACZ,CAAC;IAEF,KAAK,MAAM,KAAK,IAAI,MAAM,EAAE,CAAC;QAC3B,MAAM,IAAI,GAAG,IAAA,wBAAe,EAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QACzC,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,OAAO,CACpC,KAAK,CAAC,eAAe,CAAC,QAAQ,EAAE,EAChC;YACE,MAAM,EAAE,6BAAiB;YACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CACF,CAAC;QACF,IAAI,CAAC,UAAU;YAAE,SAAS;QAE1B,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC;QACxC,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,CAAC;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACvC,MAAM,KAAK,CAAC,OAAO,CACjB,MAAM,EACN,EAAE,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,EAChC,EAAE,MAAM,EAAE,wBAAY,EAAE,SAAS,EAAE,0BAAS,CAAC,MAAM,EAAE,CACtD,CAAC;IACJ,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -160,7 +160,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
160
160
  healthRatio,
161
161
  value,
162
162
  },
163
- name: (0, helpers_1.decodeName)(userAccount.name),
163
+ name: (0, solana_1.u8ArrayToString)(userAccount.name),
164
164
  });
165
165
  }
166
166
  return elements;
@@ -1 +1 @@
1
- {"version":3,"file":"deposits.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/deposits.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAUoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA0E;AAC1E,qCAIkB;AAClB,uCAOmB;AAEnB,+CAAmE;AACnE,iDAAsD;AACtD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,gBAAgB,GAAG,MAAM,KAA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d,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;YACD,IAAI,EAAE,IAAA,wBAAe,EAAC,WAAW,CAAC,IAAI,CAAC;SACxC,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -20,7 +20,6 @@ export declare function calculateBorrowRate(bank: SpotMarket): BigNumber;
20
20
  export declare function calculateDepositRate(bank: SpotMarket): BigNumber;
21
21
  export declare function calculateInterestRate(bank: SpotMarket, delta?: BigNumber): BigNumber;
22
22
  export declare function isSpotPositionAvailable(position: SpotPosition): boolean;
23
- export declare function decodeName(bytes: number[]): string;
24
23
  export declare function getUserAccountPublicKey(programId: PublicKey, owner: PublicKey, subAccountId: number): PublicKey;
25
24
  export declare function getUserMainAccountPublicKey(programId: PublicKey, owner: PublicKey): PublicKey;
26
25
  export declare function getUserAccountsPublicKeys(programId: PublicKey, owner: PublicKey, startId: number, endId: number): PublicKey[];
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getUserInsuranceFundStakeAccountPublicKey = exports.getUserAccountsPublicKeys = exports.getUserMainAccountPublicKey = exports.getUserAccountPublicKey = exports.decodeName = exports.isSpotPositionAvailable = exports.calculateInterestRate = exports.calculateDepositRate = exports.calculateBorrowRate = exports.calculateUtilization = exports.getSignedTokenAmount = exports.getTokenAmount = exports.divCeil = exports.CONCENTRATION_PRECISION = exports.PERCENTAGE_PRECISION = exports.PERCENTAGE_PRECISION_EXP = exports.SPOT_MARKET_RATE_PRECISION = exports.SPOT_MARKET_RATE_PRECISION_EXP = exports.SPOT_MARKET_UTILIZATION_PRECISION = exports.SPOT_MARKET_UTILIZATION_PRECISION_EXP = exports.QUOTE_SPOT_MARKET_INDEX = exports.TEN = exports.ONE = exports.ZERO = void 0;
6
+ exports.getUserInsuranceFundStakeAccountPublicKey = exports.getUserAccountsPublicKeys = exports.getUserMainAccountPublicKey = exports.getUserAccountPublicKey = exports.isSpotPositionAvailable = exports.calculateInterestRate = exports.calculateDepositRate = exports.calculateBorrowRate = exports.calculateUtilization = exports.getSignedTokenAmount = exports.getTokenAmount = exports.divCeil = exports.CONCENTRATION_PRECISION = exports.PERCENTAGE_PRECISION = exports.PERCENTAGE_PRECISION_EXP = exports.SPOT_MARKET_RATE_PRECISION = exports.SPOT_MARKET_RATE_PRECISION_EXP = exports.SPOT_MARKET_UTILIZATION_PRECISION = exports.SPOT_MARKET_UTILIZATION_PRECISION_EXP = exports.QUOTE_SPOT_MARKET_INDEX = exports.TEN = exports.ONE = exports.ZERO = void 0;
7
7
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
8
8
  const web3_js_1 = require("@solana/web3.js");
9
9
  const bn_js_1 = require("bn.js");
@@ -111,11 +111,6 @@ function isSpotPositionAvailable(position) {
111
111
  return position.scaledBalance.eq(exports.ZERO) && position.openOrders === 0;
112
112
  }
113
113
  exports.isSpotPositionAvailable = isSpotPositionAvailable;
114
- function decodeName(bytes) {
115
- const buffer = Buffer.from(bytes);
116
- return buffer.toString('utf8').trim();
117
- }
118
- exports.decodeName = decodeName;
119
114
  function getUserAccountPublicKey(programId, owner, subAccountId) {
120
115
  return web3_js_1.PublicKey.findProgramAddressSync([
121
116
  Buffer.from('user', 'utf8'),
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AACrC,6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CAAyC,CACvD,SAAoB,EACpB,KAAgB,EAChB,WAAmB;IAEnB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,sBAAsB,EAAE,MAAM,CAAC;QAC3C,KAAK,CAAC,QAAQ,EAAE;QAChB,IAAI,UAAE,CAAC,WAAW,CAAC,CAAC,WAAW,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;KACjD,EACD,SAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,8FAaC"}
@@ -19,7 +19,6 @@ const getLpTokenSource_1 = __importDefault(require("../../utils/misc/getLpTokenS
19
19
  const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
20
20
  const constants_1 = require("./constants");
21
21
  const structs_1 = require("./structs");
22
- const helpers_1 = require("../mango/helpers");
23
22
  const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
24
23
  const solana_1 = require("../../utils/solana");
25
24
  const constants_2 = require("../jupiter/constants");
@@ -97,7 +96,7 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
97
96
  });
98
97
  }
99
98
  // eslint-disable-next-line prefer-const
100
- let source = (0, getLpTokenSource_1.default)(portfolio_core_1.NetworkId.solana, constants_1.poolsPkeys[i].toString(), constants_1.platformId, (0, helpers_1.decodeName)(pool.name), { address: mint, decimals, supply }, assets);
99
+ let source = (0, getLpTokenSource_1.default)(portfolio_core_1.NetworkId.solana, constants_1.poolsPkeys[i].toString(), constants_1.platformId, (0, solana_1.u8ArrayToString)(pool.name), { address: mint, decimals, supply }, assets);
101
100
  source.price = pool.aumUsd
102
101
  .dividedBy(Math.pow(10, decimals))
103
102
  .dividedBy(supply)
@@ -1 +1 @@
1
- {"version":3,"file":"poolJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/poolJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAmE;AACnE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ACjB,QAAQ,EAAE,CAAC;QAEd,MAAM,KAAK,CAAC,OAAO,CAAC,sBAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,CAAC,EAAE;YACvE,MAAM,EAAE,sBAAU;YAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;QAEH,MAAM,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;IAC1C,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,OAAO;IACxB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -19,7 +19,7 @@ const clients_1 = require("../../utils/clients");
19
19
  const fetchTokenSupplyAndDecimals_1 = require("../../utils/solana/fetchTokenSupplyAndDecimals");
20
20
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
21
21
  const client = (0, clients_1.getClientSolana)();
22
- const banksAccount = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.bankStruct, constants_1.MangoProgram, filters_1.banksFilter);
22
+ const banksAccount = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.bankStruct, constants_1.mangoV4Pid, filters_1.banksFilter);
23
23
  if (!banksAccount)
24
24
  return;
25
25
  for (let index = 0; index < banksAccount.length; index++) {
@@ -1 +1 @@
1
- {"version":3,"file":"banksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/banksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAoE;AACpE,+CAA8D;AAC9D,qCAAsC;AACtC,uCAAwC;AACxC,uCAA0D;AAC1D,iDAAsD;AACtD,gGAA6F;AAE7F,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACj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SAAS,CAAC;gBACxB,GAAG,EAAE,SAAS;aACf;YACD,cAAc;YACd,YAAY,EAAE;gBACZ,GAAG,EAAE,IAAA,yBAAQ,EAAC,UAAU,CAAC;gBACzB,GAAG,EAAE,UAAU;aAChB;YACD,eAAe;YACf,UAAU,EAAV,sBAAU;YACV,QAAQ,EAAE,MAAM;SACjB,CAAC;QAEF,MAAM,KAAK,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,EAAE,IAAI,YAAY,EAAE,EAAE,IAAI,EAAE;YACpE,MAAM,EAAE,sCAAqB;YAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Job } from '../../Job';
2
+ declare const job: Job;
3
+ export default job;
@@ -0,0 +1,42 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
13
+ const constants_1 = require("./constants");
14
+ const solana_1 = require("../../utils/solana");
15
+ const struct_1 = require("./struct");
16
+ const filters_1 = require("./filters");
17
+ const clients_1 = require("../../utils/clients");
18
+ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
19
+ const client = (0, clients_1.getClientSolana)();
20
+ const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, struct_1.bankStruct, constants_1.boostProgramId, filters_1.boostBanksFilters);
21
+ const banksDetails = [];
22
+ for (let i = 0; i < accounts.length; i++) {
23
+ const account = accounts[i];
24
+ banksDetails.push({
25
+ mint: account.mint.toString(),
26
+ borrowIndex: account.borrowIndex.toString(),
27
+ depositIndex: account.depositIndex.toString(),
28
+ tokenIndex: account.tokenIndex,
29
+ });
30
+ }
31
+ yield cache.setItem(constants_1.boostBanksKey, banksDetails, {
32
+ prefix: constants_1.platformId,
33
+ networkId: portfolio_core_1.NetworkId.solana,
34
+ });
35
+ });
36
+ const job = {
37
+ id: `${constants_1.platformId}-boost-banks`,
38
+ executor,
39
+ label: 'normal',
40
+ };
41
+ exports.default = job;
42
+ //# sourceMappingURL=boostBanksJob.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boostBanksJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mango/boostBanksJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAwE;AACxE,+CAA8D;AAC9D,qCAAsC;AACtC,uCAA8C;AAC9C,iDAAsD;AAGtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAU,EACV,0BAAc,EACd,2BAAiB,CAClB,CAAC;IACF,MAAM,YAAY,GAAkB,EAAE,CAAC;IACvC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,MAAM,OAAO,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC5B,YAAY,CAAC,IAAI,CAAC;YAChB,IAAI,EAAE,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;YAC7B,WAAW,EAAE,OAAO,CAAC,WAAW,CAAC,QAAQ,EAAE;YAC3C,YAAY,EAAE,OAAO,CAAC,YAAY,CAAC,QAAQ,EAAE;YAC7C,UAAU,EAAE,OAAO,CAAC,UAAU;SAC/B,CAAC,CAAC;IACL,CAAC;IACD,MAAM,KAAK,CAAC,OAAO,CAAC,yBAAa,EAAE,YAAY,EAAE;QAC/C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,cAAc;IAC/B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;