Skip to main content

fromOutputScript

reddcoinjs-lib v7.0.1-rdd.1Docs


reddcoinjs-lib v7.0.1-rdd.1 / address / fromOutputScript

Function: fromOutputScript()

fromOutputScript(output, network?): string

Converts an output script to a Bitcoin address.

Parameters

output: Uint8Array

The output script as a Buffer.

network?: Network

The Bitcoin network (optional).

Returns

string

The Bitcoin address corresponding to the output script.

Throws

If the output script has no matching address.

Defined in

ts_src/address.ts:179