diff --git a/ts_src/address.ts b/ts_src/address.ts index 0c0cda5..ad791ad 100644 --- a/ts_src/address.ts +++ b/ts_src/address.ts @@ -64,7 +64,7 @@ export function toBech32( return bech32.encode(prefix, words); } -export function fromOutputScript(output: Buffer, network: Network): string { +export function fromOutputScript(output: Buffer, network?: Network): string { // TODO: Network network = network || networks.bitcoin; @@ -84,7 +84,7 @@ export function fromOutputScript(output: Buffer, network: Network): string { throw new Error(bscript.toASM(output) + ' has no matching Address'); } -export function toOutputScript(address: string, network: Network): Buffer { +export function toOutputScript(address: string, network?: Network): Buffer { network = network || networks.bitcoin; let decodeBase58: Base58CheckResult | undefined; diff --git a/ts_src/ecpair.ts b/ts_src/ecpair.ts index 9e56919..3941afa 100644 --- a/ts_src/ecpair.ts +++ b/ts_src/ecpair.ts @@ -16,7 +16,7 @@ const isOptions = typeforce.maybe( interface ECPairOptions { compressed?: boolean; network?: Network; - rng?(arg0: Buffer): Buffer; + rng?(arg0: number): Buffer; } export interface ECPairInterface { diff --git a/types/address.d.ts b/types/address.d.ts index 1da68ac..be0e00a 100644 --- a/types/address.d.ts +++ b/types/address.d.ts @@ -13,5 +13,5 @@ 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; +export declare function fromOutputScript(output: Buffer, network?: Network): string; +export declare function toOutputScript(address: string, network?: Network): Buffer; diff --git a/types/ecpair.d.ts b/types/ecpair.d.ts index 33535bd..a5ae716 100644 --- a/types/ecpair.d.ts +++ b/types/ecpair.d.ts @@ -3,7 +3,7 @@ import { Network } from './networks'; interface ECPairOptions { compressed?: boolean; network?: Network; - rng?(arg0: Buffer): Buffer; + rng?(arg0: number): Buffer; } export interface ECPairInterface { compressed: boolean;