@oceanprotocol/lib 4.0.0-next.1 → 4.0.1

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 (65) hide show
  1. package/.mocharc.json +8 -0
  2. package/CHANGELOG.md +77 -69
  3. package/CodeExamples.md +7 -6
  4. package/ComputeExamples.md +127 -98
  5. package/README.md +9 -0
  6. package/dist/lib.cjs +2 -0
  7. package/dist/lib.cjs.map +1 -0
  8. package/dist/lib.modern.js +1 -1
  9. package/dist/lib.modern.js.map +1 -1
  10. package/dist/lib.module.mjs +2 -0
  11. package/dist/lib.module.mjs.map +1 -0
  12. package/dist/lib.umd.js +1 -1
  13. package/dist/lib.umd.js.map +1 -1
  14. package/dist/types/@types/Compute.d.ts +46 -14
  15. package/dist/types/@types/DDO/Metadata.d.ts +1 -1
  16. package/dist/types/@types/DDO/Service.d.ts +2 -2
  17. package/dist/types/@types/File.d.ts +1 -1
  18. package/dist/types/@types/index.d.ts +20 -20
  19. package/dist/types/config/index.d.ts +2 -2
  20. package/dist/types/contracts/AccessList.d.ts +3 -3
  21. package/dist/types/contracts/AccessListFactory.d.ts +3 -3
  22. package/dist/types/contracts/Datatoken.d.ts +4 -4
  23. package/dist/types/contracts/Datatoken4.d.ts +4 -4
  24. package/dist/types/contracts/Dispenser.d.ts +3 -3
  25. package/dist/types/contracts/FixedRateExchange.d.ts +2 -2
  26. package/dist/types/contracts/NFT.d.ts +2 -2
  27. package/dist/types/contracts/NFTFactory.d.ts +3 -3
  28. package/dist/types/contracts/Router.d.ts +2 -2
  29. package/dist/types/contracts/SmartContract.d.ts +3 -3
  30. package/dist/types/contracts/SmartContractWithAddress.d.ts +3 -3
  31. package/dist/types/contracts/df/DfRewards.d.ts +1 -1
  32. package/dist/types/contracts/df/DfStrategyV1.d.ts +1 -1
  33. package/dist/types/contracts/index.d.ts +20 -20
  34. package/dist/types/contracts/ve/VeAllocate.d.ts +2 -2
  35. package/dist/types/contracts/ve/VeFeeDistributor.d.ts +2 -2
  36. package/dist/types/contracts/ve/VeFeeEstimate.d.ts +2 -2
  37. package/dist/types/contracts/ve/VeOcean.d.ts +2 -2
  38. package/dist/types/index.d.ts +5 -5
  39. package/dist/types/services/Aquarius.d.ts +7 -4
  40. package/dist/types/services/Provider.d.ts +33 -8
  41. package/dist/types/services/index.d.ts +2 -2
  42. package/dist/types/utils/Addresses.d.ts +23 -0
  43. package/dist/types/utils/Assets.d.ts +1 -23
  44. package/dist/types/utils/ContractUtils.d.ts +1 -1
  45. package/dist/types/utils/FetchHelper.d.ts +1 -1
  46. package/dist/types/utils/General.d.ts +1 -0
  47. package/dist/types/utils/OrderUtils.d.ts +5 -1
  48. package/dist/types/utils/SignatureUtils.d.ts +1 -0
  49. package/dist/types/utils/TokenUtils.d.ts +2 -2
  50. package/dist/types/utils/index.d.ts +13 -13
  51. package/docs/classes/Aquarius.md +9 -5
  52. package/docs/classes/NftFactory.md +1 -1
  53. package/docs/classes/Provider.md +39 -6
  54. package/docs/interfaces/ComputeEnvFees.md +30 -0
  55. package/docs/interfaces/ComputeEnvFeesStructure.md +20 -0
  56. package/docs/interfaces/ComputeEnvironment.md +50 -39
  57. package/docs/interfaces/ComputeResourcesPricingInfo.md +30 -0
  58. package/docs/interfaces/ComputeResourcesRequest.md +30 -0
  59. package/docs/interfaces/Metadata.md +1 -1
  60. package/docs/interfaces/RunningPlatform.md +30 -0
  61. package/package.json +30 -20
  62. package/dist/lib.js +0 -2
  63. package/dist/lib.js.map +0 -1
  64. package/dist/lib.module.js +0 -2
  65. package/dist/lib.module.js.map +0 -1
@@ -1,13 +1,13 @@
1
- export * from './Constants';
2
- export * from './ContractUtils';
3
- export * from './DatatokenName';
4
- export * from './DdoHelpers';
5
- export * from './FetchHelper';
6
- export * from './General';
7
- export * from './Logger';
8
- export * from './minAbi';
9
- export * from './SignatureUtils';
10
- export * from './TokenUtils';
11
- export * from './ProviderErrors';
12
- export * from './OrderUtils';
13
- export * from './Assets';
1
+ export * from './Constants.js';
2
+ export * from './ContractUtils.js';
3
+ export * from './DatatokenName.js';
4
+ export * from './DdoHelpers.js';
5
+ export * from './FetchHelper.js';
6
+ export * from './General.js';
7
+ export * from './Logger.js';
8
+ export * from './minAbi.js';
9
+ export * from './SignatureUtils.js';
10
+ export * from './TokenUtils.js';
11
+ export * from './ProviderErrors.js';
12
+ export * from './OrderUtils.js';
13
+ export * from './Assets.js';
@@ -18,7 +18,7 @@
18
18
  - [querySearch](Aquarius.md#querysearch)
19
19
  - [resolve](Aquarius.md#resolve)
20
20
  - [validate](Aquarius.md#validate)
21
- - [waitForAqua](Aquarius.md#waitforaqua)
21
+ - [waitForIndexer](Aquarius.md#waitForIndexer)
22
22
 
23
23
  ## Constructors
24
24
 
@@ -123,7 +123,7 @@ ___
123
123
 
124
124
  ### validate
125
125
 
126
- ▸ **validate**(`ddo`, `signal?`): `Promise`<[`ValidateMetadata`](../interfaces/ValidateMetadata.md)\>
126
+ ▸ **validate**(`ddo`, `signal?`,`signer?`,`providerUrl?`): `Promise`<[`ValidateMetadata`](../interfaces/ValidateMetadata.md)\>
127
127
 
128
128
  Validate DDO content
129
129
 
@@ -132,6 +132,8 @@ Validate DDO content
132
132
  | Name | Type | Description |
133
133
  | :------ | :------ | :------ |
134
134
  | `ddo` | [`DDO`](../interfaces/DDO.md) | DID Descriptor Object content. |
135
+ | `signer?` | `Signer` | publisher account (for signature). |
136
+ | `providerUrl?` | `string` | Provider url (to get nonce) |
135
137
  | `signal?` | `AbortSignal` | abort signal |
136
138
 
137
139
  #### Returns
@@ -146,11 +148,11 @@ Validate DDO content
146
148
 
147
149
  ___
148
150
 
149
- ### waitForAqua
151
+ ### waitForIndexer
150
152
 
151
- ▸ **waitForAqua**(`did`, `txid?`, `signal?`): `Promise`<[`Asset`](../interfaces/Asset.md)\>
153
+ ▸ **waitForIndexer**(`did`, `txid?`, `signal?`, `interval=3000`,`maxRetries=100`): `Promise`<[`Asset`](../interfaces/Asset.md)\>
152
154
 
153
- Blocks until Aqua will cache the did (or the update for that did) or timeouts
155
+ Blocks until Indexer will cache the did (or the update for that did) or timeouts
154
156
 
155
157
  #### Parameters
156
158
 
@@ -159,6 +161,8 @@ Blocks until Aqua will cache the did (or the update for that did) or timeouts
159
161
  | `did` | `string` | DID of the asset. |
160
162
  | `txid?` | `string` | used when the did exists and we expect an update with that txid. |
161
163
  | `signal?` | `AbortSignal` | abort signal |
164
+ | `interval` | `number` | retry interval in miliseconds. Default is 3000 |
165
+ | `maxRetries` | `number` | max number of retries. Default is 100 |
162
166
 
163
167
  #### Returns
164
168
 
@@ -817,7 +817,7 @@ Used as a proxy to order multiple services
817
817
 
818
818
  | Name | Type | Description |
819
819
  | :------ | :------ | :------ |
820
- | `orders` | [`TokenOrder`](../interfaces/TokenOrder.md)[] | array of of orders |
820
+ | `orders` | [`TokenOrder`](../interfaces/TokenOrder.md)[] | array of orders |
821
821
  | `estimateGas?` | `G` | if True, return gas estimate |
822
822
 
823
823
  #### Returns
@@ -97,7 +97,7 @@ ___
97
97
 
98
98
  ### computeStart
99
99
 
100
- ▸ **computeStart**(`providerUri`, `consumer`, `computeEnv`, `dataset`, `algorithm`, `signal?`, `additionalDatasets?`, `output?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
100
+ ▸ **computeStart**(`providerUri`, `signer`, `computeEnv`, `datasets`, `algorithm`, `resources`, `chainId`, `output?`, `freeEnvironment`, `signal?`): `Promise`<[`ComputeJob`](../interfaces/ComputeJob.md) \| [`ComputeJob`](../interfaces/ComputeJob.md)[]\>
101
101
 
102
102
  Instruct the provider to start a compute job
103
103
 
@@ -106,13 +106,15 @@ Instruct the provider to start a compute job
106
106
  | Name | Type | Description |
107
107
  | :------ | :------ | :------ |
108
108
  | `providerUri` | `string` | The provider URI. |
109
- | `consumer` | `Signer` | - |
109
+ | `signer` | `Signer` | - | The consumer signer/account
110
110
  | `computeEnv` | `string` | The compute environment. |
111
- | `dataset` | [`ComputeAsset`](../interfaces/ComputeAsset.md) | The dataset to start compute on |
111
+ | `datasets` | [`ComputeAsset`](../interfaces/ComputeAsset.md) | The dataset to start compute on |
112
112
  | `algorithm` | [`ComputeAlgorithm`](../interfaces/ComputeAlgorithm.md) | The algorithm to start compute with. |
113
- | `signal?` | `AbortSignal` | abort signal |
114
- | `additionalDatasets?` | [`ComputeAsset`](../interfaces/ComputeAsset.md)[] | The additional datasets if that is the case. |
113
+ | `resources` | [`ComputeResourceRequest`](../interfaces/ComputeResourcesRequest.md) | The resources to start compute with. |
114
+ | `chainId?` | [`number`] | The network for the payments |
115
115
  | `output?` | [`ComputeOutput`](../interfaces/ComputeOutput.md) | The compute job output settings. |
116
+ | `signal?` | `AbortSignal` | abort signal |
117
+
116
118
 
117
119
  #### Returns
118
120
 
@@ -283,7 +285,7 @@ ___
283
285
 
284
286
  ### getDownloadUrl
285
287
 
286
- ▸ **getDownloadUrl**(`did`, `serviceId`, `fileIndex`, `transferTxId`, `providerUri`, `signer`, `userCustomParameters?`): `Promise`<`any`\>
288
+ ▸ **getDownloadUrl**(`did`, `serviceId`, `fileIndex`, `transferTxId`, `providerUri`, `signer`, `policyServer?` `userCustomParameters?`): `Promise`<`any`\>
287
289
 
288
290
  Gets the download URL.
289
291
 
@@ -297,6 +299,7 @@ Gets the download URL.
297
299
  | `transferTxId` | `string` | The transfer transaction ID. |
298
300
  | `providerUri` | `string` | The provider URI. |
299
301
  | `signer` | `Signer` | The signer. |
302
+ | `policyServer` | `any` | The policy server (if any to be used). |
300
303
  | `userCustomParameters?` | [`UserCustomParameters`](../interfaces/UserCustomParameters.md) | The user custom parameters. |
301
304
 
302
305
  #### Returns
@@ -500,6 +503,36 @@ ProviderComputeInitialize data
500
503
 
501
504
  ___
502
505
 
506
+
507
+ ### computeStreamableLogs
508
+
509
+ ▸ **computeStreamableLogs**(`providerUri`, `signer`, `jobId`, `signal?`): `Promise`<`any`\>
510
+
511
+ Gets the streamable compute logs.
512
+
513
+ #### Parameters
514
+
515
+ | Name | Type | Description |
516
+ | :------ | :------ | :------ |
517
+ | `providerUri` | `string` | The provider URI. |
518
+ | `signer` | `Signer` | The signer. |
519
+ | `jobId` | `string` | The Job Id. |
520
+ | `signal?` | `AbortSignal` | The abort signal. |
521
+
522
+
523
+ #### Returns
524
+
525
+ `Promise`<`any`\>
526
+
527
+ The compute logs.
528
+
529
+ #### Defined in
530
+
531
+ [services/Provider.ts:908](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/services/Provider.ts#L908)
532
+
533
+ ___
534
+
535
+
503
536
  ### inputMatch
504
537
 
505
538
  ▸ `Private` **inputMatch**(`input`, `regexp`, `conversorName`): `Object`
@@ -0,0 +1,30 @@
1
+ [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / ComputeEnvFees
2
+
3
+ # Interface: ComputeEnvFees
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [feeToken](ComputeEnvFees.md#feeToken)
10
+ - [prices](ComputeEnvFees.md#prices)
11
+
12
+ ## Properties
13
+
14
+ ### feeToken
15
+
16
+ • **feeToken**: `string`
17
+
18
+ #### Defined in
19
+
20
+ [@types/Compute.ts:42](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L42)
21
+
22
+ ___
23
+
24
+ ### prices
25
+
26
+ • **prices**: `ComputeResourcesPricingInfo`[]
27
+
28
+ #### Defined in
29
+
30
+ [@types/Compute.ts:43](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L43)
@@ -0,0 +1,20 @@
1
+ [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / ComputeEnvFeesStructure
2
+
3
+ # Interface: ComputeEnvFeesStructure
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [feeToken](ComputeEnvFeesStructure.md#chainId)
10
+
11
+ ## Properties
12
+
13
+ ### chainId
14
+
15
+ • **chainId**: `ComputeEnvFees`
16
+
17
+ #### Defined in
18
+
19
+ [@types/Compute.ts:42](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L46)
20
+
@@ -7,20 +7,21 @@
7
7
  ### Properties
8
8
 
9
9
  - [consumerAddress](ComputeEnvironment.md#consumeraddress)
10
- - [cpuNumber](ComputeEnvironment.md#cpunumber)
11
- - [cpuType](ComputeEnvironment.md#cputype)
10
+ - [totalCpu](ComputeEnvironment.md#totalCpu)
11
+ - [maxCpu](ComputeEnvironment.md#maxCpu)
12
+ - [totalRam](ComputeEnvironment.md#totalRam)
13
+ - [maxRam](ComputeEnvironment.md#maxRam)
14
+ - [maxDisk](ComputeEnvironment.md#maxDisk)
12
15
  - [currentJobs](ComputeEnvironment.md#currentjobs)
13
- - [desc](ComputeEnvironment.md#desc)
14
- - [diskGB](ComputeEnvironment.md#diskgb)
15
- - [gpuNumber](ComputeEnvironment.md#gpunumber)
16
- - [gpuType](ComputeEnvironment.md#gputype)
16
+ - [description](ComputeEnvironment.md#description)
17
+ - [fees](ComputeEnvironment.md#ComputeEnvFeesStructure)
17
18
  - [id](ComputeEnvironment.md#id)
18
19
  - [lastSeen](ComputeEnvironment.md#lastseen)
19
20
  - [maxJobDuration](ComputeEnvironment.md#maxjobduration)
20
21
  - [maxJobs](ComputeEnvironment.md#maxjobs)
21
- - [priceMin](ComputeEnvironment.md#pricemin)
22
- - [ramGB](ComputeEnvironment.md#ramgb)
23
22
  - [storageExpiry](ComputeEnvironment.md#storageexpiry)
23
+ - [lastSeen](ComputeEnvironment.md#lastSeen)
24
+ - [free](ComputeEnvironment.md#free)
24
25
 
25
26
  ## Properties
26
27
 
@@ -30,27 +31,27 @@
30
31
 
31
32
  #### Defined in
32
33
 
33
- [@types/Compute.ts:21](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L21)
34
+ [@types/Compute.ts:68](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L68)
34
35
 
35
36
  ___
36
37
 
37
- ### cpuNumber
38
+ ### totalCpu
38
39
 
39
- • **cpuNumber**: `number`
40
+ • **totalCpu**: `number`
40
41
 
41
42
  #### Defined in
42
43
 
43
- [@types/Compute.ts:11](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L11)
44
+ [@types/Compute.ts:58](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L58)
44
45
 
45
46
  ___
46
47
 
47
- ### cpuType
48
+ ### maxCpu
48
49
 
49
- • **cpuType**: `string`
50
+ • **maxCpu**: `number`
50
51
 
51
52
  #### Defined in
52
53
 
53
- [@types/Compute.ts:12](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L12)
54
+ [@types/Compute.ts:59](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L59)
54
55
 
55
56
  ___
56
57
 
@@ -60,47 +61,47 @@ ___
60
61
 
61
62
  #### Defined in
62
63
 
63
- [@types/Compute.ts:19](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L19)
64
+ [@types/Compute.ts:66](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L66)
64
65
 
65
66
  ___
66
67
 
67
- ### desc
68
+ ### description
68
69
 
69
- • **desc**: `string`
70
+ • **description**: `string`
70
71
 
71
72
  #### Defined in
72
73
 
73
- [@types/Compute.ts:18](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L18)
74
+ [@types/Compute.ts:65](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L65)
74
75
 
75
76
  ___
76
77
 
77
- ### diskGB
78
+ ### maxDisk
78
79
 
79
- • **diskGB**: `number`
80
+ • **maxDisk**: `number`
80
81
 
81
82
  #### Defined in
82
83
 
83
- [@types/Compute.ts:16](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L16)
84
+ [@types/Compute.ts:62](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L62)
84
85
 
85
86
  ___
86
87
 
87
- ### gpuNumber
88
+ ### maxRam
88
89
 
89
- • **gpuNumber**: `number`
90
+ • **maxRam**: `number`
90
91
 
91
92
  #### Defined in
92
93
 
93
- [@types/Compute.ts:13](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L13)
94
+ [@types/Compute.ts:61](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L61)
94
95
 
95
96
  ___
96
97
 
97
- ### gpuType
98
+ ### totalRam
98
99
 
99
- • **gpuType**: `string`
100
+ • **totalRam**: `number`
100
101
 
101
102
  #### Defined in
102
103
 
103
- [@types/Compute.ts:14](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L14)
104
+ [@types/Compute.ts:60](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L60)
104
105
 
105
106
  ___
106
107
 
@@ -110,7 +111,7 @@ ___
110
111
 
111
112
  #### Defined in
112
113
 
113
- [@types/Compute.ts:10](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L10)
114
+ [@types/Compute.ts:49](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L49)
114
115
 
115
116
  ___
116
117
 
@@ -120,7 +121,7 @@ ___
120
121
 
121
122
  #### Defined in
122
123
 
123
- [@types/Compute.ts:24](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L24)
124
+ [@types/Compute.ts:71](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L71)
124
125
 
125
126
  ___
126
127
 
@@ -130,7 +131,7 @@ ___
130
131
 
131
132
  #### Defined in
132
133
 
133
- [@types/Compute.ts:23](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L23)
134
+ [@types/Compute.ts:70](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L70)
134
135
 
135
136
  ___
136
137
 
@@ -140,27 +141,27 @@ ___
140
141
 
141
142
  #### Defined in
142
143
 
143
- [@types/Compute.ts:20](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L20)
144
+ [@types/Compute.ts:67](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L67)
144
145
 
145
146
  ___
146
147
 
147
- ### priceMin
148
+ ### fees
148
149
 
149
- • **priceMin**: `number`
150
+ • **fees**: `ComputeEnvFeesStructure`
150
151
 
151
152
  #### Defined in
152
153
 
153
- [@types/Compute.ts:17](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L17)
154
+ [@types/Compute.ts:63](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L63)
154
155
 
155
156
  ___
156
157
 
157
- ### ramGB
158
+ ### free
158
159
 
159
- • **ramGB**: `number`
160
+ • **free**: `boolean`
160
161
 
161
162
  #### Defined in
162
163
 
163
- [@types/Compute.ts:15](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L15)
164
+ [@types/Compute.ts:72](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L72)
164
165
 
165
166
  ___
166
167
 
@@ -170,4 +171,14 @@ ___
170
171
 
171
172
  #### Defined in
172
173
 
173
- [@types/Compute.ts:22](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L22)
174
+ [@types/Compute.ts:69](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L69)
175
+
176
+ ___
177
+
178
+ ### platform
179
+
180
+ • **platform**: `RunningPlatform[]`
181
+
182
+ #### Defined in
183
+
184
+ [@types/Compute.ts:73](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L73)
@@ -0,0 +1,30 @@
1
+ [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / ComputeResourcesPricingInfo
2
+
3
+ # Interface: ComputeResourcesPricingInfo
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [type](ComputeResourcesPricingInfo.md#type)
10
+ - [price](ComputeResourcesPricingInfo.md#price)
11
+
12
+ ## Properties
13
+
14
+ ### type
15
+
16
+ • **type**: `ComputeResourceType`
17
+
18
+ #### Defined in
19
+
20
+ [@types/Compute.ts:38](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L38)
21
+
22
+ ___
23
+
24
+ ### price
25
+
26
+ • **price**: `number`
27
+
28
+ #### Defined in
29
+
30
+ [@types/Compute.ts:39](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L39)
@@ -0,0 +1,30 @@
1
+ [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / ComputeResourcesRequest
2
+
3
+ # Interface: ComputeResourcesRequest
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [id](ComputeResourcesRequest.md#id)
10
+ - [amount](ComputeResourcesRequest.md#amount)
11
+
12
+ ## Properties
13
+
14
+ ### id
15
+
16
+ • **id**: `string`
17
+
18
+ #### Defined in
19
+
20
+ [@types/Compute.ts:63](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L63)
21
+
22
+ ___
23
+
24
+ ### amount
25
+
26
+ • **amount**: `number`
27
+
28
+ #### Defined in
29
+
30
+ [@types/Compute.ts:64](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L64)
@@ -186,7 +186,7 @@ ___
186
186
 
187
187
  • **updated**: `string`
188
188
 
189
- Contains the the date of last update in ISO Date Time
189
+ Contains the date of last update in ISO Date Time
190
190
 
191
191
  #### Defined in
192
192
 
@@ -0,0 +1,30 @@
1
+ [@oceanprotocol/lib](../README.md) / [Exports](../modules.md) / RunningPlatform
2
+
3
+ # Interface: RunningPlatform
4
+
5
+ ## Table of contents
6
+
7
+ ### Properties
8
+
9
+ - [architecture](RunningPlatform.md#architecture)
10
+ - [os](RunningPlatform.md#os)
11
+
12
+ ## Properties
13
+
14
+ ### architecture
15
+
16
+ • **architecture**: `string`
17
+
18
+ #### Defined in
19
+
20
+ [@types/Compute.ts:31](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L31)
21
+
22
+ ___
23
+
24
+ ### os
25
+
26
+ • **os**: `string`
27
+
28
+ #### Defined in
29
+
30
+ [@types/Compute.ts:32](https://github.com/oceanprotocol/ocean.js/blob/c99bc5c6/src/@types/Compute.ts#L32)
package/package.json CHANGED
@@ -1,14 +1,16 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "4.0.0-next.1",
4
+ "version": "4.0.1",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
- "main": "./dist/lib.js",
6
+ "main": "./dist/lib.cjs",
7
7
  "umd:main": "dist/lib.umd.js",
8
- "module": "./dist/lib.module.js",
9
- "exports": {
10
- "require": "./dist/lib.js",
11
- "default": "./dist/lib.modern.js"
8
+ "module": "./dist/lib.module.mjs",
9
+ "type": "module",
10
+ "export": {
11
+ "require": "./dist/lib.cjs",
12
+ "import": "./dist/lib.module.mjs",
13
+ "default": "./dist/lib.modern.mjs"
12
14
  },
13
15
  "types": "./dist/types/index.d.ts",
14
16
  "scripts": {
@@ -29,9 +31,9 @@
29
31
  "prepublishOnly": "npm run build",
30
32
  "mocha": "TS_NODE_PROJECT='./test/tsconfig.json' mocha --config=test/.mocharc.json --node-env=test --exit",
31
33
  "test": "npm run lint && npm run test:unit:cover && npm run test:integration:cover",
32
- "test:unit": "npm run mocha -- 'test/unit/**/*.test.ts'",
34
+ "test:unit": "npx tsx ./node_modules/mocha/bin/mocha.js --config ./test/.mocharc.json 'test/unit/**/*.test.ts' --verbose",
33
35
  "test:sapphire": "npm run mocha -- 'test/integration/Sapphire.test.ts'",
34
- "test:integration": "npm run mocha -- 'test/integration/**/*.test.ts' --exclude 'test/integration/Sapphire.test.ts'",
36
+ "test:integration": "npx tsx ./node_modules/mocha/bin/mocha.js --config ./test/.mocharc.json 'test/integration/**/*.test.ts' --exclude 'test/integration/Sapphire.test.ts' --verbose",
35
37
  "test:unit:cover": "nyc --report-dir coverage/unit npm run test:unit",
36
38
  "test:integration:cover": "nyc --report-dir coverage/integration --no-clean npm run test:integration",
37
39
  "create:guide": "./scripts/createCodeExamples.sh test/integration/CodeExamples.test.ts",
@@ -56,22 +58,28 @@
56
58
  "dependencies": {
57
59
  "@oasisprotocol/sapphire-paratime": "^1.3.2",
58
60
  "@oceanprotocol/contracts": "^2.2.0",
61
+ "@oceanprotocol/ddo-js": "^0.0.1-next.7",
62
+ "@rdfjs/dataset": "^2.0.2",
63
+ "@rdfjs/formats-common": "^3.1.0",
64
+ "@zazuko/env-node": "^2.1.4",
59
65
  "cross-fetch": "^4.0.0",
60
66
  "crypto-js": "^4.1.1",
61
67
  "decimal.js": "^10.4.1",
62
68
  "ethers": "^5.7.2"
63
69
  },
64
70
  "devDependencies": {
71
+ "@istanbuljs/nyc-config-typescript": "^1.0.2",
65
72
  "@truffle/hdwallet-provider": "^2.0.14",
66
73
  "@types/chai": "^4.3.1",
67
74
  "@types/chai-spies": "^1.0.3",
68
75
  "@types/crypto-js": "^4.1.1",
69
- "@types/mocha": "^10.0.0",
76
+ "@types/mocha": "^10.0.10",
70
77
  "@types/node": "^18.0.1",
71
78
  "@types/node-fetch": "^3.0.3",
72
79
  "@typescript-eslint/eslint-plugin": "^6.4.1",
73
80
  "@typescript-eslint/parser": "^6.4.1",
74
81
  "auto-changelog": "^2.4.0",
82
+ "c8": "^10.1.3",
75
83
  "chai": "^4.3.6",
76
84
  "chai-spies": "^1.0.0",
77
85
  "cross-env": "^7.0.3",
@@ -82,39 +90,41 @@
82
90
  "fs": "0.0.1-security",
83
91
  "microbundle": "0.14.2",
84
92
  "mocha": "^10.0.0",
85
- "mock-local-storage": "^1.1.21",
86
- "nyc": "^15.1.0",
93
+ "mock-local-storage": "^1.1.24",
94
+ "nyc": "^17.1.0",
87
95
  "ora": "5.4.1",
88
96
  "prettier": "^2.7.1",
89
97
  "release-it": "^15.4.2",
90
- "source-map-support": "^0.5.19",
91
- "ts-node": "^10.9.1",
98
+ "source-map-support": "^0.5.21",
99
+ "ts-node": "^10.9.2",
92
100
  "ts-node-register": "^1.0.0",
101
+ "tsx": "^4.19.2",
93
102
  "typedoc": "^0.25.1",
94
103
  "typedoc-plugin-markdown": "^3.15.2",
95
104
  "typescript": "^5.1.6"
96
105
  },
97
106
  "nyc": {
107
+ "extends": "@istanbuljs/nyc-config-typescript",
98
108
  "include": [
99
109
  "src/**/*.ts"
100
110
  ],
101
111
  "exclude": [
102
112
  "src/@types/**/*",
103
- "test/**/*"
113
+ "test/**/*",
114
+ "node_modules/**"
104
115
  ],
105
116
  "extension": [
106
- ".ts"
107
- ],
108
- "require": [
109
- "ts-node/register"
117
+ ".ts",
118
+ ".tsx"
110
119
  ],
111
120
  "reporter": [
112
- "text",
113
121
  "lcov",
122
+ "text",
114
123
  "html"
115
124
  ],
116
125
  "sourceMap": true,
117
- "instrument": true
126
+ "instrument": true,
127
+ "all": true
118
128
  },
119
129
  "release-it": {
120
130
  "hooks": {