@oceanprotocol/lib 9.0.0 → 9.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.
@@ -1,4 +1,4 @@
1
- import { ComputeResourceRequest, ContainerMetricsSnapshot } from './Compute.js';
1
+ import { ComputeJobMetadata, ComputeResourceRequest, ContainerMetricsSnapshot } from './Compute.js';
2
2
  export interface TemplateResourceRequirement {
3
3
  id?: string;
4
4
  kind?: 'discrete' | 'fungible';
@@ -93,6 +93,7 @@ export interface ServiceJob {
93
93
  payment: ServiceJobPayment;
94
94
  extendPayments?: ServiceJobPayment[];
95
95
  runtimeMetrics?: ContainerMetricsSnapshot;
96
+ metadata?: ComputeJobMetadata;
96
97
  }
97
98
  export type ServiceJobListed = Omit<ServiceJob, 'dockerCmd' | 'dockerEntrypoint' | 'dockerfile' | 'additionalDockerFiles' | 'runtimeMetrics'>;
98
99
  export interface ServiceListFilters {
@@ -115,6 +116,7 @@ export interface ServiceContainerSpec {
115
116
  userData?: ServiceUserData;
116
117
  dockerCmd?: string[];
117
118
  dockerEntrypoint?: string[];
119
+ metadata?: ComputeJobMetadata;
118
120
  }
119
121
  export type ServiceRestartParams = ServiceContainerSpec;
120
122
  export interface ServiceStartParams extends ServiceContainerSpec {
@@ -316,6 +316,10 @@ export declare class HttpProvider {
316
316
  * the env (else the node replies 403). `userData`/`dockerCmd`/`dockerEntrypoint` are only
317
317
  * sent when supplied — an omitted override reuses the node's stored value, whereas an
318
318
  * explicit value (including `[]`) REPLACES it (matches ocean-node's restartService semantics).
319
+ *
320
+ * `params.metadata` is an optional owner-supplied label bag that, when supplied, REPLACES the
321
+ * stored metadata (and does NOT force RESPEC mode). Unlike `userData`, it is transmitted
322
+ * WITHOUT application-level encryption, so it must not contain sensitive values.
319
323
  * @return {Promise<ServiceJob[]>} The restarted service job (single-element array).
320
324
  */
321
325
  serviceRestart(nodeUri: string, signerOrAuthToken: SignerOrAuthTokenOrSignature, serviceId: string, params?: ServiceRestartParams, signal?: AbortSignal): Promise<ServiceJob[]>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "9.0.0",
4
+ "version": "9.1.0",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "module": "./dist/lib.module.mjs",
7
7
  "type": "module",
@@ -71,16 +71,16 @@
71
71
  "dependencies": {
72
72
  "@chainsafe/libp2p-noise": "^17.0.0",
73
73
  "@chainsafe/libp2p-yamux": "^8.0.1",
74
- "@libp2p/bootstrap": "^12.0.29",
75
- "@libp2p/circuit-relay-v2": "^4.2.11",
76
- "@libp2p/identify": "^4.1.12",
77
- "@libp2p/interface": "^3.2.5",
78
- "@libp2p/kad-dht": "^16.4.2",
79
- "@libp2p/peer-id": "^6.0.14",
80
- "@libp2p/ping": "^3.1.11",
81
- "@libp2p/tcp": "^11.0.26",
82
- "@libp2p/utils": "^7.3.2",
83
- "@libp2p/websockets": "^10.1.19",
74
+ "@libp2p/bootstrap": "^12.0.31",
75
+ "@libp2p/circuit-relay-v2": "^4.2.13",
76
+ "@libp2p/identify": "^4.1.14",
77
+ "@libp2p/interface": "^3.3.0",
78
+ "@libp2p/kad-dht": "^16.4.5",
79
+ "@libp2p/peer-id": "^6.0.15",
80
+ "@libp2p/ping": "^3.1.13",
81
+ "@libp2p/tcp": "^11.0.28",
82
+ "@libp2p/utils": "^7.4.1",
83
+ "@libp2p/websockets": "^10.1.21",
84
84
  "@multiformats/multiaddr": "^13.0.3",
85
85
  "@oasisprotocol/sapphire-ethers-v6": "^6.0.1",
86
86
  "@oceanprotocol/ddo-js": "^0.4.1",
@@ -91,7 +91,7 @@
91
91
  "eciesjs": "^0.5.0",
92
92
  "ethers": "^6.17.0",
93
93
  "jsonwebtoken": "^9.0.3",
94
- "libp2p": "^3.3.8",
94
+ "libp2p": "^3.3.10",
95
95
  "multiformats": "^14.0.5",
96
96
  "uint8arrays": "^6.1.1"
97
97
  },
@@ -111,7 +111,7 @@
111
111
  "eslint-plugin-prettier": "^5.5.6",
112
112
  "eslint-plugin-security": "^4.0.1",
113
113
  "globals": "^17.11.0",
114
- "mocha": "^11.8.0",
114
+ "mocha": "^12.0.0",
115
115
  "mock-local-storage": "^1.1.24",
116
116
  "nyc": "^18.0.0",
117
117
  "prettier": "^3.9.6",