bitcoinjs-lib/types/address.d.ts

18 lines
730 B
TypeScript
Raw Normal View History

/// <reference types="node" />
import { Network } from './networks';
export declare type Base58CheckResult = {
hash: Buffer;
version: number;
};
export declare type Bech32Result = {
version: number;
prefix: string;
data: Buffer;
};
export declare function fromBase58Check(address: string): Base58CheckResult;
export declare function fromBech32(address: string): Bech32Result;
export declare function toBase58Check(hash: Buffer, version: number): string;
export declare function toBech32(data: Buffer, version: number, prefix: string): string;
export declare function fromOutputScript(output: Buffer, network: Network): string;
export declare function toOutputScript(address: string, network: Network): Buffer;