UNPKG

geowords

Version:

Tool for encoding geographic coordinates as sequence of words from bip39 or other dictionary

11 lines (10 loc) 684 B
import type { Location } from "geonumber"; export { Location }; import { bip39, dictionaries } from "./words/index.js"; export { bip39, dictionaries }; export declare function countDictionaryBits(dict: string[]): bigint; export declare function prepareDictionaryFromText(text: string): string[]; export declare function encodeNumber(number: bigint, wordsCount?: number, dict?: string[]): string[]; export declare function decodeNumber(inputWords: string[], dict?: string[]): bigint; export declare function encodeLocation({ lat, lon }: Location, wordsCount?: number, dict?: string[]): string[]; export declare function decodeLocation(inputWords: string[], dict?: string[]): Location;