@sonarwatch/portfolio-plugins 0.11.160 → 0.11.162
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +1375 -1367
- package/README.md +3 -3
- package/package.json +2 -2
- package/src/index.js +8 -0
- package/src/index.js.map +1 -1
- package/src/plugins/balancer/helpers/pools.js +21 -21
- package/src/plugins/banx/constants.d.ts +8 -0
- package/src/plugins/banx/constants.js +18 -0
- package/src/plugins/banx/constants.js.map +1 -0
- package/src/plugins/banx/filters.d.ts +2 -0
- package/src/plugins/banx/filters.js +14 -0
- package/src/plugins/banx/filters.js.map +1 -0
- package/src/plugins/banx/index.d.ts +6 -0
- package/src/plugins/banx/index.js +12 -0
- package/src/plugins/banx/index.js.map +1 -0
- package/src/plugins/banx/stakingFetcher.js +65 -0
- package/src/plugins/banx/stakingFetcher.js.map +1 -0
- package/src/plugins/banx/structs.d.ts +26 -0
- package/src/plugins/banx/structs.js +29 -0
- package/src/plugins/banx/structs.js.map +1 -0
- package/src/plugins/banx/types.d.ts +65 -0
- package/src/plugins/banx/types.js +3 -0
- package/src/plugins/banx/types.js.map +1 -0
- package/src/plugins/flash/custodiesJob.js +1 -1
- package/src/plugins/flash/custodiesJob.js.map +1 -1
- package/src/plugins/flash/perpetualFetcher.js +3 -3
- package/src/plugins/flash/perpetualFetcher.js.map +1 -1
- package/src/plugins/flash/structs.d.ts +1 -1
- package/src/plugins/flash/types.d.ts +1 -1
- package/src/plugins/jupiter/exchange/constants.d.ts +11 -0
- package/src/plugins/jupiter/exchange/constants.js +21 -0
- package/src/plugins/jupiter/exchange/constants.js.map +1 -0
- package/src/plugins/jupiter/{custodiesJob.d.ts → exchange/custodiesJob.d.ts} +1 -1
- package/src/plugins/jupiter/{custodiesJob.js → exchange/custodiesJob.js} +5 -5
- package/src/plugins/jupiter/exchange/custodiesJob.js.map +1 -0
- package/src/plugins/{orders/jupiter → jupiter/exchange}/dcaFetcher.js +7 -10
- package/src/plugins/jupiter/exchange/dcaFetcher.js.map +1 -0
- package/src/plugins/jupiter/exchange/filters.d.ts +4 -0
- package/src/plugins/jupiter/exchange/filters.js +46 -0
- package/src/plugins/jupiter/exchange/filters.js.map +1 -0
- package/src/plugins/{orders/jupiter → jupiter/exchange}/limitFetcher.js +10 -20
- package/src/plugins/jupiter/exchange/limitFetcher.js.map +1 -0
- package/src/plugins/jupiter/{perpetualFetcher.d.ts → exchange/perpetualFetcher.d.ts} +1 -1
- package/src/plugins/jupiter/{perpetualFetcher.js → exchange/perpetualFetcher.js} +16 -16
- package/src/plugins/jupiter/exchange/perpetualFetcher.js.map +1 -0
- package/src/plugins/jupiter/{poolJob.d.ts → exchange/poolJob.d.ts} +1 -1
- package/src/plugins/jupiter/{poolJob.js → exchange/poolJob.js} +5 -5
- package/src/plugins/jupiter/exchange/poolJob.js.map +1 -0
- package/src/plugins/jupiter/{structs/perpetuals.d.ts → exchange/structs.d.ts} +71 -1
- package/src/plugins/jupiter/{structs/perpetuals.js → exchange/structs.js} +69 -2
- package/src/plugins/jupiter/exchange/structs.js.map +1 -0
- package/src/plugins/jupiter/{valueAverageFetcher.d.ts → exchange/valueAverageFetcher.d.ts} +1 -1
- package/src/plugins/jupiter/{valueAverageFetcher.js → exchange/valueAverageFetcher.js} +8 -8
- package/src/plugins/jupiter/exchange/valueAverageFetcher.js.map +1 -0
- package/src/plugins/jupiter/filters.d.ts +0 -1
- package/src/plugins/jupiter/filters.js +1 -11
- package/src/plugins/jupiter/filters.js.map +1 -1
- package/src/plugins/jupiter/governance/constants.d.ts +3 -0
- package/src/plugins/jupiter/governance/constants.js +12 -0
- package/src/plugins/jupiter/governance/constants.js.map +1 -0
- package/src/plugins/jupiter/{voteFetcher.d.ts → governance/voteFetcher.d.ts} +1 -1
- package/src/plugins/jupiter/{voteFetcher.js → governance/voteFetcher.js} +10 -9
- package/src/plugins/jupiter/governance/voteFetcher.js.map +1 -0
- package/src/plugins/jupiter/helpers.js +1 -1
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/index.js +19 -9
- package/src/plugins/jupiter/index.js.map +1 -1
- package/src/plugins/jupiter/launchpad/allocationsFetcher.d.ts +3 -0
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js +79 -0
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -0
- package/src/plugins/jupiter/{constants.d.ts → launchpad/constants.d.ts} +10 -9
- package/src/plugins/jupiter/launchpad/constants.js +31 -0
- package/src/plugins/jupiter/launchpad/constants.js.map +1 -0
- package/src/plugins/jupiter/{structs/vote.d.ts → launchpad/structs.d.ts} +10 -0
- package/src/plugins/jupiter/{structs/vote.js → launchpad/structs.js} +11 -2
- package/src/plugins/jupiter/launchpad/structs.js.map +1 -0
- package/src/plugins/jupiter/pricingJob.js +1 -1
- package/src/plugins/jupiter/pricingJob.js.map +1 -1
- package/src/plugins/meteora/dlmmHelper.d.ts +6 -5
- package/src/plugins/meteora/dlmmHelper.js +107 -83
- package/src/plugins/meteora/dlmmHelper.js.map +1 -1
- package/src/plugins/meteora/types.d.ts +8 -0
- package/src/plugins/orders/index.js +16 -23
- package/src/plugins/orders/index.js.map +1 -1
- package/src/plugins/sushiswap/helpers.js +24 -24
- package/src/plugins/uniswap-v2/helpers.js +22 -22
- package/src/plugins/wormhole/airdropFetcher.d.ts +3 -0
- package/src/plugins/wormhole/airdropFetcher.js +52 -0
- package/src/plugins/wormhole/airdropFetcher.js.map +1 -0
- package/src/plugins/wormhole/constants.d.ts +6 -0
- package/src/plugins/wormhole/constants.js +15 -0
- package/src/plugins/wormhole/constants.js.map +1 -0
- package/src/plugins/wormhole/helpers.d.ts +4 -0
- package/src/plugins/wormhole/helpers.js +45 -0
- package/src/plugins/wormhole/helpers.js.map +1 -0
- package/src/plugins/wormhole/index.d.ts +6 -0
- package/src/plugins/wormhole/index.js +8 -0
- package/src/plugins/wormhole/index.js.map +1 -0
- package/src/plugins/wormhole/types.d.ts +9 -0
- package/src/plugins/wormhole/types.js +3 -0
- package/src/plugins/wormhole/types.js.map +1 -0
- package/src/utils/sei/constants.js +8 -8
- package/src/utils/sei/getQueryBalanceByOwner.js +4 -4
- package/src/plugins/jupiter/airdropFetcher.js +0 -63
- package/src/plugins/jupiter/airdropFetcher.js.map +0 -1
- package/src/plugins/jupiter/constants.js +0 -25
- package/src/plugins/jupiter/constants.js.map +0 -1
- package/src/plugins/jupiter/custodiesJob.js.map +0 -1
- package/src/plugins/jupiter/perpetualFetcher.js.map +0 -1
- package/src/plugins/jupiter/poolJob.js.map +0 -1
- package/src/plugins/jupiter/structs/aidrop.d.ts +0 -14
- package/src/plugins/jupiter/structs/aidrop.js +0 -16
- package/src/plugins/jupiter/structs/aidrop.js.map +0 -1
- package/src/plugins/jupiter/structs/perpetuals.js.map +0 -1
- package/src/plugins/jupiter/structs/valueAverage.d.ts +0 -31
- package/src/plugins/jupiter/structs/valueAverage.js +0 -33
- package/src/plugins/jupiter/structs/valueAverage.js.map +0 -1
- package/src/plugins/jupiter/structs/vote.js.map +0 -1
- package/src/plugins/jupiter/valueAverageFetcher.js.map +0 -1
- package/src/plugins/jupiter/voteFetcher.js.map +0 -1
- package/src/plugins/orders/jupiter/constants.d.ts +0 -3
- package/src/plugins/orders/jupiter/constants.js +0 -7
- package/src/plugins/orders/jupiter/constants.js.map +0 -1
- package/src/plugins/orders/jupiter/dcaFetcher.js.map +0 -1
- package/src/plugins/orders/jupiter/filters.d.ts +0 -3
- package/src/plugins/orders/jupiter/filters.js +0 -36
- package/src/plugins/orders/jupiter/filters.js.map +0 -1
- package/src/plugins/orders/jupiter/limitFetcher.js.map +0 -1
- package/src/plugins/orders/jupiter/struct.d.ts +0 -47
- package/src/plugins/orders/jupiter/struct.js +0 -48
- package/src/plugins/orders/jupiter/struct.js.map +0 -1
- /package/src/plugins/{jupiter/airdropFetcher.d.ts → banx/stakingFetcher.d.ts} +0 -0
- /package/src/plugins/{orders/jupiter → jupiter/exchange}/dcaFetcher.d.ts +0 -0
- /package/src/plugins/{orders/jupiter → jupiter/exchange}/limitFetcher.d.ts +0 -0
package/README.md
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
# @sonarwatch/portfolio-plugins
|
2
|
-
|
3
|
-
This library is @sonarwatch/portfolio-plugins
|
1
|
+
# @sonarwatch/portfolio-plugins
|
2
|
+
|
3
|
+
This library is @sonarwatch/portfolio-plugins
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.162",
|
4
4
|
"type": "commonjs",
|
5
5
|
"generators": "./generators.json",
|
6
6
|
"dependencies": {
|
@@ -41,7 +41,7 @@
|
|
41
41
|
"web3-v1": "npm:web3@^1.5.0"
|
42
42
|
},
|
43
43
|
"peerDependencies": {
|
44
|
-
"@sonarwatch/portfolio-core": "0.11.
|
44
|
+
"@sonarwatch/portfolio-core": "0.11.162"
|
45
45
|
},
|
46
46
|
"main": "./src/index.js",
|
47
47
|
"types": "./src/index.d.ts"
|
package/src/index.js
CHANGED
@@ -99,6 +99,8 @@ const staratlas_1 = require("./plugins/staratlas");
|
|
99
99
|
const tulip_1 = require("./plugins/tulip");
|
100
100
|
const phoenix_1 = require("./plugins/phoenix");
|
101
101
|
const uxd_1 = require("./plugins/uxd");
|
102
|
+
const wormhole_1 = require("./plugins/wormhole");
|
103
|
+
const banx_1 = require("./plugins/banx");
|
102
104
|
var constants_1 = require("./plugins/tokens/constants");
|
103
105
|
Object.defineProperty(exports, "walletTokensPlatform", { enumerable: true, get: function () { return constants_1.walletTokensPlatform; } });
|
104
106
|
Object.defineProperty(exports, "walletNftsPlatform", { enumerable: true, get: function () { return constants_1.walletNftsPlatform; } });
|
@@ -191,6 +193,8 @@ exports.platforms = [
|
|
191
193
|
...tulip_1.platforms,
|
192
194
|
...phoenix_1.platforms,
|
193
195
|
...uxd_1.platforms,
|
196
|
+
...wormhole_1.platforms,
|
197
|
+
...banx_1.platforms,
|
194
198
|
];
|
195
199
|
// JOBS //
|
196
200
|
exports.jobs = [
|
@@ -266,6 +270,8 @@ exports.jobs = [
|
|
266
270
|
...tulip_1.jobs,
|
267
271
|
...phoenix_1.jobs,
|
268
272
|
...uxd_1.jobs,
|
273
|
+
...wormhole_1.jobs,
|
274
|
+
...banx_1.jobs,
|
269
275
|
];
|
270
276
|
// FETCHERS //
|
271
277
|
exports.fetchers = [
|
@@ -343,6 +349,8 @@ exports.fetchers = [
|
|
343
349
|
...tulip_1.fetchers,
|
344
350
|
...phoenix_1.fetchers,
|
345
351
|
...uxd_1.fetchers,
|
352
|
+
...wormhole_1.fetchers,
|
353
|
+
...banx_1.fetchers,
|
346
354
|
];
|
347
355
|
exports.fetchersByAddressSystem = (0, getFetchersByAddressSystem_1.getFetchersByAddressSystem)(exports.fetchers);
|
348
356
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3B,uDAG+B;AAC/B,yCAGwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,6CAI0B;AAC1B,+CAI2B;AAC3B,qDAG8B;AAC9B,iDAI4B;AAC5B,iDAI4B;AAC5B,mDAG6B;AAC7B,yCAIwB;AACxB,2CAIyB;AACzB,iDAI4B;AAC5B,iDAI4B;AAC5B,+CAI2B;AAC3B,yCAIwB;AACxB,2CAIyB;AACzB,mDAI6B;AAC7B,2CAIyB;AACzB,2CAIyB;AACzB,sCAIsB;AACtB,+CAI2B;AAC3B,iDAI4B;AAC5B,yCAIwB;AACxB,mDAI6B;AAC7B,qDAI8B;AAC9B,2CAIyB;AACzB,2CAIyB;AACzB,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,2CAIyB;AACzB,uDAI+B;AAC/B,6DAIkC;AAClC,2CAIyB;AACzB,yCAIwB;AACxB,mDAI6B;AAC7B,6CAI0B;AAC1B,iEAIoC;AACpC,6DAIkC;AAClC,yCAIwB;AACxB,uCAIuB;AACvB,+CAI2B;AAC3B,iDAI4B;AAC5B,mDAI6B;AAC7B,2CAIyB;AACzB,+CAI2B;AAC3B,uCAIuB;
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../packages/plugins/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAGA,wFAAqF;AACrF,sEAA8C;AAC9C,6CAI0B;AAC1B,yDAIgC;AAChC,iDAG4B;AAC5B,iDAI4B;AAC5B,2CAGyB;AACzB,6CAI0B;AAC1B,+CAI2B;AAC3B,yCAIwB;AACxB,+CAI2B;AAC3B,2CAIyB;AACzB,6CAI0B;AAC1B,2CAIyB;AACzB,6CAG0B;AAC1B,6CAI0B;AAC1B,yCAIwB;AACxB,2DAGiC;AACjC,6CAI0B;AAC1B,2CAIyB;AACzB,2CAIyB;AACzB,qDAA6D;AAC7D,qEAIsC;AACtC,uDAI+B;AAC/B,mDAG6B;AAC7B,qDAG8B;AAC9B,uDAG+B;AAC/B,2CAIyB;AACzB,6CAI0B;AAC1B,6CAG0B;AAC1B,yCAIwB;AACxB,+CAI2B;AAC3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;IAClB,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,kBAAe;IAClB,GAAG,qBAAkB;IACrB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,kBAAe;IAClB,GAAG,gBAAa;IAChB,GAAG,gBAAa;IAChB,GAAG,sBAAmB;IACtB,GAAG,yBAAsB;IACzB,GAAG,gBAAa;IAChB,GAAG,eAAY;IACf,GAAG,oBAAiB;IACpB,GAAG,iBAAc;IACjB,GAAG,2BAAsB;IACzB,GAAG,yBAAkB;IACrB,GAAG,eAAY;IACf,GAAG,cAAW;IACd,GAAG,kBAAe;IAClB,GAAG,mBAAgB;IACnB,GAAG,oBAAiB;IACpB,GAAG,gBAAa;IAChB,GAAG,kBAAe;IAClB,GAAG,cAAW;IACd,GAAG,mBAAgB;IACnB,GAAG,eAAY;CAChB,CAAC;AACW,QAAA,uBAAuB,GAAG,IAAA,uDAA0B,EAAC,gBAAQ,CAAC,CAAC"}
|
@@ -36,27 +36,27 @@ exports.getBalancerPoolsV2 = void 0;
|
|
36
36
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
37
37
|
function getBalancerPoolsV2(url) {
|
38
38
|
return __awaiter(this, void 0, void 0, function* () {
|
39
|
-
const query = (0, graphql_request_1.gql) `
|
40
|
-
query pools {
|
41
|
-
pools(
|
42
|
-
first: 1000
|
43
|
-
orderBy: totalLiquidity
|
44
|
-
orderDirection: desc
|
45
|
-
where: { totalLiquidity_gt: "500" }
|
46
|
-
) {
|
47
|
-
id
|
48
|
-
address
|
49
|
-
symbol
|
50
|
-
totalLiquidity
|
51
|
-
totalShares
|
52
|
-
tokens {
|
53
|
-
balance
|
54
|
-
decimals
|
55
|
-
symbol
|
56
|
-
address
|
57
|
-
}
|
58
|
-
}
|
59
|
-
}
|
39
|
+
const query = (0, graphql_request_1.gql) `
|
40
|
+
query pools {
|
41
|
+
pools(
|
42
|
+
first: 1000
|
43
|
+
orderBy: totalLiquidity
|
44
|
+
orderDirection: desc
|
45
|
+
where: { totalLiquidity_gt: "500" }
|
46
|
+
) {
|
47
|
+
id
|
48
|
+
address
|
49
|
+
symbol
|
50
|
+
totalLiquidity
|
51
|
+
totalShares
|
52
|
+
tokens {
|
53
|
+
balance
|
54
|
+
decimals
|
55
|
+
symbol
|
56
|
+
address
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
60
|
`;
|
61
61
|
const res = yield (0, graphql_request_1.default)(url, query);
|
62
62
|
const pools = res.pools;
|
@@ -0,0 +1,8 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
export declare const platformId = "banx";
|
4
|
+
export declare const platform: Platform;
|
5
|
+
export declare const banxPid: PublicKey;
|
6
|
+
export declare const banxMint = "BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR";
|
7
|
+
export declare const banxDecimals = 9;
|
8
|
+
export declare const banxApiUrl = "https://api.banx.gg/tokenStake/v2?walletPubkey=";
|
@@ -0,0 +1,18 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.banxApiUrl = exports.banxDecimals = exports.banxMint = exports.banxPid = exports.platform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'banx';
|
6
|
+
exports.platform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Banx',
|
9
|
+
image: 'https://sonar.watch/img/platforms/banx.png',
|
10
|
+
defiLlamaId: 'banx', // from https://defillama.com/docs/api
|
11
|
+
website: 'https://banx.gg/',
|
12
|
+
twitter: 'https://twitter.com/banx_gg',
|
13
|
+
};
|
14
|
+
exports.banxPid = new web3_js_1.PublicKey('4tdmkuY6EStxbS6Y8s5ueznL3VPMSugrvQuDeAHGZhSt');
|
15
|
+
exports.banxMint = 'BANXbTpN8U2cU41FjPxe2Ti37PiT5cCxLUKDQZuJeMMR';
|
16
|
+
exports.banxDecimals = 9;
|
17
|
+
exports.banxApiUrl = 'https://api.banx.gg/tokenStake/v2?walletPubkey=';
|
18
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAG/B,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,EAAE,sCAAsC;IAC3D,OAAO,EAAE,kBAAkB;IAC3B,OAAO,EAAE,6BAA6B;CACvC,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,UAAU,GAAG,iDAAiD,CAAC"}
|
@@ -0,0 +1,14 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.stakeFilters = void 0;
|
4
|
+
const stakeFilters = (owner) => [
|
5
|
+
{
|
6
|
+
memcmp: {
|
7
|
+
offset: 9,
|
8
|
+
bytes: owner,
|
9
|
+
},
|
10
|
+
},
|
11
|
+
{ dataSize: 160 },
|
12
|
+
];
|
13
|
+
exports.stakeFilters = stakeFilters;
|
14
|
+
//# sourceMappingURL=filters.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/filters.ts"],"names":[],"mappings":";;;AAEO,MAAM,YAAY,GAAG,CAAC,KAAa,EAA8B,EAAE,CAAC;IACzE;QACE,MAAM,EAAE;YACN,MAAM,EAAE,CAAC;YACT,KAAK,EAAE,KAAK;SACb;KACF;IACD,EAAE,QAAQ,EAAE,GAAG,EAAE;CAClB,CAAC;AARW,QAAA,YAAY,gBAQvB"}
|
@@ -0,0 +1,12 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.fetchers = exports.jobs = exports.platforms = void 0;
|
7
|
+
const constants_1 = require("./constants");
|
8
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
|
+
exports.platforms = [constants_1.platform];
|
10
|
+
exports.jobs = [];
|
11
|
+
exports.fetchers = [stakingFetcher_1.default];
|
12
|
+
//# sourceMappingURL=index.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/index.ts"],"names":[],"mappings":";;;;;;AAGA,2CAAuC;AACvC,sEAA8C;AAEjC,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC;AACnC,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,CAAC,wBAAc,CAAC,CAAC"}
|
@@ -0,0 +1,65 @@
|
|
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
|
+
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
16
|
+
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
17
|
+
const axios_1 = __importDefault(require("axios"));
|
18
|
+
const constants_1 = require("./constants");
|
19
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
20
|
+
const banxFactor = new bignumber_js_1.default(Math.pow(10, constants_1.banxDecimals));
|
21
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
22
|
+
// Account fetch was taking up to 1 min so better to use their API.
|
23
|
+
// const client = getClientSolana();
|
24
|
+
// const accounts = await getParsedProgramAccounts(
|
25
|
+
// client,
|
26
|
+
// banxTokenStakeStruct,
|
27
|
+
// banxPid,
|
28
|
+
// stakeFilters(owner)
|
29
|
+
// );
|
30
|
+
// const amounts: BigNumber[] = [];
|
31
|
+
// for (const account of accounts) {
|
32
|
+
// if (account.banxStakeState === BanxTokenStakeState.Unstaked) continue;
|
33
|
+
// if (account.tokensStaked.isZero()) continue;
|
34
|
+
// amounts.push(account.tokensStaked.dividedBy(banxFactor));
|
35
|
+
// }
|
36
|
+
// if (amounts.length === 0) return [];
|
37
|
+
const banxRes = yield axios_1.default
|
38
|
+
.get(constants_1.banxApiUrl + owner)
|
39
|
+
.catch(() => null);
|
40
|
+
if (!banxRes)
|
41
|
+
return [];
|
42
|
+
const amounts = [
|
43
|
+
new bignumber_js_1.default(banxRes.data.data.banxTokenStake.tokensStaked).dividedBy(banxFactor),
|
44
|
+
];
|
45
|
+
const tokenPrice = yield cache.getTokenPrice(constants_1.banxMint, portfolio_core_1.NetworkId.solana);
|
46
|
+
const assets = [];
|
47
|
+
amounts.forEach((amount) => assets.push((0, tokenPriceToAssetToken_1.default)(constants_1.banxMint, amount.toNumber(), portfolio_core_1.NetworkId.solana, tokenPrice)));
|
48
|
+
return [
|
49
|
+
{
|
50
|
+
type: portfolio_core_1.PortfolioElementType.multiple,
|
51
|
+
label: 'Staked',
|
52
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
53
|
+
platformId: constants_1.platformId,
|
54
|
+
data: { assets },
|
55
|
+
value: (0, portfolio_core_1.getUsdValueSum)(assets.map((asset) => asset.value)),
|
56
|
+
},
|
57
|
+
];
|
58
|
+
});
|
59
|
+
const fetcher = {
|
60
|
+
id: `${constants_1.platformId}-staking`,
|
61
|
+
networkId: portfolio_core_1.NetworkId.solana,
|
62
|
+
executor,
|
63
|
+
};
|
64
|
+
exports.default = fetcher;
|
65
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAKoC;AACpC,gEAAqC;AACrC,kDAA6C;AAG7C,2CAA6E;AAC7E,qGAA6E;AAG7E,MAAM,UAAU,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,wBAAY,CAAA,CAAC,CAAC;AAErD,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,mEAAmE;IAEnE,oCAAoC;IAEpC,mDAAmD;IACnD,YAAY;IACZ,0BAA0B;IAC1B,aAAa;IACb,wBAAwB;IACxB,KAAK;IAEL,mCAAmC;IACnC,oCAAoC;IACpC,2EAA2E;IAC3E,iDAAiD;IAEjD,8DAA8D;IAC9D,IAAI;IAEJ,uCAAuC;IAEvC,MAAM,OAAO,GAAuC,MAAM,eAAK;SAC5D,GAAG,CAAC,sBAAU,GAAG,KAAK,CAAC;SACvB,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,CAAC;IACrB,IAAI,CAAC,OAAO;QAAE,OAAO,EAAE,CAAC;IAExB,MAAM,OAAO,GAAG;QACd,IAAI,sBAAS,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,cAAc,CAAC,YAAY,CAAC,CAAC,SAAS,CACpE,UAAU,CACX;KACF,CAAC;IAEF,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,oBAAQ,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;IACzE,MAAM,MAAM,GAAqB,EAAE,CAAC;IACpC,OAAO,CAAC,OAAO,CAAC,CAAC,MAAM,EAAE,EAAE,CACzB,MAAM,CAAC,IAAI,CACT,IAAA,gCAAsB,EACpB,oBAAQ,EACR,MAAM,CAAC,QAAQ,EAAE,EACjB,0BAAS,CAAC,MAAM,EAChB,UAAU,CACX,CACF,CACF,CAAC;IAEF,OAAO;QACL;YACE,IAAI,EAAE,qCAAoB,CAAC,QAAQ;YACnC,KAAK,EAAE,QAAQ;YACf,SAAS,EAAE,0BAAS,CAAC,MAAM;YAC3B,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE,EAAE,MAAM,EAAE;YAChB,KAAK,EAAE,IAAA,+BAAc,EAAC,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;SAC1D;KACF,CAAC;AACJ,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,26 @@
|
|
1
|
+
/// <reference types="node" />
|
2
|
+
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
|
+
import { PublicKey } from '@solana/web3.js';
|
4
|
+
import BigNumber from 'bignumber.js';
|
5
|
+
export declare enum BanxTokenStakeState {
|
6
|
+
None = 0,
|
7
|
+
Staked = 1,
|
8
|
+
Unstaked = 2
|
9
|
+
}
|
10
|
+
export type BanxTokenStake = {
|
11
|
+
buffer: Buffer;
|
12
|
+
banxStakeState: BanxTokenStakeState;
|
13
|
+
user: PublicKey;
|
14
|
+
adventureSubscriptionsQuantity: BigNumber;
|
15
|
+
tokensStaked: BigNumber;
|
16
|
+
partnerPointsStaked: BigNumber;
|
17
|
+
playerPointsStaked: BigNumber;
|
18
|
+
banxNftsStakedQuantity: BigNumber;
|
19
|
+
stakedAt: BigNumber;
|
20
|
+
unstakedAt: BigNumber;
|
21
|
+
farmedAmount: BigNumber;
|
22
|
+
nftsStakedAt: BigNumber;
|
23
|
+
nftsUnstakedAt: BigNumber;
|
24
|
+
placeholderOne: PublicKey;
|
25
|
+
};
|
26
|
+
export declare const banxTokenStakeStruct: BeetStruct<BanxTokenStake, Partial<BanxTokenStake>>;
|
@@ -0,0 +1,29 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.banxTokenStakeStruct = exports.BanxTokenStakeState = 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
|
+
var BanxTokenStakeState;
|
8
|
+
(function (BanxTokenStakeState) {
|
9
|
+
BanxTokenStakeState[BanxTokenStakeState["None"] = 0] = "None";
|
10
|
+
BanxTokenStakeState[BanxTokenStakeState["Staked"] = 1] = "Staked";
|
11
|
+
BanxTokenStakeState[BanxTokenStakeState["Unstaked"] = 2] = "Unstaked";
|
12
|
+
})(BanxTokenStakeState || (exports.BanxTokenStakeState = BanxTokenStakeState = {}));
|
13
|
+
exports.banxTokenStakeStruct = new beet_1.BeetStruct([
|
14
|
+
['buffer', (0, solana_1.blob)(8)],
|
15
|
+
['banxStakeState', beet_1.u8],
|
16
|
+
['user', beet_solana_1.publicKey],
|
17
|
+
['adventureSubscriptionsQuantity', solana_1.u64],
|
18
|
+
['tokensStaked', solana_1.u64],
|
19
|
+
['partnerPointsStaked', solana_1.u64],
|
20
|
+
['playerPointsStaked', solana_1.u64],
|
21
|
+
['banxNftsStakedQuantity', solana_1.u64],
|
22
|
+
['stakedAt', solana_1.u64],
|
23
|
+
['unstakedAt', solana_1.u64],
|
24
|
+
['farmedAmount', solana_1.u64],
|
25
|
+
['nftsStakedAt', solana_1.u64],
|
26
|
+
['nftsUnstakedAt', solana_1.u64],
|
27
|
+
['placeholderOne', beet_solana_1.publicKey],
|
28
|
+
], (args) => args);
|
29
|
+
//# sourceMappingURL=structs.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/structs.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,kEAA6D;AAG7D,+CAA+C;AAE/C,IAAY,mBAIX;AAJD,WAAY,mBAAmB;IAC7B,6DAAI,CAAA;IACJ,iEAAM,CAAA;IACN,qEAAQ,CAAA;AACV,CAAC,EAJW,mBAAmB,mCAAnB,mBAAmB,QAI9B;AAmBY,QAAA,oBAAoB,GAAG,IAAI,iBAAU,CAChD;IACE,CAAC,QAAQ,EAAE,IAAA,aAAI,EAAC,CAAC,CAAC,CAAC;IACnB,CAAC,gBAAgB,EAAE,SAAE,CAAC;IACtB,CAAC,MAAM,EAAE,uBAAS,CAAC;IACnB,CAAC,gCAAgC,EAAE,YAAG,CAAC;IACvC,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,qBAAqB,EAAE,YAAG,CAAC;IAC5B,CAAC,oBAAoB,EAAE,YAAG,CAAC;IAC3B,CAAC,wBAAwB,EAAE,YAAG,CAAC;IAC/B,CAAC,UAAU,EAAE,YAAG,CAAC;IACjB,CAAC,YAAY,EAAE,YAAG,CAAC;IACnB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,cAAc,EAAE,YAAG,CAAC;IACrB,CAAC,gBAAgB,EAAE,YAAG,CAAC;IACvB,CAAC,gBAAgB,EAAE,uBAAS,CAAC;CAC9B,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAsB,CACjC,CAAC"}
|
@@ -0,0 +1,65 @@
|
|
1
|
+
export type BanxResponse = {
|
2
|
+
data: Data;
|
3
|
+
};
|
4
|
+
export type Data = {
|
5
|
+
banxWalletBalance: string;
|
6
|
+
banxTokenStake: BanxTokenStake;
|
7
|
+
banxAdventures: BanxAdventure[];
|
8
|
+
};
|
9
|
+
export type BanxAdventure = {
|
10
|
+
adventure: Adventure;
|
11
|
+
adventureSubscription: AdventureSubscription;
|
12
|
+
};
|
13
|
+
export type Adventure = {
|
14
|
+
publicKey: string;
|
15
|
+
adventureState: string;
|
16
|
+
amountOfTokensHarvested: string;
|
17
|
+
isRemoved: boolean;
|
18
|
+
periodEndingAt: string;
|
19
|
+
periodStartedAt: string;
|
20
|
+
placeholderOne: string;
|
21
|
+
rewardsToBeDistributed: string;
|
22
|
+
tokensPerPoints: string;
|
23
|
+
totalBanxSubscribed: string;
|
24
|
+
totalPartnerPoints: string;
|
25
|
+
totalPlayerPoints: string;
|
26
|
+
totalTokensStaked: string;
|
27
|
+
week: string;
|
28
|
+
};
|
29
|
+
export type AdventureSubscription = {
|
30
|
+
publicKey: string;
|
31
|
+
adventure: string;
|
32
|
+
adventureSubscriptionState: string;
|
33
|
+
amountOfTokensHarvested: string;
|
34
|
+
banxTokenStake: string;
|
35
|
+
createdAt: Date;
|
36
|
+
harvestedAt: string;
|
37
|
+
stakeNftAmount: string;
|
38
|
+
stakePartnerPointsAmount: string;
|
39
|
+
stakePlayerPointsAmount: string;
|
40
|
+
stakeTokensAmount: string;
|
41
|
+
subscribedAt: string;
|
42
|
+
unsubscribedAt: string;
|
43
|
+
updatedAt: Date;
|
44
|
+
user: string;
|
45
|
+
};
|
46
|
+
export type BanxTokenStake = {
|
47
|
+
_id: string;
|
48
|
+
publicKey: string;
|
49
|
+
adventureSubscriptionsQuantity: string;
|
50
|
+
banxNftsStakedQuantity: string;
|
51
|
+
banxStakeState: string;
|
52
|
+
createdAt: Date;
|
53
|
+
farmedAmount: string;
|
54
|
+
isRemoved: boolean;
|
55
|
+
nftsStakedAt: string;
|
56
|
+
nftsUnstakedAt: string;
|
57
|
+
partnerPointsStaked: string;
|
58
|
+
placeholderOne: string;
|
59
|
+
playerPointsStaked: string;
|
60
|
+
stakedAt: string;
|
61
|
+
tokensStaked: string;
|
62
|
+
unstakedAt: string;
|
63
|
+
updatedAt: Date;
|
64
|
+
user: string;
|
65
|
+
};
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/banx/types.ts"],"names":[],"mappings":""}
|
@@ -16,7 +16,7 @@ const constants_1 = require("./constants");
|
|
16
16
|
const structs_1 = require("./structs");
|
17
17
|
const filters_1 = require("./filters");
|
18
18
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
19
|
-
const constants_2 = require("../jupiter/constants");
|
19
|
+
const constants_2 = require("../jupiter/exchange/constants");
|
20
20
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
21
21
|
const client = (0, clients_1.getClientSolana)();
|
22
22
|
const markets = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.marketStruct, constants_1.flashPid, (0, filters_1.marketsFilter)());
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"custodiesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/custodiesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,iDAAsD;AACtD,+CAA8D;AAC9D,2CAA+D;AAC/D,uCAAiE;AACjE,uCAA0C;AAC1C,gGAA6F;
|
1
|
+
{"version":3,"file":"custodiesJob.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/custodiesJob.ts"],"names":[],"mappings":";;;;;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ants");
|
24
24
|
const filters_1 = require("./filters");
|
25
25
|
const structs_1 = require("./structs");
|
26
|
-
const
|
26
|
+
const structs_2 = require("../jupiter/exchange/structs");
|
27
27
|
const usdFactor = new bignumber_js_1.default(Math.pow(10, 6));
|
28
28
|
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
29
29
|
const client = (0, clients_1.getClientSolana)();
|
@@ -61,9 +61,9 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
61
61
|
const market = MarketById.get(position.market.toString());
|
62
62
|
if (!market)
|
63
63
|
continue;
|
64
|
-
if (Number(market.side) ===
|
64
|
+
if (Number(market.side) === structs_2.Side.None)
|
65
65
|
continue;
|
66
|
-
const isLong = Number(market.side) ===
|
66
|
+
const isLong = Number(market.side) === structs_2.Side.Long;
|
67
67
|
const collateralCustody = market.collateralCustodyAccount;
|
68
68
|
const targetCustody = market.targetCustodyAccount;
|
69
69
|
if (!market || !collateralCustody)
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,gGAA6F;AAC7F,6DAAwE;AACxE,mDAA8D;AAC9D,uCAAsD;AACtD,uCAA2C;AAE3C,
|
1
|
+
{"version":3,"file":"perpetualFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/flash/perpetualFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAQoC;AACpC,gEAAqC;AACrC,6CAA4C;AAG5C,2CAA+D;AAC/D,iDAAsD;AACtD,+CAA8D;AAC9D,gGAA6F;AAC7F,6DAAwE;AACxE,mDAA8D;AAC9D,uCAAsD;AACtD,uCAA2C;AAE3C,yDAAmD;AAEnD,MAAM,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,MAAM;IAC3B,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -2,7 +2,7 @@
|
|
2
2
|
import { BeetStruct } from '@metaplex-foundation/beet';
|
3
3
|
import { PublicKey } from '@solana/web3.js';
|
4
4
|
import BigNumber from 'bignumber.js';
|
5
|
-
import { OracleType, Side } from '../jupiter/structs
|
5
|
+
import { OracleType, Side } from '../jupiter/exchange/structs';
|
6
6
|
export type OracleParams = {
|
7
7
|
oracleAccount: PublicKey;
|
8
8
|
customOracleAccount: PublicKey;
|
@@ -0,0 +1,11 @@
|
|
1
|
+
import { PublicKey } from '@solana/web3.js';
|
2
|
+
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
export declare const platformId = "jupiter-exchange";
|
4
|
+
export declare const jupiterPlatform: Platform;
|
5
|
+
export declare const perpsProgramId: PublicKey;
|
6
|
+
export declare const valueAverageProgramId: PublicKey;
|
7
|
+
export declare const limitProgramId: PublicKey;
|
8
|
+
export declare const dcaProgramId: PublicKey;
|
9
|
+
export declare const jlpPool: PublicKey;
|
10
|
+
export declare const jlpToken: PublicKey;
|
11
|
+
export declare const custodiesKey = "custodies";
|
@@ -0,0 +1,21 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.custodiesKey = exports.jlpToken = exports.jlpPool = exports.dcaProgramId = exports.limitProgramId = exports.valueAverageProgramId = exports.perpsProgramId = exports.jupiterPlatform = exports.platformId = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
exports.platformId = 'jupiter-exchange';
|
6
|
+
exports.jupiterPlatform = {
|
7
|
+
id: exports.platformId,
|
8
|
+
name: 'Jupiter Exchange',
|
9
|
+
image: 'https://sonar.watch/img/platforms/jupiter.png',
|
10
|
+
defiLlamaId: 'parent#jupiter',
|
11
|
+
website: 'https://jup.ag/',
|
12
|
+
twitter: 'https://twitter.com/JupiterExchange',
|
13
|
+
};
|
14
|
+
exports.perpsProgramId = new web3_js_1.PublicKey('PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu');
|
15
|
+
exports.valueAverageProgramId = new web3_js_1.PublicKey('JVAp1DSLnM4Qh8qM1QasQ8x56ccb9S3DhbyEckybTF9');
|
16
|
+
exports.limitProgramId = new web3_js_1.PublicKey('jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu');
|
17
|
+
exports.dcaProgramId = new web3_js_1.PublicKey('DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M');
|
18
|
+
exports.jlpPool = new web3_js_1.PublicKey('5BUwFW4nRbftYTDMbgxykoFWqWHPzahFSNAaaaJtVKsq');
|
19
|
+
exports.jlpToken = new web3_js_1.PublicKey('27G8MtK7VtTcCHkpASjSDdkWWYfoqT6ggEuKidVJidD4');
|
20
|
+
exports.custodiesKey = 'custodies';
|
21
|
+
//# sourceMappingURL=constants.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,kBAAkB,CAAC;AAChC,QAAA,eAAe,GAAa;IACvC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,kBAAkB;IACxB,KAAK,EAAE,+CAA+C;IACtD,WAAW,EAAE,gBAAgB;IAC7B,OAAO,EAAE,iBAAiB;IAC1B,OAAO,EAAE,qCAAqC;CAC/C,CAAC;AAEW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,qBAAqB,GAAG,IAAI,mBAAS,CAChD,6CAA6C,CAC9C,CAAC;AACW,QAAA,cAAc,GAAG,IAAI,mBAAS,CACzC,6CAA6C,CAC9C,CAAC;AACW,QAAA,YAAY,GAAG,IAAI,mBAAS,CACvC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,OAAO,GAAG,IAAI,mBAAS,CAClC,8CAA8C,CAC/C,CAAC;AACW,QAAA,QAAQ,GAAG,IAAI,mBAAS,CACnC,8CAA8C,CAC/C,CAAC;AACW,QAAA,YAAY,GAAG,WAAW,CAAC"}
|
@@ -10,14 +10,14 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
10
10
|
};
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
12
12
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
13
|
-
const clients_1 = require("
|
14
|
-
const solana_1 = require("
|
15
|
-
const filters_1 = require("
|
13
|
+
const clients_1 = require("../../../utils/clients");
|
14
|
+
const solana_1 = require("../../../utils/solana");
|
15
|
+
const filters_1 = require("../../../utils/solana/filters");
|
16
16
|
const constants_1 = require("./constants");
|
17
|
-
const
|
17
|
+
const structs_1 = require("./structs");
|
18
18
|
const executor = (cache) => __awaiter(void 0, void 0, void 0, function* () {
|
19
19
|
const client = (0, clients_1.getClientSolana)();
|
20
|
-
const custodiesAccounts = yield (0, solana_1.getParsedProgramAccounts)(client,
|
20
|
+
const custodiesAccounts = yield (0, solana_1.getParsedProgramAccounts)(client, structs_1.custodyStruct, constants_1.perpsProgramId, (0, filters_1.dataStructSizeFilter)(structs_1.custodyStruct));
|
21
21
|
if (custodiesAccounts.length === 0)
|
22
22
|
return;
|
23
23
|
const accounts = custodiesAccounts.map((acc) => (Object.assign({ pubkey: acc.pubkey.toString() }, acc)));
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"custodiesJob.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/plugins/jupiter/exchange/custodiesJob.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,+DAAuD;AAGvD,oDAAyD;AACzD,kDAAiE;AACjE,2DAAqE;AACrE,2CAAuE;AACvE,uCAAmD;AAEnD,MAAM,QAAQ,GAAgB,CAAO,KAAY,EAAE,EAAE;IACnD,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,MAAM,iBAAiB,GAAG,MAAM,IAAA,iCAAwB,EACtD,MAAM,EACN,uBAAa,EACb,0BAAc,EACd,IAAA,8BAAoB,EAAC,uBAAa,CAAC,CACpC,CAAC;IACF,IAAI,iBAAiB,CAAC,MAAM,KAAK,CAAC;QAAE,OAAO;IAE3C,MAAM,QAAQ,GAAG,iBAAiB,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,iBAC9C,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,QAAQ,EAAE,IACzB,GAAe,EACnB,CAAC,CAAC;IAEJ,MAAM,KAAK,CAAC,OAAO,CAAC,wBAAY,EAAE,QAAQ,EAAE;QAC1C,MAAM,EAAE,sBAAU;QAClB,SAAS,EAAE,0BAAS,CAAC,MAAM;KAC5B,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEF,MAAM,GAAG,GAAQ;IACf,EAAE,EAAE,GAAG,sBAAU,YAAY;IAC7B,QAAQ;IACR,KAAK,EAAE,QAAQ;CAChB,CAAC;AACF,kBAAe,GAAG,CAAC"}
|