@oceanprotocol/lib 4.1.2 → 4.1.3
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 +8 -0
- package/CodeExamples.md +13 -4
- package/ComputeExamples.md +3 -3
- package/dist/lib.cjs +1 -1
- package/dist/lib.cjs.map +1 -1
- package/dist/lib.modern.js +1 -1
- package/dist/lib.modern.js.map +1 -1
- package/dist/lib.module.mjs +1 -1
- package/dist/lib.module.mjs.map +1 -1
- package/dist/lib.umd.js +1 -1
- package/dist/lib.umd.js.map +1 -1
- package/dist/types/services/Aquarius.d.ts +1 -1
- package/dist/types/utils/Addresses.d.ts +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,9 +4,17 @@ 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.3](https://github.com/oceanprotocol/ocean.js/compare/v4.1.2...v4.1.3)
|
|
8
|
+
|
|
9
|
+
- Fix bugs and log fixes [`#1949`](https://github.com/oceanprotocol/ocean.js/pull/1949)
|
|
10
|
+
- Bump base-x from 3.0.10 to 3.0.11 [`b6338db`](https://github.com/oceanprotocol/ocean.js/commit/b6338dbcc7bbb94c3a67b5da8b37c642dd2eb09c)
|
|
11
|
+
|
|
7
12
|
#### [v4.1.2](https://github.com/oceanprotocol/ocean.js/compare/v4.1.1...v4.1.2)
|
|
8
13
|
|
|
14
|
+
> 27 May 2025
|
|
15
|
+
|
|
9
16
|
- Fix pricing decode [`#1947`](https://github.com/oceanprotocol/ocean.js/pull/1947)
|
|
17
|
+
- Release 4.1.2 [`ab70372`](https://github.com/oceanprotocol/ocean.js/commit/ab70372186895af2c13f682bf35a127e7e59db89)
|
|
10
18
|
|
|
11
19
|
#### [v4.1.1](https://github.com/oceanprotocol/ocean.js/compare/v4.1.0...v4.1.1)
|
|
12
20
|
|
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.
|
|
210
|
-
config.oceanNodeUri = process.env.
|
|
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
|
-
|
|
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(
|
|
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,
|
package/ComputeExamples.md
CHANGED
|
@@ -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.
|
|
437
|
-
config.oceanNodeUri = process.env.
|
|
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
|