From dee69c04d9dc77789c35dcfe2f859095257e213b Mon Sep 17 00:00:00 2001 From: enrique Date: Thu, 11 Jul 2024 13:25:45 +0200 Subject: [PATCH 1/8] fix: update method to allow list/unlist of assets --- package.json | 2 +- src/nevermined/api/RegistryBaseApi.ts | 19 +++++++++---------- 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index b9d3c05be..cf3a65a7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nevermined-io/sdk", - "version": "3.0.16", + "version": "3.0.17", "description": "Javascript SDK for connecting with Nevermined Data Platform ", "main": "./dist/node/sdk.js", "typings": "./dist/node/sdk.d.ts", diff --git a/src/nevermined/api/RegistryBaseApi.ts b/src/nevermined/api/RegistryBaseApi.ts index 075cd098a..4bfee8c3b 100644 --- a/src/nevermined/api/RegistryBaseApi.ts +++ b/src/nevermined/api/RegistryBaseApi.ts @@ -447,18 +447,17 @@ export abstract class RegistryBaseApi extends Instantiable { } catch (error) { this.logger.log(`Unable to publish immutable content`) } + observer.next(UpdateProgressStep.UpdatingAssetOnChain) + await this.nevermined.keeper.didRegistry.updateMetadataUrl( + ddo.id, + checksum, + from, + metadataService.serviceEndpoint, + ddoVersion.immutableUrl, + txParams, + ) } - observer.next(UpdateProgressStep.UpdatingAssetOnChain) - await this.nevermined.keeper.didRegistry.updateMetadataUrl( - ddo.id, - checksum, - from, - metadataService.serviceEndpoint, - ddoVersion.immutableUrl, - txParams, - ) - observer.next(UpdateProgressStep.StoringDDOMarketplaceAPI) const storedDdo = await this.nevermined.services.metadata.updateDDO(ddo.id, ddo) From c73c7883c0c469035b720253603ad99dc5d28e40 Mon Sep 17 00:00:00 2001 From: enrique Date: Thu, 11 Jul 2024 13:29:43 +0200 Subject: [PATCH 2/8] feat: bumpversion --- CHANGELOG.md | 8 ++++---- package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 86144c6de..3f0f4d1d4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2076,7 +2076,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 2 May 2022 -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931) #### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21) @@ -2339,7 +2339,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 18 January 2022 -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c) @@ -2845,7 +2845,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268) - Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266) - integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264) -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244) - replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243) - fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246) @@ -2884,7 +2884,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191) - Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189) - Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187) -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184) diff --git a/package.json b/package.json index cf3a65a7b..7ea4cfa4d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nevermined-io/sdk", - "version": "3.0.17", + "version": "3.0.17-rc0", "description": "Javascript SDK for connecting with Nevermined Data Platform ", "main": "./dist/node/sdk.js", "typings": "./dist/node/sdk.d.ts", From 0e43079df13c681d6656527828a6369dd183bf83 Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Thu, 11 Jul 2024 11:34:49 +0000 Subject: [PATCH 3/8] Automated CHANGELOG.md update Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f0f4d1d4..1dbb2a98c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v3.0.17-rc0](https://github.com/nevermined-io/sdk-js/compare/v3.0.16...v3.0.17-rc0) + +> 11 July 2024 + +- docs: updating documentation [skip actions] [`99bdc33`](https://github.com/nevermined-io/sdk-js/commit/99bdc334b53f3e411ac12aa4574b46d7fc06f192) +- fix: update method to allow list/unlist of assets [`dee69c0`](https://github.com/nevermined-io/sdk-js/commit/dee69c04d9dc77789c35dcfe2f859095257e213b) +- feat: bumpversion [`c73c788`](https://github.com/nevermined-io/sdk-js/commit/c73c7883c0c469035b720253603ad99dc5d28e40) + #### [v3.0.16](https://github.com/nevermined-io/sdk-js/compare/v3.0.16-rc3...v3.0.16) > 3 July 2024 @@ -2076,7 +2084,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 2 May 2022 -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931) #### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21) @@ -2339,7 +2347,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 18 January 2022 -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c) @@ -2845,7 +2853,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268) - Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266) - integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264) -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244) - replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243) - fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246) @@ -2884,7 +2892,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191) - Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189) - Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187) -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184) From 5b81b36b59e2115b944ad38fe26274eba20bd62d Mon Sep 17 00:00:00 2001 From: enrique Date: Thu, 11 Jul 2024 13:56:56 +0200 Subject: [PATCH 4/8] feat: move code and debug --- package.json | 2 +- src/nevermined/api/RegistryBaseApi.ts | 23 ++++++++++++++--------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 7ea4cfa4d..02ffae987 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nevermined-io/sdk", - "version": "3.0.17-rc0", + "version": "3.0.17-rc1", "description": "Javascript SDK for connecting with Nevermined Data Platform ", "main": "./dist/node/sdk.js", "typings": "./dist/node/sdk.d.ts", diff --git a/src/nevermined/api/RegistryBaseApi.ts b/src/nevermined/api/RegistryBaseApi.ts index 4bfee8c3b..d0afb8b92 100644 --- a/src/nevermined/api/RegistryBaseApi.ts +++ b/src/nevermined/api/RegistryBaseApi.ts @@ -31,6 +31,7 @@ import { AccessService, NFTAccessService, NFTSalesService } from '../AccessServi import { DID } from '../DID' import { CreateProgressStep, OrderProgressStep, UpdateProgressStep } from '../ProgressSteps' import { SignatureUtils } from '../utils/SignatureUtils' +import { Logger } from 'src' /** * Abstract class proving common functionality related with Assets registration. @@ -434,6 +435,9 @@ export abstract class RegistryBaseApi extends Instantiable { ddo._nvm.versions.push(ddoVersion) ddo.updated = ddoVersion.updated + Logger.log(publishMetadataOptions) + Logger.log(PublishMetadataOptions.OnlyMetadataAPI) + Logger.log(publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) if (publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) { observer.next(UpdateProgressStep.StoringImmutableDDO) try { @@ -444,18 +448,19 @@ export abstract class RegistryBaseApi extends Instantiable { publishMetadataOptions, )) if (ddoVersion.immutableBackend) ddo._nvm.versions[lastIndex + 1] = ddoVersion + + observer.next(UpdateProgressStep.UpdatingAssetOnChain) + await this.nevermined.keeper.didRegistry.updateMetadataUrl( + ddo.id, + checksum, + from, + metadataService.serviceEndpoint, + ddoVersion.immutableUrl, + txParams, + ) } catch (error) { this.logger.log(`Unable to publish immutable content`) } - observer.next(UpdateProgressStep.UpdatingAssetOnChain) - await this.nevermined.keeper.didRegistry.updateMetadataUrl( - ddo.id, - checksum, - from, - metadataService.serviceEndpoint, - ddoVersion.immutableUrl, - txParams, - ) } observer.next(UpdateProgressStep.StoringDDOMarketplaceAPI) From 98793413f459710f4bafc4d6ad44d37a04be57d7 Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Thu, 11 Jul 2024 12:01:06 +0000 Subject: [PATCH 5/8] Automated CHANGELOG.md update Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1dbb2a98c..6b5fde63f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,13 @@ All notable changes to this project will be documented in this file. Dates are d Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). +#### [v3.0.17-rc1](https://github.com/nevermined-io/sdk-js/compare/v3.0.17-rc0...v3.0.17-rc1) + +> 11 July 2024 + +- feat: move code and debug [`5b81b36`](https://github.com/nevermined-io/sdk-js/commit/5b81b36b59e2115b944ad38fe26274eba20bd62d) +- Automated CHANGELOG.md update [`0e43079`](https://github.com/nevermined-io/sdk-js/commit/0e43079df13c681d6656527828a6369dd183bf83) + #### [v3.0.17-rc0](https://github.com/nevermined-io/sdk-js/compare/v3.0.16...v3.0.17-rc0) > 11 July 2024 From b5caa1e2d66f8bfda4cd5eb736df473ba1b91579 Mon Sep 17 00:00:00 2001 From: enrique Date: Thu, 11 Jul 2024 14:06:54 +0200 Subject: [PATCH 6/8] fix: build --- src/nevermined/api/RegistryBaseApi.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/nevermined/api/RegistryBaseApi.ts b/src/nevermined/api/RegistryBaseApi.ts index d0afb8b92..aa3805838 100644 --- a/src/nevermined/api/RegistryBaseApi.ts +++ b/src/nevermined/api/RegistryBaseApi.ts @@ -31,7 +31,6 @@ import { AccessService, NFTAccessService, NFTSalesService } from '../AccessServi import { DID } from '../DID' import { CreateProgressStep, OrderProgressStep, UpdateProgressStep } from '../ProgressSteps' import { SignatureUtils } from '../utils/SignatureUtils' -import { Logger } from 'src' /** * Abstract class proving common functionality related with Assets registration. @@ -435,9 +434,9 @@ export abstract class RegistryBaseApi extends Instantiable { ddo._nvm.versions.push(ddoVersion) ddo.updated = ddoVersion.updated - Logger.log(publishMetadataOptions) - Logger.log(PublishMetadataOptions.OnlyMetadataAPI) - Logger.log(publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) + this.logger.log(publishMetadataOptions) + this.logger.log(PublishMetadataOptions.OnlyMetadataAPI) + this.logger.log(publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) if (publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) { observer.next(UpdateProgressStep.StoringImmutableDDO) try { From 2f56f09d4746b42c061da11f2d65b55fda3cda2d Mon Sep 17 00:00:00 2001 From: eruizgar91 Date: Thu, 11 Jul 2024 12:10:19 +0000 Subject: [PATCH 7/8] Automated CHANGELOG.md update Signed-off-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6b5fde63f..9ce6d6fd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - feat: move code and debug [`5b81b36`](https://github.com/nevermined-io/sdk-js/commit/5b81b36b59e2115b944ad38fe26274eba20bd62d) - Automated CHANGELOG.md update [`0e43079`](https://github.com/nevermined-io/sdk-js/commit/0e43079df13c681d6656527828a6369dd183bf83) +- fix: build [`b5caa1e`](https://github.com/nevermined-io/sdk-js/commit/b5caa1e2d66f8bfda4cd5eb736df473ba1b91579) #### [v3.0.17-rc0](https://github.com/nevermined-io/sdk-js/compare/v3.0.16...v3.0.17-rc0) From f97c839457fd71bf53c02b07a94f792f3dacf84e Mon Sep 17 00:00:00 2001 From: enrique Date: Thu, 11 Jul 2024 14:25:45 +0200 Subject: [PATCH 8/8] fix: working correctly --- CHANGELOG.md | 8 ++++---- package.json | 2 +- src/nevermined/api/RegistryBaseApi.ts | 3 --- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9ce6d6fd8..1a786e9e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2092,7 +2092,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 2 May 2022 -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Adding v0.19.21 Changelog updates [`c93cdc5`](https://github.com/nevermined-io/sdk-js/commit/c93cdc55f139a43db4130ccb0f80924d2645a931) #### [v0.19.21](https://github.com/nevermined-io/sdk-js/compare/v0.19.20...v0.19.21) @@ -2355,7 +2355,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). > 18 January 2022 -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Adding v0.17.2 Changelog updates [`5eddda4`](https://github.com/nevermined-io/sdk-js/commit/5eddda43954e013e6e6f7344c9a877d801aacb5c) @@ -2861,7 +2861,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/sync develop [`#268`](https://github.com/nevermined-io/sdk-js/pull/268) - Quick fix for non-eip1559 networks [`#266`](https://github.com/nevermined-io/sdk-js/pull/266) - integrate Permissions and refactor search query [`#264`](https://github.com/nevermined-io/sdk-js/pull/264) -- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) +- add aave service agreement to ddo when creating nft721 asset [`#248`](https://github.com/nevermined-io/sdk-js/pull/248) - Get the keeper version from the artifacts instead of package version [`#244`](https://github.com/nevermined-io/sdk-js/pull/244) - replace `metadata-api` url by `marketplace-api` and sort type [`#243`](https://github.com/nevermined-io/sdk-js/pull/243) - fixing issues with BigNumbers [`#246`](https://github.com/nevermined-io/sdk-js/pull/246) @@ -2900,7 +2900,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog). - Feature/190 add did to sec markets [`#191`](https://github.com/nevermined-io/sdk-js/pull/191) - Adding utility methods for getting nft token uri [`#189`](https://github.com/nevermined-io/sdk-js/pull/189) - Lint ... [`#187`](https://github.com/nevermined-io/sdk-js/pull/187) -- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) +- Removing not used parameter [`#186`](https://github.com/nevermined-io/sdk-js/pull/186) - [wip] Create agreement+pay in one transaction [`#183`](https://github.com/nevermined-io/sdk-js/pull/183) - Adapting to contracts `v1.3.3` [`#177`](https://github.com/nevermined-io/sdk-js/pull/177) - Correct typo in route [`#184`](https://github.com/nevermined-io/sdk-js/pull/184) diff --git a/package.json b/package.json index 02ffae987..cf3a65a7b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nevermined-io/sdk", - "version": "3.0.17-rc1", + "version": "3.0.17", "description": "Javascript SDK for connecting with Nevermined Data Platform ", "main": "./dist/node/sdk.js", "typings": "./dist/node/sdk.d.ts", diff --git a/src/nevermined/api/RegistryBaseApi.ts b/src/nevermined/api/RegistryBaseApi.ts index aa3805838..045ea1a95 100644 --- a/src/nevermined/api/RegistryBaseApi.ts +++ b/src/nevermined/api/RegistryBaseApi.ts @@ -434,9 +434,6 @@ export abstract class RegistryBaseApi extends Instantiable { ddo._nvm.versions.push(ddoVersion) ddo.updated = ddoVersion.updated - this.logger.log(publishMetadataOptions) - this.logger.log(PublishMetadataOptions.OnlyMetadataAPI) - this.logger.log(publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) if (publishMetadataOptions != PublishMetadataOptions.OnlyMetadataAPI) { observer.next(UpdateProgressStep.StoringImmutableDDO) try {