multichain-address-validator
Version:
Multichain address validator for Bitcoin and other blockchains.
18 lines (17 loc) • 494 B
TypeScript
import { Address } from '../types.js';
export declare enum SegwitVersion {
NativeSegwit = 0,
TapRoot = 1
}
interface BTCValidatorOpts {
addressTypes: string[];
expectedLength?: number;
bech32Hrp?: [string];
allowedSegwitVersions?: [number];
hashFunction?: 'blake256' | 'blake256keccak256' | 'keccak256' | 'sha256';
regex?: RegExp;
}
declare const _default: (opts: BTCValidatorOpts) => {
isValidAddress(address: Address): boolean;
};
export default _default;