@sonarwatch/portfolio-plugins 0.12.56 → 0.12.57
Sign up to get free protection for your applications and to get access to all the features.
- package/CHANGELOG.md +4 -0
- package/package.json +1 -1
- package/src/AirdropFetcher.d.ts +4 -13
- package/src/AirdropFetcher.js +43 -34
- package/src/AirdropFetcher.js.map +1 -1
- package/src/plugins/drift/helpersAirdrop.js +9 -7
- package/src/plugins/drift/helpersAirdrop.js.map +1 -1
- package/src/plugins/parcl/helpersAirdrop.js +9 -7
- package/src/plugins/parcl/helpersAirdrop.js.map +1 -1
package/CHANGELOG.md
CHANGED
@@ -2,6 +2,10 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.12.57](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.56...plugins-0.12.57) (2024-07-12)
|
6
|
+
|
7
|
+
|
8
|
+
|
5
9
|
## [0.12.56](https://github.com/sonarwatch/portfolio/compare/plugins-0.12.55...plugins-0.12.56) (2024-07-12)
|
6
10
|
|
7
11
|
|
package/package.json
CHANGED
package/src/AirdropFetcher.d.ts
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { AddressSystemType, Airdrop, AirdropFetcherResult, AirdropFetchersResult,
|
1
|
+
import { AddressSystemType, Airdrop, AirdropFetcherResult, AirdropFetchersResult, IsClaimed, NetworkIdType, UsdValue } from '@sonarwatch/portfolio-core';
|
2
2
|
import { Cache } from './Cache';
|
3
3
|
import { Fetcher } from './Fetcher';
|
4
4
|
export type AirdropFetcherExecutor = (owner: string, cache: Cache) => Promise<Airdrop>;
|
@@ -8,27 +8,18 @@ export type AirdropFetcher = {
|
|
8
8
|
executor: AirdropFetcherExecutor;
|
9
9
|
};
|
10
10
|
export declare function runAirdropFetchersByNetworkId(owner: string, networkId: NetworkIdType, fetchers: AirdropFetcher[], cache: Cache): Promise<AirdropFetchersResult>;
|
11
|
-
export type AirdropStatics = Omit<Airdrop, 'status' | '
|
11
|
+
export type AirdropStatics = Omit<Airdrop, 'status' | 'items'>;
|
12
12
|
export declare function getAirdrop(params: {
|
13
13
|
statics: AirdropStatics;
|
14
|
-
|
14
|
+
items: {
|
15
15
|
amount: number;
|
16
16
|
label: string;
|
17
17
|
price: UsdValue;
|
18
18
|
imageUri?: string;
|
19
19
|
address?: string;
|
20
20
|
isClaimed: IsClaimed;
|
21
|
-
};
|
21
|
+
}[];
|
22
22
|
}): Airdrop;
|
23
|
-
export declare function getAirdropItem(params: {
|
24
|
-
airdropStatus: AirdropStatus;
|
25
|
-
amount: number;
|
26
|
-
label: string;
|
27
|
-
price: UsdValue;
|
28
|
-
imageUri?: string;
|
29
|
-
address?: string;
|
30
|
-
isClaimed: IsClaimed;
|
31
|
-
}): AirdropItem;
|
32
23
|
export declare function runAirdropFetchers(owner: string, addressSystem: AddressSystemType, fetchers: AirdropFetcher[], cache: Cache): Promise<AirdropFetchersResult>;
|
33
24
|
export declare function runAirdropFetcher(owner: string, fetcher: AirdropFetcher, cache: Cache): Promise<AirdropFetcherResult>;
|
34
25
|
export declare function airdropFetcherToFetcher(airdropFetcher: AirdropFetcher, platformId: string, id: string, claimEnd?: number): Fetcher;
|
package/src/AirdropFetcher.js
CHANGED
@@ -12,7 +12,7 @@ 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.airdropFetcherToFetcher = exports.runAirdropFetcher = exports.runAirdropFetchers = exports.
|
15
|
+
exports.airdropFetcherToFetcher = exports.runAirdropFetcher = exports.runAirdropFetchers = exports.getAirdrop = exports.runAirdropFetchersByNetworkId = void 0;
|
16
16
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
17
17
|
const promiseTimeout_1 = __importDefault(require("./utils/misc/promiseTimeout"));
|
18
18
|
const tokenPriceToAssetToken_1 = __importDefault(require("./utils/misc/tokenPriceToAssetToken"));
|
@@ -29,23 +29,24 @@ function runAirdropFetchersByNetworkId(owner, networkId, fetchers, cache) {
|
|
29
29
|
exports.runAirdropFetchersByNetworkId = runAirdropFetchersByNetworkId;
|
30
30
|
function getAirdrop(params) {
|
31
31
|
const status = (0, portfolio_core_1.getAirdropStatus)(params.statics.claimStart, params.statics.claimEnd);
|
32
|
-
return Object.assign(Object.assign({}, params.statics), { status,
|
32
|
+
return Object.assign(Object.assign({}, params.statics), { status, items: getAirdropItems(status, params.items) });
|
33
33
|
}
|
34
34
|
exports.getAirdrop = getAirdrop;
|
35
|
-
function
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
35
|
+
function getAirdropItems(airdropStatus, items) {
|
36
|
+
return items.map((item) => {
|
37
|
+
const isEligible = (0, portfolio_core_1.getIsEligible)(item.amount);
|
38
|
+
return {
|
39
|
+
amount: item.amount,
|
40
|
+
isClaimed: isEligible === false ? false : item.isClaimed,
|
41
|
+
isEligible,
|
42
|
+
label: item.label,
|
43
|
+
price: item.price,
|
44
|
+
status: (0, portfolio_core_1.getAirdropItemStatus)(airdropStatus, item.amount, item.isClaimed),
|
45
|
+
address: item.address,
|
46
|
+
imageUri: item.imageUri,
|
47
|
+
};
|
48
|
+
});
|
47
49
|
}
|
48
|
-
exports.getAirdropItem = getAirdropItem;
|
49
50
|
function runAirdropFetchers(owner, addressSystem, fetchers, cache) {
|
50
51
|
return __awaiter(this, void 0, void 0, function* () {
|
51
52
|
const fOwner = (0, portfolio_core_1.formatAddress)(owner, addressSystem);
|
@@ -117,34 +118,42 @@ function airdropFetcherToFetcher(airdropFetcher, platformId, id, claimEnd) {
|
|
117
118
|
if (claimEnd && Date.now() > claimEnd)
|
118
119
|
return [];
|
119
120
|
const airdrop = yield airdropFetcher.executor(owner, cache);
|
120
|
-
|
121
|
-
|
121
|
+
const assets = [];
|
122
|
+
airdrop.items.forEach((item) => {
|
123
|
+
if (item.status !== portfolio_core_1.AirdropItemStatus.claimable &&
|
124
|
+
item.status !== portfolio_core_1.AirdropItemStatus.claimableLater)
|
125
|
+
return;
|
126
|
+
const asset = item.address
|
127
|
+
? (0, tokenPriceToAssetToken_1.default)(item.address, item.amount, airdropFetcher.networkId, undefined, item.price || undefined, { isClaimable: true, lockedUntil: airdrop.claimStart })
|
128
|
+
: {
|
129
|
+
type: portfolio_core_1.PortfolioAssetType.generic,
|
130
|
+
data: {
|
131
|
+
amount: item.amount,
|
132
|
+
price: item.price,
|
133
|
+
},
|
134
|
+
name: item.label,
|
135
|
+
networkId: airdropFetcher.networkId,
|
136
|
+
attributes: {
|
137
|
+
isClaimable: true,
|
138
|
+
lockedUntil: airdrop.claimStart,
|
139
|
+
},
|
140
|
+
value: item.price ? item.price * item.amount : null,
|
141
|
+
imageUri: item.imageUri,
|
142
|
+
};
|
143
|
+
assets.push(asset);
|
144
|
+
});
|
145
|
+
if (assets.length === 0)
|
122
146
|
return [];
|
123
|
-
const { item } = airdrop;
|
124
|
-
const asset = item.address
|
125
|
-
? (0, tokenPriceToAssetToken_1.default)(item.address, item.amount, airdropFetcher.networkId, undefined, item.price || undefined, { isClaimable: true, lockedUntil: airdrop.claimStart })
|
126
|
-
: {
|
127
|
-
type: portfolio_core_1.PortfolioAssetType.generic,
|
128
|
-
data: {
|
129
|
-
amount: item.amount,
|
130
|
-
price: item.price,
|
131
|
-
},
|
132
|
-
name: item.label,
|
133
|
-
networkId: airdropFetcher.networkId,
|
134
|
-
attributes: { isClaimable: true, lockedUntil: airdrop.claimStart },
|
135
|
-
value: item.price ? item.price * item.amount : null,
|
136
|
-
imageUri: item.imageUri,
|
137
|
-
};
|
138
147
|
return [
|
139
148
|
{
|
140
149
|
networkId: airdropFetcher.networkId,
|
141
150
|
label: 'Airdrop',
|
142
151
|
data: {
|
143
|
-
assets
|
152
|
+
assets,
|
144
153
|
},
|
145
154
|
platformId,
|
146
155
|
type: portfolio_core_1.PortfolioElementType.multiple,
|
147
|
-
value:
|
156
|
+
value: (0, portfolio_core_1.getUsdValueSum)(assets.map((a) => a.value)),
|
148
157
|
name: airdrop.name,
|
149
158
|
},
|
150
159
|
];
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+
|
1
|
+
{"version":3,"file":"AirdropFetcher.js","sourceRoot":"","sources":["../../../../packages/plugins/src/AirdropFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,+DAwBoC;AAEpC,iFAAyD;AAEzD,iGAAyE;AAazE,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAEvC,SAAsB,6BAA6B,CACjD,KAAa,EACb,SAAwB,EACxB,QAA0B,EAC1B,KAAY;;QAEZ,MAAM,gBAAgB,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC;QAC1E,IAAI,CAAC,gBAAgB;YACnB,MAAM,IAAI,KAAK,CACb,uDAAuD,SAAS,EAAE,CACnE,CAAC;QAEJ,MAAM,EAAE,aAAa,EAAE,GAAG,yBAAQ,CAAC,SAAS,CAAC,CAAC;QAC9C,OAAO,kBAAkB,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,EAAE,KAAK,CAAC,CAAC;IACnE,CAAC;CAAA;AAdD,sEAcC;AAID,SAAgB,UAAU,CAAC,MAU1B;IACC,MAAM,MAAM,GAAG,IAAA,iCAAgB,EAC7B,MAAM,CAAC,OAAO,CAAC,UAAU,EACzB,MAAM,CAAC,OAAO,CAAC,QAAQ,CACxB,CAAC;IACF,uCACK,MAAM,CAAC,OAAO,KACjB,MAAM,EACN,KAAK,EAAE,eAAe,CAAC,MAAM,EAAE,MAAM,CAAC,KAAK,CAAC,IAC5C;AACJ,CAAC;AApBD,gCAoBC;AAED,SAAS,eA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rice = yield cache.getTokenPrice(constants_1.driftMint, portfolio_core_1.NetworkId.solana);
|
54
54
|
return (0, AirdropFetcher_1.getAirdrop)({
|
55
55
|
statics: constants_1.airdropStatics,
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
56
|
+
items: [
|
57
|
+
{
|
58
|
+
amount,
|
59
|
+
label: 'DRIFT',
|
60
|
+
address: constants_1.driftMint,
|
61
|
+
price: (driftPrice === null || driftPrice === void 0 ? void 0 : driftPrice.price) || null,
|
62
|
+
isClaimed,
|
63
|
+
},
|
64
|
+
],
|
63
65
|
});
|
64
66
|
});
|
65
67
|
exports.airdropFetcher = {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAAuD;AACvD,2CAKqB;AACrB,yDAI8B;AAG9B,MAAM,WAAW,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC;AAmBvD,SAAsB,gBAAgB,CAAC,KAAa;;QAClD,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CACzD,sBAAU,GAAG,KAAK,EAClB;YACE,OAAO,EAAE;gBACP,MAAM,EAAE,0BAA0B;gBAClC,OAAO,EAAE,2BAA2B;aACrC;YACD,OAAO,EAAE,IAAI;YACb,cAAc,CAAC,MAAM;gBACnB,OAAO,MAAM,KAAK,GAAG,IAAI,MAAM,KAAK,GAAG,CAAC;YAC1C,CAAC;SACF,CACF,CAAC;QAEF,IAAI,GAAG,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC;YACnB,OAAO,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;QAC5D,CAAC;QAED,MAAM,eAAe,GACnB,IAAI,CAAC,GAAG,EAAE,GAAG,GAAG,CAAC,IAAI,CAAC,MAAM,GAAG,IAAI;YACjC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU;YACrB,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,YAAY,CAAC;QAE5B,OAAO;YACL,MAAM,EAAE,IAAI,sBAAS,CAAC,eAAe,IAAI,CAAC,CAAC;iBACxC,SAAS,CAAC,WAAW,CAAC;iBACtB,QAAQ,EAAE;YACb,MAAM,EAAE,GAAG,CAAC,IAAI,CAAC,WAAW;YAC5B,SAAS,EAAE,GAAG,CAAC,IAAI,CAAC,eAAe,KAAK,CAAC;SAC1C,CAAC;IACJ,CAAC;CAAA;AA/BD,4CA+BC;AAED,MAAM,oBAAoB,GAA2B,CACnD,KAAa,EACb,KAAY,EACZ,EAAE;IACF,MAAM,WAAW,GAAG,MAAM,gBAAgB,CAAC,KAAK,CAAC,CAAC;IAClD,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,WAAW,CAAC;IAE1C,MAAM,UAAU,GAAG,MAAM,KAAK,CAAC,aAAa,CAAC,qBAAS,EAAE,0BAAS,CAAC,MAAM,CAAC,CAAC;IAE1E,OAAO,IAAA,2BAAU,EAAC;QAChB,OAAO,EAAE,0BAAc;QACvB,
|
1
|
+
{"version":3,"file":"helpersAirdrop.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/drift/helpersAirdrop.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,gEAAqC;AACrC,kDAA6C;AAC7C,+DAAuD;AACvD,2CAKqB;AACrB,yDAI8B;AAG9B,MAAM,WAAW,GAAG,IAAI,sBAAS,CAAC,SAAA,EAAE,EAAI,yBAAa,CAAA,CAAC,CAAC;AAmBvD,SAAsB,gBAAgB,CAAC,KAAa;;QAClD,MAAM,GAAG,GAAmC,MAAM,eAAK,CAAC,GAAG,CACzD,sBAAU,GAAG,KAAK,EAClB;YACE,OAAO,E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AE,OAAO;gBACd,OAAO,EAAE,qBAAS;gBAClB,KAAK,EAAE,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,KAAK,KAAI,IAAI;gBAChC,SAAS;aACV;SACF;KACF,CAAC,CAAC;AACL,CAAC,CAAA,CAAC;AAEW,QAAA,cAAc,GAAmB;IAC5C,EAAE,EAAE,0BAAc,CAAC,EAAE;IACrB,SAAS,EAAE,0BAAS,CAAC,MAAM;IAC3B,QAAQ,EAAE,oBAAoB;CAC/B,CAAC"}
|
@@ -77,13 +77,15 @@ function fetchAirdrop(owner, client, cache) {
|
|
77
77
|
}
|
78
78
|
return (0, AirdropFetcher_1.getAirdrop)({
|
79
79
|
statics: constants_1.airdropStatics,
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
80
|
+
items: [
|
81
|
+
{
|
82
|
+
amount,
|
83
|
+
isClaimed,
|
84
|
+
label: 'PRCL',
|
85
|
+
address: constants_1.prclMint,
|
86
|
+
price: (prclTokenPrice === null || prclTokenPrice === void 0 ? void 0 : prclTokenPrice.price) || null,
|
87
|
+
},
|
88
|
+
],
|
87
89
|
});
|
88
90
|
});
|
89
91
|
}
|
@@ -1 +1 @@
|
|
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;QAC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Ae,CAAC,KAAK,EAAE,KAAK,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,
|
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,OAAO,gBAAgB,CAAC;QAE9C,IAAI,UAAsB,CAAC;QAC3B,MAAM,WAAW,GAAG,MAAM,eAAK,CAAC,GAAG,CAGjC,sBAAU,GAAG,KAAK,EAAE;YACpB,OAAO,EAAE;gBACP,MAAM,EAAE,sBAAsB;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