From 7bf29f3564a239e3254e1de1c1433d4d7dff7c6a Mon Sep 17 00:00:00 2001 From: Daniel N <2color@users.noreply.github.com> Date: Wed, 6 Nov 2024 10:31:23 +0100 Subject: [PATCH] refactor: simplify naming --- packages/verified-fetch/src/index.ts | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/verified-fetch/src/index.ts b/packages/verified-fetch/src/index.ts index 051c5a22..daae1fe2 100644 --- a/packages/verified-fetch/src/index.ts +++ b/packages/verified-fetch/src/index.ts @@ -650,21 +650,21 @@ export interface CreateVerifiedFetchInit { * * @default false */ - webSocketsProviders?: boolean + webSockets?: boolean /** * Whether to enable WebTransport providers. * * @default false */ - webTransportProviders?: boolean + webTransport?: boolean /** * Whether to enable WebRTC providers. * * @default false */ - webRTCProviders?: boolean + webRTC?: boolean /** * In order to parse DNSLink records, we need to resolve DNS queries. You can @@ -816,18 +816,18 @@ export interface VerifiedFetchInit extends RequestInit, ProgressOptions { if (!isHelia(init)) { - if (init?.webTransportProviders ?? init?.webSocketsProviders ?? init?.webRTCProviders ?? false) { + if (init?.webTransport ?? init?.webSockets ?? init?.webRTC ?? false) { const libp2pConfig = libp2pDefaults() libp2pConfig.transports = [] - if (init?.webTransportProviders === true) { + if (init?.webTransport === true) { libp2pConfig.transports.push(webTransport()) } - if (init?.webSocketsProviders === true) { + if (init?.webSockets === true) { libp2pConfig.transports.push(webSockets()) } - if (init?.webRTCProviders === true) { + if (init?.webRTC === true) { libp2pConfig.transports.push(webRTCDirect()) }