diff --git a/assets/navigation.js b/assets/navigation.js index d6171e4..9b30b70 100644 --- a/assets/navigation.js +++ b/assets/navigation.js @@ -1 +1 @@ -window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA42U207CQBCG32W9BbUIKtwZPNCI0AhJLwhpaju4G7bbph08xPjuZlt6Xrbebr/5pvNndjc/BOELyYS4B6SkRyIXKZmQIPQPHJILeXpOMeCkR/ZM+GQy6BGPMu7HIMhkU5RPOQOBdzWJx90kySUlUPcZg9vfXqFZQfwBsUZTAjrNbL22LIDYvJekFYcYlr4PN2buWzGdgq2rrwYVc0muPAoBnNQ2wZZzW7Ey4cNXO/30+H/xHxIMAznKzBU+h9gUDEshEwjxzvUKp5JvdBpdV/7wEdCj0zCIQgECE426Qeqksr/GJD93lXfMmSNdGpshPWaS5dHhbPG6BvbDfO48L5b2wrFel+vldDlfqfYm06tozUJSxKiU7Q7CQxaKcncw6hv18uthozwbJLtZelWVbEmrCx0x8d7eZ3n6r3W2zMVTMb1j3qvSSmVNUBNUAsK3ar9VTpi6ckCTViIn75AcCW08n8B5fy/CT9GnzX3Lw5KMkzIOVe6YOjr9snXIz05UZx2Hxnh4dVnNwwbOn6WldWvyR1vRqFmke8jT5zh5cSsrjt+R2luwjZwuxzfGSL632z8DYBsO7gYAAA==" \ No newline at end of file +window.navigationData = "data:application/octet-stream;base64,H4sIAAAAAAAAA5WVX2+bMBTFv4v3mqxNmnZr3qa0W1HTgJZIeagixOCmtmJsC27aTlO/e2UI/43JXs25v8s9Phee/xGEdyRzEhyRkhFRAVIyJ7GMjhzSC336lWLMyYgcmIjIfDoiIWU8SkCQ+XNZvuAMBP5oQEIepGkBqQRN3mT6/WNUYtaQvEJiwVQCG0Y/B4EsDBDyClchkyKtqEwgJPsgLMC9Ja3xr296+kQ/AUP6X30aJbY+D4jqIRARh6SfXBPZWJWDrrK8Z0Nm423kAYQj9rKfVUqsM242ngeQOHe6qZdIrBFfg4QFf8pEGrRN9NW0Rq6U65BCDL3YtrDD3NWoTETw3t2Y7Pi8lTmmKGM9yunWHMHQaGLONOptjmbpWshYSQECzXedo1vKoWuykPTjofKBOQvJEGbLkJ48saxGxezobQ2298ul/7hytyvf++1u3IW7XJtyk+NNaksgKaKqYPujCLMvQJkdVONJs/xm1irPB8mX1I6qKzvQeqAVEy/dPOvTs+LsOatf5fS+c2dyK4O1hRajUhCR13itasKMVQgsbqV68gHISWG15w04Hx+EfBNj2s5bYZbW+JnGp8aMma2zh20A/qWnOu84m9zOri7rfmyB80dN6WxN8aM1NGoX2X6+2ec4lLweAfyrzOBK3HLq8vbb5HraxqZPgTqXqrVm6O5j9wnKZG9r+QgAAA==" \ No newline at end of file diff --git a/assets/search.js b/assets/search.js index a1b3190..b0fbff0 100644 --- a/assets/search.js +++ b/assets/search.js @@ -1 +1 @@ -window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA7WbW2/buBKA/4vyqmTDm2znbTd79jTYtgm2wemDERiqzdhCbckryUmDIP/9gJQsDeUZhbLblyax58b5hkOKYl+DPHsugqvpa/A9SRfBFQ+DNN7o4CpI0oX+EYTBLl8HV8EmW+zWuvjNfnqxKjfrIAzm67godBFcBcFbuLcQycbEqiy3jYXHXTovkyxtbZTbc4aYCoNtnOu0bGIAtpUSUWN+NitfttrHwZn5/aKR73Fmtew/9JCud0WZbb7o/Ennvd6h4C8e6IGrs4NPvYffsdUZcBskV22IH+7v75oAk7TU+WM8b+rFfDssAfxSjhvjj7qcrzysn+0F+0ZoIyUcbXP9mPz4K8vv8qzM5tnaxymmdGwAS13eaZ1/0mXs49oVP9bpKk4Xa20khgwb1RoSQqd6viblqiq0D9Zy3h/EgfgJ9VWYyv6q1+u/0+w53Q+nOCaAM9rWe7k5TAARbq6XSVFqzyIl4kSMnBQgoPmXmYXX2WabpTote9LYERxGkF1y2UlJHvcUDebsDOr1Db87JCKMeZam2vbmT3EaL/tqGA0H0/8JYa2z5fBYGqXjAuhO75s0KfsL1Uj82kWi8eC9UNio8UHVM+H+/q6e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ubF3OGZF1v60s5IADQEgQ15JZVUd/KAOMHa7WgVrjqgh+IH3jlVHkZpdl+Fs+ShRM23CFQJVJd1n/McqwVAGwUrSpbm9iZmRw0IU5pmjcQq+YNBJhWoAEpKuz9/R4sagYKlNVbI0ElEFx4BhZA5hjFq3plga4AEswrRVWsuQ3ZZc5BT+OUY9vDDjTBoDnVyKru190DSTBaSSXcqrpzpLrG39oB9cqoeWbO2r9lTjtRoJNFlN7+VgqYU6DGBLVQWbWydMpDgPqSl3VfoGZ19VKC2CookHNFLbaVBWSNB1mPKPf2FTM6SUDSJOW6esXQTTfcZVGzwoB2qkt4tGBwlI/WhwDFLUS9L6KKvCk1bK8BN7nU4M26d1DpoKEpdJI8hME22ep1kurgavrw9vZ/gV8h7BE4AAA="; \ No newline at end of file +window.searchData = "data:application/octet-stream;base64,H4sIAAAAAAAAA71cW3ObyBL+L/iVeM1cAPltN3v2JLVJ7Nq4Th5UKRcrjS0qEmgRTjblyn/fmgFB96gbg6Q9L7Ej9f37umeAwc9BVX7bBdfz5+BLXiyDaxEGRbYxwXWQF0vzdxAGT9U6uA425fJpbXY/uU8vV/VmHYTBYp3tdmYXXAfBj3BvIVadiVVdbzsLD0/Fos7LordRb19FhKkw2GaVKeouBmBbaxl35u/v6+9bM8bBhf39spMfcOa03D98Sq+fdnW5+Wiqr6Ya9A4F/+VED1xdHHw6On3PlpdwH6TQfYhv7u5uuwDzojbVQ7bo+GK/nVYAcaXSzviDqRerEdYv9oJDGbpIGUfbyjzkf/9WVrdVWZeLcj3GKaV0bACPpr41pnpv6myMayx+rNNVVizXxkpMSZvUmhKCx55Peb1qiPbGWa6GgzgQP4FfO8vsT2a9/r0ovxX7dHbHBHDB23qpNocFYMKtzGO+q81IkjJxEkZOChCg+ZvtwtflZlsWpqgHyugJTkMwuhLKK0mVDZCGcnYB9YbS91NiwliURWHcbH6fFdnjEIfJcCj9M4S1Lh+nx9IpHReA395vi7weJqqV+HcXic7D6IXCRU0n1XbC3d1t2w3DGZ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znVzFMkHDJQh5laRRvNghIPuSDinlmWoMeSIVQs81CbJKUFDyz1mHNs6nlP7PHhzgOs1u1U4aFLQH5pk6+cw2OZbs84LE1zPP//48Q+FqTVFxkoAAA=="; \ No newline at end of file diff --git a/classes/auth.ClientAuth.html b/classes/auth.ClientAuth.html index 2fb8484..9092676 100644 --- a/classes/auth.ClientAuth.html +++ b/classes/auth.ClientAuth.html @@ -1,9 +1,17 @@ -ClientAuth | @libp2p/http-fetch

Constructors

constructor +ClientAuth | @libp2p/http-fetch

Constructors

Properties

tokenTTL: number = ...
tokens: Map<string, tokenInfo> = ...

Methods

  • Parameters

    • hostname: string

    Returns undefined | string

\ No newline at end of file +

Constructors

Properties

tokenTTL: number = ...
tokens: Map<string, TokenInfo> = ...

Methods

  • authenticatedFetch is like fetch, but it also handles HTTP Peer ID +authentication with the server.

    +

    If we have not seen the server before, verifyPeer will be called to check +if we want to make the request to the server with the given peer id. This +happens after we've authenticated the server.

    +

    Parameters

    Returns Promise<Response & {
        peer: PeerId;
    }>

  • Parameters

    • hostname: string

    Returns undefined | string

  • Parameters

    • hostname: string

    Returns undefined | {
        authorization: string;
        peer: PeerId;
    }

\ No newline at end of file diff --git a/classes/auth.ServerAuth.html b/classes/auth.ServerAuth.html index b118bdb..33a8024 100644 --- a/classes/auth.ServerAuth.html +++ b/classes/auth.ServerAuth.html @@ -1,18 +1,18 @@ -ServerAuth | @libp2p/http-fetch

Constructors

constructor +ServerAuth | @libp2p/http-fetch

Constructors

  • Parameters

    • key: PrivateKey
    • validHostnames: ((hostname) => boolean)
        • (hostname): boolean
        • Parameters

          • hostname: string

          Returns boolean

    • Optional opts: {
          logger?: Logger;
          tokenTTL?: number;
      }
      • Optional logger?: Logger
      • Optional tokenTTL?: number

    Returns ServerAuth

Properties

httpHandler: httpHandler = ...
logger?: Logger
tokenTTL: number = ...
validHostname: ((hostname) => boolean)

Type declaration

    • (hostname): boolean
    • Parameters

      • hostname: string

      Returns boolean

Methods

  • Parameters

    • clientPeerId: PeerId
    • hostname: string

    Returns string

\ No newline at end of file +

Constructors

Properties

httpHandler: HttpHandler = ...
logger?: Logger
tokenTTL: number = ...
validHostname: ((hostname) => boolean)

Type declaration

    • (hostname): boolean
    • Parameters

      • hostname: string

      Returns boolean

Methods

\ No newline at end of file diff --git a/classes/well_known_handler.WellKnownHandler.html b/classes/well_known_handler.WellKnownHandler.html index 560f944..f3eb91c 100644 --- a/classes/well_known_handler.WellKnownHandler.html +++ b/classes/well_known_handler.WellKnownHandler.html @@ -1,5 +1,5 @@ -WellKnownHandler | @libp2p/http-fetch

Constructors

constructor +WellKnownHandler | @libp2p/http-fetch

Constructors

Properties

myWellKnownProtos: ProtosMap = {}

Methods

  • Parameters

    • protocol: string
    • path: string

    Returns void

\ No newline at end of file +

Constructors

Properties

myWellKnownProtos: ProtosMap = {}

Methods

\ No newline at end of file diff --git a/functions/index.http-1.html b/functions/index.http-1.html index c642d7d..215b872 100644 --- a/functions/index.http-1.html +++ b/functions/index.http-1.html @@ -1,3 +1,3 @@ http | @libp2p/http-fetch
  • Create an HTTP service that provides a fetch implementation and a way to register custom HTTP handlers.

    Parameters

    • init: HTTPInit = {}

      Options to configure the HTTP service.

      -

    Returns ((components) => HTTP)

\ No newline at end of file +

Returns ((components) => HTTP)

\ No newline at end of file diff --git a/functions/index.httpCustomServer.html b/functions/index.httpCustomServer.html index c46f221..9c86156 100644 --- a/functions/index.httpCustomServer.html +++ b/functions/index.httpCustomServer.html @@ -1,4 +1,4 @@ httpCustomServer | @libp2p/http-fetch
\ No newline at end of file +

Returns ((components) => HTTP & HTTPWithCustomHandler)

\ No newline at end of file diff --git a/functions/ping.sendPing.html b/functions/ping.sendPing.html index 7f57db5..1a46dd0 100644 --- a/functions/ping.sendPing.html +++ b/functions/ping.sendPing.html @@ -1,4 +1,4 @@ sendPing | @libp2p/http-fetch
\ No newline at end of file +

Returns Promise<void>

\ No newline at end of file diff --git a/functions/ping.servePing.html b/functions/ping.servePing.html index 553b819..c89f37a 100644 --- a/functions/ping.servePing.html +++ b/functions/ping.servePing.html @@ -1,4 +1,4 @@ servePing | @libp2p/http-fetch
\ No newline at end of file +
\ No newline at end of file diff --git a/interfaces/auth.AuthenticateServerOptions.html b/interfaces/auth.AuthenticateServerOptions.html new file mode 100644 index 0000000..c6a2998 --- /dev/null +++ b/interfaces/auth.AuthenticateServerOptions.html @@ -0,0 +1,9 @@ +AuthenticateServerOptions | @libp2p/http-fetch

Interface AuthenticateServerOptions

interface AuthenticateServerOptions {
    fetch?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
    hostname?: string;
    signal?: AbortSignal;
}

Hierarchy

Properties

Properties

fetch?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

The Fetch implementation to use

+

Type declaration

Default

globalThis.fetch
+
+
hostname?: string

The hostname to use - by default this will be extracted from the .host +property of authEndpointURI

+
signal?: AbortSignal
\ No newline at end of file diff --git a/interfaces/auth.AuthenticatedFetchOptions.html b/interfaces/auth.AuthenticatedFetchOptions.html new file mode 100644 index 0000000..eb9672f --- /dev/null +++ b/interfaces/auth.AuthenticatedFetchOptions.html @@ -0,0 +1,39 @@ +AuthenticatedFetchOptions | @libp2p/http-fetch

Interface AuthenticatedFetchOptions

interface AuthenticatedFetchOptions {
    body?: null | BodyInit;
    cache?: RequestCache;
    credentials?: RequestCredentials;
    fetch?: {
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
        (input, init?): Promise<Response>;
    };
    headers?: HeadersInit;
    hostname?: string;
    integrity?: string;
    keepalive?: boolean;
    method?: string;
    mode?: RequestMode;
    priority?: RequestPriority;
    redirect?: RequestRedirect;
    referrer?: string;
    referrerPolicy?: ReferrerPolicy;
    signal?: null | AbortSignal;
    window?: null;
    verifyPeer?(peerId, options): boolean | Promise<boolean>;
}

Hierarchy

  • RequestInit
    • AuthenticatedFetchOptions

Properties

body?: null | BodyInit

A BodyInit object or null to set request's body.

+
cache?: RequestCache

A string indicating how the request will interact with the browser's cache to set request's cache.

+
credentials?: RequestCredentials

A string indicating whether credentials will be sent with the request always, never, or only when sent to a same-origin URL. Sets request's credentials.

+
fetch?: {
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
    (input, init?): Promise<Response>;
}

The Fetch implementation to use

+

Type declaration

Default

globalThis.fetch
+
+
headers?: HeadersInit

A Headers object, an object literal, or an array of two-item arrays to set request's headers.

+
hostname?: string

The hostname to use - by default this will be extracted from the .host +property of authEndpointURI

+
integrity?: string

A cryptographic hash of the resource to be fetched by request. Sets request's integrity.

+
keepalive?: boolean

A boolean to set request's keepalive.

+
method?: string

A string to set request's method.

+
mode?: RequestMode

A string to indicate whether the request will use CORS, or will be restricted to same-origin URLs. Sets request's mode.

+
priority?: RequestPriority
redirect?: RequestRedirect

A string indicating whether request follows redirects, results in an error upon encountering a redirect, or returns the redirect (in an opaque fashion). Sets request's redirect.

+
referrer?: string

A string whose value is a same-origin URL, "about:client", or the empty string, to set request's referrer.

+
referrerPolicy?: ReferrerPolicy

A referrer policy to set request's referrerPolicy.

+
signal?: null | AbortSignal

An AbortSignal to set request's signal.

+
window?: null

Can only be null. Used to disassociate request from any Window.

+

Methods

  • A function to verify the peer ID of the server. This function +will be called after the server has authenticated itself. +If the function returns false, the request will be aborted.

    +

    Parameters

    Returns boolean | Promise<boolean>

\ No newline at end of file diff --git a/interfaces/auth.HttpHandler.html b/interfaces/auth.HttpHandler.html new file mode 100644 index 0000000..68171b3 --- /dev/null +++ b/interfaces/auth.HttpHandler.html @@ -0,0 +1 @@ +HttpHandler | @libp2p/http-fetch
interface HttpHandler ((req) => Promise<Response>)
\ No newline at end of file diff --git a/interfaces/auth.ServerAuthOps.html b/interfaces/auth.ServerAuthOps.html new file mode 100644 index 0000000..9a3d3ef --- /dev/null +++ b/interfaces/auth.ServerAuthOps.html @@ -0,0 +1,3 @@ +ServerAuthOps | @libp2p/http-fetch
interface ServerAuthOps {
    logger?: Logger;
    tokenTTL?: number;
}

Properties

Properties

logger?: Logger
tokenTTL?: number
\ No newline at end of file diff --git a/interfaces/auth.TokenInfo.html b/interfaces/auth.TokenInfo.html new file mode 100644 index 0000000..67825e0 --- /dev/null +++ b/interfaces/auth.TokenInfo.html @@ -0,0 +1,4 @@ +TokenInfo | @libp2p/http-fetch
interface TokenInfo {
    bearer: string;
    creationTime: Date;
    peer: PeerId;
}

Properties

Properties

bearer: string
creationTime: Date
peer: PeerId
\ No newline at end of file diff --git a/interfaces/index.CustomHTTPHandlerInit.html b/interfaces/index.CustomHTTPHandlerInit.html index 63c5a4c..295ed09 100644 --- a/interfaces/index.CustomHTTPHandlerInit.html +++ b/interfaces/index.CustomHTTPHandlerInit.html @@ -1,2 +1,2 @@ -CustomHTTPHandlerInit | @libp2p/http-fetch

Interface CustomHTTPHandlerInit

interface CustomHTTPHandlerInit {
    customHTTPHandler(req): Promise<Response>;
}

Methods

\ No newline at end of file +CustomHTTPHandlerInit | @libp2p/http-fetch

Interface CustomHTTPHandlerInit

interface CustomHTTPHandlerInit {
    customHTTPHandler(req): Promise<Response>;
}

Methods

\ No newline at end of file diff --git a/interfaces/index.FetchComponents.html b/interfaces/index.FetchComponents.html index 402abc5..6c51ac4 100644 --- a/interfaces/index.FetchComponents.html +++ b/interfaces/index.FetchComponents.html @@ -1,4 +1,4 @@ -FetchComponents | @libp2p/http-fetch
interface FetchComponents {
    connectionManager: ConnectionManager;
    logger: ComponentLogger;
    registrar: Registrar;
}

Properties

connectionManager +FetchComponents | @libp2p/http-fetch
interface FetchComponents {
    connectionManager: ConnectionManager;
    logger: ComponentLogger;
    registrar: Registrar;
}

Properties

connectionManager: ConnectionManager
registrar: Registrar
\ No newline at end of file +

Properties

connectionManager: ConnectionManager
registrar: Registrar
\ No newline at end of file diff --git a/interfaces/index.HTTP.html b/interfaces/index.HTTP.html index 0121547..fe5bc10 100644 --- a/interfaces/index.HTTP.html +++ b/interfaces/index.HTTP.html @@ -1,6 +1,6 @@ HTTP | @libp2p/http-fetch

HTTP service interface.

-
interface HTTP {
    fetch(request, requestInit?): Promise<Response>;
    getPeerMeta(peer): Promise<ProtosMap>;
    handleHTTPProtocol(protocol, path, handler): void;
    prefixForProtocol(peer, protocol): Promise<string>;
}

Methods

interface HTTP {
    fetch(request, requestInit?): Promise<Response>;
    getPeerMeta(peer): Promise<ProtosMap>;
    handleHTTPProtocol(protocol, path, handler): void;
    prefixForProtocol(peer, protocol): Promise<string>;
}

Methods

\ No newline at end of file +

Methods

\ No newline at end of file diff --git a/interfaces/index.HTTPInit.html b/interfaces/index.HTTPInit.html index f8bf03b..22f70c8 100644 --- a/interfaces/index.HTTPInit.html +++ b/interfaces/index.HTTPInit.html @@ -1,4 +1,4 @@ HTTPInit | @libp2p/http-fetch

Options to configure the HTTP service.

Only required if you want to specify a custom fetch implementation. Or provide one if your environment does not have a global fetch.

-
interface HTTPInit {
    fetch?(request): Promise<Response>;
}

Methods

Methods

\ No newline at end of file +
interface HTTPInit {
    fetch?(request): Promise<Response>;
}

Methods

Methods

\ No newline at end of file diff --git a/interfaces/index.HTTPWithCustomHandler.html b/interfaces/index.HTTPWithCustomHandler.html index cc89a82..6027d4d 100644 --- a/interfaces/index.HTTPWithCustomHandler.html +++ b/interfaces/index.HTTPWithCustomHandler.html @@ -1,3 +1,3 @@ -HTTPWithCustomHandler | @libp2p/http-fetch

Interface HTTPWithCustomHandler

interface HTTPWithCustomHandler {
    registerProtocol(protocol, path): void;
    serveWellKnownProtocols(req): Promise<Response>;
}

Methods

registerProtocol +HTTPWithCustomHandler | @libp2p/http-fetch

Interface HTTPWithCustomHandler

interface HTTPWithCustomHandler {
    registerProtocol(protocol, path): void;
    serveWellKnownProtocols(req): Promise<Response>;
}

Methods

  • Parameters

    • protocol: string
    • path: string

    Returns void

\ No newline at end of file +

Methods

  • Parameters

    • protocol: string
    • path: string

    Returns void

\ No newline at end of file diff --git a/modules/auth.html b/modules/auth.html index 60513d9..92bb46d 100644 --- a/modules/auth.html +++ b/modules/auth.html @@ -1,5 +1,10 @@ -auth | @libp2p/http-fetch

Index

Classes

ClientAuth +auth | @libp2p/http-fetch
\ No newline at end of file diff --git a/modules/index.html b/modules/index.html index 545d6ca..716e089 100644 --- a/modules/index.html +++ b/modules/index.html @@ -5,7 +5,7 @@

Example

See the examples/ for full examples of how to use the HTTP service.

import { createLibp2p } from 'libp2p'
import { http } from '@libp2p/http-fetch'

const node = await createLibp2p({
// other options ...
services: {
http: http()
}
})

await node.start()

// Make an http request to a libp2p peer
let resp = await node.services.http.fetch('multiaddr:/dns4/localhost/tcp/1234')
// Or a traditional HTTP request
resp = await node.services.http.fetch('multiaddr:/dns4/example.com/tcp/443/tls/http')
// And of course, you can use the fetch API as you normally would
resp = await node.services.http.fetch('https://example.com')

// This gives you the accessibility of the fetch API with the flexibility of using a p2p network.
-

Index

Interfaces

Index

Interfaces

CustomHTTPHandlerInit FetchComponents HTTP HTTPInit diff --git a/modules/ping.html b/modules/ping.html index 3396555..30ebf41 100644 --- a/modules/ping.html +++ b/modules/ping.html @@ -1,4 +1,4 @@ -ping | @libp2p/http-fetch

Index

Variables

PING_PROTOCOL_ID +ping | @libp2p/http-fetch

Index

Variables

Functions

\ No newline at end of file diff --git a/modules/well_known_handler.html b/modules/well_known_handler.html index 0cad716..bc24595 100644 --- a/modules/well_known_handler.html +++ b/modules/well_known_handler.html @@ -1,4 +1,5 @@ -well-known-handler | @libp2p/http-fetch

Module well-known-handler

References

WELL_KNOWN_PROTOCOLS +well-known-handler | @libp2p/http-fetch

Module well-known-handler

References

Classes

Type Aliases

Type Aliases

References

Re-exports WELL_KNOWN_PROTOCOLS
\ No newline at end of file diff --git a/types/well_known_handler.ProtocolID.html b/types/well_known_handler.ProtocolID.html new file mode 100644 index 0000000..d16d609 --- /dev/null +++ b/types/well_known_handler.ProtocolID.html @@ -0,0 +1 @@ +ProtocolID | @libp2p/http-fetch
ProtocolID: string
\ No newline at end of file diff --git a/types/well_known_handler.ProtosMap.html b/types/well_known_handler.ProtosMap.html index 3739b7b..d102bc9 100644 --- a/types/well_known_handler.ProtosMap.html +++ b/types/well_known_handler.ProtosMap.html @@ -1 +1 @@ -ProtosMap | @libp2p/http-fetch
ProtosMap: Record<ProtocolID, {
    path: string;
}>

Type declaration

  • path: string
\ No newline at end of file +ProtosMap | @libp2p/http-fetch
ProtosMap: Record<ProtocolID, {
    path: string;
}>

Type declaration

  • path: string
\ No newline at end of file diff --git a/variables/auth.HTTPPeerIDAuthProto.html b/variables/auth.HTTPPeerIDAuthProto.html index 4aabdbb..08a96d4 100644 --- a/variables/auth.HTTPPeerIDAuthProto.html +++ b/variables/auth.HTTPPeerIDAuthProto.html @@ -1 +1 @@ -HTTPPeerIDAuthProto | @libp2p/http-fetch

Variable HTTPPeerIDAuthProtoConst

HTTPPeerIDAuthProto: "/http-peer-id-auth/1.0.0" = '/http-peer-id-auth/1.0.0'
\ No newline at end of file +HTTPPeerIDAuthProto | @libp2p/http-fetch

Variable HTTPPeerIDAuthProtoConst

HTTPPeerIDAuthProto: "/http-peer-id-auth/1.0.0" = '/http-peer-id-auth/1.0.0'
\ No newline at end of file diff --git a/variables/auth.PeerIDAuthScheme.html b/variables/auth.PeerIDAuthScheme.html index 82d025c..ffe3561 100644 --- a/variables/auth.PeerIDAuthScheme.html +++ b/variables/auth.PeerIDAuthScheme.html @@ -1 +1 @@ -PeerIDAuthScheme | @libp2p/http-fetch

Variable PeerIDAuthSchemeConst

PeerIDAuthScheme: "libp2p-PeerID" = 'libp2p-PeerID'
\ No newline at end of file +PeerIDAuthScheme | @libp2p/http-fetch

Variable PeerIDAuthSchemeConst

PeerIDAuthScheme: "libp2p-PeerID" = 'libp2p-PeerID'
\ No newline at end of file diff --git a/variables/index.WELL_KNOWN_PROTOCOLS.html b/variables/index.WELL_KNOWN_PROTOCOLS.html index eb9f5dd..94b674e 100644 --- a/variables/index.WELL_KNOWN_PROTOCOLS.html +++ b/variables/index.WELL_KNOWN_PROTOCOLS.html @@ -1 +1 @@ -WELL_KNOWN_PROTOCOLS | @libp2p/http-fetch

Variable WELL_KNOWN_PROTOCOLSConst

WELL_KNOWN_PROTOCOLS: "/.well-known/libp2p/protocols" = '/.well-known/libp2p/protocols'
\ No newline at end of file +WELL_KNOWN_PROTOCOLS | @libp2p/http-fetch

Variable WELL_KNOWN_PROTOCOLSConst

WELL_KNOWN_PROTOCOLS: "/.well-known/libp2p/protocols" = '/.well-known/libp2p/protocols'
\ No newline at end of file diff --git a/variables/ping.PING_PROTOCOL_ID.html b/variables/ping.PING_PROTOCOL_ID.html index 91929b4..0f4c29c 100644 --- a/variables/ping.PING_PROTOCOL_ID.html +++ b/variables/ping.PING_PROTOCOL_ID.html @@ -1 +1 @@ -PING_PROTOCOL_ID | @libp2p/http-fetch

Variable PING_PROTOCOL_IDConst

PING_PROTOCOL_ID: "/http-ping/1" = '/http-ping/1'
\ No newline at end of file +PING_PROTOCOL_ID | @libp2p/http-fetch

Variable PING_PROTOCOL_IDConst

PING_PROTOCOL_ID: "/http-ping/1" = '/http-ping/1'
\ No newline at end of file