@sonarwatch/portfolio-plugins 0.14.20 → 0.14.22
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/index.js +16 -0
- package/src/index.js.map +1 -1
- package/src/plugins/cyberfrogs/constants.d.ts +5 -0
- package/src/plugins/cyberfrogs/constants.js +14 -0
- package/src/plugins/cyberfrogs/constants.js.map +1 -0
- package/src/plugins/cyberfrogs/index.d.ts +6 -0
- package/src/plugins/cyberfrogs/index.js +12 -0
- package/src/plugins/cyberfrogs/index.js.map +1 -0
- package/src/plugins/cyberfrogs/structs.d.ts +13 -0
- package/src/plugins/cyberfrogs/structs.js +15 -0
- package/src/plugins/cyberfrogs/structs.js.map +1 -0
- package/src/plugins/cyberfrogs/thorDepositFetcher.js +52 -0
- package/src/plugins/cyberfrogs/thorDepositFetcher.js.map +1 -0
- package/src/plugins/grass/constants.d.ts +6 -0
- package/src/plugins/grass/constants.js +15 -0
- package/src/plugins/grass/constants.js.map +1 -0
- package/src/plugins/grass/helpers.d.ts +2 -0
- package/src/plugins/grass/helpers.js +10 -0
- package/src/plugins/grass/helpers.js.map +1 -0
- package/src/plugins/grass/index.d.ts +6 -0
- package/src/plugins/grass/index.js +12 -0
- package/src/plugins/grass/index.js.map +1 -0
- package/src/plugins/grass/stakingFetcher.d.ts +3 -0
- package/src/plugins/grass/stakingFetcher.js +52 -0
- package/src/plugins/grass/stakingFetcher.js.map +1 -0
- package/src/plugins/grass/structs.d.ts +28 -0
- package/src/plugins/grass/structs.js +28 -0
- package/src/plugins/grass/structs.js.map +1 -0
- package/src/plugins/hxro/constants.d.ts +6 -0
- package/src/plugins/hxro/constants.js +16 -0
- package/src/plugins/hxro/constants.js.map +1 -0
- package/src/plugins/hxro/index.d.ts +6 -0
- package/src/plugins/hxro/index.js +12 -0
- package/src/plugins/hxro/index.js.map +1 -0
- package/src/plugins/hxro/stakingFetcher.d.ts +3 -0
- package/src/plugins/hxro/stakingFetcher.js +57 -0
- package/src/plugins/hxro/stakingFetcher.js.map +1 -0
- package/src/plugins/hxro/structs.d.ts +37 -0
- package/src/plugins/hxro/structs.js +36 -0
- package/src/plugins/hxro/structs.js.map +1 -0
- package/src/plugins/hxro/types.d.ts +5 -0
- package/src/plugins/hxro/types.js +3 -0
- package/src/plugins/hxro/types.js.map +1 -0
- package/src/plugins/jupiter/filters.d.ts +1 -0
- package/src/plugins/jupiter/filters.js +11 -1
- package/src/plugins/jupiter/filters.js.map +1 -1
- package/src/plugins/jupiter/governance/voteFetcher.js +25 -25
- package/src/plugins/jupiter/governance/voteFetcher.js.map +1 -1
- package/src/plugins/jupiter/helpers.js +22 -8
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/launchpad/structs.d.ts +10 -1
- package/src/plugins/jupiter/launchpad/structs.js +9 -1
- package/src/plugins/jupiter/launchpad/structs.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +0 -4
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/kamino/constants.js +12 -0
- package/src/plugins/kamino/constants.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +10 -11
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/orca/helpers_fees.js +12 -3
- package/src/plugins/orca/helpers_fees.js.map +1 -1
- package/src/plugins/spdr/constants.d.ts +7 -0
- package/src/plugins/spdr/constants.js +17 -0
- package/src/plugins/spdr/constants.js.map +1 -0
- package/src/plugins/spdr/index.d.ts +6 -0
- package/src/plugins/spdr/index.js +12 -0
- package/src/plugins/spdr/index.js.map +1 -0
- package/src/plugins/spdr/stakingFetcher.d.ts +3 -0
- package/src/plugins/spdr/stakingFetcher.js +78 -0
- package/src/plugins/spdr/stakingFetcher.js.map +1 -0
- package/src/plugins/spdr/structs.d.ts +26 -0
- package/src/plugins/spdr/structs.js +26 -0
- package/src/plugins/spdr/structs.js.map +1 -0
- package/src/plugins/spdr/types.d.ts +21 -0
- package/src/plugins/spdr/types.js +3 -0
- package/src/plugins/spdr/types.js.map +1 -0
- package/src/plugins/tensor/index.js +0 -2
- package/src/plugins/tensor/index.js.map +1 -1
- package/src/plugins/tensor/locksFetcher.js +0 -62
- package/src/plugins/tensor/locksFetcher.js.map +0 -1
- /package/src/plugins/{tensor/locksFetcher.d.ts → cyberfrogs/thorDepositFetcher.d.ts} +0 -0
@@ -0,0 +1,36 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.claimableRewardsStruct = exports.stakeRewardsStruct = exports.stakeRewardsStateStruct = 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.stakeRewardsStateStruct = new beet_1.BeetStruct([
|
8
|
+
['effectiveAmountStaked', solana_1.u128],
|
9
|
+
['amountStaked', solana_1.u64],
|
10
|
+
['claimedShares', solana_1.u128],
|
11
|
+
], (args) => args);
|
12
|
+
exports.stakeRewardsStruct = new beet_1.BeetStruct([
|
13
|
+
['buffer', (0, solana_1.blob)(8)],
|
14
|
+
['staker', beet_solana_1.publicKey],
|
15
|
+
['stakepool', beet_solana_1.publicKey],
|
16
|
+
['poolShares', beet_solana_1.publicKey],
|
17
|
+
['stakerShares', beet_solana_1.publicKey],
|
18
|
+
['vaultNeedsMultisig', beet_1.bool],
|
19
|
+
['depositTimestamp', solana_1.i64],
|
20
|
+
['stakeDuration', solana_1.u64],
|
21
|
+
['lastClaimTimestamp', solana_1.i64],
|
22
|
+
['padding', (0, solana_1.blob)(1)],
|
23
|
+
['stakeState', exports.stakeRewardsStateStruct],
|
24
|
+
], (args) => args);
|
25
|
+
exports.claimableRewardsStruct = new beet_1.BeetStruct([
|
26
|
+
['buffer', (0, solana_1.blob)(8)],
|
27
|
+
['staker', beet_solana_1.publicKey],
|
28
|
+
['stakepool', beet_solana_1.publicKey],
|
29
|
+
['poolShares', beet_solana_1.publicKey],
|
30
|
+
['stakerShares', beet_solana_1.publicKey],
|
31
|
+
['depositTimestamp', solana_1.i64],
|
32
|
+
['stakeDuration', solana_1.u64],
|
33
|
+
['lastClaimTimestamp', solana_1.u64],
|
34
|
+
['claimableShares', solana_1.u64],
|
35
|
+
], (args) => args);
|
36
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/structs.ts"],"names":[],"mappings":";;;AAAA,oDAA6D;AAC7D,kEAA6D;AAG7D,+CAA0D;AAQ7C,QAAA,uBAAuB,GAAG,IAAI,iBAAU,CACnD;IACE,CAAC,uBAAuB,EAAE,aAAI,CAAC;IAC/B,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,eAAe,EAAE,aAAI,CAAC;CACxB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAyB,CACpC,CAAC;AAgBW,QAAA,kBAAkB,GAAG,IAAI,iBAAU,CAC9C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,cAAc,EAAE,uBAAS,CAAC;IAC3B,CAAC,oBAAoB,EAAE,WAAI,CAAC;IAC5B,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,YAAY,EAAE,+BAAuB,CAAC;CACxC,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AAeW,QAAA,sBAAsB,GAAG,IAAI,iBAAU,CAClD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,YAAY,EAAE,uBAAS,CAAC;IACzB,CAAC,cAAc,EAAE,uBAAS,CAAC;IAC3B,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,iBAAiB,EAAE,YAAG,CAAC;CACzB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAwB,CACnC,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/hxro/types.ts"],"names":[],"mappings":""}
|
@@ -1,3 +1,4 @@
|
|
1
1
|
import { GetProgramAccountsFilter } from '@solana/web3.js';
|
2
2
|
export declare const perpetualsPositionsFilter: (owner: string) => GetProgramAccountsFilter[];
|
3
3
|
export declare const escrowFilter: (owner: string) => GetProgramAccountsFilter[];
|
4
|
+
export declare const partialUnstakeFilter: (escrow: string) => GetProgramAccountsFilter[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.escrowFilter = exports.perpetualsPositionsFilter = void 0;
|
3
|
+
exports.partialUnstakeFilter = exports.escrowFilter = exports.perpetualsPositionsFilter = void 0;
|
4
4
|
const perpetualsPositionsFilter = (owner) => [
|
5
5
|
{
|
6
6
|
memcmp: {
|
@@ -21,4 +21,14 @@ const escrowFilter = (owner) => [
|
|
21
21
|
{ dataSize: 322 },
|
22
22
|
];
|
23
23
|
exports.escrowFilter = escrowFilter;
|
24
|
+
const partialUnstakeFilter = (escrow) => [
|
25
|
+
{
|
26
|
+
memcmp: {
|
27
|
+
offset: 8,
|
28
|
+
bytes: escrow,
|
29
|
+
},
|
30
|
+
},
|
31
|
+
{ dataSize: 156 },
|
32
|
+
];
|
33
|
+
exports.partialUnstakeFilter = partialUnstakeFilter;
|
24
34
|
//# sourceMappingURL=filters.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,GAAG,CACvC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,yBAAyB,6BAUpC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,yBAAyB,GAAG,CACvC,KAAa,EACe,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,yBAAyB,6BAUpC;AAEK,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,EAAE;YACV,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB;AAEK,MAAM,oBAAoB,GAAG,CAClC,MAAc,EACc,EAAE,CAAC;IAC/B;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,MAAM;SACd;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AAVW,QAAA,oBAAoB,wBAU/B"}
|
@@ -8,46 +8,46 @@ 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 clients_1 = require("../../../utils/clients");
|
17
14
|
const getParsedAccountInfo_1 = require("../../../utils/solana/getParsedAccountInfo");
|
18
15
|
const helpers_1 = require("../helpers");
|
19
|
-
const tokenPriceToAssetToken_1 = __importDefault(require("../../../utils/misc/tokenPriceToAssetToken"));
|
20
16
|
const structs_1 = require("../launchpad/structs");
|
21
17
|
const constants_1 = require("../launchpad/constants");
|
22
18
|
const constants_2 = require("./constants");
|
19
|
+
const ElementRegistry_1 = require("../../../utils/elementbuilder/ElementRegistry");
|
23
20
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
21
|
const client = (0, clients_1.getClientSolana)();
|
25
22
|
const escrowPubkey = (0, helpers_1.getVotePda)(owner);
|
26
23
|
const escrowAccount = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, structs_1.escrowStruct, escrowPubkey);
|
27
24
|
if (!escrowAccount)
|
28
25
|
return [];
|
29
|
-
const
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
const
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
name: 'Vote',
|
45
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
46
|
-
platformId: constants_2.platformId,
|
47
|
-
data: { assets: [asset] },
|
48
|
-
value: asset.value,
|
26
|
+
// const partialUnstakingAccounts = await getParsedProgramAccounts(
|
27
|
+
// client,
|
28
|
+
// partialUnstakeStruct,
|
29
|
+
// voteProgramId,
|
30
|
+
// partialUnstakeFilter(escrowAccount.pubkey.toString())
|
31
|
+
// );
|
32
|
+
const registry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_2.platformId);
|
33
|
+
const element = registry.addElementMultiple({ label: 'Staked' });
|
34
|
+
element.addAsset({
|
35
|
+
address: constants_1.jupMint,
|
36
|
+
amount: escrowAccount.amount,
|
37
|
+
attributes: {
|
38
|
+
lockedUntil: escrowAccount.escrowStartedAt.isZero()
|
39
|
+
? undefined
|
40
|
+
: escrowAccount.escrowEndsAt.times(1000).toNumber(),
|
49
41
|
},
|
50
|
-
|
42
|
+
});
|
43
|
+
// partialUnstakingAccounts.forEach((account) => {
|
44
|
+
// element.addAsset({
|
45
|
+
// address: jupMint,
|
46
|
+
// amount: account.amount,
|
47
|
+
// attributes: { lockedUntil: account.expiration.times(1000).toNumber() },
|
48
|
+
// });
|
49
|
+
// });
|
50
|
+
return registry.getElements(cache);
|
51
51
|
});
|
52
52
|
const fetcher = {
|
53
53
|
id: `${constants_2.platformId}-vote`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"voteFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/voteFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"voteFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/voteFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,qFAAkF;AAClF,wCAAwC;AACxC,kDAA0E;AAC1E,sDAAgE;AAChE,2CAAyC;AAGzC,mFAAgF;AAEhF,M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ePda(owner) {
|
|
25
25
|
], constants_1.voteProgramId)[0];
|
26
26
|
}
|
27
27
|
exports.getVotePda = getVotePda;
|
28
|
+
const maxIdsPerRequest = 100;
|
28
29
|
function getJupiterPrices(mints, vsMint) {
|
29
30
|
return __awaiter(this, void 0, void 0, function* () {
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
31
|
+
let res;
|
32
|
+
const pricesData = [];
|
33
|
+
let subMints;
|
34
|
+
let start = 0;
|
35
|
+
let end = maxIdsPerRequest - 1;
|
36
|
+
do {
|
37
|
+
subMints = mints.slice(start, end);
|
38
|
+
res = yield axios_1.default.get('https://api.jup.ag/price/v2', {
|
39
|
+
params: {
|
40
|
+
ids: subMints.map((m) => m.toString()).join(','),
|
41
|
+
vsToken: vsMint.toString(),
|
42
|
+
},
|
43
|
+
});
|
44
|
+
start += maxIdsPerRequest;
|
45
|
+
end += maxIdsPerRequest;
|
46
|
+
pricesData.push(res.data.data);
|
47
|
+
} while (mints.at(start));
|
36
48
|
const prices = new Map();
|
37
|
-
for (const
|
38
|
-
|
49
|
+
for (const priceData of pricesData) {
|
50
|
+
for (const [, value] of Object.entries(priceData)) {
|
51
|
+
prices.set(value.id, value.price);
|
52
|
+
}
|
39
53
|
}
|
40
54
|
return prices;
|
41
55
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAA6C;AAC7C,+DAGoC;AAEpC,qDAAoE;AAEpE,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrB,wBAAY,CAAC,OAAO,EAAE;QACtB,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;KAC/B,EACD,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AATD,gCASC;AAED,SAAsB,gBAAgB,CAAC,KAAkB,EAAE,MAAiB;;QAC1E,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAA6C;AAC7C,+DAGoC;AAEpC,qDAAoE;AAEpE,SAAgB,UAAU,CAAC,KAAa;IACtC,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,QAAQ,CAAC;QACrB,wBAAY,CAAC,OAAO,EAAE;QACtB,IAAI,mBAAS,CAAC,KAAK,CAAC,CAAC,OAAO,EAAE;KAC/B,EACD,yBAAa,CACd,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AATD,gCASC;AAED,MAAM,gBAAgB,GAAG,GAAG,CAAC;AAE7B,SAAsB,gBAAgB,CAAC,KAAkB,EAAE,MAAiB;;QAC1E,IAAI,GAAG,CAAC;QACR,MAAM,UAAU,GAAG,EAAE,CAAC;QACtB,IAAI,QAAQ,CAAC;QACb,IAAI,KAAK,GAAG,CAAC,CAAC;QACd,IAAI,GAAG,GAAG,gBAAgB,GAAG,CAAC,CAAC;QAC/B,GAAG,CAAC;YACF,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;YACnC,GAAG,GAAG,MAAM,eAAK,CAAC,GAAG,CACnB,6BAA6B,EAC7B;gBACE,MAAM,EAAE;oBACN,GAAG,EAAE,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;oBAChD,OAAO,EAAE,MAAM,CAAC,QAAQ,EAAE;iBAC3B;aACF,CACF,CAAC;YACF,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AAK,CAAC,CAAC,CAAC;YACxE,WAAW,CAAC,GAAG,CAAC,OAAO,EAAE,aAAa,CAAC,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,KAAK,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,EAAE,CAAC,CAAC;AAC1C,CAAC;AAnBD,0CAmBC"}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
/// <reference types="node" />
|
2
|
-
import { BeetStruct } from '@metaplex-foundation/beet';
|
2
|
+
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
5
|
export type Escrow = {
|
@@ -16,6 +16,15 @@ export type Escrow = {
|
|
16
16
|
buffers: BigNumber[];
|
17
17
|
};
|
18
18
|
export declare const escrowStruct: BeetStruct<Escrow, Partial<Escrow>>;
|
19
|
+
export type PartialUnstake = {
|
20
|
+
buffer: Buffer;
|
21
|
+
escrow: PublicKey;
|
22
|
+
amount: BigNumber;
|
23
|
+
expiration: BigNumber;
|
24
|
+
buffers: BigNumber[];
|
25
|
+
memo: number[];
|
26
|
+
};
|
27
|
+
export declare const partialUnstakeStruct: FixableBeetStruct<PartialUnstake, Partial<PartialUnstake>>;
|
19
28
|
export type ClaimStatus = {
|
20
29
|
buffer: Buffer;
|
21
30
|
claimant: PublicKey;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.claimStatusStruct = exports.escrowStruct = void 0;
|
3
|
+
exports.claimStatusStruct = exports.partialUnstakeStruct = exports.escrowStruct = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../../utils/solana");
|
@@ -17,6 +17,14 @@ exports.escrowStruct = new beet_1.BeetStruct([
|
|
17
17
|
['isMaxLock', beet_1.bool],
|
18
18
|
['buffers', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 10)],
|
19
19
|
], (args) => args);
|
20
|
+
exports.partialUnstakeStruct = new beet_1.FixableBeetStruct([
|
21
|
+
['buffer', (0, solana_1.blob)(8)],
|
22
|
+
['escrow', beet_solana_1.publicKey],
|
23
|
+
['amount', solana_1.u64],
|
24
|
+
['expiration', solana_1.i64],
|
25
|
+
['buffers', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 6)],
|
26
|
+
['memo', (0, beet_1.array)(beet_1.u8)],
|
27
|
+
], (args) => args);
|
20
28
|
exports.claimStatusStruct = new beet_1.BeetStruct([
|
21
29
|
['buffer', (0, solana_1.blob)(8)],
|
22
30
|
['claimant', beet_solana_1.publicKey],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/structs.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/launchpad/structs.ts"],"names":[],"mappings":";;;AAAA,oDAOmC;AACnC,kEAA6D;AAG7D,kDAA6D;AAgBhD,QAAA,YAAY,GAAG,IAAI,iBAAU,CACxC;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,MAAM,EAAE,SAAE,CAAC;IACZ,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,iBAAiB,EAAE,YAAG,CAAC;IACxB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,uBAAS,CAAC;IAC3B,CAAC,WAAW,EAAE,WAAI,CAAC;IACnB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,aAAI,EAAE,EAAE,CAAC,CAAC;CAC7C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAc,CACzB,CAAC;AAUW,QAAA,oBAAoB,GAAG,IAAI,wBAAiB,CACvD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,QAAQ,EAAE,uBAAS,CAAC;IACrB,CAAC,QAAQ,EAAE,YAAG,CAAC;IACf,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,aAAI,EAAE,CAAC,CAAC,CAAC;IAC3C,CAAC,MAAM,EAAE,IAAA,YAAK,EAAC,SAAE,CAAC,CAAC;CACpB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AAYW,QAAA,iBAAiB,GAAG,IAAI,iBAAU,CAC7C;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,UAAU,EAAE,uBAAS,CAAC;IACvB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,uBAAuB,EAAE,YAAG,CAAC;IAC9B,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,UAAU,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACrB,CAAC,OAAO,EAAE,uBAAS,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAmB,CAC9B,CAAC"}
|
@@ -19,10 +19,6 @@ const clients_1 = require("../../utils/clients");
|
|
19
19
|
const constants_3 = require("../sanctum/constants");
|
20
20
|
const mints = [
|
21
21
|
'xLfNTYy76B8Tiix3hA51Jyvc1kMSFV4sPdR7szTZsRu', // xLifinity
|
22
|
-
'BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR', // Banx
|
23
|
-
'4LLbsb5ReP3yEtYzmXewyGjcir5uXtKFURtaEUVC2AHs', // Parcl
|
24
|
-
'SHARKSYJjqaNyxVfrpnBN9pjgkhwDhatnMyicWPnr1s', // Shark
|
25
|
-
'KMNo3nJsBXfcpJTVhZcXLW7RmTwTt4GVFE7suUBo9sS', // Kamino
|
26
22
|
'DdFPRnccQqLD4zCHrBqdY95D6hvw6PLWp9DEXj1fLCL9', // Wrapped USDC (Allbridge from Ethereum)
|
27
23
|
'eqKJTf1Do4MDPyKisMYqVaUFpkEFAs3riGF3ceDH2Ca', // Wrapped USDC (Allbridge from Polygon)
|
28
24
|
'8Yv9Jz4z7BUHP68dz8E8m3tMe6NKgpMUKn8KVqrPA6Fr', // Wrapped USDC (Allbridge from Avalanche)
|
@@ -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;AACtD,oDAAgF;AAEhF,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,
|
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;AACtD,oDAAgF;AAEhF,MAAM,KAAK,GAAG;IACZ,6CAA6C,EAAE,YAAY;IAC3D,8CAA8C,EAAE,yCAAyC;IACzF,6CAA6C,EAAE,wCAAwC;IACvF,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,oBAAoB;IACpE,8CAA8C,EAAE,QAAQ;IACxD,8CAA8C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AAE,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"}
|
@@ -100,6 +100,18 @@ exports.lendingConfigs = new Map([
|
|
100
100
|
],
|
101
101
|
['ByYiZxp8QrdN9qbdtaAiePN8AAr3qvTPppNJDpf5DVJ5', { name: 'Altcoins Market' }],
|
102
102
|
['BJnbcRHqvppTyGesLzWASGKnmnF1wq9jZu6ExrjT7wvF', { name: 'Ethena Market' }],
|
103
|
+
[
|
104
|
+
'H6rHXmXoCQvq8Ue81MqNh7ow5ysPa1dSozwW3PU1dDH6',
|
105
|
+
{
|
106
|
+
name: 'Jito Market',
|
107
|
+
multiplyPairs: [
|
108
|
+
[
|
109
|
+
'J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn',
|
110
|
+
'So11111111111111111111111111111111111111112',
|
111
|
+
],
|
112
|
+
],
|
113
|
+
},
|
114
|
+
],
|
103
115
|
]);
|
104
116
|
exports.marketsKey = `markets`;
|
105
117
|
exports.reservesKey = `reserves`;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAK/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,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,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,kBAAkB,GAAG,gBAAgB,CAAC;AACtC,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;gBACD;oBACE,6CAA6C;oBAC7C,6CAA6C;iBAC9C;gBACD;oBACE,6CAA6C;oBAC7C,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;QACE,8CAA8C;QAC9C;YACE,IAAI,EAAE,YAAY;YAClB,aAAa,EAAE;gBACb;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;gBACD;oBACE,8CAA8C;oBAC9C,8CAA8C;iBAC/C;aACF;SACF;KACF;IACD,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,iBAAiB,EAAE,CAAC;IAC7E,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,eAAe,EAAE,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/kamino/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAK/B,QAAA,UAAU,GAAG,QAAQ,CAAC;AACtB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,QAAQ;IACd,KAAK,EAAE,qCAAqC,kBAAU,OAAO;IAC7D,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,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,aAAa,GAA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,IAAI,EAAE,aAAa;YACnB,aAAa,EAAE;gBACb;oBACE,8CAA8C;oBAC9C,6CAA6C;iBAC9C;aACF;SACF;KACF;CACF,CAAC,CAAC;AAEU,QAAA,UAAU,GAAG,SAAS,CAAC;AACvB,QAAA,WAAW,GAAG,UAAU,CAAC;AACzB,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,oCAAoC;IAC/C,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC;AACW,QAAA,gBAAgB,GAAmB;IAC9C,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,SAAS;IACnB,EAAE,EAAE,WAAW;IACf,WAAW,EAAE,QAAQ;IACrB,WAAW,EAAE,6BAA6B;IAC1C,SAAS,EAAE,6CAA6C;IACxD,KAAK,EAAE,+CAA+C;IACtD,IAAI,EAAE,IAAI;CACX,CAAC"}
|
@@ -138,31 +138,30 @@ function getOrcaNftFetcher(platformId, programId) {
|
|
138
138
|
}
|
139
139
|
if (!assetTokenA ||
|
140
140
|
!assetTokenB ||
|
141
|
-
assetTokenA.value === null
|
142
|
-
assetTokenB.value === null)
|
141
|
+
(assetTokenA.value === null && assetTokenB.value === null))
|
143
142
|
continue;
|
144
|
-
const assets =
|
145
|
-
|
146
|
-
|
147
|
-
|
143
|
+
const assets = [assetTokenA, assetTokenB];
|
144
|
+
const assetsValue = (0, portfolio_core_1.getUsdValueSum)([
|
145
|
+
assetTokenA.value,
|
146
|
+
assetTokenB.value,
|
147
|
+
]);
|
148
148
|
const rewardAssetsValue = (0, portfolio_core_1.getUsdValueSum)(rewardAssets.map((a) => a.value));
|
149
|
-
|
150
|
-
continue;
|
149
|
+
const totalValue = (0, portfolio_core_1.getUsdValueSum)([assetsValue, rewardAssetsValue]);
|
151
150
|
elements.push({
|
152
151
|
type: portfolio_core_1.PortfolioElementType.liquidity,
|
153
152
|
networkId: portfolio_core_1.NetworkId.solana,
|
154
153
|
platformId,
|
155
154
|
label: 'LiquidityPool',
|
156
155
|
name: 'Concentrated',
|
157
|
-
value:
|
156
|
+
value: totalValue,
|
158
157
|
data: {
|
159
158
|
liquidities: [
|
160
159
|
{
|
161
160
|
assets,
|
162
|
-
assetsValue
|
161
|
+
assetsValue,
|
163
162
|
rewardAssets,
|
164
163
|
rewardAssetsValue,
|
165
|
-
value:
|
164
|
+
value: totalValue,
|
166
165
|
yields: [],
|
167
166
|
},
|
168
167
|
],
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,C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,MAAM,EAChB,iBAAiB,CAClB,CACF,CAAC;oBACJ,CAAC;gBACH,CAAC;YACH,CAAC;YAED,IACE,CAAC,WAAW;gBACZ,CAAC,WAAW;gBACZ,WAAW,CAAC,KAAK,KAAK,IAAI
|
1
|
+
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAChE,qGAA6E;AAC7E,wFAAyF;AAEzF,iDAIwB;AAEX,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC/B,UAAkB,EAClB,SAAoB;IAEpB,OAAO,CACL,KAAY,EACZ,IAAiC,EACJ,EAAE;QAC/B,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,uBAAuB,GAAgB,EAAE,CAAC;QAEhD,IAAI,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;YACnB,MAAM,OAAO,GAAG,IAAI,mBAAS,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAEhD,MAAM,YAAY,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC,QAAQ,EAAE,CAAC,CAAC;YAEnE,MAAM,CAAC,cAAc,CAAC,GAAG,mBAAS,CAAC,sBAAsB,CACvD,YAAY,EACZ,SAAS,CACV,CAAC;YACF,uBAAuB,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QACH,IAAI,uBAAuB,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAEpD,MAAM,aAAa,GAAG,MAAM,IAAA,sCAA6B,EACvD,MAAM,EACN,0B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E,WAAW,CAAC,CAAC;YAE1C,MAAM,WAAW,GAAG,IAAA,+BAAc,EAAC;gBACjC,WAAW,CAAC,KAAK;gBACjB,WAAW,CAAC,KAAK;aAClB,CAAC,CAAC;YACH,MAAM,iBAAiB,GAAG,IAAA,+BAAc,EACtC,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,CACjC,CAAC;YACF,MAAM,UAAU,GAAG,IAAA,+BAAc,EAAC,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;YAEpE,QAAQ,CAAC,IAAI,CAAC;gBACZ,IAAI,EAAE,qCAAoB,CAAC,SAAS;gBACpC,SAAS,EAAE,0BAAS,CAAC,MAAM;gBAC3B,UAAU;gBACV,KAAK,EAAE,eAAe;gBACtB,IAAI,EAAE,cAAc;gBACpB,KAAK,EAAE,UAAU;gBACjB,IAAI,EAAE;oBACJ,WAAW,EAAE;wBACX;4BACE,MAAM;4BACN,WAAW;4BACX,YAAY;4BACZ,iBAAiB;4BACjB,KAAK,EAAE,UAAU;4BACjB,MAAM,EAAE,EAAE;yBACX;qBACF;iBACF;gBACD,IAAI;aACL,CAAC,CAAC;QACL,CAAC;QAED,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAA,CAAC;AACJ,CAAC;AA1PD,8CA0PC"}
|
@@ -237,15 +237,24 @@ function getCollectRewardsQuoteInternal(param) {
|
|
237
237
|
const rewardExistsA = (_a = rewardGrowthsInsideX64[0]) === null || _a === void 0 ? void 0 : _a[1];
|
238
238
|
const rewardExistsB = (_b = rewardGrowthsInsideX64[1]) === null || _b === void 0 ? void 0 : _b[1];
|
239
239
|
const rewardExistsC = (_c = rewardGrowthsInsideX64[2]) === null || _c === void 0 ? void 0 : _c[1];
|
240
|
-
const
|
240
|
+
const finalRewardA = rewardExistsA
|
241
241
|
? new bignumber_js_1.default((_d = updatedRewardInfosX64[0]) === null || _d === void 0 ? void 0 : _d.shrn(64).toString())
|
242
242
|
: new bignumber_js_1.default(0);
|
243
|
-
const
|
243
|
+
const finalRewardB = rewardExistsB
|
244
244
|
? new bignumber_js_1.default((_e = updatedRewardInfosX64[1]) === null || _e === void 0 ? void 0 : _e.shrn(64).toString())
|
245
245
|
: new bignumber_js_1.default(0);
|
246
|
-
const
|
246
|
+
const finalRewardC = rewardExistsC
|
247
247
|
? new bignumber_js_1.default((_f = updatedRewardInfosX64[2]) === null || _f === void 0 ? void 0 : _f.shrn(64).toString())
|
248
248
|
: new bignumber_js_1.default(0);
|
249
|
+
const rewardOwedA = finalRewardA.isGreaterThan(Math.pow(10, 18))
|
250
|
+
? (0, bignumber_js_1.default)(0)
|
251
|
+
: finalRewardA;
|
252
|
+
const rewardOwedB = finalRewardB.isGreaterThan(Math.pow(10, 18))
|
253
|
+
? (0, bignumber_js_1.default)(0)
|
254
|
+
: finalRewardB;
|
255
|
+
const rewardOwedC = finalRewardC.isGreaterThan(Math.pow(10, 18))
|
256
|
+
? (0, bignumber_js_1.default)(0)
|
257
|
+
: finalRewardC;
|
249
258
|
return { rewardOwedA, rewardOwedB, rewardOwedC };
|
250
259
|
}
|
251
260
|
exports.getCollectRewardsQuoteInternal = getCollectRewardsQuoteInternal;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers_fees.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/helpers_fees.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,6CAA4C;AAC5C,kDAAuB;AACvB,gEAAqC;AACrC,mDAO6B;AAC7B,+CAG4B;AAC5B,2CAA+C;AAC/C,iDAAsD;AACtD,gDAA6C;AAE7C,MAAM,GAAG,GAAG,IAAI,eAAE,CAAC,CAAC,CAAC,CAAC;AACtB,MAAM,IAAI,GAAG,GAAG,CAAC,GAAG,CAAC,IAAI,eAAE,CAAC,GAAG,CAAC,CAAC,CAAC;AAClC,MAAM,eAAe,GAAG,EAAE,CAAC;AAC3B,MAAM,cAAc,GAAG,MAA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A,sBAAS,EAAC,CAAC,CAAC;QACd,CAAC,CAAC,YAAY,CAAC;IACjB,MAAM,WAAW,GAAG,YAAY,CAAC,aAAa,CAAC,SAAA,EAAE,EAAI,EAAE,CAAA,CAAC;QACtD,CAAC,CAAC,IAAA,sBAAS,EAAC,CAAC,CAAC;QACd,CAAC,CAAC,YAAY,CAAC;IAEjB,OAAO,EAAE,WAAW,EAAE,WAAW,EAAE,WAAW,EAAE,CAAC;AACnD,CAAC;AAnJD,wEAmJC"}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
3
|
+
export declare const platformId = "spdr";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const pid: PublicKey;
|
6
|
+
export declare const spdrMint = "AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY";
|
7
|
+
export declare const pool: PublicKey;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.pool = exports.spdrMint = exports.pid = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'spdr';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Spiderswap',
|
9
|
+
image: 'https://sonar.watch/img/platforms/spdr.webp',
|
10
|
+
website: 'https://www.spiderswap.io/staking',
|
11
|
+
twitter: 'https://twitter.com/spdrswap',
|
12
|
+
// defiLlamaId: 'spdr-finance', // from https://defillama.com/docs/api
|
13
|
+
};
|
14
|
+
exports.pid = new web3_js_1.PublicKey('GTavkffQHnDKDH36YNFpk7uxwHNseTRo24tV4HGC8MNY');
|
15
|
+
exports.spdrMint = 'AT79ReYU9XtHUTF5vM6Q4oa9K8w7918Fp5SU7G1MDMQY';
|
16
|
+
exports.pool = new web3_js_1.PublicKey('2hJQSpUvDy2Byhs2Mc3HAy7atKHHELfYfycbZBErpn1X');
|
17
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spdr/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,YAAY;IAClB,KAAK,EAAE,6CAA6C;IACpD,OAAO,EAAE,mCAAmC;IAC5C,OAAO,EAAE,8BAA8B;IACvC,sEAAsE;CACvE,CAAC;AAEW,QAAA,GAAG,GAAG,IAAI,mBAAS,CAC9B,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,IAAI,GAAG,IAAI,mBAAS,CAC/B,8CAA8C,CAC/C,CAAC"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
+
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/spdr/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAAsD;AAEzC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAsB,CAAC,CAAC"}
|