Export enr, dns, entree modules

This commit is contained in:
Franck Royer 2022-01-13 15:53:22 +11:00
parent 4bfe060064
commit e871da056f
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
4 changed files with 8 additions and 15 deletions

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';

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;
/**

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;

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[],