@libp2p/interface-internal
Advanced tools
Comparing version 0.1.5 to 0.1.6-62a56b54
@@ -6,7 +6,7 @@ import type { Multiaddr } from '@multiformats/multiaddr'; | ||
*/ | ||
getListenAddrs: () => Multiaddr[]; | ||
getListenAddrs(): Multiaddr[]; | ||
/** | ||
* Get peer announcing multiaddrs | ||
*/ | ||
getAnnounceAddrs: () => Multiaddr[]; | ||
getAnnounceAddrs(): Multiaddr[]; | ||
/** | ||
@@ -16,3 +16,3 @@ * Get observed multiaddrs - these addresses may not have been confirmed as | ||
*/ | ||
getObservedAddrs: () => Multiaddr[]; | ||
getObservedAddrs(): Multiaddr[]; | ||
/** | ||
@@ -22,3 +22,3 @@ * Signal that we have confidence an observed multiaddr is publicly dialable - | ||
*/ | ||
confirmObservedAddr: (addr: Multiaddr) => void; | ||
confirmObservedAddr(addr: Multiaddr): void; | ||
/** | ||
@@ -28,3 +28,3 @@ * Signal that we do not have confidence an observed multiaddr is publicly dialable - | ||
*/ | ||
removeObservedAddr: (addr: Multiaddr) => void; | ||
removeObservedAddr(addr: Multiaddr): void; | ||
/** | ||
@@ -35,8 +35,8 @@ * Add peer observed addresses. These will then appear in the output of getObservedAddrs | ||
*/ | ||
addObservedAddr: (addr: Multiaddr) => void; | ||
addObservedAddr(addr: Multiaddr): void; | ||
/** | ||
* Get the current node's addresses | ||
*/ | ||
getAddresses: () => Multiaddr[]; | ||
getAddresses(): Multiaddr[]; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -30,3 +30,3 @@ import type { AbortOptions, PendingDial } from '@libp2p/interface'; | ||
*/ | ||
getConnections: (peerId?: PeerId) => Connection[]; | ||
getConnections(peerId?: PeerId): Connection[]; | ||
/** | ||
@@ -41,3 +41,3 @@ * Return a map of all connections with their associated PeerIds | ||
*/ | ||
getConnectionsMap: () => PeerMap<Connection[]>; | ||
getConnectionsMap(): PeerMap<Connection[]>; | ||
/** | ||
@@ -52,7 +52,7 @@ * Open a connection to a remote peer | ||
*/ | ||
openConnection: (peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions) => Promise<Connection>; | ||
openConnection(peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions): Promise<Connection>; | ||
/** | ||
* Close our connections to a peer | ||
*/ | ||
closeConnections: (peer: PeerId, options?: AbortOptions) => Promise<void>; | ||
closeConnections(peer: PeerId, options?: AbortOptions): Promise<void>; | ||
/** | ||
@@ -64,7 +64,7 @@ * Invoked after an incoming connection is opened but before PeerIds are | ||
*/ | ||
acceptIncomingConnection: (maConn: MultiaddrConnection) => Promise<boolean>; | ||
acceptIncomingConnection(maConn: MultiaddrConnection): Promise<boolean>; | ||
/** | ||
* Invoked after upgrading a multiaddr connection has finished | ||
*/ | ||
afterUpgradeInbound: () => void; | ||
afterUpgradeInbound(): void; | ||
/** | ||
@@ -79,4 +79,4 @@ * Return the list of in-progress or queued dials | ||
*/ | ||
getDialQueue: () => PendingDial[]; | ||
getDialQueue(): PendingDial[]; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -18,7 +18,7 @@ import type { PeerId } from '@libp2p/interface/peer-id'; | ||
*/ | ||
marshal: () => Uint8Array; | ||
marshal(): Uint8Array; | ||
/** | ||
* Verifies if the other provided Record is identical to this one. | ||
*/ | ||
equals: (other: Record) => boolean; | ||
equals(other: Record): boolean; | ||
} | ||
@@ -30,6 +30,6 @@ export interface Envelope { | ||
signature: Uint8Array | Uint8ArrayList; | ||
marshal: () => Uint8Array; | ||
validate: (domain: string) => Promise<boolean>; | ||
equals: (other: Envelope) => boolean; | ||
marshal(): Uint8Array; | ||
validate(domain: string): Promise<boolean>; | ||
equals(other: Envelope): boolean; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -34,15 +34,15 @@ import type { Connection, Stream } from '@libp2p/interface/connection'; | ||
*/ | ||
getProtocols: () => string[]; | ||
getProtocols(): string[]; | ||
/** | ||
* Add a protocol handler | ||
*/ | ||
handle: (protocol: string, handler: StreamHandler, options?: StreamHandlerOptions) => Promise<void>; | ||
handle(protocol: string, handler: StreamHandler, options?: StreamHandlerOptions): Promise<void>; | ||
/** | ||
* Remove a protocol handler | ||
*/ | ||
unhandle: (protocol: string) => Promise<void>; | ||
unhandle(protocol: string): Promise<void>; | ||
/** | ||
* Return the handler for the passed protocol | ||
*/ | ||
getHandler: (protocol: string) => StreamHandlerRecord; | ||
getHandler(protocol: string): StreamHandlerRecord; | ||
/** | ||
@@ -56,7 +56,7 @@ * Register a topology handler for a protocol - the topology will be | ||
*/ | ||
register: (protocol: string, topology: Topology) => Promise<string>; | ||
register(protocol: string, topology: Topology): Promise<string>; | ||
/** | ||
* Remove the topology handler with the passed id. | ||
*/ | ||
unregister: (id: string) => void; | ||
unregister(id: string): void; | ||
/** | ||
@@ -66,4 +66,4 @@ * Return all topology handlers that wish to be informed about peers | ||
*/ | ||
getTopologies: (protocol: string) => Topology[]; | ||
getTopologies(protocol: string): Topology[]; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,12 +5,12 @@ import type { Connection } from '@libp2p/interface/connection'; | ||
export interface TransportManager { | ||
add: (transport: Transport) => void; | ||
dial: (ma: Multiaddr, options?: any) => Promise<Connection>; | ||
getAddrs: () => Multiaddr[]; | ||
getTransports: () => Transport[]; | ||
getListeners: () => Listener[]; | ||
transportForMultiaddr: (ma: Multiaddr) => Transport | undefined; | ||
listen: (addrs: Multiaddr[]) => Promise<void>; | ||
remove: (key: string) => Promise<void>; | ||
removeAll: () => Promise<void>; | ||
add(transport: Transport): void; | ||
dial(ma: Multiaddr, options?: any): Promise<Connection>; | ||
getAddrs(): Multiaddr[]; | ||
getTransports(): Transport[]; | ||
getListeners(): Listener[]; | ||
transportForMultiaddr(ma: Multiaddr): Transport | undefined; | ||
listen(addrs: Multiaddr[]): Promise<void>; | ||
remove(key: string): Promise<void>; | ||
removeAll(): Promise<void>; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
{ | ||
"name": "@libp2p/interface-internal", | ||
"version": "0.1.5", | ||
"version": "0.1.6-62a56b54", | ||
"description": "Interfaces implemented by internal libp2p components", | ||
@@ -71,2 +71,3 @@ "license": "Apache-2.0 OR MIT", | ||
"parserOptions": { | ||
"project": true, | ||
"sourceType": "module" | ||
@@ -82,4 +83,4 @@ } | ||
"dependencies": { | ||
"@libp2p/interface": "^0.1.2", | ||
"@libp2p/peer-collections": "^4.0.4", | ||
"@libp2p/interface": "0.1.3-62a56b54", | ||
"@libp2p/peer-collections": "4.0.5-62a56b54", | ||
"@multiformats/multiaddr": "^12.1.5", | ||
@@ -89,4 +90,4 @@ "uint8arraylist": "^2.4.3" | ||
"devDependencies": { | ||
"aegir": "^40.0.8" | ||
"aegir": "^41.0.2" | ||
} | ||
} |
@@ -7,3 +7,3 @@ import type { Multiaddr } from '@multiformats/multiaddr' | ||
*/ | ||
getListenAddrs: () => Multiaddr[] | ||
getListenAddrs(): Multiaddr[] | ||
@@ -13,3 +13,3 @@ /** | ||
*/ | ||
getAnnounceAddrs: () => Multiaddr[] | ||
getAnnounceAddrs(): Multiaddr[] | ||
@@ -20,3 +20,3 @@ /** | ||
*/ | ||
getObservedAddrs: () => Multiaddr[] | ||
getObservedAddrs(): Multiaddr[] | ||
@@ -27,3 +27,3 @@ /** | ||
*/ | ||
confirmObservedAddr: (addr: Multiaddr) => void | ||
confirmObservedAddr(addr: Multiaddr): void | ||
@@ -34,3 +34,3 @@ /** | ||
*/ | ||
removeObservedAddr: (addr: Multiaddr) => void | ||
removeObservedAddr(addr: Multiaddr): void | ||
@@ -42,3 +42,3 @@ /** | ||
*/ | ||
addObservedAddr: (addr: Multiaddr) => void | ||
addObservedAddr(addr: Multiaddr): void | ||
@@ -48,3 +48,3 @@ /** | ||
*/ | ||
getAddresses: () => Multiaddr[] | ||
getAddresses(): Multiaddr[] | ||
} |
@@ -33,3 +33,3 @@ import type { AbortOptions, PendingDial } from '@libp2p/interface' | ||
*/ | ||
getConnections: (peerId?: PeerId) => Connection[] | ||
getConnections(peerId?: PeerId): Connection[] | ||
@@ -45,3 +45,3 @@ /** | ||
*/ | ||
getConnectionsMap: () => PeerMap<Connection[]> | ||
getConnectionsMap(): PeerMap<Connection[]> | ||
@@ -57,3 +57,3 @@ /** | ||
*/ | ||
openConnection: (peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions) => Promise<Connection> | ||
openConnection(peer: PeerId | Multiaddr | Multiaddr[], options?: OpenConnectionOptions): Promise<Connection> | ||
@@ -63,3 +63,3 @@ /** | ||
*/ | ||
closeConnections: (peer: PeerId, options?: AbortOptions) => Promise<void> | ||
closeConnections(peer: PeerId, options?: AbortOptions): Promise<void> | ||
@@ -72,3 +72,3 @@ /** | ||
*/ | ||
acceptIncomingConnection: (maConn: MultiaddrConnection) => Promise<boolean> | ||
acceptIncomingConnection(maConn: MultiaddrConnection): Promise<boolean> | ||
@@ -78,3 +78,3 @@ /** | ||
*/ | ||
afterUpgradeInbound: () => void | ||
afterUpgradeInbound(): void | ||
@@ -90,3 +90,3 @@ /** | ||
*/ | ||
getDialQueue: () => PendingDial[] | ||
getDialQueue(): PendingDial[] | ||
} |
@@ -19,7 +19,7 @@ import type { PeerId } from '@libp2p/interface/peer-id' | ||
*/ | ||
marshal: () => Uint8Array | ||
marshal(): Uint8Array | ||
/** | ||
* Verifies if the other provided Record is identical to this one. | ||
*/ | ||
equals: (other: Record) => boolean | ||
equals(other: Record): boolean | ||
} | ||
@@ -33,5 +33,5 @@ | ||
marshal: () => Uint8Array | ||
validate: (domain: string) => Promise<boolean> | ||
equals: (other: Envelope) => boolean | ||
marshal(): Uint8Array | ||
validate(domain: string): Promise<boolean> | ||
equals(other: Envelope): boolean | ||
} |
@@ -41,3 +41,3 @@ import type { Connection, Stream } from '@libp2p/interface/connection' | ||
*/ | ||
getProtocols: () => string[] | ||
getProtocols(): string[] | ||
@@ -47,3 +47,3 @@ /** | ||
*/ | ||
handle: (protocol: string, handler: StreamHandler, options?: StreamHandlerOptions) => Promise<void> | ||
handle(protocol: string, handler: StreamHandler, options?: StreamHandlerOptions): Promise<void> | ||
@@ -53,3 +53,3 @@ /** | ||
*/ | ||
unhandle: (protocol: string) => Promise<void> | ||
unhandle(protocol: string): Promise<void> | ||
@@ -59,3 +59,3 @@ /** | ||
*/ | ||
getHandler: (protocol: string) => StreamHandlerRecord | ||
getHandler(protocol: string): StreamHandlerRecord | ||
@@ -70,3 +70,3 @@ /** | ||
*/ | ||
register: (protocol: string, topology: Topology) => Promise<string> | ||
register(protocol: string, topology: Topology): Promise<string> | ||
@@ -76,3 +76,3 @@ /** | ||
*/ | ||
unregister: (id: string) => void | ||
unregister(id: string): void | ||
@@ -83,3 +83,3 @@ /** | ||
*/ | ||
getTopologies: (protocol: string) => Topology[] | ||
getTopologies(protocol: string): Topology[] | ||
} |
@@ -6,11 +6,11 @@ import type { Connection } from '@libp2p/interface/connection' | ||
export interface TransportManager { | ||
add: (transport: Transport) => void | ||
dial: (ma: Multiaddr, options?: any) => Promise<Connection> | ||
getAddrs: () => Multiaddr[] | ||
getTransports: () => Transport[] | ||
getListeners: () => Listener[] | ||
transportForMultiaddr: (ma: Multiaddr) => Transport | undefined | ||
listen: (addrs: Multiaddr[]) => Promise<void> | ||
remove: (key: string) => Promise<void> | ||
removeAll: () => Promise<void> | ||
add(transport: Transport): void | ||
dial(ma: Multiaddr, options?: any): Promise<Connection> | ||
getAddrs(): Multiaddr[] | ||
getTransports(): Transport[] | ||
getListeners(): Listener[] | ||
transportForMultiaddr(ma: Multiaddr): Transport | undefined | ||
listen(addrs: Multiaddr[]): Promise<void> | ||
remove(key: string): Promise<void> | ||
removeAll(): Promise<void> | ||
} |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24389
34
458
+ Added@libp2p/interface@0.1.3-62a56b54(transitive)
+ Added@libp2p/peer-collections@4.0.5-62a56b54(transitive)
+ Added@libp2p/peer-id@3.0.3-62a56b54(transitive)
- Removed@libp2p/interface@0.1.6(transitive)
- Removed@libp2p/peer-collections@4.0.11(transitive)
- Removed@libp2p/peer-id@3.0.6(transitive)