@libp2p/interface
Advanced tools
Comparing version 2.6.0 to 2.6.1-22e62d00f
@@ -247,3 +247,3 @@ import type { AbortOptions, Logger } from './index.js'; | ||
/** | ||
* Outbound conections are opened by the local node, inbound streams are opened by the remote | ||
* Outbound connections are opened by the local node, inbound streams are opened by the remote | ||
*/ | ||
@@ -342,3 +342,3 @@ direction: Direction; | ||
/** | ||
* When connection lifecycle events occurred | ||
* When connection life cycle events occurred | ||
*/ | ||
@@ -345,0 +345,0 @@ timeline: MultiaddrConnectionTimeline; |
@@ -689,6 +689,12 @@ /** | ||
/** | ||
* A signal that needs to be cleared when no longer in use | ||
*/ | ||
export interface ClearableSignal extends AbortSignal { | ||
clear(): void; | ||
} | ||
/** | ||
* When a routing operation involves reading values, these options allow | ||
* controlling where the values are read from. By default libp2p will check | ||
* local caches but may not use the network if a valid local value is found, | ||
* these options allow tuning that behaviour. | ||
* these options allow tuning that behavior. | ||
*/ | ||
@@ -695,0 +701,0 @@ export interface RoutingOptions extends AbortOptions, ProgressOptions, TraceOptions { |
@@ -19,3 +19,3 @@ import type { Stream } from './connection.js'; | ||
* * Build messages without the signature, key, from and seqno fields. | ||
* * The corresponding protobuf key-value pairs are absent from the marshalled message, not just empty. | ||
* * The corresponding protobuf key-value pairs are absent from the marshaled message, not just empty. | ||
* | ||
@@ -22,0 +22,0 @@ * On the consuming side: |
@@ -13,3 +13,3 @@ /** | ||
* * Build messages without the signature, key, from and seqno fields. | ||
* * The corresponding protobuf key-value pairs are absent from the marshalled message, not just empty. | ||
* * The corresponding protobuf key-value pairs are absent from the marshaled message, not just empty. | ||
* | ||
@@ -16,0 +16,0 @@ * On the consuming side: |
/** | ||
* Implemented by components that have a lifecycle | ||
* Implemented by components that have a life cycle | ||
*/ | ||
@@ -4,0 +4,0 @@ export interface Startable { |
import type { Connection, ConnectionLimits, MultiaddrConnection } from './connection.js'; | ||
import type { TypedEventTarget } from './event-target.js'; | ||
import type { AbortOptions } from './index.js'; | ||
import type { AbortOptions, ClearableSignal } from './index.js'; | ||
import type { StreamMuxerFactory } from './stream-muxer.js'; | ||
@@ -55,3 +55,3 @@ import type { Multiaddr } from '@multiformats/multiaddr'; | ||
} | ||
export interface DialTransportOptions<DialEvents extends ProgressEvent = ProgressEvent> extends AbortOptions, ProgressOptions<DialEvents> { | ||
export interface DialTransportOptions<DialEvents extends ProgressEvent = ProgressEvent> extends Required<AbortOptions>, ProgressOptions<DialEvents> { | ||
/** | ||
@@ -89,3 +89,3 @@ * The upgrader turns a MultiaddrConnection into a Connection which should be | ||
/** | ||
* Takes a list of `Multiaddr`s and returns only addresses that are vali for | ||
* Takes a list of `Multiaddr`s and returns only addresses that are valid for | ||
* the transport to dial | ||
@@ -109,3 +109,3 @@ */ | ||
} | ||
export interface UpgraderOptions<ConnectionUpgradeEvents extends ProgressEvent = ProgressEvent> extends ProgressOptions<ConnectionUpgradeEvents>, AbortOptions { | ||
export interface UpgraderOptions<ConnectionUpgradeEvents extends ProgressEvent = ProgressEvent> extends ProgressOptions<ConnectionUpgradeEvents>, Required<AbortOptions> { | ||
skipEncryption?: boolean; | ||
@@ -129,3 +129,12 @@ skipProtection?: boolean; | ||
upgradeInbound(maConn: MultiaddrConnection, opts?: UpgraderOptions<InboundConnectionUpgradeEvents>): Promise<void>; | ||
/** | ||
* Used by transports that perform part of the upgrade process themselves and | ||
* do some async work. This allows configuring inbound upgrade timeouts from a | ||
* single location. | ||
* | ||
* Regular transports should just pass the signal from their shutdown | ||
* controller to `upgradeInbound`. | ||
*/ | ||
createInboundAbortSignal(signal: AbortSignal): ClearableSignal; | ||
} | ||
//# sourceMappingURL=transport.d.ts.map |
{ | ||
"name": "@libp2p/interface", | ||
"version": "2.6.0", | ||
"version": "2.6.1-22e62d00f", | ||
"description": "The interface implemented by a libp2p node", | ||
@@ -59,3 +59,3 @@ "license": "Apache-2.0 OR MIT", | ||
"devDependencies": { | ||
"aegir": "^45.0.5" | ||
"aegir": "^45.1.1" | ||
}, | ||
@@ -62,0 +62,0 @@ "browser": { |
@@ -285,3 +285,3 @@ import type { AbortOptions, Logger } from './index.js' | ||
/** | ||
* Outbound conections are opened by the local node, inbound streams are opened by the remote | ||
* Outbound connections are opened by the local node, inbound streams are opened by the remote | ||
*/ | ||
@@ -402,3 +402,3 @@ direction: Direction | ||
/** | ||
* When connection lifecycle events occurred | ||
* When connection life cycle events occurred | ||
*/ | ||
@@ -405,0 +405,0 @@ timeline: MultiaddrConnectionTimeline |
@@ -772,6 +772,13 @@ /** | ||
/** | ||
* A signal that needs to be cleared when no longer in use | ||
*/ | ||
export interface ClearableSignal extends AbortSignal { | ||
clear(): void | ||
} | ||
/** | ||
* When a routing operation involves reading values, these options allow | ||
* controlling where the values are read from. By default libp2p will check | ||
* local caches but may not use the network if a valid local value is found, | ||
* these options allow tuning that behaviour. | ||
* these options allow tuning that behavior. | ||
*/ | ||
@@ -778,0 +785,0 @@ export interface RoutingOptions extends AbortOptions, ProgressOptions, TraceOptions { |
@@ -21,3 +21,3 @@ import type { Stream } from './connection.js' | ||
* * Build messages without the signature, key, from and seqno fields. | ||
* * The corresponding protobuf key-value pairs are absent from the marshalled message, not just empty. | ||
* * The corresponding protobuf key-value pairs are absent from the marshaled message, not just empty. | ||
* | ||
@@ -24,0 +24,0 @@ * On the consuming side: |
/** | ||
* Implemented by components that have a lifecycle | ||
* Implemented by components that have a life cycle | ||
*/ | ||
@@ -4,0 +4,0 @@ export interface Startable { |
import type { Connection, ConnectionLimits, MultiaddrConnection } from './connection.js' | ||
import type { TypedEventTarget } from './event-target.js' | ||
import type { AbortOptions } from './index.js' | ||
import type { AbortOptions, ClearableSignal } from './index.js' | ||
import type { StreamMuxerFactory } from './stream-muxer.js' | ||
@@ -61,3 +61,3 @@ import type { Multiaddr } from '@multiformats/multiaddr' | ||
export interface DialTransportOptions<DialEvents extends ProgressEvent = ProgressEvent> extends AbortOptions, ProgressOptions<DialEvents> { | ||
export interface DialTransportOptions<DialEvents extends ProgressEvent = ProgressEvent> extends Required<AbortOptions>, ProgressOptions<DialEvents> { | ||
/** | ||
@@ -101,3 +101,3 @@ * The upgrader turns a MultiaddrConnection into a Connection which should be | ||
/** | ||
* Takes a list of `Multiaddr`s and returns only addresses that are vali for | ||
* Takes a list of `Multiaddr`s and returns only addresses that are valid for | ||
* the transport to dial | ||
@@ -127,3 +127,3 @@ */ | ||
export interface UpgraderOptions<ConnectionUpgradeEvents extends ProgressEvent = ProgressEvent> extends ProgressOptions<ConnectionUpgradeEvents>, AbortOptions { | ||
export interface UpgraderOptions<ConnectionUpgradeEvents extends ProgressEvent = ProgressEvent> extends ProgressOptions<ConnectionUpgradeEvents>, Required<AbortOptions> { | ||
skipEncryption?: boolean | ||
@@ -155,2 +155,12 @@ skipProtection?: boolean | ||
upgradeInbound(maConn: MultiaddrConnection, opts?: UpgraderOptions<InboundConnectionUpgradeEvents>): Promise<void> | ||
/** | ||
* Used by transports that perform part of the upgrade process themselves and | ||
* do some async work. This allows configuring inbound upgrade timeouts from a | ||
* single location. | ||
* | ||
* Regular transports should just pass the signal from their shutdown | ||
* controller to `upgradeInbound`. | ||
*/ | ||
createInboundAbortSignal (signal: AbortSignal): ClearableSignal | ||
} |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
312395
118
7708
1