Skip to content

Commit

Permalink
chore: update interface name
Browse files Browse the repository at this point in the history
  • Loading branch information
achingbrain committed Jan 13, 2025
1 parent f171b1e commit 7789433
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions packages/routers/src/http-gateway-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const DEFAULT_TRUSTLESS_GATEWAYS = [
'https://4everland.io'
]

export interface HTTPGatwayRouterInit {
export interface HTTPGatewayRouterInit {
gateways?: Array<URL | string>
}

Expand All @@ -36,7 +36,7 @@ function toPeerInfo (url: string | URL): PeerInfo {
class HTTPGatewayRouter implements Partial<Routing> {
private readonly gateways: PeerInfo[]

constructor (init: HTTPGatwayRouterInit = {}) {
constructor (init: HTTPGatewayRouterInit = {}) {
this.gateways = (init.gateways ?? DEFAULT_TRUSTLESS_GATEWAYS).map(url => toPeerInfo(url))
}

Expand All @@ -51,6 +51,6 @@ class HTTPGatewayRouter implements Partial<Routing> {
/**
* Returns a static list of HTTP Gateways as providers
*/
export function httpGatewayRouting (init: HTTPGatwayRouterInit = {}): Partial<Routing> {
export function httpGatewayRouting (init: HTTPGatewayRouterInit = {}): Partial<Routing> {
return new HTTPGatewayRouter(init)
}
2 changes: 1 addition & 1 deletion packages/routers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
export { delegatedHTTPRouting } from './delegated-http-routing.js'
export { delegatedHTTPRoutingDefaults } from './utils/delegated-http-routing-defaults.js'
export { httpGatewayRouting } from './http-gateway-routing.js'
export type { HTTPGatwayRouterInit } from './http-gateway-routing.js'
export type { HTTPGatewayRouterInit } from './http-gateway-routing.js'
export { libp2pRouting } from './libp2p-routing.js'

0 comments on commit 7789433

Please sign in to comment.