@oceanprotocol/lib 7.0.0-next.10 → 7.0.0-next.11
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.
|
@@ -40,6 +40,7 @@ export declare class BaseProvider {
|
|
|
40
40
|
getNodeStatus(nodeUri: string | Multiaddr[], signal?: AbortSignal): Promise<NodeStatus>;
|
|
41
41
|
getNodeJobs(nodeUri: string | Multiaddr[], fromTimestamp?: number, signal?: AbortSignal): Promise<NodeComputeJob[]>;
|
|
42
42
|
setupP2P(config: P2PConfig): Promise<void>;
|
|
43
|
+
getLibp2pNode(): import("libp2p").Libp2p<import("@libp2p/interface").ServiceMap>;
|
|
43
44
|
getDiscoveredNodes(): Promise<Array<{
|
|
44
45
|
peerId: string;
|
|
45
46
|
multiaddrs: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type Libp2pOptions } from 'libp2p';
|
|
1
|
+
import { type Libp2p, type Libp2pOptions } from 'libp2p';
|
|
2
2
|
import { type Multiaddr } from '@multiformats/multiaddr';
|
|
3
3
|
import { Signer } from 'ethers';
|
|
4
4
|
import { StorageObject, FileInfo, ComputeJob, ComputeOutput, ComputeAlgorithm, ComputeAsset, ComputeEnvironment, ProviderInitialize, ProviderComputeInitializeResults, UserCustomParameters, ComputeResourceRequest, ComputeJobMetadata, PolicyServerInitializeCommand, PolicyServerPassthroughCommand, dockerRegistryAuth, DownloadResponse, ComputeResultStream, NodeStatus, NodeComputeJob } from '../../@types/index.js';
|
|
@@ -49,6 +49,8 @@ export declare class P2pProvider {
|
|
|
49
49
|
*/
|
|
50
50
|
setupP2P(config: P2PConfig): Promise<void>;
|
|
51
51
|
getMultiaddrFromPeerId(peerId: string): Promise<string>;
|
|
52
|
+
/** Returns the underlying libp2p node instance, or null if P2P is not initialized. */
|
|
53
|
+
getLibp2pNode(): Libp2p | null;
|
|
52
54
|
/** Returns all peers known to the peerStore (discovered via bootstrap, DHT, or connections). */
|
|
53
55
|
getDiscoveredNodes(): Promise<Array<{
|
|
54
56
|
peerId: string;
|
package/package.json
CHANGED