@oceanprotocol/lib 1.0.0 → 1.1.2

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,8 +4,33 @@ 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
+ #### [v1.1.2](https://github.com/oceanprotocol/ocean.js/compare/v1.1.1...v1.1.2)
8
+
9
+ - manual bump fix [`5674a54`](https://github.com/oceanprotocol/ocean.js/commit/5674a547d1d367ce88b3595f0be8ebbf12274266)
10
+
11
+ #### [v1.1.1](https://github.com/oceanprotocol/ocean.js/compare/v1.1.0...v1.1.1)
12
+
13
+ > 15 June 2022
14
+
15
+ - Release 1.1.1 [`ea48e01`](https://github.com/oceanprotocol/ocean.js/commit/ea48e015ac8299f71d57a929f8f30c5d1a8446e7)
16
+ - manual bump fix [`a362410`](https://github.com/oceanprotocol/ocean.js/commit/a36241004b1d9578ec5c02d9d6e64d9750c53a7b)
17
+
18
+ #### [v1.1.0](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0...v1.1.0)
19
+
20
+ > 15 June 2022
21
+
22
+ - Issue-#1485: Remove imports of ABIs in the tests and use utility tranfer(), mint(), balance() functions [`#1486`](https://github.com/oceanprotocol/ocean.js/pull/1486)
23
+ - Bump @types/node from 17.0.35 to 17.0.44 [`#1513`](https://github.com/oceanprotocol/ocean.js/pull/1513)
24
+ - Bump eslint-config-oceanprotocol from 1.5.0 to 2.0.1 [`#1466`](https://github.com/oceanprotocol/ocean.js/pull/1466)
25
+ - update to new schema & compute fixes [`#1510`](https://github.com/oceanprotocol/ocean.js/pull/1510)
26
+ - Release 1.1.0 [`112c27e`](https://github.com/oceanprotocol/ocean.js/commit/112c27edab58ef0681ea3e87fb09978411924753)
27
+
7
28
  #### [v1.0.0](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.45...v1.0.0)
8
29
 
30
+ > 8 June 2022
31
+
32
+ - Release 1.0.0 [`04735dd`](https://github.com/oceanprotocol/ocean.js/commit/04735dd8243f4aa292e4550f83f11bf41ba11997)
33
+
9
34
  #### [v1.0.0-next.45](https://github.com/oceanprotocol/ocean.js/compare/v1.0.0-next.44...v1.0.0-next.45)
10
35
 
11
36
  > 5 June 2022
package/CodeExamples.md CHANGED
@@ -98,6 +98,7 @@ import {
98
98
  DispenserCreationParams,
99
99
  downloadFile,
100
100
  Erc20CreateParams,
101
+ Files,
101
102
  FixedRateExchange,
102
103
  FreCreationParams,
103
104
  getHash,
@@ -153,13 +154,17 @@ We also define some constants that we will use:
153
154
 
154
155
  We will need a file to publish, so here we define the file that we intend to publish.
155
156
  ```Typescript
156
- const ASSET_URL = [
157
- {
158
- type: 'url',
159
- url: 'https://raw.githubusercontent.com/oceanprotocol/testdatasets/main/shs_dataset_test.txt',
160
- method: 'GET'
161
- }
162
- ]
157
+ const ASSET_URL: Files = {
158
+ datatokenAddress: '0x0',
159
+ nftAddress: '0x0',
160
+ files: [
161
+ {
162
+ type: 'url',
163
+ url: 'https://raw.githubusercontent.com/oceanprotocol/testdatasets/main/shs_dataset_test.txt',
164
+ method: 'GET'
165
+ }
166
+ ]
167
+ }
163
168
  ```
164
169
 
165
170
  Next, we define the metadata that will describe our data asset. This is what we call the DDO
@@ -167,7 +172,7 @@ Next, we define the metadata that will describe our data asset. This is what we
167
172
  const DDO = {
168
173
  '@context': ['https://w3id.org/did/v1'],
169
174
  id: '',
170
- version: '4.0.0',
175
+ version: '4.1.0',
171
176
  chainId: 4,
172
177
  nftAddress: '0x0',
173
178
  metadata: {
@@ -324,6 +329,8 @@ Now we update the ddo and set the right did
324
329
  ```
325
330
  Next we encrypt the file or files using Ocean Provider. The provider is an off chain proxy built specifically for this task
326
331
  ```Typescript
332
+ ASSET_URL.datatokenAddress = poolDatatokenAddress
333
+ ASSET_URL.nftAddress = poolNftAddress
327
334
  const encryptedFiles = await ProviderInstance.encrypt(ASSET_URL, providerUrl)
328
335
  DDO.services[0].files = await encryptedFiles
329
336
  DDO.services[0].datatokenAddress = poolDatatokenAddress
@@ -587,6 +594,8 @@ Now we are going to update the ddo and set the did
587
594
  ```
588
595
  Next, let's encrypt the file(s) using provider
589
596
  ```Typescript
597
+ ASSET_URL.datatokenAddress = freDatatokenAddress
598
+ ASSET_URL.nftAddress = freNftAddress
590
599
  const encryptedFiles = await ProviderInstance.encrypt(ASSET_URL, providerUrl)
591
600
  DDO.services[0].files = await encryptedFiles
592
601
  DDO.services[0].datatokenAddress = freDatatokenAddress
@@ -801,6 +810,8 @@ Lets start by updating the ddo and setting the did
801
810
  ```
802
811
  Now we need to encrypt file(s) using provider
803
812
  ```Typescript
813
+ ASSET_URL.datatokenAddress = dispenserDatatokenAddress
814
+ ASSET_URL.nftAddress = dispenserNftAddress
804
815
  const encryptedFiles = await ProviderInstance.encrypt(ASSET_URL, providerUrl)
805
816
  DDO.services[0].files = await encryptedFiles
806
817
  DDO.services[0].datatokenAddress = dispenserDatatokenAddress