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

@libp2p/interface

Package Overview
Dependencies
Maintainers
6
Versions
535
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@libp2p/interface - npm Package Compare versions

Comparing version 0.0.1-7debe031 to 0.0.1-7f60b579

12

dist/src/connection/index.d.ts

@@ -155,2 +155,7 @@ import type { AbortOptions } from '../index.js';

maxOutboundStreams?: number;
/**
* Opt-in to running over a transient connection - one that has time/data limits
* placed on it.
*/
runOnTransientConnection?: boolean;
}

@@ -206,2 +211,9 @@ export type ConnectionStatus = 'open' | 'closing' | 'closed';

/**
* A transient connection is one that is not expected to be open for very long
* or one that cannot transfer very much data, such as one being used as a
* circuit relay connection. Protocols need to explicitly opt-in to being run
* over transient connections.
*/
transient: boolean;
/**
* Create a new stream on this connection and negotiate one of the passed protocols

@@ -208,0 +220,0 @@ */

4

dist/src/index.d.ts

@@ -16,3 +16,3 @@ /**

*/
import type { Connection, Stream } from './connection/index.js';
import type { Connection, NewStreamOptions, Stream } from './connection/index.js';
import type { ContentRouting } from './content-routing/index.js';

@@ -463,3 +463,3 @@ import type { EventEmitter } from './events.js';

*/
dialProtocol: (peer: PeerId | Multiaddr | Multiaddr[], protocols: string | string[], options?: AbortOptions) => Promise<Stream>;
dialProtocol: (peer: PeerId | Multiaddr | Multiaddr[], protocols: string | string[], options?: NewStreamOptions) => Promise<Stream>;
/**

@@ -466,0 +466,0 @@ * Attempts to gracefully close an open connection to the given peer. If the

@@ -18,2 +18,7 @@ import type { Connection, Stream } from '../connection/index.js';

maxOutboundStreams?: number;
/**
* Opt-in to running over a transient connection - one that has time/data limits
* placed on it.
*/
runOnTransientConnection?: boolean;
}

@@ -20,0 +25,0 @@ export interface StreamHandlerRecord {

import { abortableSource } from 'abortable-iterator';
import { pushable } from 'it-pushable';
import defer from 'p-defer';
import defer, {} from 'p-defer';
import { Uint8ArrayList } from 'uint8arraylist';

@@ -5,0 +5,0 @@ import { CodeError } from '../errors.js';

@@ -85,2 +85,7 @@ import type { Connection, MultiaddrConnection } from '../connection/index.js';

muxerFactory?: StreamMuxerFactory;
/**
* The passed MultiaddrConnection has limits place on duration and/or data
* transfer amounts so is not expected to be open for very long.
*/
transient?: boolean;
}

@@ -87,0 +92,0 @@ export interface Upgrader {

{
"name": "@libp2p/interface",
"version": "0.0.1-7debe031",
"version": "0.0.1-7f60b579",
"description": "The interface implemented by a libp2p node",

@@ -170,9 +170,6 @@ "license": "Apache-2.0 OR MIT",

"@types/sinon": "^10.0.15",
"aegir": "^39.0.13",
"aegir": "^40.0.1",
"sinon": "^15.1.2",
"sinon-ts": "^1.0.0"
},
"typedoc": {
"entryPoint": "./src/index.ts"
}
}

@@ -181,2 +181,8 @@ import type { AbortOptions } from '../index.js'

maxOutboundStreams?: number
/**
* Opt-in to running over a transient connection - one that has time/data limits
* placed on it.
*/
runOnTransientConnection?: boolean
}

@@ -244,2 +250,10 @@

/**
* A transient connection is one that is not expected to be open for very long
* or one that cannot transfer very much data, such as one being used as a
* circuit relay connection. Protocols need to explicitly opt-in to being run
* over transient connections.
*/
transient: boolean
/**
* Create a new stream on this connection and negotiate one of the passed protocols

@@ -246,0 +260,0 @@ */

@@ -1,2 +0,1 @@

/**

@@ -3,0 +2,0 @@ * When this error is thrown it means an operation was aborted,

@@ -17,3 +17,3 @@ /**

import type { Connection, Stream } from './connection/index.js'
import type { Connection, NewStreamOptions, Stream } from './connection/index.js'
import type { ContentRouting } from './content-routing/index.js'

@@ -507,3 +507,3 @@ import type { EventEmitter } from './events.js'

*/
dialProtocol: (peer: PeerId | Multiaddr | Multiaddr[], protocols: string | string[], options?: AbortOptions) => Promise<Stream>
dialProtocol: (peer: PeerId | Multiaddr | Multiaddr[], protocols: string | string[], options?: NewStreamOptions) => Promise<Stream>

@@ -510,0 +510,0 @@ /**

@@ -1,2 +0,1 @@

export interface PublicKey {

@@ -3,0 +2,0 @@ readonly bytes: Uint8Array

@@ -1,2 +0,1 @@

export const KEEP_ALIVE = 'keep-alive'

@@ -1,2 +0,1 @@

/**

@@ -3,0 +2,0 @@ * Implemented by components that have a lifecycle

@@ -22,2 +22,8 @@ import type { Connection, Stream } from '../connection/index.js'

maxOutboundStreams?: number
/**
* Opt-in to running over a transient connection - one that has time/data limits
* placed on it.
*/
runOnTransientConnection?: boolean
}

@@ -24,0 +30,0 @@

@@ -99,2 +99,8 @@ import type { Connection, MultiaddrConnection } from '../connection/index.js'

muxerFactory?: StreamMuxerFactory
/**
* The passed MultiaddrConnection has limits place on duration and/or data
* transfer amounts so is not expected to be open for very long.
*/
transient?: boolean
}

@@ -101,0 +107,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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