@sonarwatch/portfolio-plugins 0.11.165 → 0.11.167

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. package/CHANGELOG.md +1387 -1379
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/plugins/aries/depositsFetcher.js +1 -1
  5. package/src/plugins/aries/depositsFetcher.js.map +1 -1
  6. package/src/plugins/balancer/helpers/pools.js +21 -21
  7. package/src/plugins/banx/stakingFetcher.js +1 -1
  8. package/src/plugins/banx/stakingFetcher.js.map +1 -1
  9. package/src/plugins/bskt/vestingFetcher.js +3 -1
  10. package/src/plugins/bskt/vestingFetcher.js.map +1 -1
  11. package/src/plugins/drift/constants.d.ts +1 -0
  12. package/src/plugins/drift/constants.js +2 -1
  13. package/src/plugins/drift/constants.js.map +1 -1
  14. package/src/plugins/drift/index.js +2 -1
  15. package/src/plugins/drift/index.js.map +1 -1
  16. package/src/plugins/drift/premarketJob.d.ts +3 -0
  17. package/src/plugins/drift/premarketJob.js +52 -0
  18. package/src/plugins/drift/premarketJob.js.map +1 -0
  19. package/src/plugins/drift/struct.d.ts +150 -0
  20. package/src/plugins/drift/struct.js +149 -1
  21. package/src/plugins/drift/struct.js.map +1 -1
  22. package/src/plugins/drift/types.d.ts +4 -0
  23. package/src/plugins/flash/perpetualFetcher.js +1 -1
  24. package/src/plugins/flash/perpetualFetcher.js.map +1 -1
  25. package/src/plugins/jupiter/exchange/perpetualFetcher.js +2 -2
  26. package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -1
  27. package/src/plugins/jupiter/launchpad/allocationsFetcher.js +1 -1
  28. package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
  29. package/src/plugins/kamino/airdropFetcher.d.ts +3 -0
  30. package/src/plugins/kamino/airdropFetcher.js +80 -0
  31. package/src/plugins/kamino/airdropFetcher.js.map +1 -0
  32. package/src/plugins/kamino/constants.d.ts +2 -0
  33. package/src/plugins/kamino/constants.js +3 -1
  34. package/src/plugins/kamino/constants.js.map +1 -1
  35. package/src/plugins/kamino/helpers/common.d.ts +6 -0
  36. package/src/plugins/kamino/helpers/common.js +23 -1
  37. package/src/plugins/kamino/helpers/common.js.map +1 -1
  38. package/src/plugins/kamino/index.js +2 -1
  39. package/src/plugins/kamino/index.js.map +1 -1
  40. package/src/plugins/rain/helpers.js +1 -1
  41. package/src/plugins/rain/helpers.js.map +1 -1
  42. package/src/plugins/sushiswap/helpers.js +24 -24
  43. package/src/plugins/uniswap-v2/helpers.js +22 -22
  44. package/src/plugins/wormhole/helpers.js +1 -1
  45. package/src/plugins/wormhole/helpers.js.map +1 -1
  46. package/src/utils/sei/constants.js +8 -8
  47. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -3,3 +3,7 @@ export type SpotMarketEnhanced = SpotMarket & {
3
3
  depositApr: number;
4
4
  borrowApr: number;
5
5
  };
6
+ export type PreMarketPrice = {
7
+ id: string;
8
+ price: number;
9
+ };
@@ -124,7 +124,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
124
124
  networkId: portfolio_core_1.NetworkId.solana,
125
125
  value: pnl,
126
126
  attributes: {},
127
- data: { name: 'PNL ($)', amount: pnl },
127
+ data: { name: 'PNL ($)', amount: pnl, price: null },
128
128
  });
129
129
  // rewardAssets.push({
130
130
  // type: 'generic',
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,gGAA6F;AAC7F,6DAAwE;AACxE,mDAA8D;AAC9D,uCAAsD;AACtD,uCAA2C;AAE3C,yDAAmD;AAEnD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,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BACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,aAAa;IAC9B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -120,14 +120,14 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
120
120
  networkId: portfolio_core_1.NetworkId.solana,
121
121
  value: pnl,
122
122
  attributes: {},
123
- data: { name: 'PNL ($)', amount: pnl },
123
+ data: { name: 'PNL ($)', amount: pnl, price: null },
124
124
  });
125
125
  rewardAssets.push({
126
126
  type: 'generic',
127
127
  networkId: portfolio_core_1.NetworkId.solana,
128
128
  value: fees,
129
129
  attributes: {},
130
- data: { name: 'Fees O/C ($)', amount: fees },
130
+ data: { name: 'Fees O/C ($)', amount: fees, price: null },
131
131
  });
132
132
  if (suppliedAssets.length === 0 && borrowedAssets.length === 0)
133
133
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,oDAAyD;AACzD,kDAAiE;AACjE,wCAAuD;AAEvD,mGAAgG;AAChG,gEAA2E;AAC3E,sDAAiE;AACjE,2CAAuE;AACvE,uCAAiD;AAEjD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IAC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IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,oDAAyD;AACzD,kDAAiE;AACjE,wCAAuD;AAEvD,mGAAgG;AAChG,gEAA2E;AAC3E,sDAAiE;AACjE,2CAAuE;AACvE,uCAAiD;AAEjD,MAAM,SAAS,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,CAAC,CAAA,CAAC,CAAC;AACzC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,mBAAmB,GAAG,MAAM,IAAA,iCAAwB,EACxD,MAAM,EACN,wBAAc,EACd,0BAAc,EACd,IAAA,mCAAyB,EAAC,KAAK,CAAC,CACjC,CAAC;IACF,IACE,mBAAmB,CAAC,MAAM,KAAK,CAAC;QAChC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC;QAElE,OAAO,EAAE,CAAC;IAEZ,MAAM,iBAAiB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAgB,wBAAY,EAAE;QACzE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;IACH,IAAI,CAAC,iBAAiB;QAAE,OAAO,EAAE,CAAC;IAElC,MA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B,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;QAExE,MAAM,KAAK,GAAG,aAAa,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,CAAC;QACtE,MAAM,IAAI,GAAG,MAAM,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,CAAC;QAEvC,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,UAAU;YACjB,KAAK;YACL,IAAI,EAAE,GAAG,WAAW,IAAI,IAAI,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,GAAG;YAC5D,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBAErB,YAAY;gBACZ,WAAW;gBACX,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -27,7 +27,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
27
27
  const claimsProof = yield Promise.all(constants_1.airdropsInfo.map((info) => {
28
28
  if (info.claimUntilTs < Date.now())
29
29
  return axios_1.default
30
- .get(`${constants_1.merkleApi}/${info.mint}/${owner}`)
30
+ .get(`${constants_1.merkleApi}/${info.mint}/${owner}`, { timeout: 1000 })
31
31
  .catch(() => null);
32
32
  return null;
33
33
  }));
@@ -1 +1 @@
1
- {"version":3,"file":"allocationsFet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IACrB,CAAC;IAED,IAAI,MAAM,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAEnC,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,SAAS;YAChB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAE,kCAAsB;YAClC,IAAI,EAAE,YAAY;YAClB,IAAI,EAAE;gBACJ,MAAM;aACP;YACD,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,kCAAsB,aAAa;IAC1C,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"allocationsFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/allocationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,kDAA6C;AAC7C,6CAA4C;AAC5C,gEAAqC;AAGrC,oDAAyD;AAEzD,wCAA+C;AAC/C,wGAAgF;AAChF,uCAA8C;AAC9C,2CAMqB;AACrB,kDAAsE;AAEtE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GACf,MAAM,OAAO,CAAC,GAAG,CACf,wBAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE;QACxB,IAAI,IAAI,CAAC,YAAY,GAAG,IAAI,CAAC,GAAG,EAAE;YAChC,OAAO,eAAK;iBACT,GAAG,CAAC,GAAG,qBAAS,IAAI,IAAI,CAAC,IAAI,IAAI,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AAEF,kBAAe,OAAO,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Fetcher } from '../../Fetcher';
2
+ declare const fetcher: Fetcher;
3
+ export default fetcher;
@@ -0,0 +1,80 @@
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
+ var __importDefault = (this && this.__importDefault) || function (mod) {
12
+ return (mod && mod.__esModule) ? mod : { "default": mod };
13
+ };
14
+ Object.defineProperty(exports, "__esModule", { value: true });
15
+ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
+ const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const constants_1 = require("./constants");
18
+ const constants_2 = require("../drift/constants");
19
+ const common_1 = require("./helpers/common");
20
+ const oneDayInMs = 24 * 60 * 60 * 1000;
21
+ const kmnkoPreMarketPriceKey = `${constants_2.preMarketPriceKey}-KMNO`;
22
+ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
+ const premarketPrice = yield cache.getItem(kmnkoPreMarketPriceKey, {
24
+ prefix: constants_2.driftPlatform.id,
25
+ networkId: portfolio_core_1.NetworkId.solana,
26
+ });
27
+ const cachedAllocation = yield cache.getItem(owner, {
28
+ prefix: constants_1.allocationPrefix,
29
+ networkId: portfolio_core_1.NetworkId.solana,
30
+ });
31
+ let amount;
32
+ if (cachedAllocation) {
33
+ amount = new bignumber_js_1.default(cachedAllocation);
34
+ }
35
+ else {
36
+ const allocations = yield (0, common_1.getAllocationsBySeason)(owner, 1);
37
+ if (allocations) {
38
+ amount = allocations
39
+ .map((alloc) => new bignumber_js_1.default(alloc.quantity))
40
+ .reduce((alloc, sum) => sum.plus(alloc), new bignumber_js_1.default(0));
41
+ yield cache.setItem(owner, amount.toNumber(), {
42
+ prefix: constants_1.allocationPrefix,
43
+ networkId: portfolio_core_1.NetworkId.solana,
44
+ ttl: oneDayInMs,
45
+ });
46
+ }
47
+ }
48
+ if (!amount || amount.isZero())
49
+ return [];
50
+ const asset = {
51
+ networkId: portfolio_core_1.NetworkId.solana,
52
+ type: 'generic',
53
+ value: !premarketPrice ? null : amount.times(premarketPrice).toNumber(),
54
+ data: {
55
+ name: 'KMNO',
56
+ amount: amount.toNumber(),
57
+ price: premarketPrice || null,
58
+ imageUri: constants_1.kaminoPlatform.image,
59
+ },
60
+ attributes: { isClaimable: false },
61
+ };
62
+ return [
63
+ {
64
+ value: asset.value,
65
+ type: portfolio_core_1.PortfolioElementType.multiple,
66
+ platformId: constants_1.platformId,
67
+ name: 'Season 1 Allocation',
68
+ networkId: portfolio_core_1.NetworkId.solana,
69
+ label: 'Rewards',
70
+ data: { assets: [asset] },
71
+ },
72
+ ];
73
+ });
74
+ const fetcher = {
75
+ id: `${constants_1.platformId}-airdrop`,
76
+ networkId: portfolio_core_1.NetworkId.solana,
77
+ executor,
78
+ };
79
+ exports.default = fetcher;
80
+ //# sourceMappingURL=airdropFetcher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAA2E;AAC3E,kDAAsE;AACtE,6CAA0D;AAE1D,MAAM,UAAU,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC;AACvC,MAAM,sBAAsB,GAAG,GAAG,6BAAiB,OAAO,CAAC;AAE3D,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE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,SAAS;QACf,KAAK,EAAE,CAAC,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,QAAQ,EAAE;QACvE,IAAI,EAAE;YACJ,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,MAAM,CAAC,QAAQ,EAAE;YACzB,KAAK,EAAE,cAAc,IAAI,IAAI;YAC7B,QAAQ,EAAE,0BAAc,CAAC,KAAK;SAC/B;QACD,UAAU,EAAE,EAAE,WAAW,EAAE,KAAK,EAAE;KACnC,CAAC;IACF,OAAO;QACL;YACE,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,qBAAqB;YAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE;SAC1B;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -4,6 +4,8 @@ import { LendingMarketConfig } from './types';
4
4
  export declare const platformId = "kamino";
5
5
  export declare const kaminoPlatform: Platform;
6
6
  export declare const programId: PublicKey;
7
+ export declare const allocationApiUrl = "https://api.hubbleprotocol.io/v2/airdrop/users/";
8
+ export declare const allocationPrefix = "kamino/allocation";
7
9
  export declare const klendProgramId: PublicKey;
8
10
  export declare const farmProgramId: PublicKey;
9
11
  export declare const farmsKey = "farms";
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.programId = exports.kaminoPlatform = exports.platformId = void 0;
3
+ exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.allocationPrefix = exports.allocationApiUrl = exports.programId = exports.kaminoPlatform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'kamino';
6
6
  exports.kaminoPlatform = {
@@ -11,6 +11,8 @@ exports.kaminoPlatform = {
11
11
  defiLlamaId: 'parent#kamino-finance',
12
12
  };
13
13
  exports.programId = new web3_js_1.PublicKey('6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc');
14
+ exports.allocationApiUrl = 'https://api.hubbleprotocol.io/v2/airdrop/users/';
15
+ exports.allocationPrefix = `${exports.platformId}/allocation`;
14
16
  exports.klendProgramId = new web3_js_1.PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD');
15
17
  exports.farmProgramId = new web3_js_1.PublicKey('FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr');
16
18
  exports.farmsKey = 'farms';
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,cAAc,GAAa;IACtC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,MAAM;IAC5D,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,uBAAuB;CACrC,CAAC;AACW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,OAAO,CAAC;AACnB,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAE5D,QAAA,cAAc,GAAqC,IAAI,GAAG,CAAC;IACtE;QACE,8CAA8C;QAC9C;YACE,IAAI,EAAE,aAAa;YACnB,aAAa,EAAE;gBACb;oBACE,6CAA6C;oBAC7C,6CAA6C;iBAC9C;gBACD;oBACE,8CAA8C;oBAC9C,6CAA6C;iBAC9C;gBACD;oBACE,6CAA6C;oBAC7C,6CAA6C;iBAC9C;aACF;YACD,aAAa,EAAE;gBACb;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,6CAA6C;oBAC7C,8CAA8C;iBAC/C;gBACD;oBACE,6CAA6C;oBAC7C,8CAA8C;iBAC/C;gBACD;oBACE,6CAA6C;oBAC7C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;aACF;SACF;KACF;IACD,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC;IACxE,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;CAC9E,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,cAAc,GAAa;IACtC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,MAAM;IAC5D,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,uBAAuB;CACrC,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'../../../utils/solana';
2
2
  import { Reserve } from '../structs/klend';
3
3
  export declare function getEchangeRate(reserve: ParsedAccount<Reserve>): number;
4
+ type Allocation = {
5
+ quantity: string;
6
+ name: string;
7
+ };
8
+ export declare function getAllocationsBySeason(owner: string, season: 1 | 2): Promise<Allocation[] | undefined>;
9
+ export {};
@@ -1,11 +1,22 @@
1
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
+ };
2
11
  var __importDefault = (this && this.__importDefault) || function (mod) {
3
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
13
  };
5
14
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getEchangeRate = void 0;
15
+ exports.getAllocationsBySeason = exports.getEchangeRate = void 0;
7
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const axios_1 = __importDefault(require("axios"));
8
18
  const apr_1 = require("./apr");
19
+ const constants_1 = require("../constants");
9
20
  const INITIAL_COLLATERAL_RATE = 1;
10
21
  function getEchangeRate(reserve) {
11
22
  const totalSupply = new bignumber_js_1.default((0, apr_1.getTotalSupply)(reserve.liquidity).toString());
@@ -18,4 +29,15 @@ function getEchangeRate(reserve) {
18
29
  .toNumber();
19
30
  }
20
31
  exports.getEchangeRate = getEchangeRate;
32
+ function getAllocationsBySeason(owner, season) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ const res = yield axios_1.default
35
+ .get(`${constants_1.allocationApiUrl}${owner}/allocations?source=Season${season}`, {
36
+ timeout: 1000,
37
+ })
38
+ .catch(() => null);
39
+ return res ? res.data : undefined;
40
+ });
41
+ }
42
+ exports.getAllocationsBySeason = getAllocationsBySeason;
21
43
  //# sourceMappingURL=common.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/helpers/common.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAGrC,+BAAuC;AAEvC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,cAAc,CAAC,OAA+B;IAC5D,MAAM,WAAW,GAAG,IAAI,sBAAS,CAC/B,IAAA,oBAAc,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAC7C,CAAC;IACF,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAC/C,IAAI,eAAe,CAAC,MAAM,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACrD,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,sBAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;SAC7C,SAAS,CAAC,WAAW,CAAC;SACtB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAXD,wCAWC"}
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/kamino/helpers/common.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAG7C,+BAAuC;AACvC,4CAAgD;AAEhD,MAAM,uBAAuB,GAAG,CAAC,CAAC;AAElC,SAAgB,cAAc,CAAC,OAA+B;IAC5D,MAAM,WAAW,GAAG,IAAI,sBAAS,CAC/B,IAAA,oBAAc,EAAC,OAAO,CAAC,SAAS,CAAC,CAAC,QAAQ,EAAE,CAC7C,CAAC;IACF,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,UAAU,CAAC;IAC/C,IAAI,eAAe,CAAC,MAAM,EAAE,IAAI,WAAW,CAAC,MAAM,EAAE,EAAE,CAAC;QACrD,OAAO,uBAAuB,CAAC;IACjC,CAAC;IACD,OAAO,IAAI,sBAAS,CAAC,eAAe,CAAC,QAAQ,EAAE,CAAC;SAC7C,SAAS,CAAC,WAAW,CAAC;SACtB,QAAQ,EAAE,CAAC;AAChB,CAAC;AAXD,wCAWC;AAOD,SAAsB,sBAAsB,CAC1C,KAAa,EACb,MAAa;;QAEb,MAAM,GAAG,GAAuC,MAAM,eAAK;aACxD,GAAG,CAAC,GAAG,4BAAgB,GAAG,KAAK,6BAA6B,MAAM,EAAE,EAAE;YACrE,OAAO,EAAE,IAAI;SACd,CAAC;aACD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC;IACpC,CAAC;CAAA;AAVD,wDAUC"}
@@ -11,7 +11,8 @@ const reservesJob_1 = __importDefault(require("./reservesJob"));
11
11
  const marketsJob_1 = __importDefault(require("./marketsJob"));
12
12
  const lendsFetcher_1 = __importDefault(require("./lendsFetcher"));
13
13
  const farmsFetcher_1 = __importDefault(require("./farmsFetcher"));
14
+ const airdropFetcher_1 = __importDefault(require("./airdropFetcher"));
14
15
  exports.platforms = [constants_1.kaminoPlatform];
15
16
  exports.jobs = [poolsJob_1.default, reservesJob_1.default, farmsJob_1.default, marketsJob_1.default];
16
- exports.fetchers = [lendsFetcher_1.default, farmsFetcher_1.default];
17
+ exports.fetchers = [lendsFetcher_1.default, farmsFetcher_1.default, airdropFetcher_1.default];
17
18
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAA6C;AAC7C,0DAAkC;AAClC,0DAAkC;AAClC,gEAAwC;AACxC,8DAAsC;AACtC,kEAA0C;AAC1C,kEAA0C;AAE7B,QAAA,SAAS,GAAe,CAAC,0BAAc,CAAC,CAAC;AACzC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,qBAAW,EAAE,kBAAQ,EAAE,oBAAU,CAAC,CAAC;AAC5D,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,sBAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAA6C;AAC7C,0DAAkC;AAClC,0DAAkC;AAClC,gEAAwC;AACxC,8DAAsC;AACtC,kEAA0C;AAC1C,kEAA0C;AAC1C,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,0BAAc,CAAC,CAAC;AACzC,QAAA,IAAI,GAAU,CAAC,kBAAQ,EAAE,qBAAW,EAAE,kBAAQ,EAAE,oBAAU,CAAC,CAAC;AAC5D,QAAA,QAAQ,GAAc,CAAC,sBAAY,EAAE,sBAAY,EAAE,wBAAc,CAAC,CAAC"}
@@ -45,7 +45,7 @@ exports.getPoolPda = getPoolPda;
45
45
  function getLoans(owner) {
46
46
  return __awaiter(this, void 0, void 0, function* () {
47
47
  const getLoansRes = yield axios_1.default
48
- .get(`${constants_1.rainApi}/loans/user?pubkey=${owner}`)
48
+ .get(`${constants_1.rainApi}/loans/user?pubkey=${owner}`, { timeout: 1000 })
49
49
  .catch(() => null);
50
50
  if (!getLoansRes || getLoansRes.data.ongoingCount === 0)
51
51
  return [];
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/rain/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,6CAA4C;AAC5C,gEAAqC;AACrC,2CAAiD;AASjD,MAAM,MAAM,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,CAAC;AAEnC,SAAsB,OAAO,CAAC,IAAY;;QACxC,MA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sB,CACrC,CAAC,MAAM,CAAC,IAAI,CAAC,QAAQ,EAAE,OAAO,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,EAClD,qBAAS,CACV,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AALD,gCAKC;AAED,SAAsB,QAAQ,CAAC,KAAa;;QAC1C,MAAM,WAAW,GAAwC,MAAM,eAAK;aACjE,GAAG,CAAC,GAAG,mBAAO,sBAAsB,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;aAC/D,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,CAAC,WAAW,IAAI,WAAW,CAAC,IAAI,CAAC,YAAY,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QACnE,OAAO,WAAW,CAAC,IAAI,CAAC,KAAK,CAAC;IAChC,CAAC;CAAA;AAND,4BAMC;AAED,SAAgB,gBAAgB,CAAC,KAAW,EAAE,GAAS;IACrD,OAAO,IAAI,sBAAS,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;SAChC,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,CAAC;SACtB,SAAS,CAAC,MAAM,CAAC;SACjB,aAAa,CAAC,CAAC,EAAE,sBAAS,CAAC,UAAU,CAAC;SACtC,QAAQ,EAAE,CAAC;AAChB,CAAC;AAND,4CAMC"}
@@ -54,30 +54,30 @@ function sushiV3PairToUniV2(pair) {
54
54
  }
55
55
  function getV3PairsAddresses(url, length = 300) {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
- const query = (0, graphql_request_1.gql) `
58
- {
59
- pools(
60
- orderBy: totalValueLockedUSD
61
- first: ${length}
62
- orderDirection: desc
63
- where: { volumeUSD_not: "0", liquidity_not: "0" }
64
- ) {
65
- id
66
- token0Price
67
- token1Price
68
- liquidity
69
- token0 {
70
- id
71
- totalSupply
72
- decimals
73
- }
74
- token1 {
75
- id
76
- totalSupply
77
- decimals
78
- }
79
- }
80
- }
57
+ const query = (0, graphql_request_1.gql) `
58
+ {
59
+ pools(
60
+ orderBy: totalValueLockedUSD
61
+ first: ${length}
62
+ orderDirection: desc
63
+ where: { volumeUSD_not: "0", liquidity_not: "0" }
64
+ ) {
65
+ id
66
+ token0Price
67
+ token1Price
68
+ liquidity
69
+ token0 {
70
+ id
71
+ totalSupply
72
+ decimals
73
+ }
74
+ token1 {
75
+ id
76
+ totalSupply
77
+ decimals
78
+ }
79
+ }
80
+ }
81
81
  `;
82
82
  const res = yield (0, graphql_request_1.default)(url, query);
83
83
  const pools = res.pools;
@@ -40,28 +40,28 @@ function getPairKey(version) {
40
40
  exports.getPairKey = getPairKey;
41
41
  function getPairsV2FromTheGraph(url, length = 300) {
42
42
  return __awaiter(this, void 0, void 0, function* () {
43
- const query = (0, graphql_request_1.gql) `
44
- {
45
- pairs(
46
- orderBy: reserveUSD
47
- first: ${length}
48
- orderDirection: desc
49
- where: { trackedReserveETH_not: "0" }
50
- ) {
51
- id
52
- reserve0
53
- reserve1
54
- totalSupply
55
- token0 {
56
- id
57
- decimals
58
- }
59
- token1 {
60
- id
61
- decimals
62
- }
63
- }
64
- }
43
+ const query = (0, graphql_request_1.gql) `
44
+ {
45
+ pairs(
46
+ orderBy: reserveUSD
47
+ first: ${length}
48
+ orderDirection: desc
49
+ where: { trackedReserveETH_not: "0" }
50
+ ) {
51
+ id
52
+ reserve0
53
+ reserve1
54
+ totalSupply
55
+ token0 {
56
+ id
57
+ decimals
58
+ }
59
+ token1 {
60
+ id
61
+ decimals
62
+ }
63
+ }
64
+ }
65
65
  `;
66
66
  const res = yield (0, graphql_request_1.default)(url, query);
67
67
  const pairs = res.pairs;
@@ -32,7 +32,7 @@ function getAllocation(owner, network) {
32
32
  if (!extension)
33
33
  return 0;
34
34
  const allocationsRes = yield axios_1.default
35
- .get(`${constants_1.apiUrl}${owner}${extension}.json`)
35
+ .get(`${constants_1.apiUrl}${owner}${extension}.json`, { timeout: 1000 })
36
36
  .catch(() => null);
37
37
  return allocationsRes ? allocationsRes.data.amount : 0;
38
38
  });
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAsE;AACtE,kDAA6C;AAC7C,6CAA4C;AAC5C,2CAAqC;AAGrC,MAAM,wBAAwB,GAA+B,IAAI,GAAG,CAAC;IACnE,CAAC,0BAAS,CAAC,MAAM,EAAE,IAAI,CAAC;IACxB,CAAC,0BAAS,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC1B,CAAC,0BAAS,CAAC,OAAO,EAAE,IAAI,CAAC;IACzB,CAAC,0BAAS,CAAC,SAAS,EAAE,IAAI,CAAC;IAC3B,CAAC,0BAAS,CAAC,GAAG,EAAE,IAAI,CAAC;IACrB,CAAC,0BAAS,CAAC,GAAG,EAAE,KAAK,CAAC;IACtB,CAAC,0BAAS,CAAC,KAAK,EAAE,KAAK,CAAC;CACzB,CAAC,CAAC;AAEH,SAAsB,aAAa,CACjC,KAAa,EACb,OAAsB;;QAEtB,MAAM,SAAS,GAAG,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,SAAS;YAAE,OAAO,CAAC,CAAC;QAEzB,MAAM,cAAc,GAA6C,MAAM,eAAK;aACzE,GAAG,CAAC,GAAG,kBAAM,GAAG,KAAK,GAAG,SAAS,OAAO,CAAC;aACzC,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC;CAAA;AAZD,sCAYC;AAED,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,OAAO,IAAI,mBAAS,CAAC,8CAA8C,CAAC,CAAC;AACvE,CAAC;AAFD,4CAEC"}
1
+ {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/wormhole/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAAsE;AACtE,kDAA6C;AAC7C,6CAA4C;AAC5C,2CAAqC;AAGrC,MAAM,wBAAwB,GAA+B,IAAI,GAAG,CAAC;IACnE,CAAC,0BAAS,CAAC,MAAM,EAAE,IAAI,CAAC;IACxB,CAAC,0BAAS,CAAC,QAAQ,EAAE,IAAI,CAAC;IAC1B,CAAC,0BAAS,CAAC,OAAO,EAAE,IAAI,CAAC;IACzB,CAAC,0BAAS,CAAC,SAAS,EAAE,IAAI,CAAC;IAC3B,CAAC,0BAAS,CAAC,GAAG,EAAE,IAAI,CAAC;IACrB,CAAC,0BAAS,CAAC,GAAG,EAAE,KAAK,CAAC;IACtB,CAAC,0BAAS,CAAC,KAAK,EAAE,KAAK,CAAC;CACzB,CAAC,CAAC;AAEH,SAAsB,aAAa,CACjC,KAAa,EACb,OAAsB;;QAEtB,MAAM,SAAS,GAAG,wBAAwB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;QACxD,IAAI,CAAC,SAAS;YAAE,OAAO,CAAC,CAAC;QAEzB,MAAM,cAAc,GAA6C,MAAM,eAAK;aACzE,GAAG,CAAC,GAAG,kBAAM,GAAG,KAAK,GAAG,SAAS,OAAO,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;aAC5D,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;QAErB,OAAO,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC;IACzD,CAAC;CAAA;AAZD,sCAYC;AAED,SAAgB,gBAAgB,CAAC,KAAa;IAC5C,OAAO,IAAI,mBAAS,CAAC,8CAA8C,CAAC,CAAC;AACvE,CAAC;AAFD,4CAEC"}
@@ -1,16 +1,16 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.poolQueryMsg = exports.minterQueryMsg = exports.tokenInfoQueryMsg = exports.infoQueryMsg = void 0;
4
- exports.infoQueryMsg = JSON.parse(`{
5
- "info": {}
4
+ exports.infoQueryMsg = JSON.parse(`{
5
+ "info": {}
6
6
  }`);
7
- exports.tokenInfoQueryMsg = JSON.parse(`{
8
- "token_info": {}
7
+ exports.tokenInfoQueryMsg = JSON.parse(`{
8
+ "token_info": {}
9
9
  }`);
10
- exports.minterQueryMsg = JSON.parse(`{
11
- "minter": {}
10
+ exports.minterQueryMsg = JSON.parse(`{
11
+ "minter": {}
12
12
  }`);
13
- exports.poolQueryMsg = JSON.parse(`{
14
- "pool": {}
13
+ exports.poolQueryMsg = JSON.parse(`{
14
+ "pool": {}
15
15
  }`);
16
16
  //# sourceMappingURL=constants.js.map
@@ -1,10 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  function getQueryBalanceByOwner(owner) {
4
- return JSON.parse(`{
5
- "balance": {
6
- "address": "${owner}"
7
- }
4
+ return JSON.parse(`{
5
+ "balance": {
6
+ "address": "${owner}"
7
+ }
8
8
  }`);
9
9
  }
10
10
  exports.default = getQueryBalanceByOwner;