@eluvio/elv-client-js 4.0.14 → 4.0.16
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/dist/ElvClient-min.js +8 -8
- package/dist/ElvClient-node-min.js +7 -7
- package/dist/ElvFrameClient-min.js +1 -1
- package/dist/ElvWalletClient-min.js +4 -4
- package/dist/ElvWalletClient-node-min.js +9 -9
- package/dist/src/RemoteSigner.js +0 -6
- package/dist/src/client/ContentAccess.js +49 -31
- package/dist/src/client/ContentManagement.js +6 -10
- package/dist/src/walletClient/ClientMethods.js +9 -14
- package/dist/src/walletClient/Configuration.js +4 -1
- package/dist/src/walletClient/index.js +38 -43
- package/package.json +1 -2
- package/src/client/ContentAccess.js +11 -2
- package/src/client/ContentManagement.js +1 -6
- package/src/walletClient/ClientMethods.js +2 -2
- package/src/walletClient/Configuration.js +4 -1
- package/src/walletClient/index.js +13 -10
|
@@ -34,6 +34,7 @@ class ElvWalletClient {
|
|
|
34
34
|
this.network = network;
|
|
35
35
|
this.mode = mode;
|
|
36
36
|
this.purchaseMode = Configuration[network][mode].purchaseMode;
|
|
37
|
+
this.mainSiteLibraryId = Configuration[network][mode].siteLibraryId;
|
|
37
38
|
this.mainSiteId = Configuration[network][mode].siteId;
|
|
38
39
|
this.appUrl = Configuration[network][mode].appUrl;
|
|
39
40
|
this.publicStaticToken = client.staticToken;
|
|
@@ -595,9 +596,9 @@ class ElvWalletClient {
|
|
|
595
596
|
return;
|
|
596
597
|
}
|
|
597
598
|
|
|
598
|
-
const mainSiteHash = await this.client.LatestVersionHash({objectId: this.mainSiteId});
|
|
599
599
|
let metadata = await this.client.ContentObjectMetadata({
|
|
600
|
-
|
|
600
|
+
libraryId: this.mainSiteLibraryId,
|
|
601
|
+
objectId: this.mainSiteId,
|
|
601
602
|
metadataSubtree: "public/asset_metadata/tenants",
|
|
602
603
|
resolveLinks: true,
|
|
603
604
|
linkDepthLimit: 2,
|
|
@@ -736,11 +737,12 @@ class ElvWalletClient {
|
|
|
736
737
|
return this.availableMarketplaces[marketplaceInfo.tenantSlug][marketplaceInfo.marketplaceSlug]["."].source;
|
|
737
738
|
}
|
|
738
739
|
|
|
739
|
-
const mainSiteHash = await this.client.LatestVersionHash({objectId: this.mainSiteId});
|
|
740
740
|
const marketplaceLink = await this.client.ContentObjectMetadata({
|
|
741
|
-
|
|
741
|
+
libraryId: this.mainSiteLibraryId,
|
|
742
|
+
objectId: this.mainSiteId,
|
|
742
743
|
metadataSubtree: UrlJoin("/public", "asset_metadata", "tenants", marketplaceInfo.tenantSlug, "marketplaces", marketplaceInfo.marketplaceSlug),
|
|
743
|
-
resolveLinks: false
|
|
744
|
+
resolveLinks: false,
|
|
745
|
+
noAuth: true
|
|
744
746
|
});
|
|
745
747
|
|
|
746
748
|
return LinkTargetHash(marketplaceLink);
|
|
@@ -750,7 +752,7 @@ class ElvWalletClient {
|
|
|
750
752
|
const marketplaceInfo = this.MarketplaceInfo({marketplaceParams});
|
|
751
753
|
|
|
752
754
|
const marketplaceId = marketplaceInfo.marketplaceId;
|
|
753
|
-
const
|
|
755
|
+
const marketplaceHashPromise = this.LatestMarketplaceHash({marketplaceParams});
|
|
754
756
|
|
|
755
757
|
if(this.cachedMarketplaces[marketplaceId] && this.cachedMarketplaces[marketplaceId].versionHash !== marketplaceHash) {
|
|
756
758
|
delete this.cachedMarketplaces[marketplaceId];
|
|
@@ -758,8 +760,9 @@ class ElvWalletClient {
|
|
|
758
760
|
|
|
759
761
|
if(!this.cachedMarketplaces[marketplaceId]) {
|
|
760
762
|
let marketplace = await this.client.ContentObjectMetadata({
|
|
761
|
-
|
|
762
|
-
|
|
763
|
+
libraryId: this.mainSiteLibraryId,
|
|
764
|
+
objectId: this.mainSiteId,
|
|
765
|
+
metadataSubtree: UrlJoin("/public", "asset_metadata", "tenants", marketplaceInfo.tenantSlug, "marketplaces", marketplaceInfo.marketplaceSlug, "info"),
|
|
763
766
|
localizationSubtree: this.localization ? UrlJoin("public", "asset_metadata", "localizations", this.localization, "info") : "",
|
|
764
767
|
linkDepthLimit: 1,
|
|
765
768
|
resolveLinks: true,
|
|
@@ -807,8 +810,8 @@ class ElvWalletClient {
|
|
|
807
810
|
|
|
808
811
|
marketplace.retrievedAt = Date.now();
|
|
809
812
|
marketplace.marketplaceId = marketplaceId;
|
|
810
|
-
marketplace.versionHash =
|
|
811
|
-
marketplace.marketplaceHash =
|
|
813
|
+
marketplace.versionHash = await marketplaceHashPromise;
|
|
814
|
+
marketplace.marketplaceHash = await marketplaceHashPromise;
|
|
812
815
|
|
|
813
816
|
if(this.previewMarketplaceId && marketplaceId === this.previewMarketplaceId) {
|
|
814
817
|
marketplace.branding.preview = true;
|