@sonarwatch/portfolio-plugins 0.14.151 → 0.14.153

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (184) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/package.json +1 -1
  3. package/src/plugins/allbridge/constants.d.ts +0 -6
  4. package/src/plugins/allbridge/constants.js +1 -9
  5. package/src/plugins/allbridge/constants.js.map +1 -1
  6. package/src/plugins/allbridge/helpers.d.ts +1 -1
  7. package/src/plugins/allbridge/helpers.js +1 -3
  8. package/src/plugins/allbridge/helpers.js.map +1 -1
  9. package/src/plugins/allbridge/positionsFetcher.js +2 -1
  10. package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
  11. package/src/plugins/allbridge/structs.d.ts +13 -0
  12. package/src/plugins/allbridge/structs.js +14 -0
  13. package/src/plugins/allbridge/structs.js.map +1 -0
  14. package/src/plugins/allbridge/types.d.ts +0 -6
  15. package/src/plugins/bonfida/constants.js +1 -1
  16. package/src/plugins/bonfida/constants.js.map +1 -1
  17. package/src/plugins/divvy/constants.d.ts +0 -2
  18. package/src/plugins/divvy/constants.js +1 -7
  19. package/src/plugins/divvy/constants.js.map +1 -1
  20. package/src/plugins/divvy/houseJob.js +6 -3
  21. package/src/plugins/divvy/houseJob.js.map +1 -1
  22. package/src/plugins/divvy/housePoolFetcher.js +9 -11
  23. package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
  24. package/src/plugins/divvy/stakingFetcher.js +7 -12
  25. package/src/plugins/divvy/stakingFetcher.js.map +1 -1
  26. package/src/plugins/divvy/structs.d.ts +57 -0
  27. package/src/plugins/divvy/structs.js +57 -0
  28. package/src/plugins/divvy/structs.js.map +1 -0
  29. package/src/plugins/drift/spotMarketsJob.js +0 -1
  30. package/src/plugins/drift/spotMarketsJob.js.map +1 -1
  31. package/src/plugins/elemental/constants.d.ts +4 -2
  32. package/src/plugins/elemental/constants.js +3 -7
  33. package/src/plugins/elemental/constants.js.map +1 -1
  34. package/src/plugins/elemental/filters.d.ts +0 -1
  35. package/src/plugins/elemental/filters.js +1 -6
  36. package/src/plugins/elemental/filters.js.map +1 -1
  37. package/src/plugins/elemental/helpers.js +2 -2
  38. package/src/plugins/elemental/helpers.js.map +1 -1
  39. package/src/plugins/elemental/poolsJob.js +4 -4
  40. package/src/plugins/elemental/poolsJob.js.map +1 -1
  41. package/src/plugins/ensofi/constants.d.ts +4 -2
  42. package/src/plugins/ensofi/constants.js +3 -7
  43. package/src/plugins/ensofi/constants.js.map +1 -1
  44. package/src/plugins/ensofi/idl.d.ts +149 -6
  45. package/src/plugins/ensofi/idl.js +1074 -61
  46. package/src/plugins/ensofi/idl.js.map +1 -1
  47. package/src/plugins/ensofi/index.js +2 -1
  48. package/src/plugins/ensofi/index.js.map +1 -1
  49. package/src/plugins/ensofi/solanaLoansFetcher.js +23 -37
  50. package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
  51. package/src/plugins/ensofi/solanaLoansJob.d.ts +3 -0
  52. package/src/plugins/ensofi/solanaLoansJob.js +63 -0
  53. package/src/plugins/ensofi/solanaLoansJob.js.map +1 -0
  54. package/src/plugins/ensofi/structs.d.ts +58 -0
  55. package/src/plugins/ensofi/structs.js +60 -0
  56. package/src/plugins/ensofi/structs.js.map +1 -0
  57. package/src/plugins/jupiter/governance/constants.js +3 -3
  58. package/src/plugins/jupiter/governance/constants.js.map +1 -1
  59. package/src/plugins/jupiter/launchpad/constants.d.ts +1 -0
  60. package/src/plugins/jupiter/launchpad/constants.js +8 -7
  61. package/src/plugins/jupiter/launchpad/constants.js.map +1 -1
  62. package/src/plugins/jupiter/pricingJob.js +2 -1
  63. package/src/plugins/jupiter/pricingJob.js.map +1 -1
  64. package/src/plugins/kamino/reservesJob.js +35 -0
  65. package/src/plugins/kamino/reservesJob.js.map +1 -1
  66. package/src/plugins/loopscale/constants.d.ts +2 -3
  67. package/src/plugins/loopscale/constants.js +3 -4
  68. package/src/plugins/loopscale/constants.js.map +1 -1
  69. package/src/plugins/loopscale/helpers.d.ts +6 -33
  70. package/src/plugins/loopscale/helpers.js +39 -142
  71. package/src/plugins/loopscale/helpers.js.map +1 -1
  72. package/src/plugins/loopscale/index.js +10 -3
  73. package/src/plugins/loopscale/index.js.map +1 -1
  74. package/src/plugins/loopscale/lendFetcher.js +57 -0
  75. package/src/plugins/loopscale/lendFetcher.js.map +1 -0
  76. package/src/plugins/loopscale/lendVaultsFetcher.d.ts +6 -0
  77. package/src/plugins/loopscale/lendVaultsFetcher.js +68 -0
  78. package/src/plugins/loopscale/lendVaultsFetcher.js.map +1 -0
  79. package/src/plugins/loopscale/loansFetcher.d.ts +3 -0
  80. package/src/plugins/loopscale/loansFetcher.js +79 -0
  81. package/src/plugins/loopscale/loansFetcher.js.map +1 -0
  82. package/src/plugins/loopscale/structs.d.ts +116 -86
  83. package/src/plugins/loopscale/structs.js +101 -79
  84. package/src/plugins/loopscale/structs.js.map +1 -1
  85. package/src/plugins/loopscale/types.d.ts +6 -0
  86. package/src/plugins/loopscale/types.js.map +1 -0
  87. package/src/plugins/loopscale/vaultsJob.d.ts +3 -0
  88. package/src/plugins/loopscale/vaultsJob.js +121 -0
  89. package/src/plugins/loopscale/vaultsJob.js.map +1 -0
  90. package/src/plugins/lulo/depositsFetcher.js +9 -29
  91. package/src/plugins/lulo/depositsFetcher.js.map +1 -1
  92. package/src/plugins/marginfi/banksJob.js +6 -2
  93. package/src/plugins/marginfi/banksJob.js.map +1 -1
  94. package/src/plugins/marginfi/constants.d.ts +5 -3
  95. package/src/plugins/marginfi/constants.js +8 -7
  96. package/src/plugins/marginfi/constants.js.map +1 -1
  97. package/src/plugins/marginfi/depositsFetcher.js +50 -27
  98. package/src/plugins/marginfi/depositsFetcher.js.map +1 -1
  99. package/src/plugins/marginfi/getMarginFiAccounts.d.ts +6 -0
  100. package/src/plugins/marginfi/getMarginFiAccounts.js +44 -0
  101. package/src/plugins/marginfi/getMarginFiAccounts.js.map +1 -0
  102. package/src/plugins/marginfi/helpers.d.ts +0 -5
  103. package/src/plugins/marginfi/helpers.js +1 -81
  104. package/src/plugins/marginfi/helpers.js.map +1 -1
  105. package/src/plugins/marginfi/structs/MarginfiAccount.d.ts +5 -0
  106. package/src/plugins/marginfi/structs/MarginfiAccount.js.map +1 -1
  107. package/src/plugins/orca/getWhirlpoolPositions.js +7 -7
  108. package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
  109. package/src/plugins/orca/types.d.ts +2 -0
  110. package/src/plugins/picasso/constants.d.ts +0 -2
  111. package/src/plugins/picasso/constants.js +1 -7
  112. package/src/plugins/picasso/constants.js.map +1 -1
  113. package/src/plugins/picasso/helpers.js +7 -4
  114. package/src/plugins/picasso/helpers.js.map +1 -1
  115. package/src/plugins/picasso/structs.d.ts +39 -0
  116. package/src/plugins/picasso/structs.js +37 -0
  117. package/src/plugins/picasso/structs.js.map +1 -0
  118. package/src/plugins/picasso/unstakingNftsJob.js +2 -1
  119. package/src/plugins/picasso/unstakingNftsJob.js.map +1 -1
  120. package/src/plugins/picasso/unstakingPositionsFetcher.js +4 -4
  121. package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
  122. package/src/plugins/raydium/ammV2ApiJob.js +24 -0
  123. package/src/plugins/raydium/ammV2ApiJob.js.map +1 -1
  124. package/src/plugins/raydium/constants.d.ts +1 -0
  125. package/src/plugins/raydium/constants.js +2 -1
  126. package/src/plugins/raydium/constants.js.map +1 -1
  127. package/src/plugins/raydium/getRaydiumCLMMPositions.js +9 -5
  128. package/src/plugins/raydium/getRaydiumCLMMPositions.js.map +1 -1
  129. package/src/plugins/raydium/types.d.ts +14 -4
  130. package/src/plugins/sanctum/s1AirdropFetcher.js +2 -2
  131. package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
  132. package/src/plugins/sharky/collectionsJob.js +8 -9
  133. package/src/plugins/sharky/collectionsJob.js.map +1 -1
  134. package/src/plugins/sharky/constants.d.ts +0 -2
  135. package/src/plugins/sharky/constants.js +1 -7
  136. package/src/plugins/sharky/constants.js.map +1 -1
  137. package/src/plugins/sharky/loansFetcher.js +25 -19
  138. package/src/plugins/sharky/loansFetcher.js.map +1 -1
  139. package/src/plugins/sharky/structs.d.ts +96 -0
  140. package/src/plugins/sharky/structs.js +103 -0
  141. package/src/plugins/sharky/structs.js.map +1 -0
  142. package/src/plugins/sharky/types.d.ts +0 -15
  143. package/src/plugins/sharky/types.js +0 -8
  144. package/src/plugins/sharky/types.js.map +1 -1
  145. package/src/plugins/stabble/constants.d.ts +0 -3
  146. package/src/plugins/stabble/constants.js +1 -13
  147. package/src/plugins/stabble/constants.js.map +1 -1
  148. package/src/plugins/stabble/poolsJob.js +14 -9
  149. package/src/plugins/stabble/poolsJob.js.map +1 -1
  150. package/src/plugins/stabble/structs.d.ts +43 -0
  151. package/src/plugins/stabble/structs.js +42 -0
  152. package/src/plugins/stabble/structs.js.map +1 -0
  153. package/src/plugins/suilend/helpers.js +2 -0
  154. package/src/plugins/suilend/helpers.js.map +1 -1
  155. package/src/utils/misc/getLendingMarketAprs.d.ts +3 -1
  156. package/src/utils/misc/getLendingMarketAprs.js +24 -1
  157. package/src/utils/misc/getLendingMarketAprs.js.map +1 -1
  158. package/src/utils/solana/beets/ParsedGpa.d.ts +1 -0
  159. package/src/utils/solana/beets/ParsedGpa.js +9 -0
  160. package/src/utils/solana/beets/ParsedGpa.js.map +1 -1
  161. package/src/plugins/divvy/types.d.ts +0 -28
  162. package/src/plugins/divvy/types.js.map +0 -1
  163. package/src/plugins/loopscale/filters.d.ts +0 -9
  164. package/src/plugins/loopscale/filters.js +0 -62
  165. package/src/plugins/loopscale/filters.js.map +0 -1
  166. package/src/plugins/loopscale/positionsFetcher.js +0 -119
  167. package/src/plugins/loopscale/positionsFetcher.js.map +0 -1
  168. package/src/plugins/marginfi/filters.d.ts +0 -5
  169. package/src/plugins/marginfi/filters.js +0 -45
  170. package/src/plugins/marginfi/filters.js.map +0 -1
  171. package/src/plugins/picasso/types.d.ts +0 -17
  172. package/src/plugins/picasso/types.js +0 -3
  173. package/src/plugins/picasso/types.js.map +0 -1
  174. package/src/plugins/sharky/filters.d.ts +0 -8
  175. package/src/plugins/sharky/filters.js +0 -43
  176. package/src/plugins/sharky/filters.js.map +0 -1
  177. package/src/plugins/stabble/filters.d.ts +0 -5
  178. package/src/plugins/stabble/filters.js +0 -20
  179. package/src/plugins/stabble/filters.js.map +0 -1
  180. package/src/plugins/stabble/types.d.ts +0 -40
  181. package/src/plugins/stabble/types.js +0 -3
  182. package/src/plugins/stabble/types.js.map +0 -1
  183. /package/src/plugins/loopscale/{positionsFetcher.d.ts → lendFetcher.d.ts} +0 -0
  184. /package/src/plugins/{divvy → loopscale}/types.js +0 -0
@@ -1,119 +0,0 @@
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 constants_1 = require("./constants");
17
- const clients_1 = require("../../utils/clients");
18
- const helpers_1 = require("./helpers");
19
- const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
20
- const depositsFetcher_1 = __importDefault(require("../marginfi/depositsFetcher"));
21
- const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
22
- const connection = (0, clients_1.getClientSolana)();
23
- const adminOrgs = yield (0, helpers_1.getAdminOrgs)(connection, owner);
24
- if (!adminOrgs.length)
25
- return [];
26
- const escrowAccounts = yield (0, helpers_1.getEscrows)(connection, adminOrgs);
27
- if (!escrowAccounts.length)
28
- return [];
29
- const { loansLent, loansBorrowed } = yield (0, helpers_1.getLoanVaults)(connection, escrowAccounts);
30
- const lenderLoanValues = [];
31
- const borrowerLoanValues = [];
32
- const borrowerCollateralValues = [];
33
- for (const escrowAccount of escrowAccounts) {
34
- const e = escrowAccounts.indexOf(escrowAccount);
35
- const data = yield (0, helpers_1.getOrdersForLoans)(connection, [
36
- ...loansLent[e],
37
- ...loansBorrowed[e],
38
- ]);
39
- const lenderOrders = [];
40
- for (let i = 0; i < loansLent[e].length; i++) {
41
- const loan = loansLent[e][i];
42
- const order = data.find((o) => o.orderAddress.toString() === loan.order.toString());
43
- if (order !== undefined &&
44
- order.order &&
45
- (order.order.status === 1 || order.order.status === 2))
46
- lenderOrders.push(order);
47
- }
48
- const borrowerOrders = [];
49
- for (let i = 0; i < loansBorrowed[e].length; i++) {
50
- const loan = loansBorrowed[e][i];
51
- const order = data.find((o) => o.orderAddress.toString() === loan.order.toString());
52
- if (order !== undefined &&
53
- order.order &&
54
- (order.order.status === 1 || order.order.status === 2))
55
- borrowerOrders.push(order);
56
- }
57
- lenderLoanValues.push((0, helpers_1.getLenderOrderValues)(lenderOrders));
58
- borrowerLoanValues.push((0, helpers_1.getBorrowerOrderValues)(borrowerOrders));
59
- borrowerCollateralValues.push(yield (0, helpers_1.getBorrowerCollateralValues)(connection, borrowerOrders));
60
- }
61
- const [escrowValues, escrowMarginfiElements] = yield Promise.all([
62
- Promise.all(escrowAccounts.map((escrowAccount) => (0, helpers_1.getTokensBalance)(escrowAccount.pubkey.toString()))),
63
- Promise.all(escrowAccounts.map((escrowAccount) => depositsFetcher_1.default.executor(escrowAccount.pubkey.toString(), cache))),
64
- ]);
65
- const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
66
- escrowAccounts.forEach((escrowAccount, i) => {
67
- const element = elementRegistry.addElementBorrowlend({
68
- label: 'Lending',
69
- name: Object.keys(borrowerLoanValues[i]).length > 0 ? 'Borrow' : 'Lend',
70
- ref: escrowAccount.pubkey.toString(),
71
- link: 'https://app.loopscale.com/portfolio',
72
- });
73
- escrowMarginfiElements[i].forEach((marginfiElement) => {
74
- if (marginfiElement.type === portfolio_core_1.PortfolioElementType.borrowlend) {
75
- marginfiElement.data.suppliedAssets.forEach((asset) => {
76
- if (asset.data.address && asset.data.amount) {
77
- element.addSuppliedAsset({
78
- address: asset.data.address,
79
- amount: asset.data.amount,
80
- alreadyShifted: true,
81
- });
82
- }
83
- });
84
- }
85
- });
86
- Object.keys(escrowValues[i]).forEach((address) => {
87
- element.addSuppliedAsset({
88
- address,
89
- amount: escrowValues[i][address],
90
- });
91
- });
92
- Object.keys(lenderLoanValues[i]).forEach((address) => {
93
- element.addSuppliedAsset({
94
- address,
95
- amount: lenderLoanValues[i][address],
96
- });
97
- });
98
- Object.keys(borrowerLoanValues[i]).forEach((address) => {
99
- element.addBorrowedAsset({
100
- address,
101
- amount: borrowerLoanValues[i][address],
102
- });
103
- });
104
- Object.keys(borrowerCollateralValues[i]).forEach((address) => {
105
- element.addSuppliedAsset({
106
- address,
107
- amount: borrowerCollateralValues[i][address],
108
- });
109
- });
110
- });
111
- return elementRegistry.getElements(cache);
112
- });
113
- const fetcher = {
114
- id: `${constants_1.platformId}-positions`,
115
- networkId: portfolio_core_1.NetworkId.solana,
116
- executor,
117
- };
118
- exports.default = fetcher;
119
- //# sourceMappingURL=positionsFetcher.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/loopscale/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAA6E;AAE7E,2CAAyC;AAEzC,iDAAsD;AACtD,uCASmB;AACnB,gFAA6E;AAC7E,kFAA0D;AAE1D,MAAM,QAAQ,GAAoB,CAAO,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CAAC;AAC5C,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,5 +0,0 @@
1
- /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
- /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
- import { GetProgramAccountsFilter } from '@solana/web3.js';
4
- export declare const accountsFilter: (owner: string) => GetProgramAccountsFilter[];
5
- export declare const banksFilters: () => GetProgramAccountsFilter[];
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.banksFilters = exports.accountsFilter = void 0;
4
- const constants_1 = require("./constants");
5
- const Bank_1 = require("./structs/Bank");
6
- const accountsFilter = (owner) => [
7
- {
8
- memcmp: {
9
- bytes: 'CKkRR4La3xu',
10
- offset: 0,
11
- },
12
- },
13
- {
14
- memcmp: {
15
- bytes: constants_1.MarginfiAccountAddress,
16
- offset: 8,
17
- },
18
- },
19
- {
20
- memcmp: {
21
- bytes: owner,
22
- offset: 40,
23
- },
24
- },
25
- ];
26
- exports.accountsFilter = accountsFilter;
27
- const banksFilters = () => [
28
- {
29
- memcmp: {
30
- bytes: 'QnTef4UXSzF',
31
- offset: 0,
32
- },
33
- },
34
- {
35
- memcmp: {
36
- bytes: constants_1.MarginfiAccountAddress,
37
- offset: 41,
38
- },
39
- },
40
- {
41
- dataSize: Bank_1.bankStruct.byteSize,
42
- },
43
- ];
44
- exports.banksFilters = banksFilters;
45
- //# sourceMappingURL=filters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/marginfi/filters.ts"],"names":[],"mappings":";;;AACA,2CAAqD;AACrD,yCAA4C;AAErC,MAAM,cAAc,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IAC3E;QACE,MAAM,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,CAAC;SACV;KACF;IACD;QACE,MAAM,EAAE;YACN,KAAK,EAAE,kCAAsB;YAC7B,MAAM,EAAE,CAAC;SACV;KACF;IACD;QACE,MAAM,EAAE;YACN,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,EAAE;SACX;KACF;CACF,CAAC;AAnBW,QAAA,cAAc,kBAmBzB;AAEK,MAAM,YAAY,GAAG,GAA+B,EAAE,CAAC;IAC5D;QACE,MAAM,EAAE;YACN,KAAK,EAAE,aAAa;YACpB,MAAM,EAAE,CAAC;SACV;KACF;IACD;QACE,MAAM,EAAE;YACN,KAAK,EAAE,kCAAsB;YAC7B,MAAM,EAAE,EAAE;SACX;KACF;IACD;QACE,QAAQ,EAAE,iBAAU,CAAC,QAAQ;KAC9B;CACF,CAAC;AAhBW,QAAA,YAAY,gBAgBvB"}
@@ -1,17 +0,0 @@
1
- export type Vault = {
2
- stakeTimestampSec: string;
3
- service: {
4
- guestChain: {
5
- validator: string;
6
- };
7
- };
8
- stakeAmount: string;
9
- stakeMint: string;
10
- lastReceivedRewardsHeight: string;
11
- withdrawalRequest?: WithdrawalRequestParams;
12
- };
13
- export type WithdrawalRequestParams = {
14
- timestampInSec: string;
15
- owner: string;
16
- tokenAccount: string;
17
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/picasso/types.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
- /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
- import { GetProgramAccountsFilter } from '@solana/web3.js';
4
- export declare function getLoanFilters(owner: string): [
5
- GetProgramAccountsFilter[],
6
- GetProgramAccountsFilter[],
7
- GetProgramAccountsFilter[]
8
- ];
@@ -1,43 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getLoanFilters = void 0;
4
- const constants_1 = require("./constants");
5
- function getLoanFilters(owner) {
6
- return [
7
- [
8
- {
9
- dataSize: constants_1.loanDataSize,
10
- },
11
- {
12
- memcmp: {
13
- bytes: owner,
14
- offset: 115,
15
- },
16
- },
17
- ],
18
- [
19
- {
20
- dataSize: constants_1.loanDataSize,
21
- },
22
- {
23
- memcmp: {
24
- bytes: owner,
25
- offset: 147,
26
- },
27
- },
28
- ],
29
- [
30
- {
31
- dataSize: constants_1.loanDataSize,
32
- },
33
- {
34
- memcmp: {
35
- bytes: owner,
36
- offset: 83,
37
- },
38
- },
39
- ],
40
- ];
41
- }
42
- exports.getLoanFilters = getLoanFilters;
43
- //# sourceMappingURL=filters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sharky/filters.ts"],"names":[],"mappings":";;;AACA,2CAA2C;AAE3C,SAAgB,cAAc,CAC5B,KAAa;IAMb,OAAO;QACL;YACE;gBACE,QAAQ,EAAE,wBAAY;aACvB;YACD;gBACE,MAAM,EAAE;oBACN,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,GAAG;iBACZ;aACF;SACF;QACD;YACE;gBACE,QAAQ,EAAE,wBAAY;aACvB;YACD;gBACE,MAAM,EAAE;oBACN,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,GAAG;iBACZ;aACF;SACF;QACD;YACE;gBACE,QAAQ,EAAE,wBAAY;aACvB;YACD;gBACE,MAAM,EAAE;oBACN,KAAK,EAAE,KAAK;oBACZ,MAAM,EAAE,EAAE;iBACX;aACF;SACF;KACF,CAAC;AACJ,CAAC;AA1CD,wCA0CC"}
@@ -1,5 +0,0 @@
1
- /// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
2
- /// <reference types="jito-ts/node_modules/@solana/web3.js" />
3
- import { GetProgramAccountsFilter } from '@solana/web3.js';
4
- export declare const stableFilter: GetProgramAccountsFilter[];
5
- export declare const weightedFilter: GetProgramAccountsFilter[];
@@ -1,20 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.weightedFilter = exports.stableFilter = void 0;
4
- exports.stableFilter = [
5
- {
6
- memcmp: {
7
- offset: 40,
8
- bytes: 'stab1io8dHvK26KoHmTwwHyYmHRbUWbyEJx6CdrGabC',
9
- },
10
- },
11
- ];
12
- exports.weightedFilter = [
13
- {
14
- memcmp: {
15
- offset: 40,
16
- bytes: 'w8edo9a9TDw52c1rBmVbP6dNakaAuFiPjDd52ZJwwVi',
17
- },
18
- },
19
- ];
20
- //# sourceMappingURL=filters.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stabble/filters.ts"],"names":[],"mappings":";;;AAEa,QAAA,YAAY,GAA+B;IACtD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,6CAA6C;SACrD;KACF;CACF,CAAC;AAEW,QAAA,cAAc,GAA+B;IACxD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,6CAA6C;SACrD;KACF;CACF,CAAC"}
@@ -1,40 +0,0 @@
1
- export type StablePool = {
2
- owner: string;
3
- vault: string;
4
- mint: string;
5
- authorityBump: string;
6
- isActive: boolean;
7
- ampInitialFactor: string;
8
- ampTargetFactor: string;
9
- rampStartTs: string;
10
- rampStopTs: string;
11
- swapFee: string;
12
- tokens: StablePoolToken[];
13
- pendingOwner?: string;
14
- };
15
- export type StablePoolToken = {
16
- mint: string;
17
- decimals: string;
18
- scalingUp: boolean;
19
- scalingFactor: string;
20
- balance: string;
21
- };
22
- export type WeightedPool = {
23
- owner: string;
24
- vault: string;
25
- mint: string;
26
- authorityBump: string;
27
- isActive: boolean;
28
- invariant: string;
29
- swapFee: string;
30
- tokens: StablePoolToken[];
31
- pendingOwner?: string;
32
- };
33
- export type WeightedPoolToken = {
34
- mint: string;
35
- decimals: string;
36
- scalingUp: boolean;
37
- scalingFactor: string;
38
- balance: string;
39
- weight: string;
40
- };
@@ -1,3 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- //# sourceMappingURL=types.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/stabble/types.ts"],"names":[],"mappings":""}
File without changes