@oceanprotocol/lib 4.3.2 → 4.3.3

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.
@@ -0,0 +1,9 @@
1
+ export interface PolicyServerPassthroughCommand {
2
+ policyServerPassthrough?: any;
3
+ }
4
+ export interface PolicyServerInitializeCommand {
5
+ documentId?: string;
6
+ serviceId?: string;
7
+ consumerAddress?: string;
8
+ policyServer?: any;
9
+ }
@@ -8,6 +8,7 @@ export * from './DownloadResponse.js';
8
8
  export * from './FixedPrice.js';
9
9
  export * from './NFT.js';
10
10
  export * from './NFTFactory.js';
11
+ export * from './PolicyServer.js';
11
12
  export * from './Provider.js';
12
13
  export * from './Router.js';
13
14
  export * from './ReturnTypes.js';
@@ -1,5 +1,5 @@
1
1
  import { Signer } from 'ethers';
2
- import { Arweave, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UrlFile, UserCustomParameters, Ipfs, ComputeResourceRequest, ComputeJobMetadata } from '../@types';
2
+ import { Arweave, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, ServiceEndpoint, UrlFile, UserCustomParameters, Ipfs, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand } from '../@types';
3
3
  export declare class Provider {
4
4
  private getConsumerAddress;
5
5
  private getSignature;
@@ -242,6 +242,18 @@ export declare class Provider {
242
242
  * @return {Promise<boolean>} valid or not
243
243
  */
244
244
  isValidProvider(url: string, signal?: AbortSignal): Promise<boolean>;
245
+ /** Sends a PolicyServer request to node to be passthrough to PS
246
+ * @param {string} providerUri The provider URI.
247
+ * @param {PolicyServerPassthroughCommand} request The request to be passed through to the Policy Server.
248
+ * @param {AbortSignal} signal abort signal
249
+ */
250
+ PolicyServerPassthrough(providerUri: string, request: PolicyServerPassthroughCommand, signal?: AbortSignal): Promise<any>;
251
+ /** Initialize Policy Server verification
252
+ * @param {string} providerUri The provider URI.
253
+ * @param {PolicyServerInitializeCommand} request The request to be sent to the Policy Server.
254
+ * @param {AbortSignal} signal abort signal
255
+ */
256
+ initializePSVerification(providerUri: string, request: PolicyServerInitializeCommand, signal?: AbortSignal): Promise<any>;
245
257
  /**
246
258
  * Private method that removes the leading 0x from a string.
247
259
  * @param {string} input - The input string.
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@oceanprotocol/lib",
3
3
  "source": "./src/index.ts",
4
- "version": "4.3.2",
4
+ "version": "4.3.3",
5
5
  "description": "JavaScript client library for Ocean Protocol",
6
6
  "main": "./dist/lib.cjs",
7
7
  "umd:main": "dist/lib.umd.js",