@oceanprotocol/lib 4.1.2 → 4.1.4

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
@@ -4,9 +4,25 @@ All notable changes to this project will be documented in this file. Dates are d
4
4
 
5
5
  Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
6
6
 
7
+ #### [v4.1.4](https://github.com/oceanprotocol/ocean.js/compare/v4.1.3...v4.1.4)
8
+
9
+ - Release 4.1.3 [`#1956`](https://github.com/oceanprotocol/ocean.js/pull/1956)
10
+ - Update ddo.js version. [`#1954`](https://github.com/oceanprotocol/ocean.js/pull/1954)
11
+
12
+ #### [v4.1.3](https://github.com/oceanprotocol/ocean.js/compare/v4.1.2...v4.1.3)
13
+
14
+ > 2 June 2025
15
+
16
+ - Fix bugs and log fixes [`#1949`](https://github.com/oceanprotocol/ocean.js/pull/1949)
17
+ - Release 4.1.3 [`f96befa`](https://github.com/oceanprotocol/ocean.js/commit/f96befa4c32b742ec7f962c2bd7667ad59515972)
18
+ - Bump base-x from 3.0.10 to 3.0.11 [`b6338db`](https://github.com/oceanprotocol/ocean.js/commit/b6338dbcc7bbb94c3a67b5da8b37c642dd2eb09c)
19
+
7
20
  #### [v4.1.2](https://github.com/oceanprotocol/ocean.js/compare/v4.1.1...v4.1.2)
8
21
 
22
+ > 27 May 2025
23
+
9
24
  - Fix pricing decode [`#1947`](https://github.com/oceanprotocol/ocean.js/pull/1947)
25
+ - Release 4.1.2 [`ab70372`](https://github.com/oceanprotocol/ocean.js/commit/ab70372186895af2c13f682bf35a127e7e59db89)
10
26
 
11
27
  #### [v4.1.1](https://github.com/oceanprotocol/ocean.js/compare/v4.1.0...v4.1.1)
12
28
 
package/CodeExamples.md CHANGED
@@ -206,8 +206,8 @@ Next, we define the metadata that will describe our data asset. This is what we
206
206
  const config = new ConfigHelper().getConfig(
207
207
  parseInt(String((await publisherAccount.provider.getNetwork()).chainId))
208
208
  )
209
- if (process.env.OCEAN_NODE_URL) {
210
- config.oceanNodeUri = process.env.OCEAN_NODE_URL
209
+ if (process.env.NODE_URL) {
210
+ config.oceanNodeUri = process.env.NODE_URL
211
211
  }
212
212
  aquarius = new Aquarius(config?.oceanNodeUri)
213
213
  providerUrl = config?.oceanNodeUri
@@ -397,7 +397,12 @@ Now let's console log the DID to check everything is working
397
397
  providerUrl
398
398
  )
399
399
  const encryptedDDO = await providerResponse
400
- const isAssetValid: ValidateMetadata = await aquarius.validate(fixedDDO)
400
+
401
+ const isAssetValid: ValidateMetadata = await aquarius.validate(
402
+ fixedDDO,
403
+ publisherAccount,
404
+ providerUrl
405
+ )
401
406
  assert(isAssetValid.valid === true, 'Published asset is not valid')
402
407
  await nft.setMetadata(
403
408
  freNftAddress,
@@ -695,7 +700,11 @@ Now we need to encrypt file(s) using provider
695
700
  fixedDDO.chainId,
696
701
  providerUrl
697
702
  )
698
- const isAssetValid: ValidateMetadata = await aquarius.validate(fixedDDO)
703
+ const isAssetValid: ValidateMetadata = await aquarius.validate(
704
+ fixedDDO,
705
+ publisherAccount,
706
+ providerUrl
707
+ )
699
708
  assert(isAssetValid.valid === true, 'Published asset is not valid')
700
709
  await nft.setMetadata(
701
710
  dispenserNftAddress,
@@ -213,8 +213,8 @@ const DATASET_DDO: DDO = {
213
213
  serviceEndpoint: 'http://127.0.0.1:8001',
214
214
  timeout: 300,
215
215
  compute: {
216
- publisherTrustedAlgorithmPublishers: [] as any,
217
- publisherTrustedAlgorithms: [] as any,
216
+ publisherTrustedAlgorithmPublishers: ['*'] as any,
217
+ publisherTrustedAlgorithms: ['*'] as any,
218
218
  allowRawAlgorithm: false,
219
219
  allowNetworkAccess: true
220
220
  }
@@ -353,7 +353,7 @@ async function createAssetHelper(
353
353
  ddo.id = 'did:op:' + SHA256(ethers.utils.getAddress(nftAddress) + chain.toString(10))
354
354
 
355
355
  const encryptedResponse = await ProviderInstance.encrypt(ddo, chain, providerUrl)
356
- const validateResult = await aquariusInstance.validate(ddo)
356
+ const validateResult = await aquariusInstance.validate(ddo, owner, providerUrl)
357
357
  await nft.setMetadata(
358
358
  nftAddress,
359
359
  await owner.getAddress(),
@@ -433,8 +433,8 @@ We need to load the configuration. Add the following code into your `run(){ }` f
433
433
  const config = new ConfigHelper().getConfig(
434
434
  parseInt(String((await publisherAccount.provider.getNetwork()).chainId))
435
435
  )
436
- if (process.env.OCEAN_NODE_URL) {
437
- config.oceanNodeUri = process.env.OCEAN_NODE_URL
436
+ if (process.env.NODE_URL) {
437
+ config.oceanNodeUri = process.env.NODE_URL
438
438
  }
439
439
  aquariusInstance = new Aquarius(config?.oceanNodeUri)
440
440
  providerUrl = config?.oceanNodeUri