Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@libp2p/interface-internal

Package Overview
Dependencies
Maintainers
6
Versions
549
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interface-internal - npm Package Compare versions

Comparing version 0.1.3 to 0.1.4-32825633

15

dist/src/connection-manager/index.d.ts

@@ -6,2 +6,15 @@ import type { AbortOptions, PendingDial } from '@libp2p/interface';

import type { Multiaddr } from '@multiformats/multiaddr';
export interface OpenConnectionOptions extends AbortOptions {
/**
* Connection requests with a higher priority will be executed before those
* with a lower priority. (default: 50)
*/
priority?: number;
/**
* When opening a connection to a remote peer, if a connection already exists
* it will be returned instead of creating a new connection. Pass true here
* to override that and dial a new connection anyway. (default: false)
*/
force?: boolean;
}
export interface ConnectionManager {

@@ -38,3 +51,3 @@ /**

*/
openConnection: (peer: PeerId | Multiaddr | Multiaddr[], options?: AbortOptions) => Promise<Connection>;
openConnection: (peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions) => Promise<Connection>;
/**

@@ -41,0 +54,0 @@ * Close our connections to a peer

6

package.json
{
"name": "@libp2p/interface-internal",
"version": "0.1.3",
"version": "0.1.4-32825633",
"description": "Interfaces implemented by internal libp2p components",

@@ -81,4 +81,4 @@ "license": "Apache-2.0 OR MIT",

"dependencies": {
"@libp2p/interface": "^0.1.2",
"@libp2p/peer-collections": "^4.0.3",
"@libp2p/interface": "0.1.2-32825633",
"@libp2p/peer-collections": "4.0.3-32825633",
"@multiformats/multiaddr": "^12.1.5",

@@ -85,0 +85,0 @@ "uint8arraylist": "^2.4.3"

@@ -7,2 +7,17 @@ import type { AbortOptions, PendingDial } from '@libp2p/interface'

export interface OpenConnectionOptions extends AbortOptions {
/**
* Connection requests with a higher priority will be executed before those
* with a lower priority. (default: 50)
*/
priority?: number
/**
* When opening a connection to a remote peer, if a connection already exists
* it will be returned instead of creating a new connection. Pass true here
* to override that and dial a new connection anyway. (default: false)
*/
force?: boolean
}
export interface ConnectionManager {

@@ -41,3 +56,3 @@ /**

*/
openConnection: (peer: PeerId | Multiaddr | Multiaddr[], options?: AbortOptions) => Promise<Connection>
openConnection: (peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions) => Promise<Connection>

@@ -44,0 +59,0 @@ /**

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc