@sonarwatch/portfolio-plugins 0.14.144 → 0.14.145
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 +4 -0
- package/package.json +1 -1
- package/src/plugins/bskt/constants.d.ts +1 -0
- package/src/plugins/bskt/constants.js +2 -1
- package/src/plugins/bskt/constants.js.map +1 -1
- package/src/plugins/bskt/index.js +5 -1
- package/src/plugins/bskt/index.js.map +1 -1
- package/src/plugins/bskt/stakingFetcher.d.ts +3 -0
- package/src/plugins/bskt/stakingFetcher.js +58 -0
- package/src/plugins/bskt/stakingFetcher.js.map +1 -0
- package/src/plugins/bskt/structs.d.ts +12 -0
- package/src/plugins/bskt/structs.js +12 -1
- package/src/plugins/bskt/structs.js.map +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js +1 -1
- package/src/plugins/orca/getWhirlpoolPositions.js.map +1 -1
- package/src/plugins/orca/types.d.ts +6 -2
- package/src/plugins/orca/whirlpoolsStatsJob.js +7 -3
- package/src/plugins/orca/whirlpoolsStatsJob.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.14.145](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.144...plugins-0.14.145) (2025-03-18)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.14.144](https://github.com/sonarwatch/portfolio/compare/plugins-0.14.143...plugins-0.14.144) (2025-03-17)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
@@ -6,4 +6,5 @@ export declare const platformId = "bskt";
|
|
6
6
|
export declare const bsktMint = "6gnCPhXtLnUD76HjQuSYPENLSZdG8RvDB1pTLM5aLSJA";
|
7
7
|
export declare const platform: Platform;
|
8
8
|
export declare const bsktPid: PublicKey;
|
9
|
+
export declare const bsktStakingPid: PublicKey;
|
9
10
|
export declare const bsktDecimals = 5;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.bsktDecimals = exports.bsktPid = exports.platform = exports.bsktMint = exports.platformId = void 0;
|
3
|
+
exports.bsktDecimals = exports.bsktStakingPid = exports.bsktPid = exports.platform = exports.bsktMint = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'bskt';
|
6
6
|
exports.bsktMint = '6gnCPhXtLnUD76HjQuSYPENLSZdG8RvDB1pTLM5aLSJA';
|
@@ -18,5 +18,6 @@ exports.platform = {
|
|
18
18
|
tokens: [exports.bsktMint],
|
19
19
|
};
|
20
20
|
exports.bsktPid = new web3_js_1.PublicKey('BSKTvA6XG9QyqhW5Hgq8pG8pm5NnvuYyc4pYefSzM62X');
|
21
|
+
exports.bsktStakingPid = new web3_js_1.PublicKey('DF8vgzUDH2CGywD7Gd9jd9Y5Kwmrx97h4Viumjo4rrr6');
|
21
22
|
exports.bsktDecimals = 5;
|
22
23
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EACH,0EAA0E;IAC5E,qEAAqE;IACrE,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,+BAA+B;IACxC,QAAQ,EAAE,cAAc;IACxB,WAAW,EACT,mEAAmE;IACrE,aAAa,EAAE,yCAAyC;IACxD,MAAM,EAAE,CAAC,gBAAQ,CAAC;CACnB,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,YAAY,GAAG,CAAC,CAAC"}
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EACH,0EAA0E;IAC5E,qEAAqE;IACrE,OAAO,EAAE,wBAAwB;IACjC,OAAO,EAAE,4BAA4B;IACrC,OAAO,EAAE,+BAA+B;IACxC,QAAQ,EAAE,cAAc;IACxB,WAAW,EACT,mEAAmE;IACrE,aAAa,EAAE,yCAAyC;IACxD,MAAM,EAAE,CAAC,gBAAQ,CAAC;CACnB,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,YAAY,GAAG,CAAC,CAAC"}
|
@@ -1,8 +1,12 @@
|
|
1
1
|
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
2
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
6
|
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
4
7
|
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
5
9
|
exports.platforms = [constants_1.platform];
|
6
10
|
exports.jobs = [];
|
7
|
-
exports.fetchers = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
8
12
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/index.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,58 @@
|
|
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 web3_js_1 = require("@solana/web3.js");
|
14
|
+
const constants_1 = require("./constants");
|
15
|
+
const structs_1 = require("./structs");
|
16
|
+
const clients_1 = require("../../utils/clients");
|
17
|
+
const ParsedGpa_1 = require("../../utils/solana/beets/ParsedGpa");
|
18
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
19
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
20
|
+
const client = (0, clients_1.getClientSolana)();
|
21
|
+
const accounts = yield ParsedGpa_1.ParsedGpa.build(client, structs_1.stakingAccountStruct, constants_1.bsktStakingPid)
|
22
|
+
.addFilter('accountDiscriminator', [210, 98, 254, 196, 151, 68, 235, 0])
|
23
|
+
.addFilter('owner', new web3_js_1.PublicKey(owner))
|
24
|
+
.run();
|
25
|
+
if (!accounts.length)
|
26
|
+
return [];
|
27
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
28
|
+
accounts.forEach((account) => {
|
29
|
+
const element = elementRegistry.addElementMultiple({
|
30
|
+
label: 'Staked',
|
31
|
+
ref: account.pubkey,
|
32
|
+
sourceRefs: [
|
33
|
+
{
|
34
|
+
name: 'Vault',
|
35
|
+
address: account.stakePool.toString(),
|
36
|
+
},
|
37
|
+
],
|
38
|
+
link: 'https://staking.bskt.fi/',
|
39
|
+
});
|
40
|
+
element.addAsset({
|
41
|
+
address: constants_1.bsktMint,
|
42
|
+
amount: account.depositAmount,
|
43
|
+
attributes: {
|
44
|
+
lockedUntil: account.depositTimestamp
|
45
|
+
.plus(account.lockupDuration)
|
46
|
+
.toNumber(),
|
47
|
+
},
|
48
|
+
});
|
49
|
+
});
|
50
|
+
return elementRegistry.getElements(cache);
|
51
|
+
});
|
52
|
+
const fetcher = {
|
53
|
+
id: `${constants_1.platformId}-staking`,
|
54
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
55
|
+
executor,
|
56
|
+
};
|
57
|
+
exports.default = fetcher;
|
58
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AACvD,6CAA4C;AAG5C,2CAAmE;AACnE,uCAAiD;AACjD,iDAAsD;AACtD,kEAA+D;AAC/D,gFAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,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3B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -13,3 +13,15 @@ export type VestingAccount = {
|
|
13
13
|
isCanceled: boolean;
|
14
14
|
};
|
15
15
|
export declare const vestingAccountStruct: BeetStruct<VestingAccount, Partial<VestingAccount>>;
|
16
|
+
export type StakingAccount = {
|
17
|
+
accountDiscriminator: number[];
|
18
|
+
owner: PublicKey;
|
19
|
+
payer: PublicKey;
|
20
|
+
stakePool: PublicKey;
|
21
|
+
lockupDuration: BigNumber;
|
22
|
+
depositTimestamp: BigNumber;
|
23
|
+
depositAmount: BigNumber;
|
24
|
+
effectiveStake: BigNumber;
|
25
|
+
claimedAmounts: BigNumber[];
|
26
|
+
};
|
27
|
+
export declare const stakingAccountStruct: BeetStruct<StakingAccount, Partial<StakingAccount>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.vestingAccountStruct = void 0;
|
3
|
+
exports.stakingAccountStruct = exports.vestingAccountStruct = 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");
|
@@ -12,4 +12,15 @@ exports.vestingAccountStruct = new beet_1.BeetStruct([
|
|
12
12
|
['amountClaimed', solana_1.u64],
|
13
13
|
['isCanceled', beet_1.bool],
|
14
14
|
], (args) => args);
|
15
|
+
exports.stakingAccountStruct = new beet_1.BeetStruct([
|
16
|
+
['accountDiscriminator', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 8)],
|
17
|
+
['owner', beet_solana_1.publicKey],
|
18
|
+
['payer', beet_solana_1.publicKey],
|
19
|
+
['stakePool', beet_solana_1.publicKey],
|
20
|
+
['lockupDuration', solana_1.u64],
|
21
|
+
['depositTimestamp', solana_1.i64],
|
22
|
+
['depositAmount', solana_1.u64],
|
23
|
+
['effectiveStake', solana_1.u128],
|
24
|
+
['claimedAmounts', (0, beet_1.uniformFixedSizeArray)(solana_1.u128, 10)],
|
25
|
+
], (args) => args);
|
15
26
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/structs.ts"],"names":[],"mappings":";;;AAAA,
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bskt/structs.ts"],"names":[],"mappings":";;;AAAA,oDAKmC;AACnC,kEAA6D;AAG7D,+CAA0D;AAW7C,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,YAAY,EAAE,WAAI,CAAC;CACrB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC;AAcW,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,sBAAsB,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,OAAO,EAAE,uBAAS,CAAC;IACpB,CAAC,WAAW,EAAE,uBAAS,CAAC;IACxB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,gBAAgB,EAAE,aAAI,CAAC;IACxB,CAAC,gBAAgB,EAAE,IAAA,4BAAqB,EAAC,aAAI,EAAE,EAAE,CAAC,CAAC;CACpD,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC"}
|
@@ -96,7 +96,7 @@ function getOrcaNftFetcher(platformId, programId) {
|
|
96
96
|
poolLiquidity: whirlpoolInfo.liquidity,
|
97
97
|
feeRate: (Number(whirlpoolInfo.feeRate) / 10000) *
|
98
98
|
(1 - whirlpoolInfo.protocolFeeRate / 10000),
|
99
|
-
swapVolume24h: (_a = allWhirlpoolsStats.find((p) => (p === null || p === void 0 ? void 0 : p.address) === positionInfo.whirlpool.toString())) === null || _a === void 0 ? void 0 : _a.
|
99
|
+
swapVolume24h: (_a = allWhirlpoolsStats.find((p) => (p === null || p === void 0 ? void 0 : p.address) === positionInfo.whirlpool.toString())) === null || _a === void 0 ? void 0 : _a.stats['24h'].volume,
|
100
100
|
});
|
101
101
|
const feesAndRewards = (0, helpers_fees_1.calcFeesAndRewards)(whirlpoolInfo, positionInfo, tickArrays);
|
102
102
|
if (feesAndRewards) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAEhE,iDAAwE;AACxE,gFAA6E;AAGhE,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,IA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BAA+B;gBACrC,GAAG,EAAE,YAAY,CAAC,MAAM,CAAC,QAAQ,EAAE;gBACnC,UAAU,EAAE;oBACV;wBACE,IAAI,EAAE,MAAM;wBACZ,OAAO,EAAE,aAAa,CAAC,MAAM,CAAC,QAAQ,EAAE;qBACzC;iBACF;aACF,CAAC,CAAC;YACH,MAAM,SAAS,GAAG,OAAO,CAAC,YAAY,CAAC;gBACrC,QAAQ,EAAE,aAAa,CAAC,UAAU;gBAClC,QAAQ,EAAE,aAAa,CAAC,UAAU;gBAClC,SAAS,EAAE,YAAY,CAAC,SAAS;gBACjC,gBAAgB,EAAE,aAAa,CAAC,gBAAgB;gBAChD,cAAc,EAAE,YAAY,CAAC,cAAc;gBAC3C,cAAc,EAAE,YAAY,CAAC,cAAc;gBAC3C,gBAAgB,EAAE,aAAa,CAAC,SAAS;gBACzC,aAAa,EAAE,aAAa,CAAC,SAAS;gBACtC,OAAO,EACL,CAAC,MAAM,CAAC,aAAa,CAAC,OAAO,CAAC,GAAG,KAAK,CAAC;oBACvC,CAAC,CAAC,GAAG,aAAa,CAAC,eAAe,GAAG,KAAK,CAAC;gBAC7C,aAAa,EAAE,MAAA,kBAAkB,CAAC,IAAI,CACpC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAA,CAAC,aAAD,CAAC,uBAAD,CAAC,CAAE,OAAO,MAAK,YAAY,CAAC,SAAS,CAAC,QAAQ,EAAE,CACxD,0CAAE,
|
1
|
+
{"version":3,"file":"getWhirlpoolPositions.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/getWhirlpoolPositions.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAC5C,2CAIqB;AACrB,iDAAsD;AACtD,+CAG4B;AAE5B,mDAAgE;AAEhE,iDAAwE;AACxE,gFAA6E;AAGhE,QAAA,qBAAqB,GAAG,iBAAiB,CACpD,sBAAc,EACd,4BAAgB,CACjB,CAAC;AAEF,SAAgB,iBAAiB,CAC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AG,IAAA,iCAAkB,EACvC,aAAa,EACb,YAAY,EACZ,UAAU,CACX,CAAC;YAEF,IAAI,cAAc,EAAE,CAAC;gBACnB,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,UAAU;oBACjC,MAAM,EAAE,cAAc,CAAC,QAAQ;iBAChC,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,UAAU;oBACjC,MAAM,EAAE,cAAc,CAAC,QAAQ;iBAChC,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1C,MAAM,EAAE,cAAc,CAAC,WAAW;iBACnC,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1C,MAAM,EAAE,cAAc,CAAC,WAAW;iBACnC,CAAC,CAAC;gBAEH,SAAS,CAAC,cAAc,CAAC;oBACvB,OAAO,EAAE,aAAa,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,IAAI;oBAC1C,MAAM,EAAE,cAAc,CAAC,WAAW;iBACnC,CAAC,CAAC;YACL,CAAC;QACH,CAAC;QAED,OAAO,eAAe,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC;IAC5C,CAAC,CAAA,CAAC;AACJ,CAAC;AA9ID,8CA8IC"}
|
@@ -21,15 +21,19 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
21
21
|
let cursor;
|
22
22
|
const cacheItems = [];
|
23
23
|
do {
|
24
|
-
const apiRes = yield axios_1.default.get(`https://
|
24
|
+
const apiRes = yield axios_1.default.get(`https://api.orca.so/v2/solana/pools?limit=1000&after=${cursor || ''}`);
|
25
25
|
apiRes.data.data.forEach((p) => {
|
26
26
|
cacheItems.push({
|
27
27
|
key: `${p.address}-stats`,
|
28
28
|
value: {
|
29
29
|
address: p.address,
|
30
|
-
|
30
|
+
stats: {
|
31
|
+
'24h': {
|
32
|
+
volume: p.stats['24h'].volume,
|
33
|
+
fees: p.stats['24h'].fees,
|
34
|
+
},
|
35
|
+
},
|
31
36
|
tvlUsdc: p.tvlUsdc,
|
32
|
-
feesUsdc24h: p.feesUsdc24h,
|
33
37
|
},
|
34
38
|
});
|
35
39
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"whirlpoolsStatsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/whirlpoolsStatsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAG7C,2CAA0D;AAE1D,mEAA2C;AAY3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,IAAI,WAAW,GAAG,IAAI,CAAC;IACvB,IAAI,MAAiC,CAAC;IAEtC,MAAM,UAAU,GAA4C,EAAE,CAAC;IAE/D,GAAG,CAAC;QACF,MAAM,MAAM,GAAgC,MAAM,eAAK,CAAC,GAAG,CACzD,
|
1
|
+
{"version":3,"file":"whirlpoolsStatsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/orca/whirlpoolsStatsJob.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,kDAA6C;AAG7C,2CAA0D;AAE1D,mEAA2C;AAY3C,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,IAAI,WAAW,GAAG,IAAI,CAAC;IACvB,IAAI,MAAiC,CAAC;IAEtC,MAAM,UAAU,GAA4C,EAAE,CAAC;IAE/D,GAAG,CAAC;QACF,MAAM,MAAM,GAAgC,MAAM,eAAK,CAAC,GAAG,CACzD,wDAAwD,MAAM,IAAI,EAAE,EAAE,CACvE,CAAC;QACF,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC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