@oceanprotocol/lib 5.1.3 → 6.1.0

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,17 +4,40 @@ 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
- #### [5.1.3](https://github.com/oceanprotocol/ocean.js/compare/5.2.0...5.1.3)
7
+ #### [v6.1.0](https://github.com/oceanprotocol/ocean.js/compare/v6.0.0...v6.1.0)
8
8
 
9
+ - Bump decimal.js from 10.5.0 to 10.6.0 [`#2047`](https://github.com/oceanprotocol/ocean.js/pull/2047)
10
+ - Bump eslint-plugin-prettier from 4.2.1 to 4.2.5 [`#2049`](https://github.com/oceanprotocol/ocean.js/pull/2049)
11
+ - Bump svgo from 2.8.0 to 2.8.2 [`#2051`](https://github.com/oceanprotocol/ocean.js/pull/2051)
12
+ - Feature/storage updates [`#2052`](https://github.com/oceanprotocol/ocean.js/pull/2052)
13
+
14
+ ### [v6.0.0](https://github.com/oceanprotocol/ocean.js/compare/5.2.0...v6.0.0)
15
+
16
+ > 27 February 2026
17
+
18
+ - refactor signatures + add private docker registry [`#2041`](https://github.com/oceanprotocol/ocean.js/pull/2041)
19
+ - Bump rollup from 2.79.2 to 2.80.0 [`#2046`](https://github.com/oceanprotocol/ocean.js/pull/2046)
20
+ - Bump undici and @rdfjs/serializer-jsonld-ext [`#2039`](https://github.com/oceanprotocol/ocean.js/pull/2039)
21
+ - Bump ajv from 6.12.6 to 6.14.0 [`#2042`](https://github.com/oceanprotocol/ocean.js/pull/2042)
22
+ - Bump bn.js and web3 [`#2043`](https://github.com/oceanprotocol/ocean.js/pull/2043)
23
+ - Bump basic-ftp from 5.0.5 to 5.2.0 [`#2044`](https://github.com/oceanprotocol/ocean.js/pull/2044)
24
+ - use new escrow address [`#2045`](https://github.com/oceanprotocol/ocean.js/pull/2045)
9
25
  - feat(logs): add downloadNodeLogs provider function [`#2038`](https://github.com/oceanprotocol/ocean.js/pull/2038)
26
+ - Release 6.0.0 [`c2a48da`](https://github.com/oceanprotocol/ocean.js/commit/c2a48daf8aad897a1f7ed797d65ea9f910cf3722)
27
+ - Release 5.1.3 [`cbf10ae`](https://github.com/oceanprotocol/ocean.js/commit/cbf10aeb59b67328d4bbd3a3c818985e2152a228)
10
28
  - Release 5.1.1 [`c1dea5f`](https://github.com/oceanprotocol/ocean.js/commit/c1dea5f0df8c574e99721fa7444c4e87baf633ee)
11
- - Release 5.1.2 [`0b8febb`](https://github.com/oceanprotocol/ocean.js/commit/0b8febb1603e38eb8adee04e2acc85f3437826ec)
12
- - fix url path [`1d5d373`](https://github.com/oceanprotocol/ocean.js/commit/1d5d37333836d286db7288c087568ec8d5e529f2)
13
29
 
14
- #### [5.2.0](https://github.com/oceanprotocol/ocean.js/compare/v5.1.2...5.2.0)
30
+ #### [5.2.0](https://github.com/oceanprotocol/ocean.js/compare/v5.1.3...5.2.0)
15
31
 
16
32
  > 3 February 2026
17
33
 
34
+ #### [v5.1.3](https://github.com/oceanprotocol/ocean.js/compare/v5.1.2...v5.1.3)
35
+
36
+ > 23 February 2026
37
+
38
+ - feat(logs): add downloadNodeLogs provider function [`#2038`](https://github.com/oceanprotocol/ocean.js/pull/2038)
39
+ - Release 5.1.3 [`cbf10ae`](https://github.com/oceanprotocol/ocean.js/commit/cbf10aeb59b67328d4bbd3a3c818985e2152a228)
40
+
18
41
  #### [v5.1.2](https://github.com/oceanprotocol/ocean.js/compare/v5.1.1...v5.1.2)
19
42
 
20
43
  > 3 February 2026
@@ -137,7 +137,7 @@ import {
137
137
  ComputeAlgorithm,
138
138
  ComputeAsset,
139
139
  Config,
140
- Files,
140
+ StorageObject,
141
141
  NftCreateData,
142
142
  DatatokenCreateParams,
143
143
  sendTx,
@@ -147,7 +147,8 @@ import {
147
147
  amountToUnits,
148
148
  isDefined,
149
149
  ComputeResourceRequest,
150
- unitsToAmount
150
+ unitsToAmount,
151
+ AssetFiles
151
152
  } from '../../src/index.js'
152
153
  import crypto from 'crypto-js'
153
154
  import { DDO } from '@oceanprotocol/ddo-js'
@@ -160,29 +161,18 @@ const { SHA256 } = crypto
160
161
 
161
162
  We will need two files to publish, one as dataset and one as algorithm, so here we define the files that we intend to publish.
162
163
  ```Typescript
163
- const DATASET_ASSET_URL: Files = {
164
- datatokenAddress: '0x0',
165
- nftAddress: '0x0',
166
- files: [
167
- {
168
- type: 'url',
169
- url: 'https://raw.githubusercontent.com/oceanprotocol/testdatasets/main/shs_dataset_test.txt',
170
- method: 'GET'
171
- }
172
- ]
164
+ const DATASET_ASSET_URL: StorageObject = {
165
+ type: 'url',
166
+ url: 'https://raw.githubusercontent.com/oceanprotocol/testdatasets/main/shs_dataset_test.txt',
167
+ method: 'GET'
173
168
  }
174
169
 
175
- const ALGORITHM_ASSET_URL: Files = {
176
- datatokenAddress: '0x0',
177
- nftAddress: '0x0',
178
- files: [
179
- {
180
- type: 'url',
181
- url: 'https://raw.githubusercontent.com/oceanprotocol/testdatasets/main/shs_dataset_test.txt',
182
- method: 'GET'
183
- }
184
- ]
170
+ const ALGORITHM_ASSET_URL: StorageObject = {
171
+ type: 'url',
172
+ url: 'https://raw.githubusercontent.com/oceanprotocol/testdatasets/main/shs_dataset_test.txt',
173
+ method: 'GET'
185
174
  }
175
+
186
176
  ```
187
177
 
188
178
  Next, we define the metadata for the dataset and algorithm that will describe our data assets. This is what we call the DDOs
@@ -304,7 +294,7 @@ async function createAssetHelper(
304
294
  name: string,
305
295
  symbol: string,
306
296
  owner: Signer,
307
- assetUrl: Files,
297
+ assetFiles: StorageObject[],
308
298
  ddo: DDO,
309
299
  providerUrl: string
310
300
  ) {
@@ -345,8 +335,11 @@ async function createAssetHelper(
345
335
  const nftAddress = nftCreatedEvent.args.newTokenAddress
346
336
  const datatokenAddressAsset = tokenCreatedEvent.args.newTokenAddress
347
337
  // create the files encrypted string
348
- assetUrl.datatokenAddress = datatokenAddressAsset
349
- assetUrl.nftAddress = nftAddress
338
+ const assetUrl: AssetFiles = {
339
+ nftAddress,
340
+ datatokenAddress: datatokenAddressAsset,
341
+ files: assetFiles
342
+ }
350
343
  ddo.services[0].files = await ProviderInstance.encrypt(
351
344
  assetUrl,
352
345
  Number(chainId),
@@ -533,7 +526,7 @@ you need to mint oceans to mentioned accounts only if you are using barge to tes
533
526
  'D1Min',
534
527
  'D1M',
535
528
  publisherAccount,
536
- DATASET_ASSET_URL,
529
+ [DATASET_ASSET_URL],
537
530
  DATASET_DDO,
538
531
  providerUrl
539
532
  )
@@ -552,7 +545,7 @@ Now, let's check that we successfully published a dataset (create NFT + Datatoke
552
545
  'D1Min',
553
546
  'D1M',
554
547
  publisherAccount,
555
- ALGORITHM_ASSET_URL,
548
+ [ALGORITHM_ASSET_URL],
556
549
  ALGORITHM_DDO,
557
550
  providerUrl
558
551
  )