@sonarwatch/portfolio-plugins 0.11.189 → 0.11.191

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. package/CHANGELOG.md +1505 -1497
  2. package/README.md +3 -3
  3. package/package.json +2 -2
  4. package/src/plugins/01/constants.d.ts +6 -1
  5. package/src/plugins/01/constants.js +21 -2
  6. package/src/plugins/01/constants.js.map +1 -1
  7. package/src/plugins/01/helpers.d.ts +0 -1
  8. package/src/plugins/01/helpers.js +3 -3
  9. package/src/plugins/01/helpers.js.map +1 -1
  10. package/src/plugins/aave/constants.js.map +1 -1
  11. package/src/plugins/aave/index.d.ts +2 -1
  12. package/src/plugins/aave/index.js +3 -1
  13. package/src/plugins/aave/index.js.map +1 -1
  14. package/src/plugins/aave/services.d.ts +30 -0
  15. package/src/plugins/aave/services.js +181 -0
  16. package/src/plugins/aave/services.js.map +1 -0
  17. package/src/plugins/aries/constants.d.ts +5 -2
  18. package/src/plugins/aries/constants.js +6 -3
  19. package/src/plugins/aries/constants.js.map +1 -1
  20. package/src/plugins/aries/depositsFetcher.js +102 -96
  21. package/src/plugins/aries/depositsFetcher.js.map +1 -1
  22. package/src/plugins/aries/helpers.d.ts +20 -1
  23. package/src/plugins/aries/helpers.js +94 -2
  24. package/src/plugins/aries/helpers.js.map +1 -1
  25. package/src/plugins/aries/reservesJob.js +1 -1
  26. package/src/plugins/aries/reservesJob.js.map +1 -1
  27. package/src/plugins/aries/types.d.ts +56 -33
  28. package/src/plugins/balancer/helpers/pools.js +21 -21
  29. package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
  30. package/src/plugins/jupiter/pricingJob.js +20 -1
  31. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  32. package/src/plugins/kamino/airdropFetcher.js +21 -46
  33. package/src/plugins/kamino/airdropFetcher.js.map +1 -1
  34. package/src/plugins/kamino/constants.d.ts +4 -0
  35. package/src/plugins/kamino/constants.js +5 -1
  36. package/src/plugins/kamino/constants.js.map +1 -1
  37. package/src/plugins/meteora/multiTokenPools.json +9 -0
  38. package/src/plugins/saber/constants.js +1 -1
  39. package/src/plugins/saber/constants.js.map +1 -1
  40. package/src/plugins/sushiswap/helpers.js +24 -24
  41. package/src/plugins/uniswap-v2/helpers.js +22 -22
  42. package/src/utils/aptos/getTableItemsByKeys.d.ts +1 -1
  43. package/src/utils/aptos/getTableItemsByKeys.js.map +1 -1
  44. package/src/utils/misc/getLpTokenSource.js +6 -0
  45. package/src/utils/misc/getLpTokenSource.js.map +1 -1
  46. package/src/utils/misc/getLpUnderlyingTokenSource.js +5 -4
  47. package/src/utils/misc/getLpUnderlyingTokenSource.js.map +1 -1
  48. package/src/utils/sei/constants.js +8 -8
  49. package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DASoC;AACpC,kDAA6C;AAC7C,gEAAqC;AAGrC,2CAA8D;AAE9D,uCAAoC;AACpC,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAA0C,MAAM,eAAK;SAClE,GAAG,CAAC,GAAG,kBAAM,gCAAgC,KAAK,IAAI,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;SAC1E,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACrB,IAAI,CAAC,UAAU,IAAI,CAAC,UAAU,CAAC,IAAI;QAAE,OAAO,EAAE,CAAC;IAE/C,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,OAAO,CAAoB,uBAAW,EAAE;QACnE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;KAC3B,CAAC,CAAC;IACH,MAAM,WAAW,GAAgC,IAAI,GAAG,EAAE,CAAC;IAC3D,IAAI,QAAQ,EAAE,CA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,UAAU;gBACrC,SAAS,EAAE,0BAAS,CAAC,KAAK;gBAC1B,UAAU,EAAV,sBAAU;gBACV,KAAK,EAAE,SAAS;gBAChB,KAAK;gBACL,IAAI;gBACJ,IAAI,EAAE;oBACJ,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,cAAc;oBACd,aAAa;oBACb,cAAc;oBACd,eAAe,EAAE,IAAI;oBACrB,WAAW,EAAE,CAAC,GAAG,IAAI,sBAAS,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,QAAQ,EAAE;oBAC7D,YAAY;oBACZ,WAAW;oBACX,KAAK;iBACN;aACF,CAAC,CAAC;QACL,CAAC;IACH,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AAGrC,2CAMqB;AAErB,uCAAuD;AACvD,qGAA6E;AAC7E,6CAAuD;AACvD,iDAAqD;AAErD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;;IACtE,MAAM,MAAM,GAAG,IAAA,wBAAc,GAAE,CAAC;IAEhC,kDAAkD;IAClD,MAAM,eAAe,GAAG,MAAM,IAAA,0BAAkB,EAC9C,MAAM,EACN,KAAK,EACL,+BAAmB,CACpB,CAAC;IACF,IAAI,CAAC,eAAe;QAAE,OAAO,EAAE,CAAC;IAChC,MAAM,iBAAiB,GAAG,eAAe,CAAC,eAAe,CAAC,IAAI,CAAC,GAAG,CAChE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAA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EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBACrB,WAAW;gBACX,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,SAAS,EAAE,0BAAS,CAAC,KAAK;IAC1B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
@@ -1,5 +1,24 @@
1
1
  import BigNumber from 'bignumber.js';
2
- import { Reserve } from './types';
2
+ import { Profile, Reserve } from './types';
3
+ import { AptosClient } from '../../utils/clients/types';
3
4
  export declare function getName(accountName: string): string;
4
5
  export declare function getBorrowApr(utilization: BigNumber, borrowedAmount: BigNumber, availableAmount: BigNumber, reserveData: Reserve): number;
5
6
  export declare function getDepositApr(utilization: BigNumber, borrowApr: number, reserveData: Reserve): number;
7
+ export declare function getProfileAmounts(profile: Profile | null, client: AptosClient): Promise<{
8
+ deposits: {
9
+ address: string;
10
+ amount: string;
11
+ }[];
12
+ borrows: {
13
+ address: string;
14
+ amount: string;
15
+ }[];
16
+ }>;
17
+ export declare function getProfileBorrows(profile: Profile | null, client: AptosClient): Promise<{
18
+ address: string;
19
+ amount: string;
20
+ }[]>;
21
+ export declare function getProfileDeposits(profile: Profile | null, client: AptosClient): Promise<{
22
+ address: string;
23
+ amount: string;
24
+ }[]>;
@@ -1,14 +1,39 @@
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.getDepositApr = exports.getBorrowApr = exports.getName = void 0;
15
+ exports.getProfileDeposits = exports.getProfileBorrows = exports.getProfileAmounts = exports.getDepositApr = exports.getBorrowApr = exports.getName = void 0;
7
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const aptos_1 = require("../../utils/aptos");
18
+ const constants_1 = require("./constants");
8
19
  function getName(accountName) {
9
- return accountName.replace('profile', '');
20
+ if (accountName.startsWith('profile'))
21
+ return accountName.slice(7);
22
+ return accountName;
10
23
  }
11
24
  exports.getName = getName;
25
+ function hex2a(hex) {
26
+ let hexx = hex;
27
+ if (hex.startsWith('0x'))
28
+ hexx = hexx.slice(2);
29
+ let str = '';
30
+ for (let i = 0; i < hexx.length; i += 2)
31
+ str += String.fromCharCode(parseInt(hexx.substring(i, i + 2), 16));
32
+ return str;
33
+ }
34
+ function getTokenAddress(vec) {
35
+ return `${vec.account_address}::${hex2a(vec.module_name)}::${hex2a(vec.struct_name)}`;
36
+ }
12
37
  function getBorrowApr(utilization, borrowedAmount, availableAmount, reserveData) {
13
38
  const interestRateConfig = reserveData.value.interest_rate_config;
14
39
  const optimalUtilization = interestRateConfig.optimal_utilization / 100;
@@ -43,4 +68,71 @@ function getDepositApr(utilization, borrowApr, reserveData) {
43
68
  .toNumber();
44
69
  }
45
70
  exports.getDepositApr = getDepositApr;
71
+ function getProfileAmounts(profile, client) {
72
+ return __awaiter(this, void 0, void 0, function* () {
73
+ const [deposits, borrows] = yield Promise.all([
74
+ getProfileDeposits(profile, client),
75
+ getProfileBorrows(profile, client),
76
+ ]);
77
+ return {
78
+ deposits,
79
+ borrows,
80
+ };
81
+ });
82
+ }
83
+ exports.getProfileAmounts = getProfileAmounts;
84
+ function getProfileBorrows(profile, client) {
85
+ return __awaiter(this, void 0, void 0, function* () {
86
+ const head = profile === null || profile === void 0 ? void 0 : profile.borrowed_reserves.head.vec.at(0);
87
+ const handle = profile === null || profile === void 0 ? void 0 : profile.borrowed_reserves.inner.inner.handle;
88
+ if (!head || !handle)
89
+ return [];
90
+ let nextVec = head;
91
+ let profileItem;
92
+ const amounts = [];
93
+ while (nextVec) {
94
+ profileItem = yield (0, aptos_1.getTableItem)(client, handle, {
95
+ key_type: '0x1::type_info::TypeInfo',
96
+ value_type: `${constants_1.packageId}::iterable_table::IterableValue<0x1::type_info::TypeInfo, ${constants_1.packageId}::profile::Loan>`,
97
+ key: nextVec,
98
+ });
99
+ if (profileItem) {
100
+ amounts.push({
101
+ address: getTokenAddress(nextVec),
102
+ amount: profileItem.val.borrowed_share.val,
103
+ });
104
+ }
105
+ nextVec = profileItem === null || profileItem === void 0 ? void 0 : profileItem.next.vec.at(0);
106
+ }
107
+ return amounts;
108
+ });
109
+ }
110
+ exports.getProfileBorrows = getProfileBorrows;
111
+ function getProfileDeposits(profile, client) {
112
+ return __awaiter(this, void 0, void 0, function* () {
113
+ const head = profile === null || profile === void 0 ? void 0 : profile.deposited_reserves.head.vec.at(0);
114
+ const handle = profile === null || profile === void 0 ? void 0 : profile.deposited_reserves.inner.inner.handle;
115
+ if (!head || !handle)
116
+ return [];
117
+ let nextVec = head;
118
+ let profileItem;
119
+ const amounts = [];
120
+ while (nextVec) {
121
+ profileItem = yield (0, aptos_1.getTableItem)(client, handle, {
122
+ key_type: '0x1::type_info::TypeInfo',
123
+ value_type: `${constants_1.packageId}::iterable_table::IterableValue<0x1::type_info::TypeInfo, ${constants_1.packageId}::profile::Deposit>`,
124
+ key: nextVec,
125
+ });
126
+ if (profileItem) {
127
+ amounts.push({
128
+ address: getTokenAddress(nextVec),
129
+ amount: profileItem.val.collateral_amount,
130
+ });
131
+ }
132
+ nextVec = profileItem === null || profileItem === void 0 ? void 0 : profileItem.next.vec.at(0);
133
+ }
134
+ return amounts;
135
+ });
136
+ }
137
+ exports.getProfileDeposits = getProfileDeposits;
46
138
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/helpers.ts"],"names":[],"mappings":";;;;;;AAAA,gEAAqC;AAGrC,SAAgB,OAAO,CAAC,WAAmB;IACzC,OAAO,WAAW,CAAC,OAAO,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC;AAC5C,CAAC;AAFD,0BAEC;AAED,SAAgB,YAAY,CAC1B,WAAsB,EACtB,cAAyB,EACzB,eAA0B,EAC1B,WAAoB;IAEpB,MAAM,kBAAkB,GAAG,WAAW,CAAC,KAAK,CAAC,oBAAoB,CAAC;IAClE,MAAM,kBAAkB,GAAG,kBAAkB,CAAC,mBAAmB,GAAG,GAAG,CAAC;IACxE,MAAM,WAAW,GAAG,kBAAkB,CAAC,mBAAmB,GAAG,GAAG,CAAC;IACjE,MAAM,OAAO,GAAG,kBAAkB,CAAC,eAAe,GAAG,GAAG,CAAC;IACzD,MAAM,OAAO,GAAG,kBAAkB,CAAC,eAAe,GAAG,GAAG,CAAC;IAEzD,IAAI,cAAc,CAAC,MAAM,EAAE;QAAE,OAAO,OAAO,CAAC;IAC5C,IAAI,eAAe,CAAC,MAAM,EAAE;QAAE,OAAO,OAAO,CAAC;IAE7C,IAAI,WAAW,CAAC,UAAU,CAAC,kBAAkB,CAAC,EAAE,CAAC;QAC/C,MAAM,gBAAgB,GAAG,WAAW,CAAC;QACrC,MAAM,cAAc,GAAG,kBAAkB,CAAC;QAC1C,OAAO,gBAAgB;aACpB,SAAS,CAAC,cAAc,CAAC;aACzB,KAAK,CAAC,WAAW,CAAC;aAClB,QAAQ,EAAE,CAAC;IAChB,CAAC;IACD,MAAM,gBAAgB,GAAG,WAAW,CAAC,KAA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,MAAM,EAAE,MAAM,EAAE;gBACnE,QAAQ,EAAE,0BAA0B;gBACpC,UAAU,EAAE,GAAG,qBAAS,6DAA6D,qBAAS,qBAAqB;gBACnH,GAAG,EAAE,OAAO;aACb,CAAC,CAAC;YACH,IAAI,WAAW,EAAE,CAAC;gBAChB,OAAO,CAAC,IAAI,CAAC;oBACX,OAAO,EAAE,eAAe,CAAC,OAAO,CAAC;oBACjC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,iBAAiB;iBAC1C,CAAC,CAAC;YACL,CAAC;YACD,OAAO,GAAG,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;QACxC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC;CAAA;AA1BD,gDA0BC"}
@@ -19,7 +19,7 @@ const constants_1 = require("./constants");
19
19
  const helpers_1 = require("./helpers");
20
20
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
21
21
  const reservesRes = yield axios_1.default
22
- .get(`${constants_1.apiUrl}reserve.current`)
22
+ .get(constants_1.reserveApiUrl)
23
23
  .catch(() => null);
24
24
  if (!reservesRes)
25
25
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"reservesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/aries/reservesJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,+DAKoC;AAGpC,2CAA8D;AAE9D,uCAAwD;AAExD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,WAAW,GAA0C,MAAM,eAAK;SACnE,GAAG,CAAC,GAAG,kBAAM,iBAAiB,CAAC;SAC/B,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IAErB,IAAI,CAAC,WAAW;QAAE,OAAO;IACzB,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,MAAM,KAAK,G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,KAAK,CAAC,OAAO,CAAC,uBAAW,EAAE,gBAAgB,EAAE;QAC3C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,KAAK;KAC3B,CAAC,CACH,CAAC;IAEF,MAAM,OAAO,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;AACrC,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,WAAW;IAC5B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -1,41 +1,64 @@
1
1
  import { BorrowLendRate } from '@sonarwatch/portfolio-core';
2
- export type ProfileResponse = {
3
- result: {
4
- data: ProfileData;
2
+ export type ProfilesSummary = {
3
+ profile_signers: {
4
+ data: [
5
+ {
6
+ key: string;
7
+ value: {
8
+ account: string;
9
+ };
10
+ }
11
+ ];
5
12
  };
6
13
  };
7
- export type ProfileData = {
8
- profiles: {
9
- [accountName: string]: {
10
- id: string;
11
- meta: {
12
- module: string;
13
- owner: string;
14
- version: number;
15
- timestamp: string;
16
- };
17
- profileAddress: string;
18
- deposits: {
19
- [coin: string]: {
20
- collateral_amount: string;
21
- collateral_coins: string;
22
- collateral_value: string;
23
- };
24
- };
25
- borrows: {
26
- [coin: string]: {
27
- borrowed_amount: string;
28
- borrowed_coins: string;
29
- borrowed_value: string;
30
- };
31
- };
32
- equity: string;
33
- collateralValue: string;
34
- loanValue: string;
35
- riskFactor: string;
14
+ export type Profile = {
15
+ borrow_farms: ProfileSub;
16
+ borrowed_reserves: ProfileSub;
17
+ deposit_farms: ProfileSub;
18
+ deposited_reserves: ProfileSub;
19
+ };
20
+ export type ProfileVec = {
21
+ account_address: string;
22
+ module_name: string;
23
+ struct_name: string;
24
+ };
25
+ export type ProfileSub = {
26
+ head: {
27
+ vec: ProfileVec[];
28
+ };
29
+ inner: {
30
+ inner: {
31
+ handle: string;
32
+ };
33
+ length: string;
34
+ };
35
+ tail: {
36
+ vec: ProfileVec[];
37
+ };
38
+ };
39
+ export type ProfileDepositItem = {
40
+ next: {
41
+ vec: [ProfileVec] | [];
42
+ };
43
+ prev: {
44
+ vec: [ProfileVec] | [];
45
+ };
46
+ val: {
47
+ collateral_amount: string;
48
+ };
49
+ };
50
+ export type ProfileBorrowItem = {
51
+ next: {
52
+ vec: [ProfileVec] | [];
53
+ };
54
+ prev: {
55
+ vec: [ProfileVec] | [];
56
+ };
57
+ val: {
58
+ borrowed_share: {
59
+ val: string;
36
60
  };
37
61
  };
38
- total_equity: string;
39
62
  };
40
63
  export type ReserveResponse = {
41
64
  result: {
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
36
36
  const graphql_request_1 = __importStar(require("graphql-request"));
37
37
  function getBalancerPoolsV2(url) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
- const query = (0, graphql_request_1.gql) `
40
- query pools {
41
- pools(
42
- first: 1000
43
- orderBy: totalLiquidity
44
- orderDirection: desc
45
- where: { totalLiquidity_gt: "500" }
46
- ) {
47
- id
48
- address
49
- symbol
50
- totalLiquidity
51
- totalShares
52
- tokens {
53
- balance
54
- decimals
55
- symbol
56
- address
57
- }
58
- }
59
- }
39
+ const query = (0, graphql_request_1.gql) `
40
+ query pools {
41
+ pools(
42
+ first: 1000
43
+ orderBy: totalLiquidity
44
+ orderDirection: desc
45
+ where: { totalLiquidity_gt: "500" }
46
+ ) {
47
+ id
48
+ address
49
+ symbol
50
+ totalLiquidity
51
+ totalShares
52
+ tokens {
53
+ balance
54
+ decimals
55
+ symbol
56
+ address
57
+ }
58
+ }
59
+ }
60
60
  `;
61
61
  const res = yield (0, graphql_request_1.default)(url, query);
62
62
  const pools = res.pools;
@@ -1 +1 @@
1
- {"version":3,"file":"allocationsFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/allocationsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,kDA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AC;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,sBAAU;YACtB,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,sBAAU,aAAa;IAC9B,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;AAE7C,gEAAqC;AAGrC,oDAAyD;AAEzD,wCAA+C;AAC/C,wGAAgF;AAChF,uCAA8C;AAC9C,2CAA+E;AAC/E,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,EAAE,CAAC;YACnC,OAAO,eAAK;iBACT,GAAG,CAAC,GAAG,qBAAS,IAAI,IAAI,CAAC,IAAI,IAAI,KAAK,EAAE,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC;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AO,CAAC"}
@@ -17,11 +17,11 @@ const constants_2 = require("../tokens/constants");
17
17
  const getMultipleDecimalsAsMap_1 = require("../../utils/solana/getMultipleDecimalsAsMap");
18
18
  const clients_1 = require("../../utils/clients");
19
19
  const mints = [
20
- 'HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX', // SolanaHub staked SOL
21
20
  'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu', // xLifinity
22
21
  'BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR', // Banx
23
22
  '4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs', // Parcl
24
23
  'SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s', // Shark
24
+ 'KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS', // Kamino
25
25
  'DdFPRnccQqLD4zCHrBqdY95D6hvw6PLWp9DEXj1fLCL9', // Wrapped USDC (Allbridge from Ethereum)
26
26
  'eqKJTf1Do4MDPyKisMYqVaUFpkEFAs3riGF3ceDH2Ca', // Wrapped USDC (Allbridge from Polygon)
27
27
  '8Yv9Jz4z7BUHP68dz8E8m3tMe6NKgpMUKn8KVqrPA6Fr', // Wrapped USDC (Allbridge from Avalanche)
@@ -37,6 +37,25 @@ const mints = [
37
37
  '5RpUwQ8wtdPCZHhu6MERp2RGrpobsbZ6MH5dDHkUjs2', // BUSD Token (Wormhole from BSC)
38
38
  'FCqfQSujuPxy6V42UvafBhsysWtEq1vhjfMN1PUbgaxA', // USD Coin (Wormhole from BSC)
39
39
  '8qJSyQprMC57TWKaYEmetUR3UUiTP2M3hXdcvFhkZdmv', // Tether USD (Wormhole from BSC)
40
+ // Sanctum / LSTs
41
+ 'HUBsveNpjo5pWqNkH57QzxjQASdTVXcSK7bVKTSZtcSX',
42
+ 'pWrSoLAhue6jUxUkbWgmEy5rD9VJzkFmvfTDV5KgNuu',
43
+ 'st8QujHLPsX3d6HG9uQg9kJ91jFxUgruwsb1hyYXSNd',
44
+ 'strng7mqqc1MBJJV6vMzYbEqnwVGvKKGKedeCvtktWA',
45
+ 'suPer8CPwxoJPQ7zksGMwFvjBQhjAHwUMmPV4FVatBw',
46
+ 'vSoLxydx6akxyMD9XEcPvGYNGq6Nn66oqVb3UkGkei7',
47
+ 'Zippybh3S5xYYam2nvL6hVJKz1got6ShgV4DyD1XQYF',
48
+ 'CgnTSoL3DgY9SFHxcLj6CgCgKKoTBr6tp4CPAEWy25DE',
49
+ 'GRJQtWwdJmp5LLpy8JWjPgn5FnLyqSJGNhn5ZnCTFUwM',
50
+ 'edge86g9cVz87xcpKpy3J77vbp4wYd9idEV562CCntt',
51
+ 'he1iusmfkpAdwvxLNGV8Y1iSbj4rUy6yMhEA3fotn9A',
52
+ 'pathdXw4He1Xk3eX84pDdDZnGKEme3GivBamGCVPZ5a',
53
+ '7Q2afV64in6N6SeZsAAB81TJzwDoD6zpqmHkzi9Dcavn',
54
+ 'jupSoLaHXQiZZTSfEWMTRRgpnyFm8f6sZdosWBjx93v',
55
+ 'LnTRntk2kTfWEY6cVB8K9649pgJbt6dJLS1Ns1GZCWg',
56
+ 'phaseZSfPxTDBpiVb96H4XFSD8xHeHxZre5HerehBJG',
57
+ 'picobAEvs6w7QEknPce34wAE4gknZA9v5tTonnmHYdX',
58
+ 'pumpkinsEq8xENVZE6QgTS93EN4r9iKvNxNALS1ooyp',
40
59
  ];
41
60
  const vsToken = portfolio_core_1.solanaNativeWrappedAddress;
42
61
  const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
@@ -1 +1 @@
1
- {"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,oDAAkD;AAClD,uCAA6C;AAC7C,mDAA2D;AAC3D,0FAAuF;AACvF,iDAAsD;AAEtD,MAAM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AAE,CAAC;IACvC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,IAAI,EAAE,EAAE;QAC7B,MAAM,QAAQ,GAAG,WAAW,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACvC,IAAI,CAAC,QAAQ;YAAE,OAAO;QACtB,MAAM,MAAM,GAAqB;YAC/B,OAAO,EAAE,IAAI;YACb,QAAQ;YACR,EAAE,EAAE,aAAa;YACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,aAAa,CAAC,KAAK,GAAG,KAAK;YAClC,UAAU,EAAE,gCAAoB,CAAC,EAAE;YACnC,MAAM,EAAE,GAAG;SACZ,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACvB,CAAC,CAAC,CAAC;IACH,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,QAAQ;IACR,KAAK,EAAE,WAAW;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
@@ -14,62 +14,37 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  const portfolio_core_1 = require("@sonarwatch/portfolio-core");
16
16
  const bignumber_js_1 = __importDefault(require("bignumber.js"));
17
+ const axios_1 = __importDefault(require("axios"));
17
18
  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`;
19
+ const helpers_1 = require("../jupiter/helpers");
20
+ const clients_1 = require("../../utils/clients");
21
+ const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
22
+ const kmnoFactor = new bignumber_js_1.default(Math.pow(10, constants_1.kmnoDecimals));
22
23
  const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
23
- const [premarketPrice, cachedAllocation] = yield Promise.all([
24
- cache.getItem(kmnkoPreMarketPriceKey, {
25
- prefix: constants_2.platformId,
26
- networkId: portfolio_core_1.NetworkId.solana,
27
- }),
28
- cache.getItem(owner, {
29
- prefix: constants_1.allocationPrefix,
30
- networkId: portfolio_core_1.NetworkId.solana,
31
- }),
32
- ]);
33
- let amount;
34
- if (cachedAllocation) {
35
- amount = new bignumber_js_1.default(cachedAllocation);
36
- }
37
- else {
38
- const allocations = yield (0, common_1.getAllocationsBySeason)(owner, 1);
39
- if (allocations) {
40
- amount = allocations
41
- .map((alloc) => new bignumber_js_1.default(alloc.quantity))
42
- .reduce((alloc, sum) => sum.plus(alloc), new bignumber_js_1.default(0));
43
- yield cache.setItem(owner, amount.toNumber(), {
44
- prefix: constants_1.allocationPrefix,
45
- networkId: portfolio_core_1.NetworkId.solana,
46
- ttl: oneDayInMs,
47
- });
48
- }
49
- }
50
- if (!amount || amount.isZero())
24
+ const allocation = yield axios_1.default
25
+ .get(constants_1.distributorApi + owner)
26
+ .catch(() => null);
27
+ if (!allocation)
51
28
  return [];
52
- const asset = {
53
- networkId: portfolio_core_1.NetworkId.solana,
54
- type: 'generic',
55
- value: !premarketPrice ? null : amount.times(premarketPrice).toNumber(),
56
- data: {
57
- name: 'KMNO',
58
- amount: amount.toNumber(),
59
- price: premarketPrice || null,
60
- imageUri: constants_1.platform.image,
61
- },
62
- attributes: { isClaimable: false },
63
- };
29
+ const pda = (0, helpers_1.deriveClaimStatus)(owner, allocation.data.merkle_tree, constants_1.distributorProgram);
30
+ const client = (0, clients_1.getClientSolana)();
31
+ const claimStatus = yield client.getAccountInfo(pda);
32
+ if (claimStatus)
33
+ return [];
34
+ const kmnoTokenPrice = yield cache.getTokenPrice(constants_1.kmnoMint, portfolio_core_1.NetworkId.solana);
35
+ const amount = (0, bignumber_js_1.default)(allocation.data.amount)
36
+ .dividedBy(kmnoFactor)
37
+ .toNumber();
38
+ const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.kmnoMint, amount, portfolio_core_1.NetworkId.solana, kmnoTokenPrice, undefined, { isClaimable: true });
64
39
  return [
65
40
  {
66
- value: asset.value,
67
41
  type: portfolio_core_1.PortfolioElementType.multiple,
68
42
  platformId: constants_1.platformId,
69
- name: 'Season 1 Allocation',
43
+ name: 'Season 1 Airdrop',
70
44
  networkId: portfolio_core_1.NetworkId.solana,
71
45
  label: 'Rewards',
72
46
  data: { assets: [asset] },
47
+ value: asset.value,
73
48
  },
74
49
  ];
75
50
  });
@@ -1 +1 @@
1
- {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAAqE;AACrE,kDAG4B;AAC5B,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,KAAY,EAAE,EAAE;IACtE,MAAM,CAAC,cAAc,EAAE,gBAAgB,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC3D,KAAK,CAAC,OAAO,CAAS,sBAAsB,EAAE;YAC5C,MAAM,EAAE,sBAAe;YACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;QACF,KAAK,CAAC,OAAO,CAAS,KAAK,EAAE;YAC3B,MAAM,EAAE,4BAAgB;YACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC;KACH,CAAC,CAAC;IAEH,IAAI,MAA6B,CAAC;IAClC,IAAI,gBAAgB,EAAE,CAAC;QACrB,MAAM,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,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"}
1
+ {"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AACrC,kDAA6C;AAG7C,2CAMqB;AACrB,gDAAuD;AAEvD,iDAAsD;AACtD,qGAA6E;AAE7E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,wBAAY,CAAA,CAAC,CAAC;AACrD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAA6C,MAAM,eAAK;SACrE,GAAG,CAAC,0BAAc,GAAG,KAAK,CAAC;SAC3B,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACrB,IAAI,CAAC,UAAU;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,GAAG,GAAG,IAAA,2BAAiB,EAC3B,KAAK,EACL,UAAU,CAAC,IAAI,CAAC,WAAW,EAC3B,8BAAkB,CACnB,CAAC;IAEF,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IACjC,MAAM,WAAW,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC;IACrD,IAAI,WAAW;QAAE,OAAO,EAAE,CAAC;IAE3B,MAAM,cAAc,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,oBAAQ,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;IAE7E,MAAM,MAAM,GAAG,IAAA,sBAAS,EAAC,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC;SAC7C,SAAS,CAAC,UAAU,CAAC;SACrB,QAAQ,EAAE,CAAC;IACd,MAAM,KAAK,GAAmB,IAAA,gCAAsB,EAClD,oBAAQ,EACR,MAAM,EACN,0BAAS,CAAC,MAAM,EAChB,cAAc,EACd,SAAS,EACT,EAAE,WAAW,EAAE,IAAI,EAAE,CACtB,CAAC;IAEF,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,kBAAkB;YACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,EAAE,MAAM,EAAE,CAAC,KAAK,CAAC,EAAE;YACzB,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;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"}
@@ -3,8 +3,12 @@ import { Platform } from '@sonarwatch/portfolio-core';
3
3
  import { LendingMarketConfig } from './types';
4
4
  export declare const platformId = "kamino";
5
5
  export declare const platform: Platform;
6
+ export declare const kmnoMint = "KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS";
7
+ export declare const kmnoDecimals = 6;
6
8
  export declare const programId: PublicKey;
7
9
  export declare const allocationApiUrl = "https://api.hubbleprotocol.io/v2/airdrop/users/";
10
+ export declare const distributorApi = "https://api.kamino.finance/distributor/user/";
11
+ export declare const distributorProgram = "KdisqEcXbXKaTrBFqeDLhMmBvymLTwj9GmhDcdJyGat";
8
12
  export declare const allocationPrefix = "kamino/allocation";
9
13
  export declare const klendProgramId: PublicKey;
10
14
  export declare const farmProgramId: PublicKey;
@@ -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.allocationPrefix = exports.allocationApiUrl = exports.programId = exports.platform = exports.platformId = void 0;
3
+ exports.reservesKey = exports.marketsKey = exports.lendingConfigs = exports.mainMarket = exports.farmsKey = exports.farmProgramId = exports.klendProgramId = exports.allocationPrefix = exports.distributorProgram = exports.distributorApi = exports.allocationApiUrl = exports.programId = exports.kmnoDecimals = exports.kmnoMint = exports.platform = exports.platformId = void 0;
4
4
  const web3_js_1 = require("@solana/web3.js");
5
5
  exports.platformId = 'kamino';
6
6
  exports.platform = {
@@ -10,8 +10,12 @@ exports.platform = {
10
10
  website: 'https://kamino.finance/',
11
11
  defiLlamaId: 'parent#kamino-finance',
12
12
  };
13
+ exports.kmnoMint = 'KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS';
14
+ exports.kmnoDecimals = 6;
13
15
  exports.programId = new web3_js_1.PublicKey('6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc');
14
16
  exports.allocationApiUrl = 'https://api.hubbleprotocol.io/v2/airdrop/users/';
17
+ exports.distributorApi = 'https://api.kamino.finance/distributor/user/';
18
+ exports.distributorProgram = 'KdisqEcXbXKaTrBFqeDLhMmBvymLTwj9GmhDcdJyGat';
15
19
  exports.allocationPrefix = `${exports.platformId}/allocation`;
16
20
  exports.klendProgramId = new web3_js_1.PublicKey('KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD');
17
21
  exports.farmProgramId = new web3_js_1.PublicKey('FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr');
@@ -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,QAAQ,GAAa;IAChC,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,gBAAgB,GAC3B,iDAAiD,CAAC;AACvC,QAAA,gBAAgB,GAAG,GAAG,kBAAU,aAAa,CAAC;AAE9C,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,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,MAAM;IAC5D,OAAO,EAAE,yBAAyB;IAClC,WAAW,EAAE,uBAAuB;CACrC,CAAC;AAEW,QAAA,QAAQ,GAAG,6CAA6C,CAAC;AACzD,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,gBAAgB,GAC3B,iDAAiD,CAAC;AAEvC,QAAA,cAAc,GAAG,8CAA8C,CAAC;AAEhE,QAAA,kBAAkB,GAAG,6CAA6C,CAAC;AACnE,QAAA,gBAAgB,GAAG,GAAG,kBAAU,aAAa,CAAC;AAE9C,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"}
@@ -145,5 +145,14 @@
145
145
  "2vhaJumb3hbRLUSDDy3Qk8KGGfzqThdwo8ai4tAvztGh",
146
146
  "CC3FtDKTueNP1pmgtNWvKHZwbznyigSaiGhKsQYAfufD"
147
147
  ]
148
+ },
149
+ {
150
+ "symbol": "abUSDC-3Pool",
151
+ "address": "8d8CouP9qR1pk6nL9VKXcSbxswbH9vmDRUMBt4nhnADz",
152
+ "reserveAccounts": [
153
+ "FQYcwzmrW9k86AxBt8Zz72LRoVakRvjpdX9dXEJokqAS",
154
+ "DfeJ5Tq8mDxEoFPDHf3wBvZBWHUCRS5NN9GrZeWK3bqb",
155
+ "Bj1KkZSDyoRK2tyj7Wi7AWGD7sZVT7B5P8JWtiDRtFRR"
156
+ ]
148
157
  }
149
158
  ]
@@ -7,7 +7,7 @@ exports.platform = {
7
7
  name: 'Saber',
8
8
  image: 'https://sonar.watch/img/platforms/saber.png',
9
9
  defiLlamaId: 'saber',
10
- website: 'https://app.saber.so/',
10
+ website: 'https://saberdao.io/',
11
11
  };
12
12
  exports.SABER_SWAPS = 'https://raw.githubusercontent.com/saber-hq/saber-registry-dist/master/data/swaps.mainnet.json';
13
13
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,uBAAuB;CACjC,CAAC;AACW,QAAA,WAAW,GACtB,+FAA+F,CAAC"}
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/saber/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,OAAO;IACb,KAAK,EAAE,6CAA6C;IACpD,WAAW,EAAE,OAAO;IACpB,OAAO,EAAE,sBAAsB;CAChC,CAAC;AACW,QAAA,WAAW,GACtB,+FAA+F,CAAC"}