@sonarwatch/portfolio-plugins 0.12.170 → 0.12.171
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/Cache.d.ts +2 -1
- package/src/Cache.js +3 -3
- package/src/Cache.js.map +1 -1
- package/src/TokenPriceMap.d.ts +8 -0
- package/src/TokenPriceMap.js +21 -0
- package/src/TokenPriceMap.js.map +1 -0
- package/src/index.js +16 -0
- package/src/index.js.map +1 -1
- package/src/plugins/adrastea/constants.d.ts +9 -0
- package/src/plugins/adrastea/constants.js +19 -0
- package/src/plugins/adrastea/constants.js.map +1 -0
- package/src/plugins/adrastea/index.d.ts +6 -0
- package/src/plugins/adrastea/index.js +13 -0
- package/src/plugins/adrastea/index.js.map +1 -0
- package/src/plugins/adrastea/positionsFetcher.js +61 -0
- package/src/plugins/adrastea/positionsFetcher.js.map +1 -0
- package/src/plugins/adrastea/positionsJob.d.ts +3 -0
- package/src/plugins/adrastea/positionsJob.js +53 -0
- package/src/plugins/adrastea/positionsJob.js.map +1 -0
- package/src/plugins/adrastea/structs.d.ts +45 -0
- package/src/plugins/adrastea/structs.js +44 -0
- package/src/plugins/adrastea/structs.js.map +1 -0
- package/src/plugins/adrastea/types.d.ts +4 -0
- package/src/plugins/adrastea/types.js +3 -0
- package/src/plugins/adrastea/types.js.map +1 -0
- package/src/plugins/banx/stakingFetcher.js +11 -15
- package/src/plugins/banx/stakingFetcher.js.map +1 -1
- package/src/plugins/bluemove/constants.d.ts +7 -0
- package/src/plugins/bluemove/constants.js +17 -0
- package/src/plugins/bluemove/constants.js.map +1 -0
- package/src/plugins/bluemove/index.d.ts +6 -0
- package/src/plugins/bluemove/index.js +12 -0
- package/src/plugins/bluemove/index.js.map +1 -0
- package/src/plugins/bluemove/poolsJob.d.ts +3 -0
- package/src/plugins/bluemove/poolsJob.js +97 -0
- package/src/plugins/bluemove/poolsJob.js.map +1 -0
- package/src/plugins/bluemove/types.d.ts +21 -0
- package/src/plugins/bluemove/types.js +3 -0
- package/src/plugins/bluemove/types.js.map +1 -0
- package/src/plugins/cetus/clmmsFetcher.js +3 -3
- package/src/plugins/cetus/clmmsFetcher.js.map +1 -1
- package/src/plugins/cetus/constants.d.ts +4 -0
- package/src/plugins/cetus/constants.js +5 -1
- package/src/plugins/cetus/constants.js.map +1 -1
- package/src/plugins/cetus/dcaFetcher.js +77 -0
- package/src/plugins/cetus/dcaFetcher.js.map +1 -0
- package/src/plugins/cetus/farmsFetcher.js +2 -4
- package/src/plugins/cetus/farmsFetcher.js.map +1 -1
- package/src/plugins/cetus/index.js +8 -1
- package/src/plugins/cetus/index.js.map +1 -1
- package/src/plugins/cetus/limitFetcher.d.ts +3 -0
- package/src/plugins/cetus/limitFetcher.js +66 -0
- package/src/plugins/cetus/limitFetcher.js.map +1 -0
- package/src/plugins/cetus/types.d.ts +32 -0
- package/src/plugins/deepbook/constants.d.ts +3 -0
- package/src/plugins/deepbook/constants.js +4 -1
- package/src/plugins/deepbook/constants.js.map +1 -1
- package/src/plugins/deepbook/helpers.d.ts +4 -0
- package/src/plugins/deepbook/helpers.js +142 -0
- package/src/plugins/deepbook/helpers.js.map +1 -0
- package/src/plugins/deepbook/index.js +7 -2
- package/src/plugins/deepbook/index.js.map +1 -1
- package/src/plugins/deepbook/ordersFetcher.d.ts +3 -0
- package/src/plugins/deepbook/ordersFetcher.js +74 -0
- package/src/plugins/deepbook/ordersFetcher.js.map +1 -0
- package/src/plugins/deepbook/poolsJob.d.ts +3 -0
- package/src/plugins/deepbook/poolsJob.js +30 -0
- package/src/plugins/deepbook/poolsJob.js.map +1 -0
- package/src/plugins/deepbook/types.d.ts +12 -0
- package/src/plugins/deepbook/types.js +3 -0
- package/src/plugins/deepbook/types.js.map +1 -0
- package/src/plugins/flowx/stakingPoolFetcher.js +1 -1
- package/src/plugins/flowx/stakingPoolFetcher.js.map +1 -1
- package/src/plugins/flowx/stakingPoolV3Fetcher.js +1 -1
- package/src/plugins/flowx/stakingPoolV3Fetcher.js.map +1 -1
- package/src/plugins/foo/constants.d.ts +1 -1
- package/src/plugins/foo/constants.js +2 -2
- package/src/plugins/foo/constants.js.map +1 -1
- package/src/plugins/foo/index.js +2 -2
- package/src/plugins/foo/index.js.map +1 -1
- package/src/plugins/foo/marketsJob.js +3 -3
- package/src/plugins/foo/marketsJob.js.map +1 -1
- package/src/plugins/foo/positionsEthereumFetcher.d.ts +3 -0
- package/src/plugins/foo/positionsEthereumFetcher.js +33 -0
- package/src/plugins/foo/positionsEthereumFetcher.js.map +1 -0
- package/src/plugins/foo/positionsSolanaFetcher.js +10 -26
- package/src/plugins/foo/positionsSolanaFetcher.js.map +1 -1
- package/src/plugins/foo/positionsSuiFetcher.d.ts +3 -0
- package/src/plugins/foo/positionsSuiFetcher.js +46 -0
- package/src/plugins/foo/positionsSuiFetcher.js.map +1 -0
- package/src/plugins/foo/types.d.ts +5 -0
- package/src/plugins/foo/types.js +3 -0
- package/src/plugins/foo/types.js.map +1 -0
- package/src/plugins/francium/constants.d.ts +19 -0
- package/src/plugins/francium/constants.js +839 -0
- package/src/plugins/francium/constants.js.map +1 -0
- package/src/plugins/francium/helpers.d.ts +14 -0
- package/src/plugins/francium/helpers.js +85 -0
- package/src/plugins/francium/helpers.js.map +1 -0
- package/src/plugins/francium/index.d.ts +6 -0
- package/src/plugins/francium/index.js +13 -0
- package/src/plugins/francium/index.js.map +1 -0
- package/src/plugins/francium/lendingFetcher.d.ts +3 -0
- package/src/plugins/francium/lendingFetcher.js +70 -0
- package/src/plugins/francium/lendingFetcher.js.map +1 -0
- package/src/plugins/francium/lendingPoolJob.d.ts +3 -0
- package/src/plugins/francium/lendingPoolJob.js +49 -0
- package/src/plugins/francium/lendingPoolJob.js.map +1 -0
- package/src/plugins/francium/structs.d.ts +59 -0
- package/src/plugins/francium/structs.js +49 -0
- package/src/plugins/francium/structs.js.map +1 -0
- package/src/plugins/francium/tokens.d.ts +9 -0
- package/src/plugins/francium/tokens.js +524 -0
- package/src/plugins/francium/tokens.js.map +1 -0
- package/src/plugins/francium/types.d.ts +16 -0
- package/src/plugins/francium/types.js +3 -0
- package/src/plugins/francium/types.js.map +1 -0
- package/src/plugins/kamino/lendsFetcher.js +64 -167
- package/src/plugins/kamino/lendsFetcher.js.map +1 -1
- package/src/plugins/kriya/farmsFetcher.js +23 -48
- package/src/plugins/kriya/farmsFetcher.js.map +1 -1
- package/src/plugins/kriya/leverageVaultsFetcher.js +5 -5
- package/src/plugins/kriya/leverageVaultsFetcher.js.map +1 -1
- package/src/plugins/meteora/farmsFetcher.js +19 -68
- package/src/plugins/meteora/farmsFetcher.js.map +1 -1
- package/src/plugins/nxfinance/positionsFetcher.js +32 -80
- package/src/plugins/nxfinance/positionsFetcher.js.map +1 -1
- package/src/plugins/quarry/positionsFetcher.js +1 -1
- package/src/plugins/quarry/positionsFetcher.js.map +1 -1
- package/src/plugins/raydium/farmsFetcher.js +30 -74
- package/src/plugins/raydium/farmsFetcher.js.map +1 -1
- package/src/plugins/raydium/helpers.d.ts +3 -2
- package/src/plugins/raydium/helpers.js +5 -7
- package/src/plugins/raydium/helpers.js.map +1 -1
- package/src/plugins/raydium/index.js +1 -2
- package/src/plugins/raydium/index.js.map +1 -1
- package/src/plugins/raydium/lpTokensJob.js +1 -1
- package/src/plugins/raydium/lpTokensJob.js.map +1 -1
- package/src/plugins/stabble/constants.d.ts +8 -0
- package/src/plugins/stabble/constants.js +27 -0
- package/src/plugins/stabble/constants.js.map +1 -0
- package/src/plugins/stabble/filters.d.ts +3 -0
- package/src/plugins/stabble/filters.js +20 -0
- package/src/plugins/stabble/filters.js.map +1 -0
- package/src/plugins/stabble/index.d.ts +6 -0
- package/src/plugins/stabble/index.js +12 -0
- package/src/plugins/stabble/index.js.map +1 -0
- package/src/plugins/stabble/poolsJob.d.ts +3 -0
- package/src/plugins/stabble/poolsJob.js +84 -0
- package/src/plugins/stabble/poolsJob.js.map +1 -0
- package/src/plugins/stabble/stableIdl.d.ts +40 -0
- package/src/plugins/stabble/stableIdl.js +104 -0
- package/src/plugins/stabble/stableIdl.js.map +1 -0
- package/src/plugins/stabble/types.d.ts +40 -0
- package/src/plugins/stabble/types.js +3 -0
- package/src/plugins/stabble/types.js.map +1 -0
- package/src/plugins/stabble/weightedIdl.d.ts +40 -0
- package/src/plugins/stabble/weightedIdl.js +96 -0
- package/src/plugins/stabble/weightedIdl.js.map +1 -0
- package/src/utils/bitcoin/getBalance.js +1 -0
- package/src/utils/bitcoin/getBalance.js.map +1 -1
- package/src/utils/elementbuilder/AssetBuilder.d.ts +11 -0
- package/src/utils/elementbuilder/AssetBuilder.js +28 -0
- package/src/utils/elementbuilder/AssetBuilder.js.map +1 -0
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.d.ts +27 -0
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js +110 -0
- package/src/utils/elementbuilder/ElementBorrowlendBuilder.js.map +1 -0
- package/src/utils/elementbuilder/ElementBuilder.d.ts +12 -0
- package/src/utils/elementbuilder/ElementBuilder.js +13 -0
- package/src/utils/elementbuilder/ElementBuilder.js.map +1 -0
- package/src/utils/elementbuilder/ElementLiquidityBuilder.d.ts +12 -0
- package/src/utils/elementbuilder/ElementLiquidityBuilder.js +42 -0
- package/src/utils/elementbuilder/ElementLiquidityBuilder.js.map +1 -0
- package/src/utils/elementbuilder/ElementMultipleBuilder.d.ts +13 -0
- package/src/utils/elementbuilder/ElementMultipleBuilder.js +40 -0
- package/src/utils/elementbuilder/ElementMultipleBuilder.js.map +1 -0
- package/src/utils/elementbuilder/ElementParams.d.ts +7 -0
- package/src/utils/elementbuilder/ElementParams.js +3 -0
- package/src/utils/elementbuilder/ElementParams.js.map +1 -0
- package/src/utils/elementbuilder/ElementRegistry.d.ts +17 -0
- package/src/utils/elementbuilder/ElementRegistry.js +49 -0
- package/src/utils/elementbuilder/ElementRegistry.js.map +1 -0
- package/src/utils/elementbuilder/LiquidityBuilder.d.ts +15 -0
- package/src/utils/elementbuilder/LiquidityBuilder.js +52 -0
- package/src/utils/elementbuilder/LiquidityBuilder.js.map +1 -0
- package/src/utils/elementbuilder/PortfolioAssetParams.d.ts +7 -0
- package/src/utils/elementbuilder/PortfolioAssetParams.js +3 -0
- package/src/utils/elementbuilder/PortfolioAssetParams.js.map +1 -0
- package/src/plugins/foo/positionsFetcher.js +0 -49
- package/src/plugins/foo/positionsFetcher.js.map +0 -1
- package/src/plugins/raydium/stakingFetcher.js +0 -50
- package/src/plugins/raydium/stakingFetcher.js.map +0 -1
- /package/src/plugins/{foo → adrastea}/positionsFetcher.d.ts +0 -0
- /package/src/plugins/{raydium/stakingFetcher.d.ts → cetus/dcaFetcher.d.ts} +0 -0
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.12.171](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.170...plugins-0.12.171) (2024-09-30)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.12.170](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.169...plugins-0.12.170) (2024-09-23)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
package/src/Cache.d.ts
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
import { Driver, Storage, StorageValue } from 'unstorage';
|
2
2
|
import { NetworkIdType, TokenPrice, TokenPriceSource } from '@sonarwatch/portfolio-core';
|
3
|
+
import { TokenPriceMap } from './TokenPriceMap';
|
3
4
|
export type TransactionOptions = {
|
4
5
|
prefix: string;
|
5
6
|
networkId?: NetworkIdType;
|
@@ -83,7 +84,7 @@ export declare class Cache {
|
|
83
84
|
private setTokenPriceLocal;
|
84
85
|
getTokenPrice(address: string, networkId: NetworkIdType): Promise<TokenPrice | undefined>;
|
85
86
|
getTokenPrices(addresses: string[], networkId: NetworkIdType): Promise<(TokenPrice | undefined)[]>;
|
86
|
-
getTokenPricesAsMap(addresses: string[]
|
87
|
+
getTokenPricesAsMap(addresses: string[] | Set<string>, networkId: NetworkIdType): Promise<TokenPriceMap>;
|
87
88
|
private getTokenPriceSources;
|
88
89
|
private getTokenPricesSources;
|
89
90
|
getItems<K extends StorageValue>(keys: string[], opts: TransactionOptions): Promise<(K | undefined)[]>;
|
package/src/Cache.js
CHANGED
@@ -44,7 +44,7 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
44
44
|
const overlayDriver_1 = __importDefault(require("./overlayDriver"));
|
45
45
|
const memoryDriver_1 = __importStar(require("./memoryDriver"));
|
46
46
|
const runInBatch_1 = __importDefault(require("./utils/misc/runInBatch"));
|
47
|
-
const
|
47
|
+
const TokenPriceMap_1 = require("./TokenPriceMap");
|
48
48
|
const tokenPriceSourcePrefix = 'tokenpricesource';
|
49
49
|
class Cache {
|
50
50
|
constructor(cacheConfig) {
|
@@ -142,8 +142,8 @@ class Cache {
|
|
142
142
|
}
|
143
143
|
getTokenPricesAsMap(addresses, networkId) {
|
144
144
|
return __awaiter(this, void 0, void 0, function* () {
|
145
|
-
const tokenPrices = yield this.getTokenPrices(addresses, networkId);
|
146
|
-
return (
|
145
|
+
const tokenPrices = yield this.getTokenPrices([...addresses], networkId).then((values) => values.filter((tokenPrice) => tokenPrice !== undefined));
|
146
|
+
return new TokenPriceMap_1.TokenPriceMap(networkId, tokenPrices.map((tokenPrice) => [tokenPrice.address, tokenPrice]));
|
147
147
|
});
|
148
148
|
}
|
149
149
|
getTokenPriceSources(address, networkId) {
|
package/src/Cache.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Cache.js","sourceRoot":"","sources":["../../../../packages/plugins/src/Cache.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,yCAAyE;AACzE,8DAA4C;AAC5C,oEAAkD;AAClD,kEAAgD;AAChD,+DAUoC;AACpC,oEAA4C;AAC5C,+DAGwB;AACxB,yEAAiD;AACjD,
|
1
|
+
{"version":3,"file":"Cache.js","sourceR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D,OAAO,EAAE;wBACP,aAAa,EAAE,UACb,OAAO,CAAC,GAAG,CAAC,0BAA0B,CAAC,IAAI,kCAC7C,EAAE;qBACH;iBACF;aACF,CAAC;QACJ;YACE,OAAO;gBACL,IAAI,EAAE,QAAQ;gBACd,MAAM,EAAE,EAAE;aACX,CAAC;IACN,CAAC;AACH,CAAC;AAlED,wCAkEC;AAED,SAAgB,QAAQ;IACtB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,OAAO,IAAI,KAAK,CAAC,WAAW,CAAC,CAAC;AAChC,CAAC;AAHD,4BAGC"}
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { NetworkIdType, TokenPrice } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare class TokenPriceMap extends Map<string, TokenPrice> {
|
3
|
+
readonly networkId: NetworkIdType;
|
4
|
+
constructor(networkId: NetworkIdType, initialEntries?: [string, TokenPrice][]);
|
5
|
+
private formatKey;
|
6
|
+
get(address: string): TokenPrice | undefined;
|
7
|
+
has(address: string): boolean;
|
8
|
+
}
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.TokenPriceMap = void 0;
|
4
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
|
+
class TokenPriceMap extends Map {
|
6
|
+
constructor(networkId, initialEntries) {
|
7
|
+
super(initialEntries);
|
8
|
+
this.networkId = networkId;
|
9
|
+
}
|
10
|
+
formatKey(key) {
|
11
|
+
return (0, portfolio_core_1.formatTokenAddress)(key, this.networkId);
|
12
|
+
}
|
13
|
+
get(address) {
|
14
|
+
return super.get(this.formatKey(address));
|
15
|
+
}
|
16
|
+
has(address) {
|
17
|
+
return super.has(this.formatKey(address));
|
18
|
+
}
|
19
|
+
}
|
20
|
+
exports.TokenPriceMap = TokenPriceMap;
|
21
|
+
//# sourceMappingURL=TokenPriceMap.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"TokenPriceMap.js","sourceRoot":"","sources":["../../../../packages/plugins/src/TokenPriceMap.ts"],"names":[],"mappings":";;;AAAA,+DAIoC;AAEpC,MAAa,aAAc,SAAQ,GAAuB;IAGxD,YACE,SAAwB,EACxB,cAAuC;QAEvC,KAAK,CAAC,cAAc,CAAC,CAAC;QACtB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAC;IAC7B,CAAC;IAEO,SAAS,CAAC,GAAW;QAC3B,OAAO,IAAA,mCAAkB,EAAC,GAAG,EAAE,IAAI,CAAC,SAAS,CAAC,CAAC;IACjD,CAAC;IAEQ,GAAG,CAAC,OAAe;QAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC;IAEQ,GAAG,CAAC,OAAe;QAC1B,OAAO,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC;IAC5C,CAAC;CACF;AAtBD,sCAsBC"}
|
package/src/index.js
CHANGED
@@ -138,6 +138,10 @@ const debridge_1 = require("./plugins/debridge");
|
|
138
138
|
const alphafi_1 = require("./plugins/alphafi");
|
139
139
|
const jewel_1 = require("./plugins/jewel");
|
140
140
|
const tradeport_1 = require("./plugins/tradeport");
|
141
|
+
const bluemove_1 = require("./plugins/bluemove");
|
142
|
+
const stabble_1 = require("./plugins/stabble");
|
143
|
+
const francium_1 = require("./plugins/francium");
|
144
|
+
const adrastea_1 = require("./plugins/adrastea");
|
141
145
|
var constants_1 = require("./plugins/tokens/constants");
|
142
146
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
143
147
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -269,6 +273,10 @@ exports.platforms = [
|
|
269
273
|
...alphafi_1.platforms,
|
270
274
|
...jewel_1.platforms,
|
271
275
|
...tradeport_1.platforms,
|
276
|
+
...bluemove_1.platforms,
|
277
|
+
...stabble_1.platforms,
|
278
|
+
...francium_1.platforms,
|
279
|
+
...adrastea_1.platforms,
|
272
280
|
];
|
273
281
|
// JOBS //
|
274
282
|
exports.jobs = [
|
@@ -383,6 +391,10 @@ exports.jobs = [
|
|
383
391
|
...alphafi_1.jobs,
|
384
392
|
...jewel_1.jobs,
|
385
393
|
...tradeport_1.jobs,
|
394
|
+
...bluemove_1.jobs,
|
395
|
+
...stabble_1.jobs,
|
396
|
+
...francium_1.jobs,
|
397
|
+
...adrastea_1.jobs,
|
386
398
|
];
|
387
399
|
// FETCHERS //
|
388
400
|
exports.fetchers = [
|
@@ -499,6 +511,10 @@ exports.fetchers = [
|
|
499
511
|
...alphafi_1.fetchers,
|
500
512
|
...jewel_1.fetchers,
|
501
513
|
...tradeport_1.fetchers,
|
514
|
+
...bluemove_1.fetchers,
|
515
|
+
...stabble_1.fetchers,
|
516
|
+
...francium_1.fetchers,
|
517
|
+
...adrastea_1.fetchers,
|
502
518
|
];
|
503
519
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
504
520
|
exports.airdropFetchers = [
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAIA,wFAAqF;AACrF,wEAAgD;AAChD,6CAI0B;AAC1B,yDAIgC;AAChC,uDAAgE;AAChE,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAKyB;AACzB,2CAIyB;AACzB,q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BAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,iBAAc;IACjB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,uBAAoB;IACvB,GAAG,mBAAgB;IACnB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,iBAAc;IACjB,GAAG,kBAAe;IAClB,GAAG,oBAAiB;IACpB,GAAG,8BAA2B;IAC9B,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,kBAAe;IAClB,GAAG,iBAAc;IACjB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;IACnB,GAAG,gBAAa;IAChB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,oBAAiB;IACpB,GAAG,mBAAgB;IACnB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,mBAAgB;CACpB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC;AAE/D,QAAA,eAAe,GAAqB;IAC/C,GAAG,yBAAsB;IACzB,GAAG,wBAAqB;IACxB,GAAG,yBAAsB;IACzB,sBAAmB;IACnB,sBAAmB;IACnB,yBAAsB;IACtB,sBAAmB;IACnB,GAAG,0BAAuB;CAC3B,CAAC;AACW,QAAA,8BAA8B,GACzC,IAAA,uDAA0B,EAAC,uBAAe,CAAC,CAAC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
import { PublicKey } from '@solana/web3.js';
|
3
|
+
export declare const platformId = "adrastea";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const usdcLedgerPk: PublicKey;
|
6
|
+
export declare const jlpLedgerPk: PublicKey;
|
7
|
+
export declare const jlpPositionsCacheKey = "jlp_positions";
|
8
|
+
export declare const usdcPositionsCacheKey = "usdc_positions";
|
9
|
+
export declare const jlpToken: PublicKey;
|
@@ -0,0 +1,19 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.jlpToken = exports.usdcPositionsCacheKey = exports.jlpPositionsCacheKey = exports.jlpLedgerPk = exports.usdcLedgerPk = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'adrastea';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Adrastea',
|
9
|
+
image: 'https://sonar.watch/img/platforms/adrastea.webp',
|
10
|
+
website: 'https://app.adrastea.fi/',
|
11
|
+
twitter: 'https://x.com/AdrasteaFinance',
|
12
|
+
defiLlamaId: 'adrastea', // from https://defillama.com/docs/api
|
13
|
+
};
|
14
|
+
exports.usdcLedgerPk = new web3_js_1.PublicKey('7uxLeq1RikyRjSGArSD76Yq1cpx1GdfQf16nNprRZJA4');
|
15
|
+
exports.jlpLedgerPk = new web3_js_1.PublicKey('AGUu8jtcox9Lf8hkufe6w747cXRkkoqoW1XAPYPeJbLz');
|
16
|
+
exports.jlpPositionsCacheKey = 'jlp_positions';
|
17
|
+
exports.usdcPositionsCacheKey = 'usdc_positions';
|
18
|
+
exports.jlpToken = new web3_js_1.PublicKey('27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4');
|
19
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrastea/constants.ts"],"names":[],"mappings":";;;AACA,6CAA4C;AAE/B,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,0BAA0B;IACnC,OAAO,EAAE,+BAA+B;IACxC,WAAW,EAAE,UAAU,EAAE,sCAAsC;CAChE,CAAC;AAEW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AACW,QAAA,WAAW,GAAG,IAAI,mBAAS,CACtC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,oBAAoB,GAAG,eAAe,CAAC;AACvC,QAAA,qBAAqB,GAAG,gBAAgB,CAAC;AAEzC,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
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 positionsJob_1 = __importDefault(require("./positionsJob"));
|
9
|
+
const positionsFetcher_1 = __importDefault(require("./positionsFetcher"));
|
10
|
+
exports.platforms = [constants_1.platform];
|
11
|
+
exports.jobs = [positionsJob_1.default];
|
12
|
+
exports.fetchers = [positionsFetcher_1.default];
|
13
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrastea/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,kEAA0C;AAC1C,0EAAkD;AAErC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,CAAC,sBAAY,CAAC,CAAC;AAC7B,QAAA,QAAQ,GAAc,CAAC,0BAAgB,CAAC,CAAC"}
|
@@ -0,0 +1,61 @@
|
|
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 MemoizedCache_1 = require("../../utils/misc/MemoizedCache");
|
15
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
16
|
+
const solana_1 = require("../../utils/solana");
|
17
|
+
const jlpPositionsMemo = new MemoizedCache_1.MemoizedCache(constants_1.jlpPositionsCacheKey, {
|
18
|
+
prefix: constants_1.platformId,
|
19
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
20
|
+
});
|
21
|
+
const usdcPositionsMemo = new MemoizedCache_1.MemoizedCache(constants_1.usdcPositionsCacheKey, {
|
22
|
+
prefix: constants_1.platformId,
|
23
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
24
|
+
});
|
25
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
26
|
+
const [jlpPositions, usdcPositions] = yield Promise.all([
|
27
|
+
jlpPositionsMemo.getItem(cache),
|
28
|
+
usdcPositionsMemo.getItem(cache),
|
29
|
+
]);
|
30
|
+
const jlpPosition = jlpPositions.find((p) => p.owner === owner);
|
31
|
+
const usdcPosition = usdcPositions.find((p) => p.owner === owner);
|
32
|
+
if (!jlpPosition && !usdcPosition)
|
33
|
+
return [];
|
34
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
35
|
+
if (jlpPosition) {
|
36
|
+
const element = elementRegistry.addElementMultiple({
|
37
|
+
label: 'Leverage',
|
38
|
+
});
|
39
|
+
element.addAsset({
|
40
|
+
address: constants_1.jlpToken.toString(),
|
41
|
+
amount: jlpPosition.amount,
|
42
|
+
});
|
43
|
+
}
|
44
|
+
if (usdcPosition) {
|
45
|
+
const element = elementRegistry.addElementMultiple({
|
46
|
+
label: 'Lending',
|
47
|
+
});
|
48
|
+
element.addAsset({
|
49
|
+
address: solana_1.usdcSolanaMint.toString(),
|
50
|
+
amount: usdcPosition.amount,
|
51
|
+
});
|
52
|
+
}
|
53
|
+
return elementRegistry.dump(cache);
|
54
|
+
});
|
55
|
+
const fetcher = {
|
56
|
+
id: `${constants_1.platformId}-positions`,
|
57
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
58
|
+
executor,
|
59
|
+
};
|
60
|
+
exports.default = fetcher;
|
61
|
+
//# sourceMappingURL=positionsFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrastea/positionsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAEvD,2CAKqB;AAErB,kEAA+D;AAE/D,gFAA6E;AAC7E,+CAAoD;AAEpD,MAAM,gBAAgB,GAAG,IAAI,6BAAa,CAAa,gCAAoB,EAAE;IAC3E,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AACH,MAAM,iBAAiB,GAAG,IAAI,6BAAa,CAAa,iCAAqB,EAAE;IAC7E,MAAM,EAAE,sBAAU;IAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;CAC5B,CAAC,CAAC;AAEH,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,CAAC,Y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7B,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,53 @@
|
|
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 getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
16
|
+
const structs_1 = require("./structs");
|
17
|
+
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
18
|
+
const connection = (0, clients_1.getClientSolana)();
|
19
|
+
const [jlpLedger, usdcLedger] = yield Promise.all([
|
20
|
+
(0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, structs_1.jlpLedgerStruct, constants_1.jlpLedgerPk),
|
21
|
+
(0, getParsedAccountInfo_1.getParsedAccountInfo)(connection, structs_1.usdcLedgerStruct, constants_1.usdcLedgerPk),
|
22
|
+
]);
|
23
|
+
const jlpPositions = [];
|
24
|
+
const usdcPositions = [];
|
25
|
+
jlpLedger === null || jlpLedger === void 0 ? void 0 : jlpLedger.holders.forEach((holder) => {
|
26
|
+
if (!holder.base_amount.isZero())
|
27
|
+
jlpPositions.push({
|
28
|
+
owner: holder.address.toString(),
|
29
|
+
amount: holder.base_amount.toString(),
|
30
|
+
});
|
31
|
+
});
|
32
|
+
usdcLedger === null || usdcLedger === void 0 ? void 0 : usdcLedger.holders.forEach((holder) => {
|
33
|
+
if (!holder.base_amount.isZero())
|
34
|
+
usdcPositions.push({
|
35
|
+
owner: holder.address.toString(),
|
36
|
+
amount: holder.base_amount.toString(),
|
37
|
+
});
|
38
|
+
});
|
39
|
+
yield cache.setItems([
|
40
|
+
{ key: constants_1.jlpPositionsCacheKey, value: jlpPositions },
|
41
|
+
{ key: constants_1.usdcPositionsCacheKey, value: usdcPositions },
|
42
|
+
], {
|
43
|
+
prefix: constants_1.platformId,
|
44
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
45
|
+
});
|
46
|
+
});
|
47
|
+
const job = {
|
48
|
+
id: `${constants_1.platformId}-positions`,
|
49
|
+
executor,
|
50
|
+
label: 'realtime',
|
51
|
+
};
|
52
|
+
exports.default = job;
|
53
|
+
//# sourceMappingURL=positionsJob.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"positionsJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrastea/positionsJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,2CAMqB;AACrB,iDAAsD;AACtD,kFAA+E;AAC/E,uCAA8D;AAG9D,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IAErC,MAAM,CAAC,SAAS,EAAE,UAAU,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAChD,IAAA,2CAAoB,EAAC,UAAU,EAAE,yBAAe,EAAE,uBAAW,CAAC;QAC9D,IAAA,2CAAoB,EAAC,UAAU,EAAE,0BAAgB,EAAE,wBAAY,CAAC;KACjE,CAAC,CAAC;IAEH,MAAM,YAAY,GAAe,EAAE,CAAC;IACpC,MAAM,aAAa,GAAe,EAAE,CAAC;IAErC,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACpC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE;YAC9B,YAAY,CAAC,IAAI,CAAC;gBAChB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE;gBAChC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE;aACtC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE;QACrC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE;YAC9B,aAAa,CAAC,IAAI,CAAC;gBACjB,KAAK,EAAE,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE;gBAChC,MAAM,EAAE,MAAM,CAAC,WAAW,CAAC,QAAQ,EAAE;aACtC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;IAEH,MAAM,KAAK,CAAC,QAAQ,CAClB;QACE,EAAE,GAAG,EAAE,gCAAoB,EAAE,KAAK,EAAE,YAAY,EAAE;QAClD,EAAE,GAAG,EAAE,iCAAqB,EAAE,KAAK,EAAE,aAAa,EAAE;KACrD,EACD;QACE,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,UAAU;CAClB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -0,0 +1,45 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export type JlpHolder = {
|
6
|
+
address: PublicKey;
|
7
|
+
base_amount: BigNumber;
|
8
|
+
balance: BigNumber;
|
9
|
+
deposited_at: BigNumber;
|
10
|
+
deposited_at_price: BigNumber;
|
11
|
+
leveraged_amount: BigNumber;
|
12
|
+
cumulative_borrow: BigNumber;
|
13
|
+
target_leverage: number;
|
14
|
+
_padding: number[];
|
15
|
+
};
|
16
|
+
export declare const jlpHolderStruct: BeetStruct<JlpHolder, Partial<JlpHolder>>;
|
17
|
+
export type JlpLedger = {
|
18
|
+
padding: Buffer;
|
19
|
+
total_base_amount: BigNumber;
|
20
|
+
total_leveraged_amount: BigNumber;
|
21
|
+
min_amount: BigNumber;
|
22
|
+
max_capacity: BigNumber;
|
23
|
+
max_amount: BigNumber;
|
24
|
+
holders: JlpHolder[];
|
25
|
+
};
|
26
|
+
export declare const jlpLedgerStruct: FixableBeetStruct<JlpLedger, Partial<JlpLedger>>;
|
27
|
+
export type UsdcHolder = {
|
28
|
+
address: PublicKey;
|
29
|
+
base_amount: BigNumber;
|
30
|
+
balance: BigNumber;
|
31
|
+
deposited_at: BigNumber;
|
32
|
+
cumulative_borrow: BigNumber;
|
33
|
+
};
|
34
|
+
export declare const usdcHolderStruct: BeetStruct<UsdcHolder, Partial<UsdcHolder>>;
|
35
|
+
export type UsdcLedger = {
|
36
|
+
padding: Buffer;
|
37
|
+
total_base_amount: BigNumber;
|
38
|
+
total_available_amount: BigNumber;
|
39
|
+
total_reserved_amount: BigNumber;
|
40
|
+
max_capacity: BigNumber;
|
41
|
+
min_amount: BigNumber;
|
42
|
+
max_amount: BigNumber;
|
43
|
+
holders: UsdcHolder[];
|
44
|
+
};
|
45
|
+
export declare const usdcLedgerStruct: FixableBeetStruct<UsdcLedger, Partial<UsdcLedger>>;
|
@@ -0,0 +1,44 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.usdcLedgerStruct = exports.usdcHolderStruct = exports.jlpLedgerStruct = exports.jlpHolderStruct = 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.jlpHolderStruct = new beet_1.BeetStruct([
|
8
|
+
['address', beet_solana_1.publicKey],
|
9
|
+
['base_amount', solana_1.u64],
|
10
|
+
['balance', solana_1.u64],
|
11
|
+
['deposited_at', solana_1.u64],
|
12
|
+
['deposited_at_price', solana_1.u64],
|
13
|
+
['leveraged_amount', solana_1.u64],
|
14
|
+
['cumulative_borrow', solana_1.u64],
|
15
|
+
['target_leverage', beet_1.u8],
|
16
|
+
['_padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 7)],
|
17
|
+
], (args) => args);
|
18
|
+
exports.jlpLedgerStruct = new beet_1.FixableBeetStruct([
|
19
|
+
['padding', (0, solana_1.blob)(8)],
|
20
|
+
['total_base_amount', solana_1.u64],
|
21
|
+
['total_leveraged_amount', solana_1.u64],
|
22
|
+
['min_amount', solana_1.u64],
|
23
|
+
['max_capacity', solana_1.u64],
|
24
|
+
['max_amount', solana_1.u64],
|
25
|
+
['holders', (0, beet_1.uniformFixedSizeArray)(exports.jlpHolderStruct, 5000)],
|
26
|
+
], (args) => args);
|
27
|
+
exports.usdcHolderStruct = new beet_1.BeetStruct([
|
28
|
+
['address', beet_solana_1.publicKey],
|
29
|
+
['base_amount', solana_1.u64],
|
30
|
+
['balance', solana_1.u64],
|
31
|
+
['deposited_at', solana_1.u64],
|
32
|
+
['cumulative_borrow', solana_1.u64],
|
33
|
+
], (args) => args);
|
34
|
+
exports.usdcLedgerStruct = new beet_1.FixableBeetStruct([
|
35
|
+
['padding', (0, solana_1.blob)(8)],
|
36
|
+
['total_base_amount', solana_1.u64],
|
37
|
+
['total_available_amount', solana_1.u64],
|
38
|
+
['total_reserved_amount', solana_1.u64],
|
39
|
+
['max_capacity', solana_1.u64],
|
40
|
+
['min_amount', solana_1.u64],
|
41
|
+
['max_amount', solana_1.u64],
|
42
|
+
['holders', (0, beet_1.uniformFixedSizeArray)(exports.usdcHolderStruct, 5000)],
|
43
|
+
], (args) => args);
|
44
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrastea/structs.ts"],"names":[],"mappings":";;;AAAA,oDAKmC;AACnC,kEAA6D;AAG7D,+CAA+C;AAclC,QAAA,eAAe,GAAG,IAAI,iBAAU,CAC3C;IACE,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,kBAAkB,EAAE,YAAG,CAAC;IACzB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,iBAAiB,EAAE,SAAE,CAAC;IACvB,CAAC,UAAU,EAAE,IAAA,4BAAqB,EAAC,SAAE,EAAE,CAAC,CAAC,CAAC;CAC3C,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC;AAYW,QAAA,eAAe,GAAG,IAAI,wBAAiB,CAClD;IACE,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,wBAAwB,EAAE,YAAG,CAAC;IAC/B,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,uBAAe,EAAE,IAAI,CAAC,CAAC;CAC1D,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAiB,CAC5B,CAAC;AAUW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,SAAS,EAAE,uBAAS,CAAC;IACtB,CAAC,aAAa,EAAE,YAAG,CAAC;IACpB,CAAC,SAAS,EAAE,YAAG,CAAC;IAChB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,mBAAmB,EAAE,YAAG,CAAC;CAC3B,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC;AAaW,QAAA,gBAAgB,GAAG,IAAI,wBAAiB,CACnD;IACE,CAAC,SAAS,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACpB,CAAC,mBAAmB,EAAE,YAAG,CAAC;IAC1B,CAAC,wBAAwB,EAAE,YAAG,CAAC;IAC/B,CAAC,uBAAuB,EAAE,YAAG,CAAC;IAC9B,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,SAAS,EAAE,IAAA,4BAAqB,EAAC,wBAAgB,EAAE,IAAI,CAAC,CAAC;CAC3D,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/adrastea/types.ts"],"names":[],"mappings":""}
|
@@ -15,11 +15,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
15
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
16
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
17
|
const constants_1 = require("./constants");
|
18
|
-
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
19
18
|
const solana_1 = require("../../utils/solana");
|
20
19
|
const structs_1 = require("./structs");
|
21
20
|
const filters_1 = require("./filters");
|
22
21
|
const clients_1 = require("../../utils/clients");
|
22
|
+
const ElementRegistry_1 = require("../../utils/elementbuilder/ElementRegistry");
|
23
23
|
const banxFactor = new bignumber_js_1.default(Math.pow(10, constants_1.banxDecimals));
|
24
24
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
25
25
|
const client = (0, clients_1.getClientSolana)();
|
@@ -35,20 +35,16 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
35
35
|
if (amounts.length === 0)
|
36
36
|
return [];
|
37
37
|
const amount = amounts.reduce((curr, sum) => curr.plus(sum), (0, bignumber_js_1.default)(0));
|
38
|
-
const
|
39
|
-
const
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
data: { assets },
|
49
|
-
value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
|
50
|
-
},
|
51
|
-
];
|
38
|
+
const elementRegistry = new ElementRegistry_1.ElementRegistry(portfolio_core_1.NetworkId.solana, constants_1.platformId);
|
39
|
+
const element = elementRegistry.addElementMultiple({
|
40
|
+
label: 'Staked',
|
41
|
+
});
|
42
|
+
element.addAsset({
|
43
|
+
address: constants_1.banxMint,
|
44
|
+
amount,
|
45
|
+
alreadyShifted: true,
|
46
|
+
});
|
47
|
+
return elementRegistry.dump(cache);
|
52
48
|
});
|
53
49
|
const fetcher = {
|
54
50
|
id: `${constants_1.platformId}-staking`,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAAuD;AACvD,gEAAqC;AAGrC,2CAA0E;AAC1E,+CAA8D;AAC9D,uCAAsE;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AC;IAEH,OAAO,eAAe,CAAC,IAAI,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,7 @@
|
|
1
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
2
|
+
export declare const platformId = "bluemove";
|
3
|
+
export declare const platform: Platform;
|
4
|
+
export declare const marketsCacheKey = "markets";
|
5
|
+
export declare const packageId = "0xb24b6789e088b876afabca733bed2299fbc9e2d6369be4d1acfa17d8145454d9";
|
6
|
+
export declare const dexInfoId = "0x3f2d9f724f4a1ce5e71676448dc452be9a6243dac9c5b975a588c8c867066e92";
|
7
|
+
export declare const lpDecimals = 9;
|
@@ -0,0 +1,17 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.lpDecimals = exports.dexInfoId = exports.packageId = exports.marketsCacheKey = exports.platform = exports.platformId = void 0;
|
4
|
+
exports.platformId = 'bluemove';
|
5
|
+
exports.platform = {
|
6
|
+
id: exports.platformId,
|
7
|
+
name: 'BlueMove',
|
8
|
+
image: 'https://sonar.watch/img/platforms/bluemove.webp',
|
9
|
+
website: 'https://dex.bluemove.net/',
|
10
|
+
twitter: 'https://x.com/BlueMove_OA',
|
11
|
+
defiLlamaId: 'bluemove', // from https://defillama.com/docs/api
|
12
|
+
};
|
13
|
+
exports.marketsCacheKey = `markets`;
|
14
|
+
exports.packageId = '0xb24b6789e088b876afabca733bed2299fbc9e2d6369be4d1acfa17d8145454d9';
|
15
|
+
exports.dexInfoId = '0x3f2d9f724f4a1ce5e71676448dc452be9a6243dac9c5b975a588c8c867066e92';
|
16
|
+
exports.lpDecimals = 9;
|
17
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/bluemove/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,UAAU,CAAC;AACxB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,UAAU;IAChB,KAAK,EAAE,iDAAiD;IACxD,OAAO,EAAE,2BAA2B;IACpC,OAAO,EAAE,2BAA2B;IACpC,WAAW,EAAE,UAAU,EAAE,sCAAsC;CAChE,CAAC;AACW,QAAA,eAAe,GAAG,SAAS,CAAC;AAE5B,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAE1D,QAAA,SAAS,GACpB,oEAAoE,CAAC;AAE1D,QAAA,UAAU,GAAG,CAAC,CAAC"}
|