@sonarwatch/portfolio-plugins 0.11.35 → 0.11.37
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
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
4
4
|
|
5
|
+
## [0.11.37](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.36...plugins-0.11.37) (2024-01-05)
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
## [0.11.36](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.35...plugins-0.11.36) (2024-01-05)
|
10
|
+
|
11
|
+
|
12
|
+
|
5
13
|
## [0.11.35](https://github.com/sonarwatch/portfolio/compare/plugins-0.11.34...plugins-0.11.35) (2024-01-05)
|
6
14
|
|
7
15
|
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sonarwatch/portfolio-plugins",
|
3
|
-
"version": "0.11.
|
3
|
+
"version": "0.11.37",
|
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.37"
|
45
45
|
},
|
46
46
|
"main": "./src/index.js",
|
47
47
|
"types": "./src/index.d.ts"
|
@@ -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) {
|
6
|
-
var _a, _b, _c;
|
6
|
+
var _a, _b, _c, _d;
|
7
7
|
// Tags
|
8
8
|
const tags = [];
|
9
9
|
if (asset.compression.compressed)
|
@@ -32,7 +32,7 @@ function heliusAssetToAssetCollectible(asset) {
|
|
32
32
|
amount = parseInt(amt, 10);
|
33
33
|
collection = {
|
34
34
|
floorPrice: null,
|
35
|
-
id:
|
35
|
+
id: `${tick}-spl-20`,
|
36
36
|
name: tick.toUpperCase(),
|
37
37
|
};
|
38
38
|
tags.push('spl20');
|
@@ -43,7 +43,7 @@ function heliusAssetToAssetCollectible(asset) {
|
|
43
43
|
collection = {
|
44
44
|
floorPrice: null,
|
45
45
|
id: collectionGroup.group_value,
|
46
|
-
name: collectionGroup.collection_metadata.name,
|
46
|
+
name: ((_c = collectionGroup.collection_metadata) === null || _c === void 0 ? void 0 : _c.name) || (collection === null || collection === void 0 ? void 0 : collection.name),
|
47
47
|
};
|
48
48
|
}
|
49
49
|
return {
|
@@ -57,7 +57,7 @@ function heliusAssetToAssetCollectible(asset) {
|
|
57
57
|
price: null,
|
58
58
|
name: asset.content.metadata.name,
|
59
59
|
dataUri: asset.content.json_uri,
|
60
|
-
imageUri: (
|
60
|
+
imageUri: (_d = asset.content.links) === null || _d === void 0 ? void 0 : _d.image,
|
61
61
|
attributes: asset.content.metadata.attributes,
|
62
62
|
collection,
|
63
63
|
},
|
@@ -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;;IAElB,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,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,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAE1D,SAAS;IACT,IAAI,OAAO,IAAI,OAAO,KAAK,CAAC,EAAE,CAAC;QAC7B,MAAM,GAAG,OAAO,CAAC;QACjB,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IACnB,CAAC;IAED,IAAI,KAAK,CAAC,KAAK,EAAE,CAAC;QAChB,MAAM,EAAE,GAAG,EAAE,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,KAAK,CAAC;QACzC,IAAI,CAAC,KAAK,QAAQ;YAAE,OAAO,IAAI,CAAC;QAChC,IAAI,EAAE,KAAK,MAAM;YAAE,OAAO,IAAI,CAAC;QAC/B,IAAI,GAAG,KAAK,SAAS;YAAE,OAAO,IAAI,CAAC;QACnC,MAAM,GAAG,QAAQ,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAC3B,UAAU,GAAG;YACX,UAAU,EAAE,IAAI;YAChB,EAAE,EAAE,
|
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;;IAElB,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,MAAM,GAAG,C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AE,CAAA,MAAA,eAAe,CAAC,mBAAmB,0CAAE,IAAI,MAAI,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,IAAI,CAAA;SACpE,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,IAAI;YACX,IAAI,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI;YACjC,OAAO,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ;YAC/B,QAAQ,EAAE,MAAA,KAAK,CAAC,OAAO,CAAC,KAAK,0CAAE,KAAK;YACpC,UAAU,EAAE,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,UAAU;YAC7C,UAAU;SACX;QACD,SAAS,EAAE,0BAAS,CAAC,MAAM;QAC3B,KAAK,EAAE,IAAI;KACZ,CAAC;AACJ,CAAC;AAjED,sEAiEC"}
|
@@ -113,7 +113,7 @@ export type CollectionGroup = {
|
|
113
113
|
group_key: 'collection';
|
114
114
|
group_value: string;
|
115
115
|
verified: boolean;
|
116
|
-
collection_metadata
|
116
|
+
collection_metadata?: CollectionMetadata;
|
117
117
|
};
|
118
118
|
export interface CollectionMetadata {
|
119
119
|
name: string;
|