export function normalizeName(input: any): string; export function buildIndex({ electrum, WebSocket: WS, client, directIP }?: { electrum?: { url: string; ip: string; }[] | undefined; directIP?: boolean | undefined; }): Promise>; export function resolveName(input: any, opts?: {}): Promise; export function parseElectrumRecord(records: any): ({ url: string; ip: string; } | { url: string; ip?: undefined; })[]; export function getElectrumServers(index: any): ({ url: string; ip: string; } | { url: string; ip?: undefined; })[]; export function fetchElectrumServers(opts?: {}): Promise<({ url: string; ip: string; } | { url: string; ip?: undefined; })[]>; export function parseTldsRecord(records: any): string[]; export function getBcnrTlds(index: any): string[]; export function fetchBcnrTlds(opts?: {}): Promise; export function isBcnrNativeTld(tldOrList: any, tld: any): boolean; export interface ElectrumServer { url: string; ip?: string } export interface BnsNetwork { id: "chipnet" | "mainnet"; label: string; prefix: "bchtest" | "bitcoincash"; beacon: string | null; beaconScripthash: string | null; tldBeacon: string | null; tldBeaconScripthash: string | null; electrum: ElectrumServer[]; beaconOnly: RegExp; electrumListName: string; rootTldName: string; bootstrapTlds: string[]; startHeight: number | null; hostingBucket: string; nameListUrl: string; cdnIndexUrl: string; nostrTags: { names: string; tlds: string }; explorerTx: string; faucets: { name: string; url: string }[]; operatorAddress: string | null; accountPath: string; bchnRpcPort: number; blocklists: { name: string; beacon: string; scripthash?: string }[]; } /** The transaction's single BNS payload; null when it has none or more than one. */ export function onlyPayload(vouts: any[]): any | null; /** REG/TREG: is `mint` the only token of its category there is or can ever be? */ export function soleCertificate(tx: any, mint: any): boolean; /** A covenant-held name's verified state (PROTOCOL-ADDENDUM-covenant-names.md). */ export interface CovenantState { ownerPkh: string; expiry: number; tier: number; version: number } export const COVENANT_MAX_EXPIRY: number; export function pkhToAddress(pkhHex: string, prefix?: string): string; export function covenantTierIndex(name: string, covenant: any): number; export function covenantLockHex(covenant: any, tierIndex: number, ownerPkh: string, expiry: number): string; export function covenantClaim(payload: any, holder: any, name: string, network?: any): CovenantState | null; export function covenantEntryPaid(claim: CovenantState, tx: any, height: number, network?: any): boolean; export function admitCovenantState(entry: any, payload: any, holder: any, tx: any, height: number, network?: any): boolean; export function covenantPhase(state: CovenantState | null | undefined, height: number, network?: any): { status: "active" | "idle" | "open"; expiry: number; idleEnd: number } | null; export function historyHeight(history: Array<{ height: number }>): number; export function applyLifecycle>(names: T, height: number, network?: any): T; /** REL: does `tx` burn `entry`'s certificate, spending it from a beacon transaction in `txs`? */ export function burnsCertificate(tx: any, entry: { category: string }, txs: Map): boolean; /** One-block gap after a release. `releasedAt` undefined = never released. */ export function mayReRegister(releasedAt: number | undefined, height: number): boolean; export interface BlockFlag { name: string; reason: string; reportTxid: string; txid: string; height: number; evidence: string | null; vote: string | null; source: string | null; address: string; } export function sha256(bytes: Uint8Array): Uint8Array; export function addressToLockHex(address: string): string; export function addressToScripthash(address: string): string; export const BLOCK_REASONS: Set; /** Reduce one list's history to its current flags (pure). */ export function reduceBlocklist(o: { history: { tx_hash: string; height: number }[]; txs: Map | Record; address: string; source?: string | null }): Map; export function blocklistAddress(list: { name?: string; beacon?: string }, index?: Map | null): string | null; export function buildBlocklists(o?: { network?: any; lists?: { name?: string; beacon?: string }[]; index?: Map | null; electrum?: any; WebSocket?: any; client?: any; directIP?: boolean }): Promise>; export function withBlockFlag(entry: T, flags: Map | null): T; export const NETWORKS: { chipnet: BnsNetwork; mainnet: BnsNetwork }; export const DEFAULT_NETWORK_ID: "chipnet"; export function networkIdFromEnv(): string; export function getNetwork(idOrRecord?: string | BnsNetwork): BnsNetwork; export const NETWORK: BnsNetwork; export function requireBeacons(network?: string | BnsNetwork): BnsNetwork; export const BEACON: string | null; export const BEACON_SCRIPTHASH: string | null; export const TLD_BEACON: string | null; export const TLD_BEACON_SCRIPTHASH: string | null; export const ELECTRUM: ElectrumServer[]; export const PREFIX: "BNS1"; export const TLD: ".bch"; export const DEFAULT_TLD: "bch"; export const CHIPNET_ELECTRUM: { url: string; ip: string; }[]; export const ELECTRUM_LIST_NAME: string; export const ROOT_TLD_NAME: string; export const BOOTSTRAP_TLDS: string[];