@sonarwatch/portfolio-plugins 0.12.45 → 0.12.47
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/plugins/jito/helper.d.ts +3 -0
- package/src/plugins/jito/helper.js +21 -0
- package/src/plugins/jito/helper.js.map +1 -0
- package/src/plugins/native-stake/solana/constants.d.ts +1 -1
- package/src/plugins/native-stake/solana/constants.js +2 -2
- package/src/plugins/native-stake/solana/constants.js.map +1 -1
- package/src/plugins/native-stake/solana/solanaFetcher.js +1 -1
- package/src/plugins/native-stake/solana/solanaFetcher.js.map +1 -1
- package/src/plugins/native-stake/solana/solanaValidatorsJob.js +17 -38
- package/src/plugins/native-stake/solana/solanaValidatorsJob.js.map +1 -1
- package/src/plugins/native-stake/solana/types.d.ts +7 -11
- package/src/plugins/zeta/airdropFetcher.js +8 -0
- package/src/plugins/zeta/airdropFetcher.js.map +1 -1
- package/src/plugins/zeta/constants.d.ts +5 -0
- package/src/plugins/zeta/constants.js +46 -1
- package/src/plugins/zeta/constants.js.map +1 -1
- package/src/plugins/zeta/helpers.d.ts +3 -0
- package/src/plugins/zeta/helpers.js +27 -1
- package/src/plugins/zeta/helpers.js.map +1 -1
- package/src/plugins/zeta/idls.d.ts +70 -0
- package/src/plugins/zeta/idls.js +749 -0
- package/src/plugins/zeta/idls.js.map +1 -0
- package/src/plugins/zeta/index.js +6 -1
- package/src/plugins/zeta/index.js.map +1 -1
- package/src/plugins/zeta/stakingFetcher.d.ts +3 -0
- package/src/plugins/zeta/stakingFetcher.js +69 -0
- package/src/plugins/zeta/stakingFetcher.js.map +1 -0
- package/src/plugins/zeta/structs.d.ts +7 -0
- package/src/plugins/zeta/structs.js +7 -1
- package/src/plugins/zeta/structs.js.map +1 -1
- package/src/plugins/zeta/types.d.ts +26 -0
- package/src/plugins/zeta/types.js +7 -0
- package/src/plugins/zeta/types.js.map +1 -1
- package/src/utils/solana/das/getAssetBatchDas.js +3 -2
- package/src/utils/solana/das/getAssetBatchDas.js.map +1 -1
- package/src/utils/solana/das/heliusAssetToAssetCollectible.js +6 -4
- package/src/utils/solana/das/heliusAssetToAssetCollectible.js.map +1 -1
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"idls.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/idls.ts"],"names":[],"mappings":";;;AAAa,QAAA,IAAI,GAAG;IAClB,OAAO,EAAE,OAAO;IAChB,IAAI,EAAE,cAAc;IACpB,YAAY,EAAE;QACZ;YACE,IAAI,EAAE,cAAc;YACpB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,UAAU;oBAChB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,KAAK;iBAChB;aACF;YACD,IAAI,EAAE;gBACJ;oBACE,IAAI,EAAE,sBAAsB;oBAC5B,IAAI,EAAE,KAAK;iBACZ;gBACD;oBACE,IAAI,EAAE,YAAY;oBAClB,IAAI,EAAE,KAAK;iBACZ;gBACD;oBACE,IAAI,EAAE,wBAAwB;oBAC9B,IAAI,EAAE,KAAK;iBACZ;aACF;SACF;QACD;YACE,IAAI,EAAE,iBAAiB;YACvB,QAAQ,EAAE;gBACR;oBACE,IAAI,EAAE,eAAe;oBACrB,KAAK,EAAE,IAAI;oBACX,QAAQ,EAAE,KAAK;iBAChB;gBACD;oBACE,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,IAAI;iBACf;gBACD;oBACE,IAAI,EAAE,cAAc;oBACpB,KAAK,EAAE,KAAK;oBACZ,QAAQ,EAAE,K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ACF,CAAC"}
|
@@ -6,8 +6,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.platforms = exports.fetchers = exports.jobs = void 0;
|
7
7
|
const depositsFetcher_1 = __importDefault(require("./depositsFetcher"));
|
8
8
|
const airdropFetcher_1 = __importDefault(require("./airdropFetcher"));
|
9
|
+
const stakingFetcher_1 = __importDefault(require("./stakingFetcher"));
|
9
10
|
const constants_1 = require("./constants");
|
10
11
|
exports.jobs = [];
|
11
|
-
exports.fetchers = [
|
12
|
+
exports.fetchers = [
|
13
|
+
depositsFetcher_1.default,
|
14
|
+
airdropFetcher_1.default,
|
15
|
+
stakingFetcher_1.default,
|
16
|
+
];
|
12
17
|
exports.platforms = [constants_1.platform];
|
13
18
|
//# sourceMappingURL=index.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,sEAA8C;AAC9C,2CAAuC;AAE1B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc,
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/index.ts"],"names":[],"mappings":";;;;;;AAGA,wEAAgD;AAChD,sEAA8C;AAC9C,sEAA8C;AAC9C,2CAAuC;AAE1B,QAAA,IAAI,GAAU,EAAE,CAAC;AACjB,QAAA,QAAQ,GAAc;IACjC,yBAAe;IACf,wBAAc;IACd,wBAAc;CACf,CAAC;AACW,QAAA,SAAS,GAAe,CAAC,oBAAQ,CAAC,CAAC"}
|
@@ -0,0 +1,69 @@
|
|
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 constants_1 = require("./constants");
|
18
|
+
const tokenPriceToAssetToken_1 = __importDefault(require("../../utils/misc/tokenPriceToAssetToken"));
|
19
|
+
const clients_1 = require("../../utils/clients");
|
20
|
+
const helpers_1 = require("./helpers");
|
21
|
+
const solana_1 = require("../../utils/solana");
|
22
|
+
const networkId = portfolio_core_1.NetworkId.solana;
|
23
|
+
const executor = (owner, cache) => __awaiter(void 0, void 0, void 0, function* () {
|
24
|
+
const client = (0, clients_1.getClientSolana)();
|
25
|
+
let index = 0;
|
26
|
+
const step = 5;
|
27
|
+
const accounts = [];
|
28
|
+
do {
|
29
|
+
const stakeAccountsAddresses = (0, helpers_1.getStakeAccountsAddresses)(owner, index, index + step);
|
30
|
+
const stakeAccounts = yield (0, solana_1.getAutoParsedMultipleAccountsInfo)(client, constants_1.sharkyIdlItem, stakeAccountsAddresses);
|
31
|
+
index += step;
|
32
|
+
accounts.push(...stakeAccounts);
|
33
|
+
} while (!accounts.some((acc) => !acc));
|
34
|
+
const tokenPrice = yield cache.getTokenPrice(constants_1.zexMint, networkId);
|
35
|
+
const elements = [];
|
36
|
+
for (const account of accounts) {
|
37
|
+
if (!account)
|
38
|
+
continue;
|
39
|
+
const name = (0, solana_1.u8ArrayToString)(account.name);
|
40
|
+
const amount = new bignumber_js_1.default(account.amountStillStaked)
|
41
|
+
.dividedBy(Math.pow(10, constants_1.zexDecimals))
|
42
|
+
.toNumber();
|
43
|
+
const attributes = {
|
44
|
+
lockedUntil: account.stakeState.vesting
|
45
|
+
? (0, helpers_1.getTimestamp)(account.stakeDurationEpochs, account.stakeState.vesting.stakeStartEpoch)
|
46
|
+
: -1,
|
47
|
+
};
|
48
|
+
const asset = (0, tokenPriceToAssetToken_1.default)(constants_1.zexMint, amount, networkId, tokenPrice, undefined, attributes);
|
49
|
+
elements.push({
|
50
|
+
type: 'multiple',
|
51
|
+
label: 'Staked',
|
52
|
+
networkId,
|
53
|
+
platformId: constants_1.platformId,
|
54
|
+
name,
|
55
|
+
data: {
|
56
|
+
assets: [asset],
|
57
|
+
},
|
58
|
+
value: asset.value,
|
59
|
+
});
|
60
|
+
}
|
61
|
+
return elements;
|
62
|
+
});
|
63
|
+
const fetcher = {
|
64
|
+
id: `${constants_1.platformId}-staking`,
|
65
|
+
networkId,
|
66
|
+
executor,
|
67
|
+
};
|
68
|
+
exports.default = fetcher;
|
69
|
+
//# sourceMappingURL=stakingFetcher.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"stakingFetcher.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/stakingFetcher.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AAAA,+DAIoC;AACpC,gEAAqC;AAGrC,2CAA8E;AAC9E,qGAA6E;AAC7E,iDAAsD;AACtD,uCAAoE;AACpE,+CAG4B;AAG5B,MAAM,SAAS,GAAG,0BAAS,CAAC,MAAM,CAAC;AAEnC,MAAM,QAAQ,GAAoB,CAAO,KAAa,EAAE,KAAY,EAAE,EAAE;IACtE,MAAM,MAAM,GAAG,IAAA,yBAAe,GAAE,CAAC;IAEjC,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,MAAM,IAAI,GAAG,CAAC,CAAC;IACf,MAAM,QAAQ,GAAG,EAAE,CAAC;IACpB,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AChB,KAAK,EAAE,QAAQ;YACf,SAAS;YACT,UAAU,EAAV,sBAAU;YACV,IAAI;YACJ,IAAI,EAAE;gBACJ,MAAM,EAAE,CAAC,KAAK,CAAC;aAChB;YACD,KAAK,EAAE,KAAK,CAAC,KAAK;SACnB,CAAC,CAAC;IACL,CAAC;IAED,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAA,CAAC;AAEF,MAAM,OAAO,GAAY;IACvB,EAAE,EAAE,GAAG,sBAAU,UAAU;IAC3B,SAAS;IACT,QAAQ;CACT,CAAC;AAEF,kBAAe,OAAO,CAAC"}
|
@@ -48,3 +48,10 @@ export type CrossMarginAccount = {
|
|
48
48
|
padding: Buffer[];
|
49
49
|
};
|
50
50
|
export declare const crossMarginAccountStruct: FixableBeetStruct<CrossMarginAccount, Partial<CrossMarginAccount>>;
|
51
|
+
export type ClaimStatus = {
|
52
|
+
buffer: Buffer;
|
53
|
+
claimant: PublicKey;
|
54
|
+
claimedAt: BigNumber;
|
55
|
+
claimedAmount: BigNumber;
|
56
|
+
};
|
57
|
+
export declare const claimStatusStruct: BeetStruct<ClaimStatus, Partial<ClaimStatus>>;
|
@@ -1,6 +1,6 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
-
exports.crossMarginAccountStruct = exports.productLedgerStruct = exports.orderStateStruct = exports.positionStruct = exports.anchorDecimalStruct = exports.MarginAccountType = void 0;
|
3
|
+
exports.claimStatusStruct = exports.crossMarginAccountStruct = exports.productLedgerStruct = exports.orderStateStruct = exports.positionStruct = exports.anchorDecimalStruct = exports.MarginAccountType = void 0;
|
4
4
|
const beet_1 = require("@metaplex-foundation/beet");
|
5
5
|
const beet_solana_1 = require("@metaplex-foundation/beet-solana");
|
6
6
|
const solana_1 = require("../../utils/solana");
|
@@ -49,4 +49,10 @@ exports.crossMarginAccountStruct = new beet_1.FixableBeetStruct([
|
|
49
49
|
['productLedgersPadding', (0, beet_1.uniformFixedSizeArray)(exports.productLedgerStruct, 20)],
|
50
50
|
['padding', (0, beet_1.uniformFixedSizeArray)(beet_1.u8, 2000)],
|
51
51
|
], (args) => args);
|
52
|
+
exports.claimStatusStruct = new beet_1.BeetStruct([
|
53
|
+
['buffer', (0, solana_1.blob)(8)],
|
54
|
+
['claimant', beet_solana_1.publicKey],
|
55
|
+
['claimedAt', solana_1.u64],
|
56
|
+
['claimedAmount', solana_1.u64],
|
57
|
+
], (args) => args);
|
52
58
|
//# sourceMappingURL=structs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"structs.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/structs.ts"],"names":[],"mappings":";;;AAAA,oDAOmC;AACnC,kEAA6D;AAG7D,+CAAoD;AAEpD,IAAY,iBAGX;AAHD,WAAY,iBAAiB;IAC3B,6DAAM,CAAA;IACN,uEAAW,CAAA;AACb,CAAC,EAHW,iBAAiB,iCAAjB,iBAAiB,QAG5B;AAQY,QAAA,mBAAmB,GAAG,IAAI,iBAAU,CAC/C;IACE,CAAC,OAAO,EAAE,UAAG,CAAC;IACd,CAAC,IAAI,EAAE,UAAG,CAAC;IACX,CAAC,IAAI,EAAE,UAAG,CAAC;IACX,CAAC,KAAK,EAAE,UAAG,CAAC;CACb,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAqB,CAChC,CAAC;AAMW,QAAA,cAAc,GAAG,IAAI,iBAAU,CAC1C;IACE,CAAC,MAAM,EAAE,YAAG,CAAC;IACb,CAAC,cAAc,EAAE,YAAG,CAAC;CACtB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAgB,CAC3B,CAAC;AAOW,QAAA,gBAAgB,GAAG,IAAI,iBAAU,CAC5C;IACE,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;IACtB,CAAC,eAAe,EAAE,YAAG,CAAC;CACvB,EACD,CAAC,IAAI,EAAE,EAAE,CAAC,IAAkB,CAC7B,C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inalFrontend;
|
3
4
|
};
|
@@ -12,3 +13,28 @@ export type GetAirdropFinalFrontend = {
|
|
12
13
|
total_allocation: number;
|
13
14
|
__typename: string;
|
14
15
|
};
|
16
|
+
export declare enum StakeStateName {
|
17
|
+
Uninitialized = 0,
|
18
|
+
Vesting = 1,
|
19
|
+
Locked = 2
|
20
|
+
}
|
21
|
+
export type StakeState = {
|
22
|
+
vesting?: {
|
23
|
+
lastClaimTs: string;
|
24
|
+
stakeStartEpoch: number;
|
25
|
+
};
|
26
|
+
locked?: null;
|
27
|
+
uninitialized?: null;
|
28
|
+
};
|
29
|
+
export type StakeAccount = {
|
30
|
+
buffer: Buffer;
|
31
|
+
name: number[];
|
32
|
+
vaultNonce: number;
|
33
|
+
bitInUse: number;
|
34
|
+
stakeState: StakeState;
|
35
|
+
initialStakeAmount: string;
|
36
|
+
amountStillStaked: string;
|
37
|
+
amountClaimed: string;
|
38
|
+
stakeDurationEpochs: number;
|
39
|
+
authority: string;
|
40
|
+
};
|
@@ -1,3 +1,10 @@
|
|
1
1
|
"use strict";
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.StakeStateName = void 0;
|
4
|
+
var StakeStateName;
|
5
|
+
(function (StakeStateName) {
|
6
|
+
StakeStateName[StakeStateName["Uninitialized"] = 0] = "Uninitialized";
|
7
|
+
StakeStateName[StakeStateName["Vesting"] = 1] = "Vesting";
|
8
|
+
StakeStateName[StakeStateName["Locked"] = 2] = "Locked";
|
9
|
+
})(StakeStateName || (exports.StakeStateName = StakeStateName = {}));
|
3
10
|
//# sourceMappingURL=types.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/types.ts"],"names":[],"mappings":""}
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../../packages/plugins/src/plugins/zeta/types.ts"],"names":[],"mappings":";;;AAgBA,IAAY,cAIX;AAJD,WAAY,cAAc;IACxB,qEAAa,CAAA;IACb,yDAAO,CAAA;IACP,uDAAM,CAAA;AACR,CAAC,EAJW,cAAc,8BAAd,cAAc,QAIzB"}
|
@@ -18,11 +18,12 @@ const getBasicAuthHeaders_1 = require("../../misc/getBasicAuthHeaders");
|
|
18
18
|
const MAX_MINTS = 1000;
|
19
19
|
function getAssetBatchDas(dasEndpoint, publicKeys) {
|
20
20
|
return __awaiter(this, void 0, void 0, function* () {
|
21
|
+
const uniquePublicKeys = Array.from(new Set(publicKeys));
|
21
22
|
if (publicKeys.length <= MAX_MINTS) {
|
22
|
-
return getAssetBatchDasUnsafe(dasEndpoint,
|
23
|
+
return getAssetBatchDasUnsafe(dasEndpoint, uniquePublicKeys);
|
23
24
|
}
|
24
25
|
const assetsInfo = [];
|
25
|
-
const publicKeysToFetch = [...
|
26
|
+
const publicKeysToFetch = [...uniquePublicKeys];
|
26
27
|
while (publicKeysToFetch.length !== 0) {
|
27
28
|
const currPublicKeysToFetch = publicKeysToFetch.splice(0, MAX_MINTS);
|
28
29
|
const accountsInfoRes = yield getAssetBatchDasUnsafe(dasEndpoint, currPublicKeysToFetch);
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"getAssetBatchDas.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/getAssetBatchDas.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAE7C,wEAAqE;AAErE,MAAM,SAAS,GAAG,IAAI,CAAC;AAEvB,SAAsB,gBAAgB,CACpC,WAAwB,EACxB,UAAoB;;QAEpB,IAAI,UAAU,CAAC,MAAM,IAAI,SAAS,EAAE,CAAC;YACnC,OAAO,sBAAsB,CAAC,WAAW,EAAE,
|
1
|
+
{"version":3,"file":"getAssetBatchDas.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/getAssetBatchDas.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kDAA6C;AAE7C,wEAAqE;AAErE,MAAM,SAA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AE,OAAO,EAAE,CAAC;QACvC,MAAM,WAAW,GAAG,WAAW,CAAC,SAAS;YACvC,CAAC,CAAC,IAAA,yCAAmB,EACjB,WAAW,CAAC,SAAS,CAAC,QAAQ,EAC9B,WAAW,CAAC,SAAS,CAAC,QAAQ,CAC/B;YACH,CAAC,CAAC,SAAS,CAAC;QAEd,MAAM,GAAG,GAAG,MAAM,eAAK,CAAC,IAAI,CAK1B,WAAW,CAAC,GAAG,EACf;YACE,OAAO,EAAE,KAAK;YACd,EAAE,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC5B,MAAM,EAAE,eAAe;YACvB,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU;aAChB;SACF,EACD;YACE,OAAO,kBACL,cAAc,EAAE,kBAAkB,IAC/B,WAAW,CACf;SACF,CACF,CAAC;QAEF,OAAO,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC;IACzB,CAAC;CAAA"}
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.heliusAssetToAssetCollectible = void 0;
|
4
4
|
const portfolio_core_1 = require("@sonarwatch/portfolio-core");
|
5
5
|
function heliusAssetToAssetCollectible(asset, props) {
|
6
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
6
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
7
7
|
// Tags
|
8
8
|
const tags = [];
|
9
9
|
if (asset.compression.compressed)
|
@@ -59,14 +59,16 @@ function heliusAssetToAssetCollectible(asset, props) {
|
|
59
59
|
address: asset.id,
|
60
60
|
amount,
|
61
61
|
price: (_j = (_h = props === null || props === void 0 ? void 0 : props.collection) === null || _h === void 0 ? void 0 : _h.floorPrice) !== null && _j !== void 0 ? _j : null,
|
62
|
-
name: asset.content.metadata.name
|
62
|
+
name: asset.content.metadata.name ||
|
63
|
+
(collection === null || collection === void 0 ? void 0 : collection.name) ||
|
64
|
+
((_k = props === null || props === void 0 ? void 0 : props.collection) === null || _k === void 0 ? void 0 : _k.name),
|
63
65
|
dataUri: asset.content.json_uri,
|
64
|
-
imageUri: (
|
66
|
+
imageUri: (_l = asset.content.links) === null || _l === void 0 ? void 0 : _l.image,
|
65
67
|
attributes: asset.content.metadata.attributes,
|
66
68
|
collection,
|
67
69
|
},
|
68
70
|
networkId: portfolio_core_1.NetworkId.solana,
|
69
|
-
value: (
|
71
|
+
value: (_o = (_m = props === null || props === void 0 ? void 0 : props.collection) === null || _m === void 0 ? void 0 : _m.floorPrice) !== null && _o !== void 0 ? _o : null,
|
70
72
|
};
|
71
73
|
}
|
72
74
|
exports.heliusAssetToAssetCollectible = heliusAssetToAssetCollectible;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"heliusAssetToAssetCollectible.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/heliusAssetToAssetCollectible.ts"],"names":[],"mappings":";;;AAAA,+DAKoC;AAGpC,SAAgB,6BAA6B,CAC3C,KAAkB,EAClB,KAGC;;IAED,OAAO;IACP,MAAM,IAAI,GAAyB,EAAE,CAAC;IACtC,IAAI,KAAK,CAAC,WAAW,CAAC,UAAU;QAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1D,IAAI,KAAK,CAAC,WAAW;QAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAElD,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,UAA6C,CAAC;IAElD,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,CAAC;IAC5C,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,OAAO,CAAC;IAC1C,IAAI,QA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AAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,IAAI,CAAA;SAC1B,CAAC;IACJ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,mCAAkB,CAAC,WAAW;QACpC,UAAU,EAAE;YACV,IAAI,EAAE,IAAI,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;SACzC;QACD,IAAI,EAAE;YACJ,OAAO,EAAE,KAAK,CAAC,EAAE;YACjB,MAAM;YACN,KAAK,EAAE,MAAA,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,UAAU,0CAAE,UAAU,mCAAI,IAAI;YAC5C,IAAI,
|
1
|
+
{"version":3,"file":"heliusAssetToAssetCollectible.js","sourceRoot":"","sources":["../../../../../../../packages/plugins/src/utils/solana/das/heliusAssetToAssetCollectible.ts"],"names":[],"mappings":";;;AAAA,+DAKoC;AAGpC,SAAgB,6BAA6B,CAC3C,KAAkB,EAClB,KAGC;;IAED,OAAO;IACP,MAAM,IAAI,GAAyB,EAAE,CAAC;IACtC,IAAI,KAAK,CAAC,WAAW,CAAC,UAAU;QAAE,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAC1D,IAAI,KAAK,CAAC,WAAW;QAAE,IAAI,CAAC,IAAI,CAAC,aAAa,CAAC,CAAC;IAEhD,IAAI,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,IAAI,0CAAE,MAAM;QAAE,IAAI,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,CAAC;IAElD,IAAI,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,UAA6C,CAAC;IAElD,MAAM,QAAQ,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,QAAQ,CAAC;IAC5C,MAAM,OAAO,GAAG,MAAA,KAAK,CAAC,UAAU,0CAAE,OAAO,CAAC;IAC1C,IAAI,QAAQ,KAAK,SAAS,IAAI,QAAQ,K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