Skip to main content

fromOutputScript

bitcoinjs-lib v1.0.7


bitcoinjs-lib / address / fromOutputScript

Function: fromOutputScript()

fromOutputScript(output, network?): string

Defined in: ts_src/address.ts:175

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.