@sonarwatch/portfolio-plugins 0.12.54 → 0.12.56
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +8 -0
- package/package.json +1 -1
- package/src/AirdropFetcher.d.ts +24 -1
- package/src/AirdropFetcher.js +64 -1
- package/src/AirdropFetcher.js.map +1 -1
- package/src/index.js +4 -0
- package/src/index.js.map +1 -1
- package/src/plugins/allbridge/positionsFetcher.js +1 -1
- package/src/plugins/allbridge/positionsFetcher.js.map +1 -1
- package/src/plugins/drift/airdropFetcher.js +3 -66
- package/src/plugins/drift/airdropFetcher.js.map +1 -1
- package/src/plugins/drift/constants.d.ts +2 -1
- package/src/plugins/drift/constants.js +11 -2
- package/src/plugins/drift/constants.js.map +1 -1
- package/src/plugins/drift/helpersAirdrop.d.ts +6 -2
- package/src/plugins/drift/helpersAirdrop.js +21 -21
- package/src/plugins/drift/helpersAirdrop.js.map +1 -1
- package/src/plugins/drift/types.d.ts +0 -16
- package/src/plugins/echelon/constants.d.ts +10 -0
- package/src/plugins/echelon/constants.js +20 -0
- package/src/plugins/echelon/constants.js.map +1 -0
- package/src/plugins/echelon/depositsFetcher.d.ts +3 -0
- package/src/plugins/echelon/depositsFetcher.js +178 -0
- package/src/plugins/echelon/depositsFetcher.js.map +1 -0
- package/src/plugins/echelon/helpers.d.ts +1 -0
- package/src/plugins/echelon/helpers.js +39 -0
- package/src/plugins/echelon/helpers.js.map +1 -0
- package/src/plugins/echelon/index.d.ts +6 -0
- package/src/plugins/echelon/index.js +13 -0
- package/src/plugins/echelon/index.js.map +1 -0
- package/src/plugins/echelon/marketsJob.d.ts +3 -0
- package/src/plugins/echelon/marketsJob.js +80 -0
- package/src/plugins/echelon/marketsJob.js.map +1 -0
- package/src/plugins/echelon/types.d.ts +78 -0
- package/src/plugins/echelon/types.js +3 -0
- package/src/plugins/echelon/types.js.map +1 -0
- package/src/plugins/jupiter/governance/asrFetcher.js +3 -3
- package/src/plugins/jupiter/governance/asrFetcher.js.map +1 -1
- package/src/plugins/jupiter/helpers.d.ts +0 -1
- package/src/plugins/jupiter/helpers.js +1 -9
- package/src/plugins/jupiter/helpers.js.map +1 -1
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js +2 -2
- package/src/plugins/jupiter/launchpad/allocationsFetcher.js.map +1 -1
- package/src/plugins/kamino/airdropFetcher.js +2 -2
- package/src/plugins/kamino/airdropFetcher.js.map +1 -1
- package/src/plugins/parcl/airdropFetcher.js +2 -41
- package/src/plugins/parcl/airdropFetcher.js.map +1 -1
- package/src/plugins/parcl/constants.d.ts +2 -0
- package/src/plugins/parcl/constants.js +11 -1
- package/src/plugins/parcl/constants.js.map +1 -1
- package/src/plugins/parcl/helpersAirdrop.d.ts +0 -17
- package/src/plugins/parcl/helpersAirdrop.js +21 -24
- package/src/plugins/parcl/helpersAirdrop.js.map +1 -1
- package/src/plugins/zeta/airdropFetcher.js +2 -2
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/utils/solana/jupiter/deriveClaimStatus.d.ts +2 -0
- package/src/utils/solana/jupiter/deriveClaimStatus.js +13 -0
- package/src/utils/solana/jupiter/deriveClaimStatus.js.map +1 -0
- package/src/utils/solana/jupiter/deriveClaimStatuses.d.ts +2 -0
- package/src/utils/solana/jupiter/deriveClaimStatuses.js +9 -0
- package/src/utils/solana/jupiter/deriveClaimStatuses.js.map +1 -0
- package/src/plugins/jito/helper.d.ts +0 -3
- package/src/plugins/jito/helper.js +0 -21
- package/src/plugins/jito/helper.js.map +0 -1
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/airdropFetcher.ts"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/airdropFetcher.ts"],"names":[],"mappings":";;AACA,2CAAyD;AACzD,qDAAkD;AAClD,yDAA+D;AAE/D,MAAM,OAAO,GAAY,IAAA,wCAAuB,EAC9C,+BAAc,EACd,sBAAU,EACV,GAAG,sBAAU,UAAU,EACvB,0BAAc,CAAC,QAAQ,CACxB,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { PublicKey } from '@solana/web3.js';
|
2
2
|
import { Platform } from '@sonarwatch/portfolio-core';
|
3
|
+
import { AirdropStatics } from '../../AirdropFetcher';
|
3
4
|
export declare const platformId = "parcl";
|
4
5
|
export declare const platformImage = "https://sonar.watch/img/platforms/parcl.webp";
|
5
6
|
export declare const platformWebsite = "https://app.parcl.co/";
|
@@ -13,3 +14,4 @@ export declare const prclDecimals = 6;
|
|
13
14
|
export declare const merkleApi = "https://worker.jup.ag/jup-claim-proof";
|
14
15
|
export declare const merkleTree = "5nRBuSmpA98JgrznGYEAFTvQAA7hCdFkVKS9e41N8mBQ";
|
15
16
|
export declare const distributorProgram = "5tu3xkmLfud5BAwSuQke4WSjoHcQ52SbrPwX9es8j6Ve";
|
17
|
+
export declare const airdropStatics: AirdropStatics;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.distributorProgram = exports.merkleTree = exports.merkleApi = exports.prclDecimals = exports.prclMint = exports.allocationPrefix = exports.airdropApi = exports.programId = exports.platform = exports.platformName = exports.platformWebsite = exports.platformImage = exports.platformId = void 0;
|
3
|
+
exports.airdropStatics = exports.distributorProgram = exports.merkleTree = exports.merkleApi = exports.prclDecimals = exports.prclMint = exports.allocationPrefix = exports.airdropApi = exports.programId = exports.platform = exports.platformName = exports.platformWebsite = exports.platformImage = exports.platformId = void 0;
|
4
4
|
const web3_js_1 = require("@solana/web3.js");
|
5
5
|
exports.platformId = 'parcl';
|
6
6
|
exports.platformImage = 'https://sonar.watch/img/platforms/parcl.webp';
|
@@ -22,4 +22,14 @@ exports.prclDecimals = 6;
|
|
22
22
|
exports.merkleApi = 'https://worker.jup.ag/jup-claim-proof';
|
23
23
|
exports.merkleTree = '5nRBuSmpA98JgrznGYEAFTvQAA7hCdFkVKS9e41N8mBQ';
|
24
24
|
exports.distributorProgram = '5tu3xkmLfud5BAwSuQke4WSjoHcQ52SbrPwX9es8j6Ve';
|
25
|
+
exports.airdropStatics = {
|
26
|
+
id: 'parcl-airdrop-1',
|
27
|
+
claimLink: 'https://claims.parcllimited.com/',
|
28
|
+
image: exports.platformImage,
|
29
|
+
emitterLink: exports.platformWebsite,
|
30
|
+
emitterName: exports.platformName,
|
31
|
+
claimStart: 1704067200000,
|
32
|
+
claimEnd: 1735603200000,
|
33
|
+
name: undefined,
|
34
|
+
};
|
25
35
|
//# sourceMappingURL=constants.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;
|
1
|
+
{"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/constants.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAI/B,QAAA,UAAU,GAAG,OAAO,CAAC;AACrB,QAAA,aAAa,GAAG,8CAA8C,CAAC;AAC/D,QAAA,eAAe,GAAG,uBAAuB,CAAC;AAC1C,QAAA,YAAY,GAAG,OAAO,CAAC;AACvB,QAAA,QAAQ,GAAa;IAChC,EAAE,EAAE,kBAAU;IACd,IAAI,EAAE,oBAAY;IAClB,KAAK,EAAE,qBAAa;IACpB,WAAW,EAAE,cAAc,EAAE,sCAAsC;IACnE,OAAO,EAAE,uBAAe;IACxB,OAAO,EAAE,2BAA2B;CACrC,CAAC;AAEW,QAAA,SAAS,GAAG,IAAI,mBAAS,CACpC,8CAA8C,CAC/C,CAAC;AAEW,QAAA,UAAU,GAAG,yCAAyC,CAAC;AACvD,QAAA,gBAAgB,GAAG,GAAG,kBAAU,aAAa,CAAC;AAC9C,QAAA,QAAQ,GAAG,8CAA8C,CAAC;AAC1D,QAAA,YAAY,GAAG,CAAC,CAAC;AACjB,QAAA,SAAS,GAAG,uCAAuC,CAAC;AACpD,QAAA,UAAU,GAAG,8CAA8C,CAAC;AAC5D,QAAA,kBAAkB,GAC7B,8CAA8C,CAAC;AAEpC,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,iBAAiB;IACrB,SAAS,EAAE,kCAAkC;IAC7C,KAAK,EAAE,qBAAa;IACpB,WAAW,EAAE,uBAAe;IAC5B,WAAW,EAAE,oBAAY;IACzB,UAAU,EAAE,aAAa;IACzB,QAAQ,EAAE,aAAa;IACvB,IAAI,EAAE,SAAS;CAChB,CAAC"}
|
@@ -1,19 +1,2 @@
|
|
1
|
-
import { Airdrop } from '@sonarwatch/portfolio-core';
|
2
|
-
import { Allocation } from './types';
|
3
|
-
import { Cache } from '../../Cache';
|
4
|
-
import { SolanaClient } from '../../utils/clients/types';
|
5
1
|
import { AirdropFetcher } from '../../AirdropFetcher';
|
6
|
-
export declare function fetchAllocation(owner: string, cache: Cache): Promise<Allocation>;
|
7
|
-
export declare const airdropStatics: {
|
8
|
-
id: string;
|
9
|
-
claimLink: string;
|
10
|
-
image: string;
|
11
|
-
label: string;
|
12
|
-
emitterLink: string;
|
13
|
-
emitterName: string;
|
14
|
-
claimStart: number;
|
15
|
-
claimEnd: number;
|
16
|
-
name: undefined;
|
17
|
-
};
|
18
|
-
export declare function fetchAirdrop(owner: string, client: SolanaClient, cache: Cache): Promise<Airdrop>;
|
19
2
|
export declare const airdropFetcher: AirdropFetcher;
|
@@ -12,14 +12,15 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
12
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
13
13
|
};
|
14
14
|
Object.defineProperty(exports, "__esModule", { value: true });
|
15
|
-
exports.airdropFetcher =
|
15
|
+
exports.airdropFetcher = void 0;
|
16
16
|
const axios_1 = __importDefault(require("axios"));
|
17
17
|
const bignumber_js_1 = __importDefault(require("bignumber.js"));
|
18
18
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
19
19
|
const constants_1 = require("./constants");
|
20
|
-
const
|
20
|
+
const deriveClaimStatus_1 = require("../../utils/solana/jupiter/deriveClaimStatus");
|
21
21
|
const getParsedAccountInfo_1 = require("../../utils/solana/getParsedAccountInfo");
|
22
22
|
const structs_1 = require("../jupiter/launchpad/structs");
|
23
|
+
const AirdropFetcher_1 = require("../../AirdropFetcher");
|
23
24
|
const clients_1 = require("../../utils/clients");
|
24
25
|
function fetchAllocation(owner, cache) {
|
25
26
|
return __awaiter(this, void 0, void 0, function* () {
|
@@ -63,35 +64,31 @@ function fetchAllocation(owner, cache) {
|
|
63
64
|
return allocation;
|
64
65
|
});
|
65
66
|
}
|
66
|
-
exports.fetchAllocation = fetchAllocation;
|
67
|
-
exports.airdropStatics = {
|
68
|
-
id: 'parcl-airdrop-1',
|
69
|
-
claimLink: 'https://claims.parcllimited.com/',
|
70
|
-
image: constants_1.platformImage,
|
71
|
-
label: 'PRCL',
|
72
|
-
emitterLink: constants_1.platformWebsite,
|
73
|
-
emitterName: constants_1.platformName,
|
74
|
-
claimStart: 1,
|
75
|
-
claimEnd: 1735603200000,
|
76
|
-
name: undefined,
|
77
|
-
};
|
78
67
|
function fetchAirdrop(owner, client, cache) {
|
79
68
|
return __awaiter(this, void 0, void 0, function* () {
|
80
69
|
const prclTokenPrice = yield cache.getTokenPrice(constants_1.prclMint, portfolio_core_1.NetworkId.solana);
|
81
70
|
const allocation = yield fetchAllocation(owner, cache);
|
82
|
-
const
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
71
|
+
const amount = !allocation.merkleTree ? 0 : allocation.amount;
|
72
|
+
let isClaimed = false;
|
73
|
+
if (amount > 0 && allocation.merkleTree) {
|
74
|
+
const claimStatusPubkey = (0, deriveClaimStatus_1.deriveClaimStatus)(owner, allocation.merkleTree, constants_1.distributorProgram);
|
75
|
+
const claimStatusAccount = yield (0, getParsedAccountInfo_1.getParsedAccountInfo)(client, structs_1.claimStatusStruct, claimStatusPubkey);
|
76
|
+
isClaimed = claimStatusAccount !== null;
|
77
|
+
}
|
78
|
+
return (0, AirdropFetcher_1.getAirdrop)({
|
79
|
+
statics: constants_1.airdropStatics,
|
80
|
+
item: {
|
81
|
+
amount,
|
82
|
+
isClaimed,
|
83
|
+
label: 'PRCL',
|
84
|
+
address: constants_1.prclMint,
|
85
|
+
price: (prclTokenPrice === null || prclTokenPrice === void 0 ? void 0 : prclTokenPrice.price) || null,
|
86
|
+
},
|
87
|
+
});
|
90
88
|
});
|
91
89
|
}
|
92
|
-
exports.fetchAirdrop = fetchAirdrop;
|
93
90
|
exports.airdropFetcher = {
|
94
|
-
id:
|
91
|
+
id: constants_1.airdropStatics.id,
|
95
92
|
networkId: portfolio_core_1.NetworkId.solana,
|
96
93
|
executor: (owner, cache) => {
|
97
94
|
const client = (0, clients_1.getClientSolana)();
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,+
|
1
|
+
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/parcl/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,kDAA6C;AAC7C,gEAAqC;AACrC,+DAA2E;AAC3E,2CAOqB;AAGrB,oFAAiF;AACjF,kFAA+E;AAE/E,0DAAiE;AACjE,yDAAkE;AAClE,iDAAsD;AAEtD,SAAe,eAAe,CAC5B,KAAa,EACb,KAAY;;QAEZ,MAAM,gBAAgB,GAAG,MAAM,KAAK,CAAC,OAAO,CAAa,KAAK,EAAE;YAC9D,MAAM,EAAE,4BAAgB;YACxB,SAAS,EAAE,0BAAS,CAAC,MAAM;SAC5B,CAAC,CAAC;QACH,IAAI,gBAAgB;YAAE,OA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K,CAAC,CAAC;QACvD,MAAM,MAAM,GAAG,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC;QAE9D,IAAI,SAAS,GAAc,KAAK,CAAC;QACjC,IAAI,MAAM,GAAG,CAAC,IAAI,UAAU,CAAC,UAAU,EAAE,CAAC;YACxC,MAAM,iBAAiB,GAAG,IAAA,qCAAiB,EACzC,KAAK,EACL,UAAU,CAAC,UAAU,EACrB,8BAAkB,CACnB,CAAC;YACF,MAAM,kBAAkB,GAAG,MAAM,IAAA,2CAAoB,EACnD,MAAM,EACN,2BAAiB,EACjB,iBAAiB,CAClB,CAAC;YACF,SAAS,GAAG,kBAAkB,KAAK,IAAI,CAAC;QAC1C,CAAC;QAED,OAAO,IAAA,2BAAU,EAAC;YAChB,OAAO,EAAE,0BAAc;YACvB,IAAI,EAAE;gBACJ,MAAM;gBACN,SAAS;gBACT,KAAK,EAAE,MAAM;gBACb,OAAO,EAAE,oBAAQ;gBACjB,KAAK,EAAE,CAAA,cAAc,aAAd,cAAc,uBAAd,cAAc,CAAE,KAAK,KAAI,IAAI;aACrC;SACF,CAAC,CAAC;IACL,CAAC;CAAA;AAEY,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE;QACzB,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;QACjC,OAAO,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,CAAC;IAC5C,CAAC;CACF,CAAC"}
|
@@ -39,9 +39,9 @@ const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
|
39
39
|
const graphql_request_1 = __importStar(require("graphql-request"));
|
40
40
|
const constants_1 = require("./constants");
|
41
41
|
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
42
|
-
const helper_1 = require("../jito/helper");
|
43
42
|
const clients_1 = require("../../utils/clients");
|
44
43
|
const getMultipleAccountsInfoSafe_1 = require("../../utils/solana/getMultipleAccountsInfoSafe");
|
44
|
+
const deriveClaimStatuses_1 = require("../../utils/solana/jupiter/deriveClaimStatuses");
|
45
45
|
const query = (0, graphql_request_1.gql) `
|
46
46
|
query GetAirdropFinalFrontend($authority: String!) {
|
47
47
|
getAirdropFinalFrontend(authority: $authority) {
|
@@ -71,7 +71,7 @@ const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* (
|
|
71
71
|
const amount = res.getAirdropFinalFrontend.total_allocation;
|
72
72
|
if (amount === 0)
|
73
73
|
return [];
|
74
|
-
const claimStatuses = (0,
|
74
|
+
const claimStatuses = (0, deriveClaimStatuses_1.deriveClaimStatuses)(owner, constants_1.distributors, constants_1.distributorPid);
|
75
75
|
const client = (0, clients_1.getClientSolana)();
|
76
76
|
const claimStatusesAccount = yield (0, getMultipleAccountsInfoSafe_1.getMultipleAccountsInfoSafe)(client, claimStatuses);
|
77
77
|
if (claimStatusesAccount.some((account) => account))
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,2CAMqB;AAErB,qGAA6E;AAC7E,
|
1
|
+
{"version":3,"file":"airdropFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/airdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+DAAuE;AACvE,mEAA+C;AAG/C,2CAMqB;AAErB,qGAA6E;AAC7E,iDAAsD;AACtD,gGAA6F;AAC7F,wFAAqF;AAErF,MAAM,KAAK,GAAG,IAAA,qBAAG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BAAO;gBAChB,QAAQ,EACN,kMAAkM;gBACpM,MAAM;gBACN,KAAK,EAAE,IAAI;gBACX,IAAI,EAAE,KAAK;aACZ;YACD,KAAK,EAAE,IAAI;YACX,SAAS;YACT,UAAU,EAAE,EAAE,WAAW,EAAE,aAAa,EAAE;SAC3C,CAAC;IAEN,OAAO;QACL;YACE,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,SAAS;YAChB,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB;KACF,CAAC;AACJ,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -0,0 +1,13 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.deriveClaimStatus = void 0;
|
4
|
+
const web3_js_1 = require("@solana/web3.js");
|
5
|
+
function deriveClaimStatus(claimant, merkleTree, merkleDistributor) {
|
6
|
+
return web3_js_1.PublicKey.findProgramAddressSync([
|
7
|
+
Buffer.from('ClaimStatus'),
|
8
|
+
new web3_js_1.PublicKey(claimant).toBytes(),
|
9
|
+
new web3_js_1.PublicKey(merkleTree).toBytes(),
|
10
|
+
], new web3_js_1.PublicKey(merkleDistributor))[0];
|
11
|
+
}
|
12
|
+
exports.deriveClaimStatus = deriveClaimStatus;
|
13
|
+
//# sourceMappingURL=deriveClaimStatus.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deriveClaimStatus.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/jupiter/deriveClaimStatus.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,SAAgB,iBAAiB,CAC/B,QAAgB,EAChB,UAAkB,EAClB,iBAAyB;IAEzB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC1B,IAAI,mBAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;QACjC,IAAI,mBAAS,CAAC,UAAU,CAAC,CAAC,OAAO,EAAE;KACpC,EACD,IAAI,mBAAS,CAAC,iBAAiB,CAAC,CACjC,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,8CAaC"}
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.deriveClaimStatuses = void 0;
|
4
|
+
const deriveClaimStatus_1 = require("./deriveClaimStatus");
|
5
|
+
function deriveClaimStatuses(claimant, distributors, programId) {
|
6
|
+
return distributors.map((d) => (0, deriveClaimStatus_1.deriveClaimStatus)(claimant, d, programId));
|
7
|
+
}
|
8
|
+
exports.deriveClaimStatuses = deriveClaimStatuses;
|
9
|
+
//# sourceMappingURL=deriveClaimStatuses.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"deriveClaimStatuses.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/jupiter/deriveClaimStatuses.ts"],"names":[],"mappings":";;;AACA,2DAAwD;AAExD,SAAgB,mBAAmB,CACjC,QAAgB,EAChB,YAAsB,EACtB,SAAiB;IAEjB,OAAO,YAAY,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAA,qCAAiB,EAAC,QAAQ,EAAE,CAAC,EAAE,SAAS,CAAC,CAAC,CAAC;AAC5E,CAAC;AAND,kDAMC"}
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { PublicKey } from '@solana/web3.js';
|
2
|
-
export declare function findClaimStatusKey(claimant: string, distributor: string, programId: string): PublicKey;
|
3
|
-
export declare function findClaimStatusesKeys(claimant: string, distributors: string[], programId: string): PublicKey[];
|
@@ -1,21 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.findClaimStatusesKeys = exports.findClaimStatusKey = void 0;
|
4
|
-
const web3_js_1 = require("@solana/web3.js");
|
5
|
-
function findClaimStatusKey(claimant, distributor, programId) {
|
6
|
-
return web3_js_1.PublicKey.findProgramAddressSync([
|
7
|
-
Buffer.from('ClaimStatus'),
|
8
|
-
new web3_js_1.PublicKey(distributor).toBytes(),
|
9
|
-
new web3_js_1.PublicKey(claimant).toBytes(),
|
10
|
-
], new web3_js_1.PublicKey(programId))[0];
|
11
|
-
}
|
12
|
-
exports.findClaimStatusKey = findClaimStatusKey;
|
13
|
-
function findClaimStatusesKeys(claimant, distributors, programId) {
|
14
|
-
return distributors.map((distributor) => web3_js_1.PublicKey.findProgramAddressSync([
|
15
|
-
Buffer.from('ClaimStatus'),
|
16
|
-
new web3_js_1.PublicKey(distributor).toBytes(),
|
17
|
-
new web3_js_1.PublicKey(claimant).toBytes(),
|
18
|
-
], new web3_js_1.PublicKey(programId))[0]);
|
19
|
-
}
|
20
|
-
exports.findClaimStatusesKeys = findClaimStatusesKeys;
|
21
|
-
//# sourceMappingURL=helper.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"helper.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/jito/helper.ts"],"names":[],"mappings":";;;AAAA,6CAA4C;AAE5C,SAAgB,kBAAkB,CAChC,QAAgB,EAChB,WAAmB,EACnB,SAAiB;IAEjB,OAAO,mBAAS,CAAC,sBAAsB,CACrC;QACE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC1B,IAAI,mBAAS,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;QACpC,IAAI,mBAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;KAClC,EACD,IAAI,mBAAS,CAAC,SAAS,CAAC,CACzB,CAAC,CAAC,CAAC,CAAC;AACP,CAAC;AAbD,gDAaC;AAED,SAAgB,qBAAqB,CACnC,QAAgB,EAChB,YAAsB,EACtB,SAAiB;IAEjB,OAAO,YAAY,CAAC,GAAG,CACrB,CAAC,WAAW,EAAE,EAAE,CACd,mBAAS,CAAC,sBAAsB,CAC9B;QACE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC;QAC1B,IAAI,mBAAS,CAAC,WAAW,CAAC,CAAC,OAAO,EAAE;QACpC,IAAI,mBAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,EAAE;KAClC,EACD,IAAI,mBAAS,CAAC,SAAS,CAAC,CACzB,CAAC,CAAC,CAAC,CACP,CAAC;AACJ,CAAC;AAhBD,sDAgBC"}
|