-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use dht selectors and validators from interfaces (#74)
- Loading branch information
1 parent
69dbd29
commit 06c80ca
Showing
4 changed files
with
19 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,7 @@ | ||
import { ValidateFn, SelectFn } from 'libp2p-interfaces/src/types' | ||
|
||
type ValidateFn = (record: Uint8Array, peerId: Uint8Array) => Promise<boolean> | boolean | ||
type CompareFn = (received: Uint8Array, current: Uint8Array) => number | ||
export type SubscriptionKeyFn = (key: Uint8Array) => Promise<Uint8Array> | Uint8Array | ||
|
||
export interface Validator { | ||
validate: ValidateFn, | ||
select: CompareFn | ||
select: SelectFn | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters