Skip to content

Commit

Permalink
Expose types to ensure documentation is complete
Browse files Browse the repository at this point in the history
  • Loading branch information
D4nte committed Jan 13, 2022
1 parent 21abe5e commit 7a9c22a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/lib/discovery/dns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { ENRTree } from './enrtree';

const dbg = debug('waku:discovery:dns');

type SearchContext = {
export type SearchContext = {
domain: string;
publicKey: string;
visits: { [key: string]: boolean };
Expand Down
4 changes: 2 additions & 2 deletions src/lib/discovery/enrtree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@ import { ecdsaVerify } from 'secp256k1';
import { ENR } from '../enr';
import { keccak256Buf } from '../utils';

type ENRRootValues = {
export type ENRRootValues = {
eRoot: string;
lRoot: string;
seq: number;
signature: string;
};

type ENRTreeValues = {
export type ENRTreeValues = {
publicKey: string;
domain: string;
};
Expand Down
4 changes: 2 additions & 2 deletions src/lib/discovery/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import { shuffle } from 'libp2p-gossipsub/src/utils';

export { getNodesFromHostedJson } from './hosted_json';
export { Bootstrap, BootstrapOptions } from './bootstrap';
export { DnsClient, DnsNodeDiscovery } from './dns';
export { DnsClient, DnsNodeDiscovery, SearchContext } from './dns';
export { Endpoints, DnsOverHttps } from './dns_over_https';
export { ENRTree } from './enrtree';
export { ENRTree, ENRTreeValues, ENRRootValues } from './enrtree';

export function getPseudoRandomSubset<T>(
values: T[],
Expand Down
1 change: 1 addition & 0 deletions src/lib/enr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from './constants';
export * from './enr';
export * from './types';
export * from './create';
export * from './keypair';

0 comments on commit 7a9c22a

Please sign in to comment.