Export enr, dns, entree modules

This commit is contained in:
Franck Royer
2022-01-13 16:39:52 +11:00
parent 4bfe060064
commit e871da056f
4 changed files with 8 additions and 15 deletions
+4 -7
View File
@@ -1,10 +1,7 @@
export {
getNodesFromHostedJson,
getPseudoRandomSubset,
parseBootstrap,
BootstrapOptions,
BootstrapFn,
} from './lib/discovery';
export { getNodesFromHostedJson } from './lib/discovery';
export * as discovery from './lib/discovery';
export * as enr from './lib/enr';
export * as utils from './lib/utils';
+1 -1
View File
@@ -20,7 +20,7 @@ export interface BootstrapOptions {
/**
* The maximum of peers to connect to as part of the bootstrap process.
*
* @default {{DefaultMaxPeers}}
* @default [[DefaultMaxPeers]]
*/
maxPeers?: number;
/**
-7
View File
@@ -7,13 +7,6 @@ import { ecdsaVerify } from 'secp256k1';
import { ENR } from '../enr';
import { keccak256Buf } from '../utils';
export interface PeerInfo {
id?: Uint8Array | Buffer;
address?: string;
udpPort?: number | null;
tcpPort?: number | null;
}
type ENRRootValues = {
eRoot: string;
lRoot: string;
+3
View File
@@ -2,6 +2,9 @@ import { shuffle } from 'libp2p-gossipsub/src/utils';
export { getNodesFromHostedJson } from './hosted_json';
export { parseBootstrap, BootstrapOptions, BootstrapFn } from './bootstrap';
export { DnsClient, DnsNodeDiscovery } from './dns';
export { Endpoints, DnsOverHttps } from './dns_over_https';
export { ENRTree } from './enrtree';
export function getPseudoRandomSubset<T>(
values: T[],