@sonarwatch/portfolio-plugins 0.14.127 → 0.14.129
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.
- package/CHANGELOG.md +2124 -2110
- package/README.md +3 -3
- package/package.json +1 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +8 -1
- package/src/index.js.map +1 -1
- package/src/plugins/adrena/positionsFetcher.js +1 -0
- package/src/plugins/adrena/positionsFetcher.js.map +1 -1
- package/src/plugins/allbridge/positionsFetcher.js +9 -1
- package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
- package/src/plugins/armada-staking/stakingFetcher.js +4 -1
- package/src/plugins/armada-staking/stakingFetcher.js.map +1 -1
- package/src/plugins/aurory/stakingFetcher.js +5 -1
- package/src/plugins/aurory/stakingFetcher.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/bonfida/offersFetcher.js +30 -37
- package/src/plugins/bonfida/offersFetcher.js.map +1 -1
- package/src/plugins/bonkrewards/positionFetcher.js +16 -22
- package/src/plugins/bonkrewards/positionFetcher.js.map +1 -1
- package/src/plugins/cyberfrogs/thorDepositFetcher.js +2 -0
- package/src/plugins/cyberfrogs/thorDepositFetcher.js.map +1 -1
- package/src/plugins/daos/realmsDepositsFetcher.js +29 -43
- package/src/plugins/daos/realmsDepositsFetcher.js.map +1 -1
- package/src/plugins/debridge/dlmmVaultsFetcher.js +16 -10
- package/src/plugins/debridge/dlmmVaultsFetcher.js.map +1 -1
- package/src/plugins/defiland/stakingFetcher.js +8 -1
- package/src/plugins/defiland/stakingFetcher.js.map +1 -1
- package/src/plugins/defituna/lendingFetcher.js +3 -0
- package/src/plugins/defituna/lendingFetcher.js.map +1 -1
- package/src/plugins/defituna/positionsFetcher.js +7 -1
- package/src/plugins/defituna/positionsFetcher.js.map +1 -1
- package/src/plugins/defituna/structs.d.ts +1 -0
- package/src/plugins/defituna/structs.js.map +1 -1
- package/src/plugins/divvy/constants.d.ts +1 -0
- package/src/plugins/divvy/constants.js +2 -1
- package/src/plugins/divvy/constants.js.map +1 -1
- package/src/plugins/divvy/housePoolFetcher.js +3 -0
- package/src/plugins/divvy/housePoolFetcher.js.map +1 -1
- package/src/plugins/divvy/stakingFetcher.js +3 -1
- package/src/plugins/divvy/stakingFetcher.js.map +1 -1
- package/src/plugins/drift/depositsFetcher.js +15 -0
- package/src/plugins/drift/depositsFetcher.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/depositsFetcher.js +2 -1
- package/src/plugins/drift-market-maker-vault/depositsFetcher.js.map +1 -1
- package/src/plugins/drift-market-maker-vault/index.js +5 -2
- package/src/plugins/drift-market-maker-vault/index.js.map +1 -1
- package/src/plugins/elemental/depositFetcher.js +3 -0
- package/src/plugins/elemental/depositFetcher.js.map +1 -1
- package/src/plugins/ensofi/solanaLoansFetcher.js +6 -0
- package/src/plugins/ensofi/solanaLoansFetcher.js.map +1 -1
- package/src/plugins/exponent/liquidityFetcher.js +1 -0
- package/src/plugins/exponent/liquidityFetcher.js.map +1 -1
- package/src/plugins/exponent/tradeFetcher.js +1 -0
- package/src/plugins/exponent/tradeFetcher.js.map +1 -1
- package/src/plugins/famousfoxfederation/stakingFetcher.js +18 -22
- package/src/plugins/famousfoxfederation/stakingFetcher.js.map +1 -1
- package/src/plugins/flash/perpetualFetcher.js +1 -1
- package/src/plugins/flash/perpetualFetcher.js.map +1 -1
- package/src/plugins/fragmetric/pricingJob.js +6 -0
- package/src/plugins/fragmetric/pricingJob.js.map +1 -1
- package/src/plugins/francium/lendingFetcher.js +1 -0
- package/src/plugins/francium/lendingFetcher.js.map +1 -1
- package/src/plugins/futarchy/daosJob.js +9 -0
- package/src/plugins/futarchy/daosJob.js.map +1 -1
- package/src/plugins/genesysgo/stakingFetcher.js +12 -25
- package/src/plugins/genesysgo/stakingFetcher.js.map +1 -1
- package/src/plugins/goosefx/stakingFetcher.js +18 -27
- package/src/plugins/goosefx/stakingFetcher.js.map +1 -1
- package/src/plugins/gpool/stakingFetcher.js +5 -1
- package/src/plugins/gpool/stakingFetcher.js.map +1 -1
- package/src/plugins/guano/constants.d.ts +8 -0
- package/src/plugins/guano/constants.js +15 -0
- package/src/plugins/guano/constants.js.map +1 -0
- package/src/plugins/guano/filters.d.ts +20 -0
- package/src/plugins/guano/filters.js +41 -0
- package/src/plugins/guano/filters.js.map +1 -0
- package/src/plugins/guano/index.d.ts +6 -0
- package/src/plugins/guano/index.js +10 -0
- package/src/plugins/guano/index.js.map +1 -0
- package/src/plugins/guano/stakingFetcher.d.ts +3 -0
- package/src/plugins/guano/stakingFetcher.js +70 -0
- package/src/plugins/guano/stakingFetcher.js.map +1 -0
- package/src/plugins/guano/structs.d.ts +34 -0
- package/src/plugins/guano/structs.js +33 -0
- package/src/plugins/guano/structs.js.map +1 -0
- package/src/plugins/guano/types.d.ts +15 -0
- package/src/plugins/guano/types.js +3 -0
- package/src/plugins/guano/types.js.map +1 -0
- package/src/plugins/hedgehog/ammJob.js +8 -0
- package/src/plugins/hedgehog/ammJob.js.map +1 -1
- package/src/plugins/hxro/stakingFetcher.js +2 -0
- package/src/plugins/hxro/stakingFetcher.js.map +1 -1
- package/src/plugins/iloop/depositsFetcher.js +8 -0
- package/src/plugins/iloop/depositsFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/dcaFetcher.js +5 -1
- package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/limitFetcher.js +2 -0
- package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -1
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js +1 -0
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -1
- package/src/plugins/kamino/lendsFetcher.js +6 -0
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/kamino/ordersFetcher.js +2 -0
- package/src/plugins/kamino/ordersFetcher.js.map +1 -1
- package/src/plugins/layer3/stakingFetcher.js +1 -0
- package/src/plugins/layer3/stakingFetcher.js.map +1 -1
- package/src/plugins/lifinity/lockerFetcher.js +14 -17
- package/src/plugins/lifinity/lockerFetcher.js.map +1 -1
- package/src/plugins/loverflow/airdropClaimFetcher.js +1 -0
- package/src/plugins/loverflow/airdropClaimFetcher.js.map +1 -1
- package/src/plugins/magiceden/escrowFetcher.js +12 -18
- package/src/plugins/magiceden/escrowFetcher.js.map +1 -1
- package/src/plugins/marginfi/helpers.d.ts +2 -1
- package/src/plugins/marginfi/helpers.js +8 -2
- package/src/plugins/marginfi/helpers.js.map +1 -1
- package/src/plugins/marinade/ticketsFetcher.js +14 -31
- package/src/plugins/marinade/ticketsFetcher.js.map +1 -1
- package/src/plugins/metaplex/resizableNftFetcher.js +1 -0
- package/src/plugins/metaplex/resizableNftFetcher.js.map +1 -1
- package/src/plugins/nxfinance/positionsFetcher.js +19 -2
- package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +10 -1
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/parcl/depositsFetcher.js +1 -1
- package/src/plugins/parcl/depositsFetcher.js.map +1 -1
- package/src/plugins/parcl/marginFetcher.js +1 -1
- package/src/plugins/parcl/marginFetcher.js.map +1 -1
- package/src/plugins/parcl/stakingFetcher.js +6 -3
- package/src/plugins/parcl/stakingFetcher.js.map +1 -1
- package/src/plugins/photofinish/stakingFetcher.js +6 -1
- package/src/plugins/photofinish/stakingFetcher.js.map +1 -1
- package/src/plugins/picasso/unstakingPositionsFetcher.js +3 -2
- package/src/plugins/picasso/unstakingPositionsFetcher.js.map +1 -1
- package/src/plugins/pluto/earnFetcher.js +1 -1
- package/src/plugins/pluto/earnFetcher.js.map +1 -1
- package/src/plugins/pluto/leverageFetcher.js +37 -26
- package/src/plugins/pluto/leverageFetcher.js.map +1 -1
- package/src/plugins/pluto/structs.d.ts +0 -2
- package/src/plugins/pluto/structs.js +0 -2
- package/src/plugins/pluto/structs.js.map +1 -1
- package/src/plugins/quarry/calculatePositions.js +7 -1
- package/src/plugins/quarry/calculatePositions.js.map +1 -1
- package/src/plugins/quarry/positionsFetcher.js +2 -0
- package/src/plugins/quarry/positionsFetcher.js.map +1 -1
- package/src/plugins/quarry/types.d.ts +3 -0
- package/src/plugins/ratex/positionsFetcher.js +2 -0
- package/src/plugins/ratex/positionsFetcher.js.map +1 -1
- package/src/plugins/saber/lpTokensJob.js +1 -0
- package/src/plugins/saber/lpTokensJob.js.map +1 -1
- package/src/plugins/sandglass/depositFetcher.js +3 -0
- package/src/plugins/sandglass/depositFetcher.js.map +1 -1
- package/src/plugins/sharky/loansFetcher.js +1 -0
- package/src/plugins/sharky/loansFetcher.js.map +1 -1
- package/src/plugins/solayer/airdropFetcher.d.ts +3 -0
- package/src/plugins/solayer/airdropFetcher.js +55 -0
- package/src/plugins/solayer/airdropFetcher.js.map +1 -0
- package/src/plugins/solayer/constants.d.ts +5 -0
- package/src/plugins/solayer/constants.js +13 -1
- package/src/plugins/solayer/constants.js.map +1 -1
- package/src/plugins/solayer/index.d.ts +2 -0
- package/src/plugins/solayer/index.js +4 -2
- package/src/plugins/solayer/index.js.map +1 -1
- package/src/plugins/solayer/proofsFetcher.js +7 -6
- package/src/plugins/solayer/proofsFetcher.js.map +1 -1
- package/src/plugins/solayer/types.d.ts +8 -0
- package/src/plugins/solayer/types.js +3 -0
- package/src/plugins/solayer/types.js.map +1 -0
- package/src/plugins/spdr/stakingFetcher.js +3 -0
- package/src/plugins/spdr/stakingFetcher.js.map +1 -1
- package/src/plugins/stabble/poolsJob.js +1 -0
- package/src/plugins/stabble/poolsJob.js.map +1 -1
- package/src/plugins/staratlas/lockersFetcher.js +2 -0
- package/src/plugins/staratlas/lockersFetcher.js.map +1 -1
- package/src/plugins/staratlas/stakingFetcher.js +2 -1
- package/src/plugins/staratlas/stakingFetcher.js.map +1 -1
- package/src/plugins/streamflow/vestingFetcher.js +1 -1
- package/src/plugins/streamflow/vestingFetcher.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/tensor/bidsFetcher.js +1 -1
- package/src/plugins/tensor/bidsFetcher.js.map +1 -1
- package/src/plugins/texture/loansFetcher.js +2 -1
- package/src/plugins/texture/loansFetcher.js.map +1 -1
- package/src/plugins/tokens/fetchers/solana-simple.d.ts +3 -0
- package/src/plugins/tokens/fetchers/solana-simple.js +66 -0
- package/src/plugins/tokens/fetchers/solana-simple.js.map +1 -0
- package/src/plugins/tokens/getTokenListsJob.js +1 -1
- package/src/plugins/tokens/getTokenListsJob.js.map +1 -1
- package/src/plugins/tokens/index.d.ts +2 -0
- package/src/plugins/tokens/index.js +3 -1
- package/src/plugins/tokens/index.js.map +1 -1
- package/src/plugins/tulip/depositsFetcher.js +3 -1
- package/src/plugins/tulip/depositsFetcher.js.map +1 -1
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/uxd/stakingFetcher.js +4 -3
- package/src/plugins/uxd/stakingFetcher.js.map +1 -1
- package/src/plugins/vaultka/lendingFetcher.js +5 -0
- package/src/plugins/vaultka/lendingFetcher.js.map +1 -1
- package/src/plugins/vaultka/strategyFetcher.js +3 -0
- package/src/plugins/vaultka/strategyFetcher.js.map +1 -1
- package/src/plugins/whalesmarket/depositFetcher.js +7 -5
- package/src/plugins/whalesmarket/depositFetcher.js.map +1 -1
- package/src/plugins/zelo/positionsFetcher.js +2 -0
- package/src/plugins/zelo/positionsFetcher.js.map +1 -1
- package/src/plugins/zeta/airdropFetcher.js +14 -14
- package/src/plugins/zeta/depositsFetcher.js +5 -1
- package/src/plugins/zeta/depositsFetcher.js.map +1 -1
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
@@ -0,0 +1,41 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.unstakeAccountFilters = exports.stakeAccountFilters = void 0;
|
4
|
+
const structs_1 = require("./structs");
|
5
|
+
const stakeAccountFilters = (owner) => [
|
6
|
+
{
|
7
|
+
memcmp: {
|
8
|
+
offset: 16,
|
9
|
+
bytes: owner,
|
10
|
+
},
|
11
|
+
},
|
12
|
+
{
|
13
|
+
memcmp: {
|
14
|
+
offset: 0,
|
15
|
+
bytes: 'EV6feDfKSVt',
|
16
|
+
},
|
17
|
+
},
|
18
|
+
{
|
19
|
+
dataSize: structs_1.stakeStruct.byteSize,
|
20
|
+
},
|
21
|
+
];
|
22
|
+
exports.stakeAccountFilters = stakeAccountFilters;
|
23
|
+
const unstakeAccountFilters = (owner) => [
|
24
|
+
{
|
25
|
+
memcmp: {
|
26
|
+
offset: 16,
|
27
|
+
bytes: owner,
|
28
|
+
},
|
29
|
+
},
|
30
|
+
{
|
31
|
+
memcmp: {
|
32
|
+
offset: 0,
|
33
|
+
bytes: '8fHY7z1kRxS',
|
34
|
+
},
|
35
|
+
},
|
36
|
+
{
|
37
|
+
dataSize: structs_1.unstakeStruct.byteSize,
|
38
|
+
},
|
39
|
+
];
|
40
|
+
exports.unstakeAccountFilters = unstakeAccountFilters;
|
41
|
+
//# sourceMappingURL=filters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/guano/filters.ts"],"names":[],"mappings":";;;AAAA,uCAAuD;AAEhD,MAAM,mBAAmB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC;IACpD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,QAAQ,EAAE,qBAAW,CAAC,QAAQ;KAC/B;CACF,CAAC;AAhBW,QAAA,mBAAmB,uBAgB9B;AAEK,MAAM,qBAAqB,GAAG,CAAC,KAAa,EAAE,EAAE,CAAC;IACtD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,aAAa;SACrB;KACF;IACD;QACE,QAAQ,EAAE,uBAAa,CAAC,QAAQ;KACjC;CACF,CAAC;AAhBW,QAAA,qBAAqB,yBAgBhC"}
|
@@ -0,0 +1,10 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
4
|
+
const constants_1 = require("./constants");
|
5
|
+
exports.platforms = [constants_1.platform];
|
6
|
+
exports.jobs = [];
|
7
|
+
exports.fetchers = [
|
8
|
+
// stakingFetcher
|
9
|
+
];
|
10
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/guano/index.ts"],"names":[],"mappings":";;;AAGA,2CAAuC;AAG1B,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc;AACjC,iBAAiB;CAClB,CAAC"}
|
@@ -0,0 +1,70 @@
|
|
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 clients_1 = require("../../utils/clients");
|
15
|
+
const structs_1 = require("./structs");
|
16
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
17
|
+
const solana_1 = require("../../utils/solana");
|
18
|
+
const filters_1 = require("./filters");
|
19
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const client = (0, clients_1.getClientSolana)();
|
21
|
+
const [unstakeAccounts, stakeAccounts] = yield Promise.all([
|
22
|
+
(0, solana_1.getParsedProgramAccounts)(client, structs_1.unstakeStruct, constants_1.stakingPid, (0, filters_1.unstakeAccountFilters)(owner)),
|
23
|
+
(0, solana_1.getParsedProgramAccounts)(client, structs_1.stakeStruct, constants_1.stakingPid, (0, filters_1.stakeAccountFilters)(owner)),
|
24
|
+
]);
|
25
|
+
console.log(' constexecutor:FetcherExecutor= ~ stakeStruct:', unstakeAccounts.map((acc) => acc.buffer));
|
26
|
+
console.log(' constexecutor:FetcherExecutor= ~ stakeStruct:', stakeAccounts.map((acc) => acc.buffer));
|
27
|
+
// 85efvMdo92xCHzj5c19YBdtbmQRPV9pczvZisaNzRMc3 PENGU LOCK
|
28
|
+
// 3yLmNQ2G8r6QhFHmqkjr1S7fxrYvJBiV7iHCghVgVvDC PENGU UNLOCK
|
29
|
+
// AMvqAocs1QKe3mfFckwGbZFJ6MxgMhq8tEwuFWsmJvG6 BAT LOCK
|
30
|
+
if (!unstakeAccounts && !stakeAccounts)
|
31
|
+
return [];
|
32
|
+
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
33
|
+
const element = registry.addElementMultiple({
|
34
|
+
label: 'Staked',
|
35
|
+
link: 'https://cave.guanocoin.com/',
|
36
|
+
});
|
37
|
+
// TODO : need to figure out how to know which mint is locked/unlocked between BAT and PENGU
|
38
|
+
unstakeAccounts.forEach((acc) => {
|
39
|
+
const { tierType } = acc;
|
40
|
+
const unlockAt = acc.createdAt
|
41
|
+
.plus(tierType * 30 * 24 * 60 * 60)
|
42
|
+
.times(1000);
|
43
|
+
element.addAsset({
|
44
|
+
address: constants_1.guanoMint,
|
45
|
+
amount: acc.amount,
|
46
|
+
attributes: {
|
47
|
+
lockedUntil: unlockAt.toNumber(),
|
48
|
+
},
|
49
|
+
ref: acc.pubkey,
|
50
|
+
});
|
51
|
+
});
|
52
|
+
stakeAccounts.forEach((acc) => {
|
53
|
+
element.addAsset({
|
54
|
+
address: constants_1.guanoMint,
|
55
|
+
amount: acc.amount,
|
56
|
+
attributes: {
|
57
|
+
lockedUntil: undefined,
|
58
|
+
},
|
59
|
+
ref: acc.pubkey,
|
60
|
+
});
|
61
|
+
});
|
62
|
+
return registry.getElements(cache);
|
63
|
+
});
|
64
|
+
const fetcher = {
|
65
|
+
id: `${constants_1.platformId}-staking`,
|
66
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
67
|
+
executor,
|
68
|
+
};
|
69
|
+
exports.default = fetcher;
|
70
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/guano/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAAgE;AAChE,iDAAsD;AACtD,uCAAuD;AACvD,gFAA6E;AAC7E,+CAA8D;AAC9D,uCAAuE;AAEvE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACzD,IAAA,iCAAwB,EACtB,MAAM,EACN,uBAAa,EACb,sBAAU,EACV,IAAA,+BAAqB,EAAC,KAAK,CAAC,CAC7B;QACD,IA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AAO,CAAC,CAAC,GAAG,EAAE,EAAE;QAC5B,OAAO,CAAC,QAAQ,CAAC;YACf,OAAO,EAAE,qBAAS;YAClB,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,UAAU,EAAE;gBACV,WAAW,EAAE,SAAS;aACvB;YACD,GAAG,EAAE,GAAG,CAAC,MAAM;SAChB,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AACrC,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"}
|
@@ -0,0 +1,34 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
/// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
|
3
|
+
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
4
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
5
|
+
import { PublicKey } from '@solana/web3.js';
|
6
|
+
import BigNumber from 'bignumber.js';
|
7
|
+
export type Stake = {
|
8
|
+
buffer: Buffer;
|
9
|
+
amount: BigNumber;
|
10
|
+
owner: PublicKey;
|
11
|
+
createdAt: BigNumber;
|
12
|
+
lastStakedAt: BigNumber;
|
13
|
+
lastClaimedAt: BigNumber;
|
14
|
+
lastClaimedAmount: BigNumber;
|
15
|
+
claimedAmount: BigNumber;
|
16
|
+
tierType: number;
|
17
|
+
bump: number;
|
18
|
+
padding: Buffer;
|
19
|
+
};
|
20
|
+
export declare const stakeStruct: BeetStruct<Stake, Partial<Stake>>;
|
21
|
+
export type Unstake = {
|
22
|
+
buffer: Buffer;
|
23
|
+
amount: BigNumber;
|
24
|
+
owner: PublicKey;
|
25
|
+
createdAt: BigNumber;
|
26
|
+
lastStakedAt: BigNumber;
|
27
|
+
lastClaimedAt: BigNumber;
|
28
|
+
lastClaimedAmount: BigNumber;
|
29
|
+
claimedAmount: BigNumber;
|
30
|
+
tierType: number;
|
31
|
+
bump: number;
|
32
|
+
padding: Buffer;
|
33
|
+
};
|
34
|
+
export declare const unstakeStruct: BeetStruct<Unstake, Partial<Unstake>>;
|
@@ -0,0 +1,33 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.unstakeStruct = exports.stakeStruct = void 0;
|
4
|
+
const beet_1 = require("@metaplex-foundation/beet");
|
5
|
+
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
|
+
const solana_1 = require("../../utils/solana");
|
7
|
+
exports.stakeStruct = new beet_1.BeetStruct([
|
8
|
+
['buffer', (0, solana_1.blob)(8)],
|
9
|
+
['amount', solana_1.u64],
|
10
|
+
['owner', beet_solana_1.publicKey],
|
11
|
+
['createdAt', solana_1.u64],
|
12
|
+
['lastStakedAt', solana_1.u64],
|
13
|
+
['lastClaimedAt', solana_1.u64],
|
14
|
+
['lastClaimedAmount', solana_1.u64],
|
15
|
+
['claimedAmount', solana_1.u64],
|
16
|
+
['tierType', beet_1.u8],
|
17
|
+
['bump', beet_1.u8],
|
18
|
+
['padding', (0, solana_1.blob)(6)],
|
19
|
+
], (args) => args);
|
20
|
+
exports.unstakeStruct = new beet_1.BeetStruct([
|
21
|
+
['buffer', (0, solana_1.blob)(8)],
|
22
|
+
['amount', solana_1.u64],
|
23
|
+
['owner', beet_solana_1.publicKey],
|
24
|
+
['createdAt', solana_1.u64],
|
25
|
+
['lastStakedAt', solana_1.u64],
|
26
|
+
['lastClaimedAt', solana_1.u64],
|
27
|
+
['lastClaimedAmount', solana_1.u64],
|
28
|
+
['claimedAmount', solana_1.u64],
|
29
|
+
['tierType', beet_1.u8],
|
30
|
+
['bump', beet_1.u8],
|
31
|
+
['padding', (0, solana_1.blob)(6)],
|
32
|
+
], (args) => args);
|
33
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/guano/structs.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,kEAA6D;AAG7D,+CAA+C;AAgBlC,QAAA,WAAW,GAAG,IAAI,iBAAU,CACvC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,UAAU,EAAE,SAAE,CAAC;IAChB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAa,CACxB,CAAC;AAgBW,QAAA,aAAa,GAAG,IAAI,iBAAU,CACzC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,YAAG,CAAC;IAClB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,UAAU,EAAE,SAAE,CAAC;IAChB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAe,CAC1B,CAAC"}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
export type AirdropResponse = {
|
2
|
+
result: Result;
|
3
|
+
};
|
4
|
+
export type Result = {
|
5
|
+
data: Data;
|
6
|
+
};
|
7
|
+
export type Data = {
|
8
|
+
json: JSON;
|
9
|
+
};
|
10
|
+
export type JSON = {
|
11
|
+
claimWallet: string;
|
12
|
+
token: string;
|
13
|
+
claimStatus: string;
|
14
|
+
availableTokenAmount: number;
|
15
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/guano/types.ts"],"names":[],"mappings":""}
|
@@ -127,6 +127,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
127
127
|
price: usdcTokenPrice.price,
|
128
128
|
},
|
129
129
|
],
|
130
|
+
sourceRefs: [
|
131
|
+
{ name: 'Pool', address: acc.pubkey.toString() },
|
132
|
+
{ name: 'Market', address: marketAcc.pubkey.toString() },
|
133
|
+
],
|
130
134
|
};
|
131
135
|
const liquidityNameB = mintB.pubkey.toString() === marketAcc.yesToken.toString()
|
132
136
|
? 'Bet - YES'
|
@@ -151,6 +155,10 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
151
155
|
price: usdcTokenPrice.price,
|
152
156
|
},
|
153
157
|
],
|
158
|
+
sourceRefs: [
|
159
|
+
{ name: 'Pool', address: acc.pubkey.toString() },
|
160
|
+
{ name: 'Market', address: marketAcc.pubkey.toString() },
|
161
|
+
],
|
154
162
|
};
|
155
163
|
sources.push(sourceA, sourceB);
|
156
164
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ammJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hedgehog/ammJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAyE;AAGzE,2CAAiD;AACjD,iDAAsD;AACtD,+CAU4B;AAC5B,uCAOmB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AAqB;YAChC,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE;YAChC,QAAQ,EAAE,KAAK,CAAC,QAAQ;YACxB,EAAE,EAAE,sBAAU;YACd,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,WAAW,EAAE,cAAc;YAC3B,aAAa,EAAE,cAAc;YAC7B,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM,GAAG,cAAc,CAAC,KAAK;YACpC,WAAW,EAAE;gBACX;oBACE,OAAO,EAAE,uBAAc;oBACvB,WAAW,EAAE,MAAM;oBACnB,QAAQ,EAAE,2BAAkB;oBAC5B,SAAS,EAAE,0BAAS,CAAC,MAAM;oBAC3B,KAAK,EAAE,cAAc,CAAC,KAAK;iBAC5B;aACF;YACD,UAAU,EAAE;gBACV,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE;gBAChD,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE;aACzD;SACF,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,KAAK,CAAC,oBAAoB,CAAC,OAAO,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,MAAM;IACvB,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -33,6 +33,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
33
33
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
34
34
|
const element = elementRegistry.addElementMultiple({
|
35
35
|
label: 'Staked',
|
36
|
+
link: 'https://app.hxro.finance/stake',
|
36
37
|
});
|
37
38
|
accounts.forEach((acc) => {
|
38
39
|
element.addAsset({
|
@@ -44,6 +45,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
44
45
|
.times(1000)
|
45
46
|
.toNumber(),
|
46
47
|
},
|
48
|
+
ref: acc.pubkey,
|
47
49
|
});
|
48
50
|
});
|
49
51
|
return elementRegistry.getElements(cache);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAAwD;AAExD,iDAAsD;AACtD,+CAA8D;AAC9D,uCAA+C;AAC/C,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,UAAU,EACV,4BAAkB,EAClB,eAAG,EACH;QACE;YACE,QAAQ,EAAE,GAAG;SACd;QACD;YACE,MAAM,EAAE;gBACN,KAAK,EAAE,KAAK;gBACZ,MAAM,EAAE,CAAC;aACV;SACF;KACF,CACF,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAC1E,MAAM,OAAO,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACjD,KAAK,EAAE,QAAQ;
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAE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BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -46,12 +46,17 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
46
46
|
accounts.forEach((account) => {
|
47
47
|
const element = elementRegistry.addElementBorrowlend({
|
48
48
|
label: 'Lending',
|
49
|
+
link: 'https://app.iloop.finance/',
|
50
|
+
ref: account.pubkey,
|
49
51
|
});
|
50
52
|
const depositMarket = markets.get(account.deposit_position.reserve.toString());
|
51
53
|
if (depositMarket) {
|
52
54
|
element.addSuppliedAsset({
|
53
55
|
address: depositMarket.owner_cached,
|
54
56
|
amount: account.deposit_position.collateral_amount,
|
57
|
+
sourceRefs: [
|
58
|
+
{ name: 'Lending Market', address: depositMarket.pubkey.toString() },
|
59
|
+
],
|
55
60
|
});
|
56
61
|
}
|
57
62
|
if (account.borrow_position.borrowed_amount.isGreaterThan(0)) {
|
@@ -60,6 +65,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
60
65
|
element.addBorrowedAsset({
|
61
66
|
address: borrowMarket.owner_cached,
|
62
67
|
amount: account.borrow_position.borrowed_amount,
|
68
|
+
sourceRefs: [
|
69
|
+
{ name: 'Lending Market', address: borrowMarket.pubkey.toString() },
|
70
|
+
],
|
63
71
|
});
|
64
72
|
}
|
65
73
|
}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/iloop/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA6E;AAC7E,2CAAqE;AACrE,uCAA4D;AAC5D,kEAA+D;AAC/D,gFAA6E;AAC7E,4DAAyD;AAEzD,MAAM,WAAW,GAAG,IAAI,6BAAa,CAInC,2BAAe,EACf;IACE,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,EACD,CAAC,OAAO,EAAE,EAAE,CACV,OAAO;IACL,CAAC,CAAC,IAAA,uBAAU,EACR,OAAO,CAAC,MAAM,CACZ,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,SAAS,CACW,EACnC,QAAQ,CACT;IACH,CAAC,CAAC,IAAI,GAAG,EAAE,CAChB,CAAC;AAEF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,0BAAgB,EAChB,qBAAS,EACT;QACE;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC;gBACT,KAAK,EAAE,aAAa;aACrB;SACF;QACD;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC;gBACT,KAAK,EAAE,KAAK;aACb;SACF;KACF,CACF,CAAC;IAEF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,OAAO,GAAG,MAAM,WAAW,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEjD,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,MAAM,OAAO,GAAG,eAAe,CAAC,oBAAoB,CAAC;YACnD,KAAK,EAAE,SAAS;
|
1
|
+
{"version":3,"file":"depositsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/iloop/depositsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA6E;AAC7E,2CAAqE;AACrE,uCAA4D;AAC5D,kEAA+D;AAC/D,gFAA6E;AAC7E,4DAAyD;AAEzD,MAAM,WAAW,GAAG,IAAI,6BAA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,CAAC;QAEF,IAAI,aAAa,EAAE,CAAC;YAClB,OAAO,CAAC,gBAAgB,CAAC;gBACvB,OAAO,EAAE,aAAa,CAAC,YAAY;gBACnC,MAAM,EAAE,OAAO,CAAC,gBAAgB,CAAC,iBAAiB;gBAClD,UAAU,EAAE;oBACV,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE;iBACrE;aACF,CAAC,CAAC;QACL,CAAC;QAED,IAAI,OAAO,CAAC,eAAe,CAAC,eAAe,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC;YAC7D,MAAM,YAAY,GAAG,OAAO,CAAC,GAAG,CAC9B,OAAO,CAAC,eAAe,CAAC,OAAO,CAAC,QAAQ,EAAE,CAC3C,CAAC;YACF,IAAI,YAAY,EAAE,CAAC;gBACjB,OAAO,CAAC,gBAAgB,CAAC;oBACvB,OAAO,EAAE,YAAY,CAAC,YAAY;oBAClC,MAAM,EAAE,OAAO,CAAC,eAAe,CAAC,eAAe;oBAC/C,UAAU,EAAE;wBACV,EAAE,IAAI,EAAE,gBAAgB,EAAE,OAAO,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE,EAAE;qBACpE;iBACF,CAAC,CAAC;YACL,CAAC;QACH,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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"}
|
@@ -24,7 +24,11 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
24
24
|
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
25
25
|
for (let i = 0; i < accounts.length; i++) {
|
26
26
|
const account = accounts[i];
|
27
|
-
const element = elementRegistry.addElementTrade({
|
27
|
+
const element = elementRegistry.addElementTrade({
|
28
|
+
label: 'DCA',
|
29
|
+
ref: account.pubkey.toString(),
|
30
|
+
link: 'https://jup.ag/recurring/',
|
31
|
+
});
|
28
32
|
element.setTrade({
|
29
33
|
inputAsset: {
|
30
34
|
address: account.inputMint,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAAuD;AACvD,uCAAsC;AACtC,uCAAuC;AACvC,mFAAgF;AAEhF,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAS,EACT,wBAAY,EACZ,IAAA,oBAAU,EAAC,KAAK,CAAC,CAClB,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,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;QAE5B,MAAM,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,
|
1
|
+
{"version":3,"file":"dcaFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/dcaFetcher.ts"],"names":[],"m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AC,YAAY;SAC5C,CAAC,CAAC;IACL,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,MAAM;IACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -34,6 +34,8 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
34
34
|
const isV1 = i <= v1Length - 1;
|
35
35
|
const element = elementRegistry.addElementTrade({
|
36
36
|
tags: isV1 ? ['deprecated'] : undefined,
|
37
|
+
ref: account.pubkey.toString(),
|
38
|
+
link: 'https://jup.ag/trigger/',
|
37
39
|
});
|
38
40
|
element.setTrade({
|
39
41
|
inputAsset: {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,0BAAgB,EAChB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;QACD,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,4BAAkB,EAClB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;KACF,CAAC,CAAC;IACH,MAAM,QAAQ,GAAG,WAAW,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC;IACvC,MAAM,QAAQ,GAAG,WAAW,CAAC,IAAI,EAAE,CAAC;IACpC,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,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;QAE5B,MAAM,IAAI,GAAG,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC;QAE/B,MAAM,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC;YAC9C,IAAI,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,SAAS;
|
1
|
+
{"version":3,"file":"limitFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/limitFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2CAA6E;AAC7E,uCAAyC;AACzC,mFAAgF;AAChF,uCAAiE;AAEjE,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,WAAW,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACpC,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,0BAAgB,EAChB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;QACD,KAAK;QACL,IAAA,iCAAwB,EACtB,MAAM,EACN,4BAAkB,EAClB,4BAAgB,EAChB,IAAA,sBAAY,EAAC,KAAK,CAAC,CACpB;KACF,CA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,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -68,6 +68,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
68
68
|
.div(Math.pow(10, outputTokenPrice.decimals))
|
69
69
|
.toNumber(),
|
70
70
|
ref: account.pubkey.toString(),
|
71
|
+
link: 'https://jup.ag/recurring/',
|
71
72
|
},
|
72
73
|
value: (0, portfolio_core_1.getUsdValueSum)([inputAsset.value, (outputAsset === null || outputAsset === void 0 ? void 0 : outputAsset.value) || 0]),
|
73
74
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO,EAAE,CAAC;IAErC,MAAM,WAAW,GAAG,MAAM,KAAK,CAAC,mBAAmB,CACjD,QAAQ;SACL,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,UAAU,CAAC,QAAQ,EAAE,CAAC,CAA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AAO,GAA0B;YACrC,IAAI,EAAE,qCAAoB,CAAC,KAAK;YAChC,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE;gBACJ,MAAM,EAAE;oBACN,KAAK,EAAE,UAAU;oBACjB,MAAM,EAAE,WAAW;iBACpB;gBACD,gBAAgB,EAAE,OAAO,CAAC,MAAM,CAAC,GAAG,CAAC,kBAAkB,CAAC,CAAC,QAAQ,EAAE;gBACnE,kBAAkB;gBAClB,YAAY;gBACZ,aAAa;gBACb,UAAU,EAAE,eAAe,CAAC,KAAK;gBACjC,WAAW,EAAE,gBAAgB,CAAC,KAAK;gBACnC,SAAS,EAAE,OAAO,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE;gBACnD,qBAAqB,EAAE,OAAO,CAAC,YAAY;qBACxC,GAAG,CAAC,SAAA,EAAE,EAAI,gBAAgB,CAAC,QAAQ,CAAA,CAAC;qBACpC,QAAQ,EAAE;gBACb,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,QAAQ,EAAE;
|
1
|
+
{"version":3,"file":"valueAverageFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/valueAverageFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AAGpC,2CAAgE;AAChE,oDAAyD;AACzD,kDAAiE;AACjE,wGAAgF;AAChF,uCAA+C;AAC/C,uCAAgD;AAEhD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,4BAAkB,EAClB,iCAAqB,EACrB,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;IACF,IAAI,QAAQ,CAAC,MAAM,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CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,gBAAgB;IACjC,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -136,6 +136,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
136
136
|
.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals))
|
137
137
|
.dividedBy(reserve.exchangeRate),
|
138
138
|
alreadyShifted: true,
|
139
|
+
sourceRefs: [
|
140
|
+
{ name: 'Reserve', address: deposit.depositReserve.toString() },
|
141
|
+
],
|
139
142
|
});
|
140
143
|
if (type === 'multiply') {
|
141
144
|
const elevationGroup = elevationGroups.get(obligation.elevationGroup);
|
@@ -176,6 +179,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
176
179
|
address: reserve.liquidity.mintPubkey,
|
177
180
|
amount: amountRaw.dividedBy(new bignumber_js_1.default(10).pow(reserve.liquidity.mintDecimals)),
|
178
181
|
alreadyShifted: true,
|
182
|
+
sourceRefs: [
|
183
|
+
{ name: 'Reserve', address: borrow.borrowReserve.toString() },
|
184
|
+
],
|
179
185
|
});
|
180
186
|
element.addBorrowedWeight(Number(reserve.config.borrowFactorPct) / 100);
|
181
187
|
element.addBorrowedYield([
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"lendsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/lendsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAiE;AACjE,gEAAqC;AACrC,2CAMqB;AAGrB,iDAAsD;AACtD,2CAAmE;AAEnE,+CAAmE;AACnE,yCAIwB;AACxB,6CAAsE;AACtE,gFAA6E;AAC7E,kEAA+D;AAC/D,4DAAyD;AAEzD,MAAM,eAAe,GAAG,kCAAkC,CAAC;AAE3D,MAAM,WAAW,GAAG,I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ACvB,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,IAAA,yBAAQ,EAAC,OAAO,CAAC,SAAS,CAAC,EAAE;aAC/D,CAAC,CAAC;QACL,CAAC;QAED,IAAI,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;YAC5C,MAAM,eAAe,GAAG,gBAAgB,CAAC,KAAK,CAAC,eAAe,CAAC,CAAC;YAChE,MAAM,QAAQ,GAAG,gBAAgB,CAAC,SAAS,CAAC,eAAe,CAAC,CAAC;YAE7D,OAAO,CAAC,OAAO,CACb,GAAG,OAAO,CAAC,IAAI,IAAI,QAAQ,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,GAAG,CAC3D,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,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"}
|
@@ -41,6 +41,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
41
41
|
const element = elementRegistry.addElementTrade({
|
42
42
|
label: 'LimitOrder',
|
43
43
|
ref: account.pubkey,
|
44
|
+
link: `https://swap.kamino.finance/swap`,
|
44
45
|
});
|
45
46
|
element.setTrade({
|
46
47
|
inputAsset: {
|
@@ -58,6 +59,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
58
59
|
if (account.tipAmount.isPositive()) {
|
59
60
|
const tipElement = elementRegistry.addElementMultiple({
|
60
61
|
label: 'Rewards',
|
62
|
+
name: 'Swap Tips',
|
61
63
|
ref: account.pubkey,
|
62
64
|
link: `https://swap.kamino.finance/swap`,
|
63
65
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ordersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/ordersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAG5E,2CAA8D;AAC9D,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAC7E,2CAA8C;AAE9C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,QAAQ,GAAG,MAAM,IAAA,iCAAwB,EAC7C,MAAM,EACN,mBAAW,EACX,+BAAmB,EACnB;QACE;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,CAAC;gBACT,KAAK,EAAE,aAAa;aACrB;SACF;QACD;YACE,MAAM,EAAE;gBACN,MAAM,EAAE,EAAE;gBACV,KAAK,EAAE,KAAK;aACb;SACF;QACD;YACE,QAAQ,EAAE,GAAG;SACd;KACF,CACF,CAAC;IACF,IAAI,CAAC,QAAQ;QAAE,OAAO,EAAE,CAAC;IAEzB,MAAM,eAAe,GAAG,IAAI,iCAAe,CAAC,0BAAS,CAAC,MAAM,EAAE,sBAAU,CAAC,CAAC;IAE1E,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC3B,MAAM,OAAO,GAAG,eAAe,CAAC,eAAe,CAAC;YAC9C,KAAK,EAAE,YAAY;YACnB,GAAG,EAAE,OAAO,CAAC,MAAM;
|
1
|
+
{"version":3,"file":"ordersFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/ordersFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAA4E;AAG5E,2CAA8D;AAC9D,iDAAsD;AACtD,+CAA8D;AAC9D,gFAA6E;AAC7E,2CAA8C;AAE9C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,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AAO,CAAC,MAAM;gBACnB,IAAI,EAAE,kCAAkC;aACzC,CAAC,CAAC;YACH,UAAU,CAAC,QAAQ,CAAC;gBAClB,OAAO,EAAE,oCAAmB;gBAC5B,MAAM,EAAE,OAAO,CAAC,SAAS;aAC1B,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;AAC5C,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -42,6 +42,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
42
42
|
const element = elementRegistry.addElementMultiple({
|
43
43
|
label: 'Staked',
|
44
44
|
ref: stakeAccount.pubkey,
|
45
|
+
link: 'https://solana.layer3.xyz/rewards?tab=staking',
|
45
46
|
});
|
46
47
|
element.addAsset({
|
47
48
|
address: constants_1.l3Mint,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/layer3/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAA4D;AAC5D,+CAI4B;AAC5B,iDAAsD;AACtD,gFAA6E;AAC7E,uCAA0C;AAE1C,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,CAAC,kBAAkB,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CAC3D;QACE,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,QAAQ,EAAE;QAC/B,yBAAgB,CAAC,QAAQ,EAAE;QAC3B,kBAAM,CAAC,QAAQ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AAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -8,9 +8,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
9
|
});
|
10
10
|
};
|
11
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
13
|
const constants_1 = require("./constants");
|
@@ -18,7 +15,7 @@ const clients_1 = require("../../utils/clients");
|
|
18
15
|
const solana_1 = require("../../utils/solana");
|
19
16
|
const structs_1 = require("./structs");
|
20
17
|
const filters_1 = require("./filters");
|
21
|
-
const
|
18
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
22
19
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
23
20
|
const client = (0, clients_1.getClientSolana)();
|
24
21
|
const accounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.escrowStruct, constants_1.LifinityLockerProgramId, (0, filters_1.escrowFilter)(owner));
|
@@ -28,26 +25,26 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
28
25
|
const { amount, escrowEndsAt, duration } = escrowAccount;
|
29
26
|
if (amount.isZero())
|
30
27
|
return [];
|
31
|
-
const lfntyTokenPrice = yield cache.getTokenPrice(constants_1.lfntyMint, portfolio_core_1.NetworkId.solana);
|
32
28
|
const yearsLocked = duration.dividedBy(60 * 60 * 24 * 365).decimalPlaces(0);
|
33
29
|
let name = 'Locked';
|
34
30
|
if (escrowEndsAt.isZero()) {
|
35
31
|
name += ` (${yearsLocked.toString()} year${yearsLocked.isGreaterThan(1) ? 's' : ''})`;
|
36
32
|
}
|
37
|
-
const
|
38
|
-
|
33
|
+
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
34
|
+
const element = registry.addElementMultiple({
|
35
|
+
label: 'Vesting',
|
36
|
+
link: 'https://lifinity.io/reward',
|
37
|
+
ref: escrowAccount.pubkey,
|
38
|
+
name,
|
39
39
|
});
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
46
|
-
platformId: constants_1.platformId,
|
47
|
-
value: asset.value,
|
48
|
-
name,
|
40
|
+
element.addAsset({
|
41
|
+
address: constants_1.lfntyMint,
|
42
|
+
amount,
|
43
|
+
attributes: {
|
44
|
+
lockedUntil: escrowEndsAt.times(1000).toNumber() || undefined,
|
49
45
|
},
|
50
|
-
|
46
|
+
});
|
47
|
+
return registry.getElements(cache);
|
51
48
|
});
|
52
49
|
const fetcher = {
|
53
50
|
id: `${constants_1.platformId}-locker`,
|