@sonarwatch/portfolio-plugins 0.12.12 → 0.12.14
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +9 -1
- package/package.json +1 -2
- package/src/plugins/clone/structs.d.ts +1 -1
- package/src/plugins/flexlend/struct.d.ts +1 -1
- package/src/plugins/futarchy/structs.d.ts +1 -1
- package/src/plugins/jito/constants.js +1 -1
- package/src/plugins/jito/constants.js.map +1 -1
- package/src/plugins/jito/structs.d.ts +1 -1
- package/src/plugins/mole/farmsFetcher.js +4 -0
- package/src/plugins/mole/farmsFetcher.js.map +1 -1
- package/src/plugins/raydium/structs/cpmm.d.ts +1 -1
- package/src/plugins/sandglass/structs.d.ts +1 -1
- package/src/plugins/typus/vaultsFetcher.js +1 -1
- package/src/plugins/typus/vaultsFetcher.js.map +1 -1
- package/src/plugins/whalesmarket/structs.d.ts +1 -1
- package/src/plugins/tensor/singleListingFetcher.d.ts +0 -2
- package/src/plugins/tensor/singleListingFetcher.js +0 -35
- package/src/plugins/tensor/singleListingFetcher.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -2,10 +2,18 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
-
## [0.12.
|
5
|
+
## [0.12.14](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.13...plugins-0.12.14) (2024-06-05)
|
6
6
|
|
7
7
|
|
8
8
|
|
9
|
+
## [0.12.13](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.12...plugins-0.12.13) (2024-06-04)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.12.12](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.11...plugins-0.12.12) (2024-06-04)
|
14
|
+
|
15
|
+
|
16
|
+
|
9
17
|
## [0.12.11](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.10...plugins-0.12.11) (2024-06-04)
|
10
18
|
|
11
19
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.12.
|
3
|
+
"version": "0.12.14",
|
4
4
|
"type": "commonjs",
|
5
5
|
"types": "./src/index.d.ts",
|
6
6
|
"peerDependencies": {
|
@@ -18,7 +18,6 @@
|
|
18
18
|
"@ethersproject/units": "^5.7.0",
|
19
19
|
"@metaplex-foundation/beet": "^0.7.1",
|
20
20
|
"@metaplex-foundation/beet-solana": "^0.4.0",
|
21
|
-
"@metaplex-foundation/js": "^0.19.4",
|
22
21
|
"@mysten/bcs": "^0.11.1",
|
23
22
|
"@mysten/sui.js": "^0.50.1",
|
24
23
|
"@onsol/tldparser": "^0.6.1",
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
3
|
import BigNumber from 'bignumber.js';
|
4
|
-
import { PublicKey } from '@
|
4
|
+
import { PublicKey } from '@solana/web3.js';
|
5
5
|
export type Borrow = {
|
6
6
|
poolIndex: number;
|
7
7
|
borrowedOnasset: BigNumber;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
-
import { PublicKey } from '@
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
5
|
export type PromotionSeed = {
|
6
6
|
authoritySeed: number[];
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct, FixableBeetStruct } from '@metaplex-foundation/beet';
|
3
|
-
import { PublicKey } from '@
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
5
|
export declare enum VaultStatus {
|
6
6
|
Active = 0,
|
@@ -7,7 +7,7 @@ exports.platform = {
|
|
7
7
|
name: 'Jito',
|
8
8
|
image: 'https://sonar.watch/img/platforms/jito.png',
|
9
9
|
defiLlamaId: 'jito',
|
10
|
-
website: 'https://jito.network/',
|
10
|
+
website: 'https://jito.network/harvest',
|
11
11
|
twitter: 'https://twitter.com/jito_sol',
|
12
12
|
};
|
13
13
|
exports.merkleTree = 'HS8EQ8QkQSBJggY8r255AKdWbtYRtyNMoRt4LjNkkWm1';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/constants.ts"],"names":[],"mappings":";;;AAEa,QAAA,UAAU,GAAG,MAAM,CAAC;AACpB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,4CAA4C;IACnD,WAAW,EAAE,MAAM;IACnB,OAAO,EAAE,8BAA8B;IACvC,OAAO,EAAE,8BAA8B;CACxC,CAAC;AAEW,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAC5D,QAAA,iBAAiB,GAAG,6CAA6C,CAAC;AAClE,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAChB,QAAA,UAAU,GAAG,sCAAsC,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
-
import { PublicKey } from '@
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
5
|
export type ClaimStatus = {
|
6
6
|
buffer: Buffer;
|
@@ -107,6 +107,10 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
107
107
|
suppliedAssets.push((0, tokenPriceToAssetToken_1.default)(farm.symbol2Address, health.toNumber(), portfolio_core_1.NetworkId.sui, tokenPrices.get((0, portfolio_core_1.formatMoveTokenAddress)(farm.symbol2Address))));
|
108
108
|
borrowedAssets.push((0, tokenPriceToAssetToken_1.default)(farm.symbol2Address, debtValue.toNumber(), portfolio_core_1.NetworkId.sui, tokenPrices.get((0, portfolio_core_1.formatMoveTokenAddress)(farm.symbol2Address))));
|
109
109
|
}
|
110
|
+
if (borrowedAssets.length === 0 &&
|
111
|
+
suppliedAssets.length === 0 &&
|
112
|
+
rewardAssets.length === 0)
|
113
|
+
return;
|
110
114
|
const { borrowedValue, suppliedValue, value, rewardValue } = (0, portfolio_core_1.getElementLendingValues)(suppliedAssets, borrowedAssets, rewardAssets);
|
111
115
|
elements.push({
|
112
116
|
type: portfolio_core_1.PortfolioElementType.borrowlend,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"farmsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/mole/farmsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,8DAA+D;AAC/D,+DASoC;AACpC,gEAAqC;AAGrC,2CAA8E;AAC9E,iDAAmD;AAEnD,uCAAiD;AACjD,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,QAAQ,GAAuB,EAAE,CAAC;IAExC,MAAM,CAAC,IAAI,EAAE,SAAS,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QAC1C,KAAK,CAAC,OAAO,CAAW,mBAAO,EAAE;YAC/B,MAAM,EAAE,wBAAY;YACpB,SAAS,EAAE,0BAAS,CAAC,GAAG;SACzB,CAAC;QACF,KAAK,CAAC,OAAO,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,CAAC,IAAA,uCAAsB,EAAC,IAAI,CAAC,cAAc,CAAC,CAAC,CAC7D,CACF,CAAC;QACJ,CAAC;QAED,IACE,cAAc,CAAC,MAAM,KAAK,CAAC;YAC3B,cAAc,CAAC,MAAM,KAAK,CAAC;YAC3B,YAAY,CAAC,MAAM,KAAK,CAAC;YAEzB,OAAO;QAET,MAAM,EAAE,aAAa,EAAE,aAAa,EAAE,KAAK,EAAE,WAAW,EAAE,GACxD,IAAA,wCAAuB,EAAC,cAAc,EAAE,cAAc,EAAE,YAAY,CAAC,CAAC;QAExE,QAAQ,CAAC,IAAI,CAAC;YACZ,IAAI,EAAE,qCAAoB,CAAC,UAAU;YACrC,SAAS,EAAE,0BAAS,CAAC,GAAG;YACxB,UAAU,EAAV,sBAAU;YACV,KAAK,EAAE,SAAS;YAChB,IAAI,EAAE,GAAG,IAAI,CAAC,UAAU,KAAK,UAAU,EAAE;YACzC,KAAK;YACL,IAAI,EAAE;gBACJ,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,cAAc;gBACd,aAAa;gBACb,cAAc;gBACd,eAAe,EAAE,IAAI;gBACrB,WAAW,EAAE,SAAS,CAAC,SAAS,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE;gBACnD,YAAY;gBACZ,WAAW;gBACX,KAAK;aACN;SACF,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CACH,CAAC;IAEF,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,QAAQ;IACzB,SAAS,EAAE,0BAAS,CAAC,GAAG;IACxB,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
-
import { PublicKey } from '@
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
5
|
export type PoolState = {
|
6
6
|
buffer: Buffer;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
-
import { PublicKey } from '@
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
5
|
export type MarketInfo = {
|
6
6
|
vaultSyAmount: BigNumber;
|
@@ -96,7 +96,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
96
96
|
}
|
97
97
|
if (assets.length > 0)
|
98
98
|
elements.push({
|
99
|
-
networkId: portfolio_core_1.NetworkId.
|
99
|
+
networkId: portfolio_core_1.NetworkId.sui,
|
100
100
|
label: 'Deposit',
|
101
101
|
platformId: constants_1.platformId,
|
102
102
|
name: vault.metadata,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"vaultsFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/typus/vaultsFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAOoC;AACpC,gEAAqC;AAGrC,2CAA6D;AAC7D,iDAAmD;AACnD,qEAAkE;AAElE,uCAA6C;AAC7C,qEAAkE;AAClE,qGAA6E;AAE7E,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,sBAAY,GAAE,CAAC;IAE9B,MAAM,gBAAgB,GAAG,MAAM,IAAA,iCAAe,EAC5C,MAAM,EACN,KAAK,EACL;QACE,MAAM,EAAE,EAAE,UAAU,EAAE,8BAAkB,EAAE;KAC3C,CACF,CAAC;IACF,IAAI,CAAC,gBAAgB;QAAE,OAAO,EAAE,CAAC;IAEjC,MAAM,WAAW,GAAa,EAAE,CAAC;IACjC,MAAM,SAAS,GAAgB,IAAI,GAAG,EAAE,CAAC;IACzC,gBAAgB,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,E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AEF,kBAAe,OAAO,CAAC"}
|
@@ -1,7 +1,7 @@
|
|
1
1
|
/// <reference types="node" />
|
2
2
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
3
|
import BigNumber from 'bignumber.js';
|
4
|
-
import { PublicKey } from '@
|
4
|
+
import { PublicKey } from '@solana/web3.js';
|
5
5
|
export declare enum OfferStatus {
|
6
6
|
Open = 0,
|
7
7
|
Closed = 1
|
@@ -1,35 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
9
|
-
});
|
10
|
-
};
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
12
|
-
const js_1 = require("@metaplex-foundation/js");
|
13
|
-
const constants_1 = require("./constants");
|
14
|
-
const solana_1 = require("../../utils/solana");
|
15
|
-
const clients_1 = require("../../utils/clients");
|
16
|
-
const struct_1 = require("./struct");
|
17
|
-
const filters_1 = require("./filters");
|
18
|
-
function getTensorSingleListings(owner) {
|
19
|
-
return __awaiter(this, void 0, void 0, function* () {
|
20
|
-
const connection = (0, clients_1.getClientSolana)();
|
21
|
-
const metaplex = new js_1.Metaplex(connection);
|
22
|
-
const singleListings = yield (0, solana_1.getParsedProgramAccounts)(connection, struct_1.singleListingStruct, constants_1.tensorPid, (0, filters_1.singleListingFilter)(owner));
|
23
|
-
if (singleListings.length === 0)
|
24
|
-
return [];
|
25
|
-
const mints = singleListings.map((listing) => listing.nftMint);
|
26
|
-
const nftsMetadata = yield metaplex.nfts().findAllByMintList({
|
27
|
-
mints,
|
28
|
-
});
|
29
|
-
if (!nftsMetadata)
|
30
|
-
return [];
|
31
|
-
return nftsMetadata.map((nft) => nft || []).flat();
|
32
|
-
});
|
33
|
-
}
|
34
|
-
exports.default = getTensorSingleListings;
|
35
|
-
//# sourceMappingURL=singleListingFetcher.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"singleListingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/tensor/singleListingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,gDAAuE;AACvE,2CAAwC;AACxC,+CAA8D;AAC9D,iDAAsD;AACtD,qCAA+C;AAC/C,uCAAgD;AAEhD,SAA8B,uBAAuB,CACnD,KAAa;;QAEb,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;QACrC,MAAM,QAAQ,GAAG,IAAI,aAAQ,CAAC,UAAU,CAAC,CAAC;QAC1C,MAAM,cAAc,GAAG,MAAM,IAAA,iCAAwB,EACnD,UAAU,EACV,4BAAmB,EACnB,qBAAS,EACT,IAAA,6BAAmB,EAAC,KAAK,CAAC,CAC3B,CAAC;QACF,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,EAAE,CAAC;QAE3C,MAAM,KAAK,GAAG,cAAc,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAE/D,MAAM,YAAY,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC,iBAAiB,CAAC;YAC3D,KAAK;SACN,CAAC,CAAC;QACH,IAAI,CAAC,YAAY;YAAE,OAAO,EAAE,CAAC;QAC7B,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,IAAI,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;IACrD,CAAC;CAAA;AApBD,0CAoBC"}
|