@oceanprotocol/lib 8.5.1 → 8.6.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.
@@ -23,6 +23,19 @@ export declare class BaseProvider {
23
23
  getDownloadUrl(did: string, serviceId: string, fileIndex: number, transferTxId: string, nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, policyServer?: any, userCustomParameters?: UserCustomParameters): Promise<string | DownloadResponse>;
24
24
  computeStart(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, computeEnv: string, datasets: ComputeAsset[], algorithm: ComputeAlgorithm, maxJobDuration: number, token: string, resources: ComputeResourceRequest[], chainId: number, metadata?: ComputeJobMetadata, additionalViewers?: string[], output?: ComputeOutput, policyServer?: any, signal?: AbortSignal, queueMaxWaitTime?: number, dockerRegistryAuth?: dockerRegistryAuth, outputBucketId?: string): Promise<ComputeJob | ComputeJob[]>;
25
25
  freeComputeStart(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, computeEnv: string, datasets: ComputeAsset[], algorithm: ComputeAlgorithm, resources?: ComputeResourceRequest[], metadata?: ComputeJobMetadata, additionalViewers?: string[], output?: ComputeOutput, policyServer?: any, signal?: AbortSignal, queueMaxWaitTime?: number, dockerRegistryAuth?: dockerRegistryAuth, outputBucketId?: string): Promise<ComputeJob | ComputeJob[]>;
26
+ /**
27
+ * Resolves the node's peerId for the given nodeUri via the node STATUS command,
28
+ * whose `id` field is the peerId.
29
+ * @param {OceanNode} nodeUri The provider URI.
30
+ * @return {Promise<string | undefined>} The peerId, or undefined if unresolved.
31
+ */
32
+ private resolveNodePeerId;
33
+ /**
34
+ * @param {OceanNode} nodeUri The provider URI the job runs on.
35
+ * @param {string} environment The compute environment the job runs in.
36
+ * @param {ComputeJob} job The compute job just started.
37
+ */
38
+ private notifyIncentiveBackendJobStarted;
26
39
  computeStreamableLogs(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, jobId: string, signal?: AbortSignal): Promise<any>;
27
40
  computeStop(jobId: string, nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, agreementId?: string, signal?: AbortSignal): Promise<ComputeJob | ComputeJob[]>;
28
41
  computeStatus(nodeUri: OceanNode, signerOrAuthToken: SignerOrAuthTokenOrSignature, jobId?: string, agreementId?: string, signal?: AbortSignal): Promise<ComputeJob | ComputeJob[]>;
@@ -1,2 +1,3 @@
1
1
  export declare function bytesToHex(bytes: Uint8Array): string;
2
+ export declare function responseBodyToAsyncIterable(body: ReadableStream<Uint8Array> | null): AsyncIterable<Uint8Array>;
2
3
  export declare function concatUint8Arrays(arrays: Uint8Array[]): Uint8Array;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "8.5.1",
4
+ "version": "8.6.1",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.cjs",
7
7
  "umd:main": "dist/lib.umd.js",
@@ -64,6 +64,9 @@
64
64
  "url": "https://github.com/oceanprotocol/ocean.js/issues"
65
65
  },
66
66
  "homepage": "https://github.com/oceanprotocol/ocean.js#readme",
67
+ "engines": {
68
+ "node": ">=18"
69
+ },
67
70
  "peerDependencies": {
68
71
  "web3": "^1.8.0"
69
72
  },
@@ -71,12 +74,10 @@
71
74
  "@oasisprotocol/sapphire-paratime": "^1.3.2",
72
75
  "@oceanprotocol/ddo-js": "^0.3.0",
73
76
  "bignumber.js": "^9.3.1",
74
- "cross-fetch": "^4.0.0",
75
77
  "crypto-js": "^4.1.1",
76
78
  "decimal.js": "^10.4.1",
77
79
  "eciesjs": "^0.4.5",
78
80
  "ethers": "^6.15.0",
79
- "form-data": "^2.3.3",
80
81
  "jsonwebtoken": "^9.0.2"
81
82
  },
82
83
  "devDependencies": {
@@ -98,7 +99,6 @@
98
99
  "@types/jsonwebtoken": "^9.0.10",
99
100
  "@types/mocha": "^10.0.10",
100
101
  "@types/node": "^24.3.0",
101
- "@types/node-fetch": "^3.0.3",
102
102
  "@typescript-eslint/eslint-plugin": "^7.0.0",
103
103
  "@typescript-eslint/parser": "^6.4.1",
104
104
  "auto-changelog": "^2.4.0",