@libp2p/interfaces
Advanced tools
Comparing version 1.3.17 to 1.3.18
import type { CID } from 'multiformats/cid'; | ||
import type { AbortOptions } from '../index.js'; | ||
import type { PeerData } from '../peer-data/index.js'; | ||
import type { PeerInfo } from '../peer-info/index.js'; | ||
export interface ContentRouting { | ||
provide: (cid: CID, options?: AbortOptions) => Promise<void>; | ||
findProviders: (cid: CID, options?: AbortOptions) => AsyncIterable<PeerData>; | ||
findProviders: (cid: CID, options?: AbortOptions) => AsyncIterable<PeerInfo>; | ||
put: (key: Uint8Array, value: Uint8Array, options?: AbortOptions) => Promise<void>; | ||
@@ -8,0 +8,0 @@ get: (key: Uint8Array, options?: AbortOptions) => Promise<Uint8Array>; |
import type { PeerId } from '../peer-id/index.js'; | ||
import type { CID } from 'multiformats/cid'; | ||
import type { PeerData } from '../peer-data/index.js'; | ||
import type { PeerInfo } from '../peer-info/index.js'; | ||
import type { AbortOptions } from '../index.js'; | ||
@@ -59,4 +59,4 @@ import type { PeerDiscovery } from '../peer-discovery/index.js'; | ||
messageType: MessageType; | ||
closer: PeerData[]; | ||
providers: PeerData[]; | ||
closer: PeerInfo[]; | ||
providers: PeerInfo[]; | ||
record?: DHTRecord; | ||
@@ -69,3 +69,3 @@ } | ||
from: PeerId; | ||
peer: PeerData; | ||
peer: PeerInfo; | ||
type: EventTypes.FINAL_PEER; | ||
@@ -90,3 +90,3 @@ name: 'FINAL_PEER'; | ||
name: 'PROVIDER'; | ||
providers: PeerData[]; | ||
providers: PeerInfo[]; | ||
} | ||
@@ -93,0 +93,0 @@ /** |
@@ -1,5 +0,5 @@ | ||
import type { PeerData } from '../peer-data/index.js'; | ||
import type { PeerInfo } from '../peer-info/index.js'; | ||
import type { EventEmitter } from '../index.js'; | ||
export interface PeerDiscoveryEvents { | ||
'peer': CustomEvent<PeerData>; | ||
'peer': CustomEvent<PeerInfo>; | ||
} | ||
@@ -6,0 +6,0 @@ export interface PeerDiscovery extends EventEmitter<PeerDiscoveryEvents> { |
import type { PeerId } from '../peer-id/index.js'; | ||
import type { PeerData } from '../peer-data/index.js'; | ||
import type { PeerInfo } from '../peer-info/index.js'; | ||
import type { AbortOptions } from '../index.js'; | ||
export interface PeerRouting { | ||
findPeer: (peerId: PeerId, options?: AbortOptions) => Promise<PeerData>; | ||
getClosestPeers: (key: Uint8Array, options?: AbortOptions) => AsyncIterable<PeerData>; | ||
findPeer: (peerId: PeerId, options?: AbortOptions) => Promise<PeerInfo>; | ||
getClosestPeers: (key: Uint8Array, options?: AbortOptions) => AsyncIterable<PeerInfo>; | ||
} | ||
//# sourceMappingURL=index.d.ts.map |
@@ -5,3 +5,3 @@ import type { PeerId } from '../peer-id/index.js'; | ||
import type { Envelope } from '../record/index.js'; | ||
import type { PeerData } from '../peer-data/index.js'; | ||
import type { PeerInfo } from '../peer-info/index.js'; | ||
export interface Address { | ||
@@ -174,3 +174,3 @@ /** | ||
export interface PeerStoreEvents { | ||
'peer': CustomEvent<PeerData>; | ||
'peer': CustomEvent<PeerInfo>; | ||
'change:protocols': CustomEvent<PeerProtocolsChangeData>; | ||
@@ -177,0 +177,0 @@ 'change:multiaddrs': CustomEvent<PeerMultiaddrsChangeData>; |
{ | ||
"name": "@libp2p/interfaces", | ||
"version": "1.3.17", | ||
"version": "1.3.18", | ||
"description": "Interfaces for JS Libp2p", | ||
@@ -99,2 +99,6 @@ "license": "Apache-2.0 OR MIT", | ||
}, | ||
"./peer-info": { | ||
"import": "./dist/src/peer-info/index.js", | ||
"types": "./dist/src/peer-info/index.d.ts" | ||
}, | ||
"./peer-routing": { | ||
@@ -101,0 +105,0 @@ "import": "./dist/src/peer-routing/index.js", |
import type { CID } from 'multiformats/cid' | ||
import type { AbortOptions } from '../index.js' | ||
import type { PeerData } from '../peer-data/index.js' | ||
import type { PeerInfo } from '../peer-info/index.js' | ||
export interface ContentRouting { | ||
provide: (cid: CID, options?: AbortOptions) => Promise<void> | ||
findProviders: (cid: CID, options?: AbortOptions) => AsyncIterable<PeerData> | ||
findProviders: (cid: CID, options?: AbortOptions) => AsyncIterable<PeerInfo> | ||
put: (key: Uint8Array, value: Uint8Array, options?: AbortOptions) => Promise<void> | ||
get: (key: Uint8Array, options?: AbortOptions) => Promise<Uint8Array> | ||
} |
import type { PeerId } from '../peer-id/index.js' | ||
import type { CID } from 'multiformats/cid' | ||
import type { PeerData } from '../peer-data/index.js' | ||
import type { PeerInfo } from '../peer-info/index.js' | ||
import type { AbortOptions } from '../index.js' | ||
@@ -66,4 +66,4 @@ import type { PeerDiscovery } from '../peer-discovery/index.js' | ||
messageType: MessageType | ||
closer: PeerData[] | ||
providers: PeerData[] | ||
closer: PeerInfo[] | ||
providers: PeerInfo[] | ||
record?: DHTRecord | ||
@@ -77,3 +77,3 @@ } | ||
from: PeerId | ||
peer: PeerData | ||
peer: PeerInfo | ||
type: EventTypes.FINAL_PEER | ||
@@ -100,3 +100,3 @@ name: 'FINAL_PEER' | ||
name: 'PROVIDER' | ||
providers: PeerData[] | ||
providers: PeerInfo[] | ||
} | ||
@@ -103,0 +103,0 @@ |
@@ -1,6 +0,6 @@ | ||
import type { PeerData } from '../peer-data/index.js' | ||
import type { PeerInfo } from '../peer-info/index.js' | ||
import type { EventEmitter } from '../index.js' | ||
export interface PeerDiscoveryEvents { | ||
'peer': CustomEvent<PeerData> | ||
'peer': CustomEvent<PeerInfo> | ||
} | ||
@@ -7,0 +7,0 @@ |
import type { PeerId } from '../peer-id/index.js' | ||
import type { PeerData } from '../peer-data/index.js' | ||
import type { PeerInfo } from '../peer-info/index.js' | ||
import type { AbortOptions } from '../index.js' | ||
export interface PeerRouting { | ||
findPeer: (peerId: PeerId, options?: AbortOptions) => Promise<PeerData> | ||
getClosestPeers: (key: Uint8Array, options?: AbortOptions) => AsyncIterable<PeerData> | ||
findPeer: (peerId: PeerId, options?: AbortOptions) => Promise<PeerInfo> | ||
getClosestPeers: (key: Uint8Array, options?: AbortOptions) => AsyncIterable<PeerInfo> | ||
} |
@@ -5,3 +5,3 @@ import type { PeerId } from '../peer-id/index.js' | ||
import type { Envelope } from '../record/index.js' | ||
import type { PeerData } from '../peer-data/index.js' | ||
import type { PeerInfo } from '../peer-info/index.js' | ||
@@ -208,3 +208,3 @@ export interface Address { | ||
export interface PeerStoreEvents { | ||
'peer': CustomEvent<PeerData> | ||
'peer': CustomEvent<PeerInfo> | ||
'change:protocols': CustomEvent<PeerProtocolsChangeData> | ||
@@ -211,0 +211,0 @@ 'change:multiaddrs': CustomEvent<PeerMultiaddrsChangeData> |
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
1366616