bitcoinjs-lib/types/address.d.ts

18 lines
718 B
TypeScript
Raw Normal View History

/// <reference types="node" />
import { Network } from './networks';
2019-03-07 03:32:06 +01:00
export interface Base58CheckResult {
hash: Buffer;
version: number;
2019-03-07 03:32:06 +01:00
}
export interface Bech32Result {
version: number;
prefix: string;
data: Buffer;
2019-03-07 03:32:06 +01:00
}
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;