2019-01-04 10:33:02 +01:00
|
|
|
import { Network } from './networks';
|
2019-03-07 03:32:06 +01:00
|
|
|
export interface Base58CheckResult {
|
2019-01-04 10:33:02 +01:00
|
|
|
hash: Buffer;
|
|
|
|
version: number;
|
2019-03-07 03:32:06 +01:00
|
|
|
}
|
|
|
|
export interface Bech32Result {
|
2019-01-04 10:33:02 +01:00
|
|
|
version: number;
|
|
|
|
prefix: string;
|
|
|
|
data: Buffer;
|
2019-03-07 03:32:06 +01:00
|
|
|
}
|
2019-01-04 10:33:02 +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;
|
2019-04-11 08:55:33 +02:00
|
|
|
export declare function fromOutputScript(output: Buffer, network?: Network): string;
|
|
|
|
export declare function toOutputScript(address: string, network?: Network): Buffer;
|