mirror of
https://github.com/fluencelabs/js-libp2p
synced 2025-06-11 08:11:21 +00:00
Adds three methods to implement the `/libp2p/fetch/0.0.1` protocol: * `libp2p.fetch(peerId, key) => Promise<Uint8Array>` * `libp2p.fetchService.registerLookupFunction(prefix, lookupFunction)` * `libp2p.fetchService.unRegisterLookupFunction(prefix, [lookupFunction])` Co-authored-by: achingbrain <alex@achingbrain.net>
7 lines
138 B
JavaScript
7 lines
138 B
JavaScript
'use strict'
|
|
|
|
module.exports = {
|
|
// https://github.com/libp2p/specs/tree/master/fetch#wire-protocol
|
|
PROTOCOL: '/libp2p/fetch/0.0.1'
|
|
}
|