@oceanprotocol/lib 5.0.5 → 5.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +44 -9
  2. package/CodeExamples.md +8 -4
  3. package/ComputeExamples.md +4 -2
  4. package/dist/lib.cjs +1 -1
  5. package/dist/lib.cjs.map +1 -1
  6. package/dist/lib.modern.js +1 -1
  7. package/dist/lib.modern.js.map +1 -1
  8. package/dist/lib.module.mjs +1 -1
  9. package/dist/lib.module.mjs.map +1 -1
  10. package/dist/lib.umd.js +1 -1
  11. package/dist/lib.umd.js.map +1 -1
  12. package/dist/types/config/Config.d.ts +0 -8
  13. package/dist/types/contracts/Dispenser.d.ts +1 -1
  14. package/dist/types/contracts/EnterpriseFeeCollector.d.ts +2 -1
  15. package/dist/types/contracts/Escrow.d.ts +12 -9
  16. package/dist/types/contracts/FixedRateExchange.d.ts +0 -1
  17. package/dist/types/contracts/NFT.d.ts +1 -1
  18. package/dist/types/contracts/index.d.ts +0 -6
  19. package/dist/types/services/Aquarius.d.ts +3 -2
  20. package/dist/types/services/Provider.d.ts +5 -3
  21. package/dist/types/utils/Assets.d.ts +2 -1
  22. package/dist/types/utils/TokenUtils.d.ts +2 -1
  23. package/docs/modules.md +0 -6
  24. package/package.json +5 -5
  25. package/dist/types/contracts/df/DfRewards.d.ts +0 -31
  26. package/dist/types/contracts/df/DfStrategyV1.d.ts +0 -21
  27. package/dist/types/contracts/ve/VeAllocate.d.ts +0 -38
  28. package/dist/types/contracts/ve/VeFeeDistributor.d.ts +0 -29
  29. package/dist/types/contracts/ve/VeFeeEstimate.d.ts +0 -14
  30. package/dist/types/contracts/ve/VeOcean.d.ts +0 -68
  31. package/docs/classes/DfRewards.md +0 -345
  32. package/docs/classes/DfStrategyV1.md +0 -313
  33. package/docs/classes/VeAllocate.md +0 -372
  34. package/docs/classes/VeFeeDistributor.md +0 -325
  35. package/docs/classes/VeFeeEstimate.md +0 -281
  36. package/docs/classes/VeOcean.md +0 -513
package/CHANGELOG.md CHANGED
@@ -4,8 +4,41 @@ 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
+ #### [v5.1.0](https://github.com/oceanprotocol/ocean.js/compare/v5.0.6...v5.1.0)
8
+
9
+ - add signature for encrypt [`#2037`](https://github.com/oceanprotocol/ocean.js/pull/2037)
10
+ - adapt createAsset to accept baseToken and baseTokenDecimals, remove h… [`#2030`](https://github.com/oceanprotocol/ocean.js/pull/2030)
11
+ - feat: cleanup unused logic [`#2031`](https://github.com/oceanprotocol/ocean.js/pull/2031)
12
+ - Bump lodash and release-it [`#2032`](https://github.com/oceanprotocol/ocean.js/pull/2032)
13
+ - add copilot instructions [`#2029`](https://github.com/oceanprotocol/ocean.js/pull/2029)
14
+ - remove legacy files [`6eac0c1`](https://github.com/oceanprotocol/ocean.js/commit/6eac0c1e0fc50c6eb35a1417f86d9be2790b174f)
15
+ - fixed conflicts [`adcd480`](https://github.com/oceanprotocol/ocean.js/commit/adcd4809dcf014fc221ba3f383ab2fda901e53a8)
16
+ - add optional tokenDecimals param [`f1fcf29`](https://github.com/oceanprotocol/ocean.js/commit/f1fcf299393697e32729faef8c2c2996afbc69d3)
17
+
18
+ #### [v5.0.6](https://github.com/oceanprotocol/ocean.js/compare/v5.0.5...v5.0.6)
19
+
20
+ > 21 January 2026
21
+
22
+ - chore: add support for others token decimals that are not 18 [`#2024`](https://github.com/oceanprotocol/ocean.js/pull/2024)
23
+ - Revert "chore: test deposit withdraw token 6 decimals" [`#2026`](https://github.com/oceanprotocol/ocean.js/pull/2026)
24
+ - chore: test deposit withdraw token 6 decimals [`#2025`](https://github.com/oceanprotocol/ocean.js/pull/2025)
25
+ - Bump typedoc-plugin-markdown from 3.17.1 to 4.0.3 [`#2020`](https://github.com/oceanprotocol/ocean.js/pull/2020)
26
+ - Bump @typescript-eslint/eslint-plugin from 6.21.0 to 7.0.0 [`#2021`](https://github.com/oceanprotocol/ocean.js/pull/2021)
27
+ - Bump chai from 5.2.1 to 6.2.2 [`#2022`](https://github.com/oceanprotocol/ocean.js/pull/2022)
28
+ - add n8n flow [`#2023`](https://github.com/oceanprotocol/ocean.js/pull/2023)
29
+ - Bump tsx from 4.20.3 to 4.20.6 [`#1997`](https://github.com/oceanprotocol/ocean.js/pull/1997)
30
+ - Bump mocha from 11.7.1 to 11.7.3 [`#1999`](https://github.com/oceanprotocol/ocean.js/pull/1999)
31
+ - Bump min-document from 2.19.0 to 2.19.2 [`#2012`](https://github.com/oceanprotocol/ocean.js/pull/2012)
32
+ - Bump js-yaml from 3.14.1 to 3.14.2 [`#2015`](https://github.com/oceanprotocol/ocean.js/pull/2015)
33
+ - Bump jws from 3.2.2 to 3.2.3 [`#2019`](https://github.com/oceanprotocol/ocean.js/pull/2019)
34
+ - Release 5.0.6 [`bf893d0`](https://github.com/oceanprotocol/ocean.js/commit/bf893d09823607ac7d3a9cfff9e50a0e4796c5fe)
35
+ - more checks [`43029b1`](https://github.com/oceanprotocol/ocean.js/commit/43029b10ec2e83c68bada4b8529226b64f94b0fb)
36
+ - chore: call amountToUnits from smart contract to detect decimals [`306edf7`](https://github.com/oceanprotocol/ocean.js/commit/306edf777d3345bebd3073634d0e0eeb11ab6d36)
37
+
7
38
  #### [v5.0.5](https://github.com/oceanprotocol/ocean.js/compare/v5.0.4...v5.0.5)
8
39
 
40
+ > 24 November 2025
41
+
9
42
  - Deps/bump_contracts_to_2_5_0 [`#2016`](https://github.com/oceanprotocol/ocean.js/pull/2016)
10
43
  - export addrs functions [`#2018`](https://github.com/oceanprotocol/ocean.js/pull/2018)
11
44
  - Feature/fix enterprise fee [`#2014`](https://github.com/oceanprotocol/ocean.js/pull/2014)
@@ -14,6 +47,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
14
47
  - add escrow address to config [`#2008`](https://github.com/oceanprotocol/ocean.js/pull/2008)
15
48
  - Update docs [`#2006`](https://github.com/oceanprotocol/ocean.js/pull/2006)
16
49
  - update codeowners [`#2005`](https://github.com/oceanprotocol/ocean.js/pull/2005)
50
+ - Release 5.0.5 [`bada383`](https://github.com/oceanprotocol/ocean.js/commit/bada383843f05bf73816216e710da55d4ce40607)
17
51
 
18
52
  #### [v5.0.4](https://github.com/oceanprotocol/ocean.js/compare/v5.0.3...v5.0.4)
19
53
 
@@ -85,7 +119,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
85
119
  - Feature/contracts_240 [`#1979`](https://github.com/oceanprotocol/ocean.js/pull/1979)
86
120
  - Release 5.0.0-next.2 [`fedd4c2`](https://github.com/oceanprotocol/ocean.js/commit/fedd4c273d86fb3f85990d7a289be4c3a4270832)
87
121
 
88
- #### [v5.0.0-next.1](https://github.com/oceanprotocol/ocean.js/compare/v4.3.6...v5.0.0-next.1)
122
+ #### [v5.0.0-next.1](https://github.com/oceanprotocol/ocean.js/compare/v4.3.7...v5.0.0-next.1)
89
123
 
90
124
  > 1 August 2025
91
125
 
@@ -96,6 +130,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
96
130
  - Feature/update ethers [`#1969`](https://github.com/oceanprotocol/ocean.js/pull/1969)
97
131
  - Release 5.0.0-next.1 [`cf92038`](https://github.com/oceanprotocol/ocean.js/commit/cf92038208679177ab6af112526f5547feb0f11e)
98
132
 
133
+ #### [v4.3.7](https://github.com/oceanprotocol/ocean.js/compare/v4.3.6...v4.3.7)
134
+
135
+ > 2 December 2025
136
+
137
+ - Release 4.3.7 [`46a157f`](https://github.com/oceanprotocol/ocean.js/commit/46a157fc93d0d0cb4aca29fa529ea5ddd70648d8)
138
+ - bump contracts to 2.5.0 [`7799229`](https://github.com/oceanprotocol/ocean.js/commit/7799229b0e2c6221884afe13420ef6454bc5898f)
139
+
99
140
  #### [v4.3.6](https://github.com/oceanprotocol/ocean.js/compare/v4.3.5...v4.3.6)
100
141
 
101
142
  > 24 November 2025
@@ -112,19 +153,13 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
112
153
  - remove typo [`f199f4a`](https://github.com/oceanprotocol/ocean.js/commit/f199f4af809eb85249fe0c59303fcc3207d8e7a7)
113
154
  - export EnterpriseFeeCollector [`68712a2`](https://github.com/oceanprotocol/ocean.js/commit/68712a2af17824bb8fc78824842376e35f582487)
114
155
 
115
- #### [v4.3.4](https://github.com/oceanprotocol/ocean.js/compare/v4.3.3...v4.3.4)
156
+ #### [v4.3.4](https://github.com/oceanprotocol/ocean.js/compare/v4.3.2...v4.3.4)
116
157
 
117
158
  > 15 November 2025
118
159
 
160
+ - add policy server endpoints [`#1974`](https://github.com/oceanprotocol/ocean.js/pull/1974)
119
161
  - add EnterpriseFee [`b502882`](https://github.com/oceanprotocol/ocean.js/commit/b502882d05375eda326166608730a11e779c6f42)
120
162
  - Release 4.3.4 [`e45a7de`](https://github.com/oceanprotocol/ocean.js/commit/e45a7defa239f6800eb68a13e1a9a3d9662f509d)
121
- - bump contracts [`0b226a1`](https://github.com/oceanprotocol/ocean.js/commit/0b226a107f309c6b200249d498ae7568343fcb92)
122
-
123
- #### [v4.3.3](https://github.com/oceanprotocol/ocean.js/compare/v4.3.2...v4.3.3)
124
-
125
- > 1 August 2025
126
-
127
- - add policy server endpoints [`#1974`](https://github.com/oceanprotocol/ocean.js/pull/1974)
128
163
  - Release 4.3.3 [`6d6d4cf`](https://github.com/oceanprotocol/ocean.js/commit/6d6d4cfe57f2a3dee73b4957ff2f144c0e7ff9d7)
129
164
 
130
165
  #### [v4.3.2](https://github.com/oceanprotocol/ocean.js/compare/v4.3.1...v4.3.2)
package/CodeExamples.md CHANGED
@@ -380,7 +380,8 @@ Next, let's encrypt the file(s) using provider
380
380
  fixedDDO.services[0].files = await ProviderInstance.encrypt(
381
381
  ASSET_URL,
382
382
  fixedDDO.chainId,
383
- providerUrl
383
+ providerUrl,
384
+ publisherAccount
384
385
  )
385
386
  fixedDDO.services[0].datatokenAddress = freDatatokenAddress
386
387
 
@@ -392,7 +393,8 @@ Now let's console log the DID to check everything is working
392
393
  const providerResponse = await ProviderInstance.encrypt(
393
394
  fixedDDO,
394
395
  fixedDDO.chainId,
395
- providerUrl
396
+ providerUrl,
397
+ publisherAccount
396
398
  )
397
399
  const encryptedDDO = await providerResponse
398
400
 
@@ -679,7 +681,8 @@ Now we need to encrypt file(s) using provider
679
681
  fixedDDO.services[0].files = await ProviderInstance.encrypt(
680
682
  ASSET_URL,
681
683
  fixedDDO.chainId,
682
- providerUrl
684
+ providerUrl,
685
+ publisherAccount
683
686
  )
684
687
  fixedDDO.services[0].datatokenAddress = dispenserDatatokenAddress
685
688
 
@@ -688,7 +691,8 @@ Now we need to encrypt file(s) using provider
688
691
  const encryptedDDO = await ProviderInstance.encrypt(
689
692
  fixedDDO,
690
693
  fixedDDO.chainId,
691
- providerUrl
694
+ providerUrl,
695
+ publisherAccount
692
696
  )
693
697
  const isAssetValid: ValidateMetadata = await aquarius.validate(
694
698
  fixedDDO,
@@ -350,7 +350,8 @@ async function createAssetHelper(
350
350
  ddo.services[0].files = await ProviderInstance.encrypt(
351
351
  assetUrl,
352
352
  Number(chainId),
353
- providerUrl
353
+ providerUrl,
354
+ owner
354
355
  )
355
356
  ddo.services[0].datatokenAddress = datatokenAddressAsset
356
357
  ddo.services[0].serviceEndpoint = providerUrl
@@ -361,7 +362,8 @@ async function createAssetHelper(
361
362
  const encryptedResponse = await ProviderInstance.encrypt(
362
363
  ddo,
363
364
  Number(chainId),
364
- providerUrl
365
+ providerUrl,
366
+ owner
365
367
  )
366
368
  const validateResult = await aquariusInstance.validate(ddo, owner, providerUrl)
367
369
  await nft.setMetadata(