@sonarwatch/portfolio-plugins 0.15.23 → 0.15.26
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 +12 -0
- package/package.json +1 -1
- package/src/plugins/huma/airdropFetcher.js +7 -0
- package/src/plugins/huma/airdropFetcher.js.map +1 -1
- package/src/plugins/jupiter/constants.d.ts +2 -0
- package/src/plugins/jupiter/constants.js +3 -1
- package/src/plugins/jupiter/constants.js.map +1 -1
- package/src/plugins/jupiter/getJupiterPrices.d.ts +5 -0
- package/src/plugins/jupiter/getJupiterPrices.js +57 -0
- package/src/plugins/jupiter/getJupiterPrices.js.map +1 -0
- package/src/plugins/jupiter/governance/asrAirdropFetcher.js +10 -12
- package/src/plugins/jupiter/governance/asrAirdropFetcher.js.map +1 -1
- package/src/plugins/jupiter/helpers.d.ts +0 -1
- package/src/plugins/jupiter/helpers.js +1 -47
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/pricingJob.js +9 -12
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/jupiter/types.d.ts +12 -9
- package/src/plugins/lifinity/index.js +1 -2
- package/src/plugins/lifinity/index.js.map +1 -1
- package/src/plugins/sanctum/s1AirdropFetcher.js +10 -28
- package/src/plugins/sanctum/s1AirdropFetcher.js.map +1 -1
- package/src/utils/solana/jupiter/getClaimTransactions.d.ts +5 -0
- package/src/utils/solana/jupiter/getClaimTransactions.js +36 -0
- package/src/utils/solana/jupiter/getClaimTransactions.js.map +1 -0
- package/src/plugins/lifinity/xLfntyJob.d.ts +0 -3
- package/src/plugins/lifinity/xLfntyJob.js +0 -42
- package/src/plugins/lifinity/xLfntyJob.js.map +0 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,18 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.15.26](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.25...plugins-0.15.26) (2025-06-05)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.15.25](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.24...plugins-0.15.25) (2025-06-04)
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
## [0.15.24](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.23...plugins-0.15.24) (2025-06-04)
|
14
|
+
|
15
|
+
|
16
|
+
|
5
17
|
## [0.15.23](https://github.com/sonarwatch/portfolio/compare/plugins-0.15.22...plugins-0.15.23) (2025-06-04)
|
6
18
|
|
7
19
|
|
package/package.json
CHANGED
@@ -19,6 +19,7 @@ const AirdropFetcher_1 = require("../../AirdropFetcher");
|
|
19
19
|
const constants_1 = require("./constants");
|
20
20
|
const clients_1 = require("../../utils/clients");
|
21
21
|
const deriveClaimStatus_1 = require("../../utils/solana/jupiter/deriveClaimStatus");
|
22
|
+
const getClaimTransactions_1 = require("../../utils/solana/jupiter/getClaimTransactions");
|
22
23
|
const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
23
24
|
try {
|
24
25
|
const res = yield axios_1.default.get(constants_1.airdropApi + owner);
|
@@ -37,6 +38,10 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
37
38
|
const client = (0, clients_1.getClientSolana)();
|
38
39
|
const claimStatus = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, res.data.distributorPubkey, constants_1.distributorPid);
|
39
40
|
const claimAccount = yield client.getAccountInfo(claimStatus);
|
41
|
+
let claims = [];
|
42
|
+
if (claimAccount) {
|
43
|
+
claims = yield (0, getClaimTransactions_1.getClaimTransactions)(owner, claimStatus, constants_1.humaMint);
|
44
|
+
}
|
40
45
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
41
46
|
statics: constants_1.airdropStatics,
|
42
47
|
items: [
|
@@ -45,6 +50,8 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
45
50
|
isClaimed: !!claimAccount,
|
46
51
|
label: 'HUMA',
|
47
52
|
address: constants_1.humaMint,
|
53
|
+
claims,
|
54
|
+
ref: claimAccount ? claimStatus.toString() : undefined,
|
48
55
|
},
|
49
56
|
],
|
50
57
|
});
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/huma/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/huma/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAA8D;AAC9D,kDAA6C;AAC7C,yDAK8B;AAC9B,2CAMqB;AAErB,iDAAsD;AACtD,oFAAiF;AACjF,0FAAuF;AAEvF,MAAM,QAAQ,GAA2B,CAAO,KAAa,EAAE,EAAE;IAC/D,IAAI,CAAC;QACH,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CACzD,sBAAU,GAAG,KAAK,CACnB,CAAC;QAEF,IAAI,CAAC,GAAG,CAAC,IAAI;YACX,OAAO,IAAA,8BAAa,EAAC;gBACnB,OAAO,EAAE,0BAAc;gBACvB,KAAK,EAAE;oBACL;wBACE,MAAM,EAAE,CAAC;wBACT,SAAS,EAAE,KAAK;wBAChB,KAAK,EAAE,MAAM;wBACb,OAAO,EAAE,oBAAQ;qBAClB;iBACF;aACF,CAAC,CAAC;QAEL,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,MAAM,WAAW,GAAG,IAAA,qCAAiB,EACnC,KAAK,EACL,GAAG,CAAC,IAAI,CAAC,iBAAiB,EAC1B,0BAAc,CACf,CAAC;QACF,MAAM,YAAY,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,WAAW,CAAC,CAAC;QAE9D,IAAI,MAAM,GAAY,EAAE,CAAC;QACzB,IAAI,YAAY,EAAE,CAAC;YACjB,MAAM,GAAG,MAAM,IAAA,2CAAoB,EAAC,KAAK,EAAE,WAAW,EAAE,oBAAQ,CAAC,CAAC;QACpE,CAAC;QAED,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,cAAc,GAAG,OAAO;oBACzC,SAAS,EAAE,CAAC,CAAC,YAAY;oBACzB,KAAK,EAAE,MAAM;oBACb,OAAO,EAAE,oBAAQ;oBACjB,MAAM;oBACN,GAAG,EAAE,YAAY,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;iBACvD;aACF;SACF,CAAC,CAAC;IACL,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,OAAO,IAAA,8BAAa,EAAC;YACnB,OAAO,EAAE,0BAAc;YACvB,KAAK,EAAE;gBACL;oBACE,MAAM,EAAE,CAAC;oBACT,SAAS,EAAE,KAAK;oBAChB,KAAK,EAAE,MAAM;oBACb,OAAO,EAAE,oBAAQ;iBAClB;aACF;SACF,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AACW,QAAA,OAAO,GAAG,IAAA,wCAAuB,EAC5C,sBAAc,EACd,sBAAU,EACV,cAAc,EACd,0BAAc,CAAC,QAAQ,CACxB,CAAC"}
|
@@ -2,6 +2,8 @@
|
|
2
2
|
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
4
4
|
export declare const jupApiParams: string | undefined;
|
5
|
+
export declare const jupDatapiHeaderKey: string | undefined;
|
6
|
+
export declare const jupDatapiHeaderValue: string | undefined;
|
5
7
|
export declare const voteProgramId: PublicKey;
|
6
8
|
export declare const lockerPubkey: PublicKey;
|
7
9
|
export declare const jupMint = "JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN";
|
@@ -1,8 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.verifiedTokensCacheKey = exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.jupApiParams = void 0;
|
3
|
+
exports.verifiedTokensCacheKey = exports.jupDecimals = exports.jupMint = exports.lockerPubkey = exports.voteProgramId = exports.jupDatapiHeaderValue = exports.jupDatapiHeaderKey = exports.jupApiParams = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.jupApiParams = process.env['PORTFOLIO_JUP_API_PARAM'];
|
6
|
+
exports.jupDatapiHeaderKey = process.env['PORTFOLIO_JUP_DATAPI_HEADER_KEY'];
|
7
|
+
exports.jupDatapiHeaderValue = process.env['PORTFOLIO_JUP_DATAPI_HEADER_VALUE'];
|
6
8
|
exports.voteProgramId = new web3_js_1.PublicKey('voTpe3tHQ7AjQHMapgSue2HJFAh2cGsdokqN3XqmVSj');
|
7
9
|
exports.lockerPubkey = new web3_js_1.PublicKey('CVMdMd79no569tjc5Sq7kzz8isbfCcFyBS5TLGsrZ5dN');
|
8
10
|
exports.jupMint = 'JUPyiwrYJFskUPiHa7hkeR8VUtAeFoSYbKedZNsDvCN';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE/B,QAAA,YAAY,GAAG,OAAO,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC;AACtD,QAAA,kBAAkB,GAC7B,OAAO,CAAC,GAAG,CAAC,iCAAiC,CAAC,CAAC;AACpC,QAAA,oBAAoB,GAC/B,OAAO,CAAC,GAAG,CAAC,mCAAmC,CAAC,CAAC;AAEtC,QAAA,aAAa,GAAG,IAAI,mBAAS,CACxC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,6CAA6C,CAAC;AACxD,QAAA,WAAW,GAAG,CAAC,CAAC;AAEhB,QAAA,sBAAsB,GAAG,iBAAiB,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
|
2
|
+
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import { DatapiAsset } from './types';
|
5
|
+
export declare function getJupiterPrices(mints: PublicKey[]): Promise<Map<string, DatapiAsset>>;
|
@@ -0,0 +1,57 @@
|
|
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
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
+
};
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
+
exports.getJupiterPrices = void 0;
|
16
|
+
const axios_1 = __importDefault(require("axios"));
|
17
|
+
const constants_1 = require("./constants");
|
18
|
+
const maxIdsPerRequest = 50;
|
19
|
+
const jupDatapiAssetsUrl = 'https://datapi.jup.ag/v1/assets';
|
20
|
+
function getJupiterPrices(mints) {
|
21
|
+
return __awaiter(this, void 0, void 0, function* () {
|
22
|
+
let res;
|
23
|
+
const pricesData = [];
|
24
|
+
let subMints;
|
25
|
+
let start = 0;
|
26
|
+
let end = maxIdsPerRequest;
|
27
|
+
const endpoint = `${jupDatapiAssetsUrl}`;
|
28
|
+
const uniqueMints = [...new Set(mints.map((m) => m.toString()))];
|
29
|
+
do {
|
30
|
+
subMints = uniqueMints.slice(start, end);
|
31
|
+
let headers = {};
|
32
|
+
if (constants_1.jupDatapiHeaderKey && constants_1.jupDatapiHeaderValue)
|
33
|
+
headers = {
|
34
|
+
[constants_1.jupDatapiHeaderKey]: constants_1.jupDatapiHeaderValue,
|
35
|
+
};
|
36
|
+
res = yield axios_1.default.get(endpoint, {
|
37
|
+
params: {
|
38
|
+
ids: subMints.map((m) => m.toString()).join(','),
|
39
|
+
},
|
40
|
+
headers,
|
41
|
+
});
|
42
|
+
start = end;
|
43
|
+
end += maxIdsPerRequest;
|
44
|
+
pricesData.push(res.data.assets);
|
45
|
+
} while (uniqueMints.at(start));
|
46
|
+
const prices = new Map();
|
47
|
+
for (const priceData of pricesData) {
|
48
|
+
for (const [, asset] of Object.entries(priceData)) {
|
49
|
+
if (asset.usdPrice)
|
50
|
+
prices.set(asset.id, asset);
|
51
|
+
}
|
52
|
+
}
|
53
|
+
return prices;
|
54
|
+
});
|
55
|
+
}
|
56
|
+
exports.getJupiterPrices = getJupiterPrices;
|
57
|
+
//# sourceMappingURL=getJupiterPrices.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getJupiterPrices.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/getJupiterPrices.ts"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QAEhC,MAAM,MAAM,GAA6B,IAAI,GAAG,EAAE,CAAC;QACnD,KAAK,MAAM,SAAS,IAAI,UAAU,EAAE,CAAC;YACnC,KAAK,MAAM,CAAC,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;gBAClD,IAAI,KAAK,CAAC,QAAQ;oBAAE,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,EAAE,KAAK,CAAC,CAAC;YAClD,CAAC;QACH,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AA1CD,4CA0CC"}
|
@@ -22,6 +22,7 @@ const clients_1 = require("../../../utils/clients");
|
|
22
22
|
const constants_2 = require("../launchpad/constants");
|
23
23
|
const deriveClaimStatus_1 = require("../../../utils/solana/jupiter/deriveClaimStatus");
|
24
24
|
const constants_3 = require("../constants");
|
25
|
+
const getClaimTransactions_1 = require("../../../utils/solana/jupiter/getClaimTransactions");
|
25
26
|
function getInegibleItems(items) {
|
26
27
|
return Array.from(items).map(([address, { label }]) => ({
|
27
28
|
amount: 0,
|
@@ -56,8 +57,13 @@ function getAsrAirdropExecutor(config) {
|
|
56
57
|
const claimAddresses = claimsProof.data.claim.map((cp) => asrDeriveClaimStatus(owner, cp, config.distributorProgram));
|
57
58
|
const client = (0, clients_1.getClientSolana)();
|
58
59
|
const claimAccounts = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, claimAddresses);
|
59
|
-
const
|
60
|
-
...claimAddresses.map((add) =>
|
60
|
+
const allClaimA = yield Promise.all([
|
61
|
+
...claimAddresses.map((add, i) => {
|
62
|
+
const claimProofRes = claimsProof.data.claim[i];
|
63
|
+
if (!claimProofRes.mint)
|
64
|
+
return [];
|
65
|
+
return (0, getClaimTransactions_1.getClaimTransactions)(owner, add, claimProofRes.mint);
|
66
|
+
}),
|
61
67
|
]);
|
62
68
|
return (0, AirdropFetcher_1.getAirdropRaw)({
|
63
69
|
statics: config.statics,
|
@@ -69,7 +75,7 @@ function getAsrAirdropExecutor(config) {
|
|
69
75
|
const asrItem = config.items.get(claimProofRes.mint);
|
70
76
|
if (!asrItem)
|
71
77
|
return [];
|
72
|
-
const
|
78
|
+
const claims = allClaimA[i];
|
73
79
|
const { label, decimals } = asrItem;
|
74
80
|
const amount = new bignumber_js_1.default(claimProofRes.amount)
|
75
81
|
.div(Math.pow(10, decimals))
|
@@ -81,15 +87,7 @@ function getAsrAirdropExecutor(config) {
|
|
81
87
|
label,
|
82
88
|
address: claimProofRes.mint,
|
83
89
|
ref: claimAcc ? claimAddresses[i].toString() : undefined,
|
84
|
-
claims
|
85
|
-
? [
|
86
|
-
{
|
87
|
-
date: claimTx.blockTime * 1000,
|
88
|
-
amount,
|
89
|
-
txId: claimTx.signature,
|
90
|
-
},
|
91
|
-
]
|
92
|
-
: undefined,
|
90
|
+
claims,
|
93
91
|
},
|
94
92
|
];
|
95
93
|
})
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"asrAirdropFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/asrAirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,2CAAiE;AACjE,4DAAgF;AAEhF,mGAAgG;AAChG,oDAAyD;AACzD,sDAAuD;AACvD,uFAAoF;AACpF,4CAAuC;
|
1
|
+
{"version":3,"file":"asrAirdropFetcher.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/governance/asrAirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,2CAAiE;AACjE,4DAAgF;AAEhF,mGAAgG;AAChG,oDAAyD;AACzD,sDAAuD;AACvD,uFAAoF;AACpF,4CAAuC;AACvC,6FAA0F;AAE1F,SAAS,gBAAgB,CAAC,KAAe;IACvC,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,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AE,GAAG,OAAO,CAAC;gBAEpC,MAAM,MAAM,GAAG,IAAI,sBAAS,CAAC,aAAa,CAAC,MAAM,CAAC;qBAC/C,GAAG,CAAC,SAAA,EAAE,EAAI,QAAQ,CAAA,CAAC;qBACnB,QAAQ,EAAE,CAAC;gBACd,OAAO;oBACL;wBACE,MAAM;wBACN,SAAS,EAAE,CAAC,CAAC,QAAQ;wBACrB,KAAK;wBACL,OAAO,EAAE,aAAa,CAAC,IAAI;wBAC3B,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,SAAS;wBACxD,MAAM;qBACP;iBACF,CAAC;YACJ,CAAC,CAAC;iBACD,IAAI,EAAE;SACV,CAAC,CAAC;IACL,CAAC,CAAA,CAAC;AACJ,CAAC;AAlED,sDAkEC"}
|
@@ -2,4 +2,3 @@
|
|
2
2
|
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
4
4
|
export declare function getVotePda(owner: string): PublicKey;
|
5
|
-
export declare function getJupiterPrices(mints: PublicKey[], vsMint: PublicKey): Promise<Map<string, number>>;
|
@@ -1,20 +1,7 @@
|
|
1
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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
12
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
|
-
};
|
14
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.
|
3
|
+
exports.getVotePda = void 0;
|
16
4
|
const web3_js_1 = require("@solana/web3.js");
|
17
|
-
const axios_1 = __importDefault(require("axios"));
|
18
5
|
const constants_1 = require("./constants");
|
19
6
|
function getVotePda(owner) {
|
20
7
|
return web3_js_1.PublicKey.findProgramAddressSync([
|
@@ -24,37 +11,4 @@ function getVotePda(owner) {
|
|
24
11
|
], constants_1.voteProgramId)[0];
|
25
12
|
}
|
26
13
|
exports.getVotePda = getVotePda;
|
27
|
-
const maxIdsPerRequest = 100;
|
28
|
-
const jupPriceApiUrl = 'https://lite-api.jup.ag/price/v2';
|
29
|
-
function getJupiterPrices(mints, vsMint) {
|
30
|
-
return __awaiter(this, void 0, void 0, function* () {
|
31
|
-
let res;
|
32
|
-
const pricesData = [];
|
33
|
-
let subMints;
|
34
|
-
let start = 0;
|
35
|
-
let end = maxIdsPerRequest;
|
36
|
-
const endpoint = `${jupPriceApiUrl}?${constants_1.jupApiParams !== null && constants_1.jupApiParams !== void 0 ? constants_1.jupApiParams : ''}`;
|
37
|
-
do {
|
38
|
-
subMints = mints.slice(start, end);
|
39
|
-
res = yield axios_1.default.get(endpoint, {
|
40
|
-
params: {
|
41
|
-
ids: subMints.map((m) => m.toString()).join(','),
|
42
|
-
vsToken: vsMint.toString(),
|
43
|
-
},
|
44
|
-
});
|
45
|
-
start = end;
|
46
|
-
end += maxIdsPerRequest;
|
47
|
-
pricesData.push(res.data.data);
|
48
|
-
} while (mints.at(start));
|
49
|
-
const prices = new Map();
|
50
|
-
for (const priceData of pricesData) {
|
51
|
-
for (const [, value] of Object.entries(priceData)) {
|
52
|
-
if (value)
|
53
|
-
prices.set(value.id, value.price);
|
54
|
-
}
|
55
|
-
}
|
56
|
-
return prices;
|
57
|
-
});
|
58
|
-
}
|
59
|
-
exports.getJupiterPrices = getJupiterPrices;
|
60
14
|
//# sourceMappingURL=helpers.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"helpers.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/helpers.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAC5C,2CAA0D;AAE1D,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"}
|
@@ -12,12 +12,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
13
|
const web3_js_1 = require("@solana/web3.js");
|
14
14
|
const constants_1 = require("./exchange/constants");
|
15
|
-
const helpers_1 = require("./helpers");
|
16
15
|
const getMultipleDecimalsAsMap_1 = require("../../utils/solana/getMultipleDecimalsAsMap");
|
17
16
|
const clients_1 = require("../../utils/clients");
|
18
|
-
const solana_1 = require("../../utils/solana");
|
19
17
|
const constants_2 = require("./constants");
|
20
18
|
const constants_3 = require("../sanctum/constants");
|
19
|
+
const getJupiterPrices_1 = require("./getJupiterPrices");
|
20
|
+
const constants_4 = require("../lifinity/constants");
|
21
21
|
const mints = [
|
22
22
|
'8Yv9Jz4z7BUHP68dz8E8m3tMe6NKgpMUKn8KVqrPA6Fr', // Wrapped USDC (Allbridge from Avalanche)
|
23
23
|
'FHfba3ov5P3RjaiLVgh8FTv4oirxQDoVXuoUUDvHuXax', // USDC (Wormhole from Avalanche)
|
@@ -25,12 +25,12 @@ const mints = [
|
|
25
25
|
'Bn113WT6rbdgwrm12UJtnmNqGqZjY4it2WoUQuQopFVn', // Wrapped USDT (Allbridge from Ethereum)
|
26
26
|
'E77cpQ4VncGmcAXX16LHFFzNBEBb2U7Ar7LBmZNfCgwL', // Wrapped USDT (Allbridge from BSC)
|
27
27
|
'8qJSyQprMC57TWKaYEmetUR3UUiTP2M3hXdcvFhkZdmv', // Tether USD (Wormhole from BSC)
|
28
|
+
constants_4.xLfntyMint,
|
29
|
+
constants_4.lfntyMint,
|
28
30
|
];
|
29
|
-
const vsToken = portfolio_core_1.solanaNativeWrappedAddress;
|
30
31
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
31
32
|
const connection = (0, clients_1.getClientSolana)();
|
32
|
-
const [
|
33
|
-
(0, helpers_1.getJupiterPrices)([new web3_js_1.PublicKey(vsToken)], new web3_js_1.PublicKey(solana_1.usdcSolanaMint)),
|
33
|
+
const [verifiedTokens, sanctumMints] = yield Promise.all([
|
34
34
|
cache.getItem(constants_2.verifiedTokensCacheKey, {
|
35
35
|
prefix: constants_1.platformId,
|
36
36
|
networkId: portfolio_core_1.NetworkId.solana,
|
@@ -44,9 +44,6 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
44
44
|
console.warn('Jupiter Verified Tokens not in cache');
|
45
45
|
if (!sanctumMints)
|
46
46
|
console.warn('Sanctums tokens not in cache');
|
47
|
-
const solPrice = solSources.get(vsToken);
|
48
|
-
if (!solPrice)
|
49
|
-
return;
|
50
47
|
const mintsPk = new Set([
|
51
48
|
...mints.map((m) => new web3_js_1.PublicKey(m)),
|
52
49
|
...(sanctumMints || []).map((a) => new web3_js_1.PublicKey(a)),
|
@@ -56,10 +53,9 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
56
53
|
mintsPk.add(new web3_js_1.PublicKey(token.address));
|
57
54
|
decimalsMap.set(token.address, Number(token.decimals));
|
58
55
|
});
|
59
|
-
const
|
60
|
-
const prices = yield (0, helpers_1.getJupiterPrices)([...mintsPk], new web3_js_1.PublicKey(vsToken));
|
56
|
+
const assets = yield (0, getJupiterPrices_1.getJupiterPrices)([...mintsPk]);
|
61
57
|
const sources = [];
|
62
|
-
|
58
|
+
assets.forEach((asset, mint) => {
|
63
59
|
const decimals = decimalsMap.get(mint);
|
64
60
|
if (!decimals)
|
65
61
|
return;
|
@@ -69,7 +65,8 @@ const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
|
69
65
|
id: portfolio_core_1.jupiterSourceId,
|
70
66
|
networkId: portfolio_core_1.NetworkId.solana,
|
71
67
|
timestamp: Date.now(),
|
72
|
-
price:
|
68
|
+
price: asset.usdPrice,
|
69
|
+
priceChange24h: asset.priceChange24h,
|
73
70
|
platformId: portfolio_core_1.walletTokensPlatformId,
|
74
71
|
weight: 1,
|
75
72
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"pricingJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jupiter/pricingJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAKoC;AACpC,6CAA4C;AAG5C,oDAAkD;AAClD,0FAAuF;AACvF,iDAAsD;AAEtD,2CAAqD;AACrD,oDAAgF;AAChF,yDAAsD;AACtD,qDAA8D;AAE9D,MAAM,KAAK,GAAG;IACZ,8CAA8C,EAAE,0CAA0C;IAC1F,8CAA8C,EAAE,iCAAiC;IACjF,6CAA6C,EAAE,iCAAiC;IAChF,8CAA8C,EAAE,yCAAyC;IACzF,8CAA8C,EAAE,oCAAoC;IACpF,8CAA8C,EAAE,iCAAiC;IACjF,sBAAU;IACV,qBAAS;CACV,CAAC;AAEF,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,UAAU,GAAG,IAAA,yBAAe,GAAE,CAAC;IA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,OAAO,CAAC,CAAC,CAAC;IAEpD,MAAM,OAAO,GAAuB,EAAE,CAAC;IACvC,MAAM,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,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,gCAAe;YACnB,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;YACrB,KAAK,EAAE,KAAK,CAAC,QAAQ;YACrB,cAAc,EAAE,KAAK,CAAC,cAAc;YACpC,UAAU,EAAE,uCAAsB;YAClC,MAAM,EAAE,CAAC;SACV,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,MAAM,EAAE,CAAC,UAAU,CAAC;CACrB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|
@@ -105,15 +105,18 @@ export type ClaimProofResponse = ClaimProof | string;
|
|
105
105
|
export type AsrResponse = {
|
106
106
|
claim: ClaimProof[];
|
107
107
|
};
|
108
|
-
export type
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
108
|
+
export type DatapiAsset = {
|
109
|
+
id: string;
|
110
|
+
chain: string;
|
111
|
+
symbol: string;
|
112
|
+
icon: string;
|
113
|
+
decimals: number;
|
114
|
+
usdPrice: number;
|
115
|
+
circSupply: number;
|
116
|
+
priceChange24h: number;
|
117
|
+
};
|
118
|
+
export type DatapiAssetsResponse = {
|
119
|
+
assets: DatapiAsset[];
|
117
120
|
};
|
118
121
|
export type TokenResponse = {
|
119
122
|
address: string;
|
@@ -5,7 +5,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.fetchers = exports.jobs = void 0;
|
7
7
|
const lockerFetcher_1 = __importDefault(require("./lockerFetcher"));
|
8
|
-
|
9
|
-
exports.jobs = [xLfntyJob_1.default];
|
8
|
+
exports.jobs = [];
|
10
9
|
exports.fetchers = [lockerFetcher_1.default];
|
11
10
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lifinity/index.ts"],"names":[],"mappings":";;;;;;AAEA,oEAA4C;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lifinity/index.ts"],"names":[],"mappings":";;;;;;AAEA,oEAA4C;AAE/B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,uBAAa,CAAC,CAAC"}
|
@@ -22,6 +22,7 @@ const deriveClaimStatus_1 = require("../../utils/solana/jupiter/deriveClaimStatu
|
|
22
22
|
const clients_1 = require("../../utils/clients");
|
23
23
|
const constants_2 = require("../jupiter/launchpad/constants");
|
24
24
|
const constants_3 = require("./constants");
|
25
|
+
const getClaimTransactions_1 = require("../../utils/solana/jupiter/getClaimTransactions");
|
25
26
|
const claimStart = new bignumber_js_1.default(1721314800000);
|
26
27
|
const earnestClaimDuration = 172 * 24 * 60 * 60 * 1000;
|
27
28
|
const earnestClaimEnd = new bignumber_js_1.default(1736208000000);
|
@@ -55,11 +56,9 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
55
56
|
const claimStatusAccount = yield client.getAccountInfo(claimStatusAddress);
|
56
57
|
let capitalAmount = new bignumber_js_1.default(0);
|
57
58
|
let claimedTs;
|
58
|
-
let
|
59
|
+
let claims = [];
|
59
60
|
if (claimStatusAccount) {
|
60
|
-
|
61
|
-
[firstTx] = txs;
|
62
|
-
claimedTs = firstTx.blockTime;
|
61
|
+
claims = yield (0, getClaimTransactions_1.getClaimTransactions)(owner, claimStatusAddress, constants_3.cloudMint);
|
63
62
|
if (claimedTs) {
|
64
63
|
const ratio = new bignumber_js_1.default(claimedTs * 1000)
|
65
64
|
.minus(claimStart)
|
@@ -87,15 +86,7 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
87
86
|
isClaimed: claimStatusAccount !== null,
|
88
87
|
label: 'CLOUD',
|
89
88
|
address: constants_3.cloudMint,
|
90
|
-
claims
|
91
|
-
? [
|
92
|
-
{
|
93
|
-
date: claimedTs,
|
94
|
-
amount: capitalAmount.div(Math.pow(10, constants_3.cloudDecimals)).toNumber(),
|
95
|
-
txId: firstTx.signature,
|
96
|
-
},
|
97
|
-
]
|
98
|
-
: undefined,
|
89
|
+
claims,
|
99
90
|
ref: claimStatusAccount ? claimStatusAddress.toString() : undefined,
|
100
91
|
},
|
101
92
|
];
|
@@ -115,17 +106,16 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
115
106
|
const earnClaimStatusAddress = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, claimProofEarn.data.merkle_tree, constants_2.lfgDisProgram);
|
116
107
|
const earnClaimStatusAccount = yield client.getAccountInfo(earnClaimStatusAddress);
|
117
108
|
let earnestAmount = new bignumber_js_1.default(0);
|
118
|
-
let earnestClaimTx;
|
119
109
|
let earnestClaimTime;
|
110
|
+
let earnestClaims = [];
|
120
111
|
if (earnClaimStatusAccount) {
|
121
|
-
|
122
|
-
|
123
|
-
earnestClaimTime = earnestClaimTx.blockTime;
|
112
|
+
earnestClaims = yield (0, getClaimTransactions_1.getClaimTransactions)(owner, earnClaimStatusAddress, constants_3.cloudMint);
|
113
|
+
earnestClaimTime = earnestClaims[0].date;
|
124
114
|
if (earnestClaimTime) {
|
125
|
-
if (earnestClaimEnd.isLessThanOrEqualTo(earnestClaimTime
|
115
|
+
if (earnestClaimEnd.isLessThanOrEqualTo(earnestClaimTime))
|
126
116
|
earnestAmount = new bignumber_js_1.default(claimProofEarn.data.amount).times(2);
|
127
117
|
else {
|
128
|
-
const ratio = new bignumber_js_1.default(earnestClaimTime
|
118
|
+
const ratio = new bignumber_js_1.default(earnestClaimTime)
|
129
119
|
.minus(claimStart)
|
130
120
|
.dividedBy(earnestClaimDuration)
|
131
121
|
.plus(1);
|
@@ -151,15 +141,7 @@ const executor = (owner) => __awaiter(void 0, void 0, void 0, function* () {
|
|
151
141
|
isClaimed: earnClaimStatusAccount !== null,
|
152
142
|
label: 'CLOUD',
|
153
143
|
address: constants_3.cloudMint,
|
154
|
-
claims:
|
155
|
-
? [
|
156
|
-
{
|
157
|
-
date: earnestClaimTime,
|
158
|
-
amount: earnestAmount.div(Math.pow(10, constants_3.cloudDecimals)).toNumber(),
|
159
|
-
txId: earnestClaimTx.signature,
|
160
|
-
},
|
161
|
-
]
|
162
|
-
: undefined,
|
144
|
+
claims: earnestClaims,
|
163
145
|
ref: earnClaimStatusAccount
|
164
146
|
? earnClaimStatusAddress.toString()
|
165
147
|
: undefined,
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"s1AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/s1AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+
|
1
|
+
{"version":3,"file":"s1AirdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/sanctum/s1AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAA8D;AAC9D,oDAAoD;AACpD,yDAK8B;AAC9B,oFAAiF;AACjF,iDAAsD;AAEtD,8DAA8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CAAC,CAAC,CAAC;YACX,aAAa,GAAG,IAAI,sBAAS,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;QACzE,CAAC;QACD,KAAK,CAAC,IAAI,CAAC;YACT,MAAM,EAAE,aAAa,CAAC,GAAG,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC,QAAQ,EAAE;YACzD,SAAS,EAAE,sBAAsB,KAAK,IAAI;YAC1C,KAAK,EAAE,OAAO;YACd,OAAO,EAAE,qBAAS;YAClB,MAAM,EAAE,aAAa;YACrB,GAAG,EAAE,sBAAsB;gBACzB,CAAC,CAAC,sBAAsB,CAAC,QAAQ,EAAE;gBACnC,CAAC,CAAC,SAAS;SACd,CAAC,CAAC;IACL,CAAC;IAED,OAAO,IAAA,8BAAa,EAAC;QACnB,OAAO,EAAE,4BAAgB;QACzB,KAAK;KACN,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,4BAAgB,CAAC,EAAE;IACvB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEW,QAAA,OAAO,GAAG,IAAA,wCAAuB,EAC5C,sBAAc,EACd,sBAAU,EACV,GAAG,sBAAU,UAAU,EACvB,4BAAgB,CAAC,QAAQ,CAC1B,CAAC"}
|
@@ -0,0 +1,5 @@
|
|
1
|
+
/// <reference types="@drift-labs/sdk/node_modules/@solana/web3.js" />
|
2
|
+
/// <reference types="jito-ts/node_modules/@solana/web3.js" />
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import { Claim } from '@sonarwatch/portfolio-core';
|
5
|
+
export declare const getClaimTransactions: (owner: PublicKey | string, claimStatusPk: PublicKey | string, mint: PublicKey | string) => Promise<Claim[]>;
|
@@ -0,0 +1,36 @@
|
|
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
|
+
exports.getClaimTransactions = void 0;
|
13
|
+
const tx_parser_1 = require("@sonarwatch/tx-parser");
|
14
|
+
const clients_1 = require("../../clients");
|
15
|
+
const getClaimTransactions = (owner, claimStatusPk, mint) => __awaiter(void 0, void 0, void 0, function* () {
|
16
|
+
const client = (0, clients_1.getClientSolana)();
|
17
|
+
const signatures = yield (0, tx_parser_1.getSignatures)(client, claimStatusPk.toString());
|
18
|
+
const transactions = yield (0, tx_parser_1.getTransactions)(client, signatures.map((s) => s.signature));
|
19
|
+
const parsedTransactions = transactions.map((t) => (0, tx_parser_1.parseTransaction)(t, owner.toString()));
|
20
|
+
return parsedTransactions
|
21
|
+
.map((transaction) => {
|
22
|
+
if (!(transaction === null || transaction === void 0 ? void 0 : transaction.blockTime))
|
23
|
+
return null;
|
24
|
+
const balanceChange = transaction.balanceChanges.find((bc) => bc.address === mint.toString());
|
25
|
+
if (!balanceChange)
|
26
|
+
return null;
|
27
|
+
return {
|
28
|
+
date: transaction.blockTime * 1000,
|
29
|
+
amount: balanceChange.change,
|
30
|
+
txId: transaction.signature,
|
31
|
+
};
|
32
|
+
})
|
33
|
+
.filter((c) => c !== null);
|
34
|
+
});
|
35
|
+
exports.getClaimTransactions = getClaimTransactions;
|
36
|
+
//# sourceMappingURL=getClaimTransactions.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"getClaimTransactions.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/jupiter/getClaimTransactions.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,qDAI+B;AAE/B,2CAAgD;AAEzC,MAAM,oBAAoB,GAAG,CAClC,KAAyB,EACzB,aAAiC,EACjC,IAAwB,EACN,EAAE;IACpB,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,UAAU,GAAG,MAAM,IAAA,yBAAa,EAAC,MAAM,EAAE,aAAa,CAAC,QAAQ,EAAE,CAAC,CAAC;IACzE,MAAM,YAAY,GAAG,MAAM,IAAA,2BAAe,EACxC,MAAM,EACN,UAAU,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC,CACnC,CAAC;IACF,MAAM,kBAAkB,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAChD,IAAA,4BAAgB,EAAC,CAAC,EAAE,KAAK,CAAC,QAAQ,EAAE,CAAC,CACtC,CAAC;IACF,OAAO,kBAAkB;SACtB,GAAG,CAAC,CAAC,WAAW,EAAE,EAAE;QACnB,IAAI,CAAC,CAAA,WAAW,aAAX,WAAW,uBAAX,WAAW,CAAE,SAAS,CAAA;YAAE,OAAO,IAAI,CAAC;QACzC,MAAM,aAAa,GAAG,WAAW,CAAC,cAAc,CAAC,IAAI,CACnD,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,OAAO,KAAK,IAAI,CAAC,QAAQ,EAAE,CACvC,CAAC;QACF,IAAI,CAAC,aAAa;YAAE,OAAO,IAAI,CAAC;QAEhC,OAAO;YACL,IAAI,EAAE,WAAW,CAAC,SAAS,GAAG,IAAI;YAClC,MAAM,EAAE,aAAa,CAAC,MAAM;YAC5B,IAAI,EAAE,WAAW,CAAC,SAAS;SACnB,CAAC;IACb,CAAC,CAAC;SACD,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,KAAK,IAAI,CAAY,CAAC;AAC1C,CAAC,CAAA,CAAC;AA9BW,QAAA,oBAAoB,wBA8B/B"}
|
@@ -1,42 +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 portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
-
const web3_js_1 = require("@solana/web3.js");
|
14
|
-
const constants_1 = require("./constants");
|
15
|
-
const helpers_1 = require("../jupiter/helpers");
|
16
|
-
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
17
|
-
const lfntyTokenPrice = yield cache.getTokenPrice(constants_1.lfntyMint, portfolio_core_1.NetworkId.solana);
|
18
|
-
if (!lfntyTokenPrice)
|
19
|
-
return;
|
20
|
-
const prices = yield (0, helpers_1.getJupiterPrices)([new web3_js_1.PublicKey(constants_1.xLfntyMint)], new web3_js_1.PublicKey(constants_1.lfntyMint));
|
21
|
-
const price = prices.get(constants_1.xLfntyMint);
|
22
|
-
if (!price)
|
23
|
-
return;
|
24
|
-
const source = {
|
25
|
-
address: constants_1.xLfntyMint,
|
26
|
-
decimals: constants_1.xLfntyDecimals,
|
27
|
-
id: 'jupiter-api',
|
28
|
-
networkId: portfolio_core_1.NetworkId.solana,
|
29
|
-
timestamp: Date.now(),
|
30
|
-
price: price * lfntyTokenPrice.price,
|
31
|
-
platformId: portfolio_core_1.walletTokensPlatformId,
|
32
|
-
weight: 0.5,
|
33
|
-
};
|
34
|
-
yield cache.setTokenPriceSource(source);
|
35
|
-
});
|
36
|
-
const job = {
|
37
|
-
id: `${constants_1.platformId}-xlfnty`,
|
38
|
-
executor,
|
39
|
-
labels: ['normal'],
|
40
|
-
};
|
41
|
-
exports.default = job;
|
42
|
-
//# sourceMappingURL=xLfntyJob.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"xLfntyJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/lifinity/xLfntyJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAIoC;AACpC,6CAA4C;AAG5C,2CAAgF;AAChF,gDAAsD;AAEtD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,eAAe,GAAG,MAAM,KAAK,CAAC,aAAa,CAC/C,qBAAS,EACT,0BAAS,CAAC,MAAM,CACjB,CAAC;IACF,IAAI,CAAC,eAAe;QAAE,OAAO;IAE7B,MAAM,MAAM,GAAG,MAAM,IAAA,0BAAgB,EACnC,CAAC,IAAI,mBAAS,CAAC,sBAAU,CAAC,CAAC,EAC3B,IAAI,mBAAS,CAAC,qBAAS,CAAC,CACzB,CAAC;IACF,MAAM,KAAK,GAAG,MAAM,CAAC,GAAG,CAAC,sBAAU,CAAC,CAAC;IACrC,IAAI,CAAC,KAAK;QAAE,OAAO;IAEnB,MAAM,MAAM,GAAqB;QAC/B,OAAO,EAAE,sBAAU;QACnB,QAAQ,EAAE,0BAAc;QACxB,EAAE,EAAE,aAAa;QACjB,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE;QACrB,KAAK,EAAE,KAAK,GAAG,eAAe,CAAC,KAAK;QACpC,UAAU,EAAE,uCAAsB;QAClC,MAAM,EAAE,GAAG;KACZ,CAAC;IACF,MAAM,KAAK,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC;AAC1C,CAAC,CAAA,CAAC;AACF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,SAAS;IAC1B,QAAQ;IACR,MAAM,EAAE,CAAC,QAAQ,CAAC;CACnB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|