Skip to content

ScriptPublicKey (Class)

A script public key.

Represents the locking conditions for an output. This script defines the conditions that must be met to spend the associated funds.

script property

script: str

The script bytes as a hex string.

version property

version: int

The version number.

__bytes__

__bytes__() -> bytes

The byte representation

__eq__

__eq__(other: object) -> bool

__new__

__new__(version: int, script: Binary) -> ScriptPublicKey

Create a new script public key.

PARAMETER DESCRIPTION
version

The script version number.

TYPE: int

script

The script bytes.

TYPE: Binary

RETURNS DESCRIPTION
ScriptPublicKey

A new ScriptPublicKey instance.

TYPE: ScriptPublicKey

__str__

__str__() -> str

The string representation.

RETURNS DESCRIPTION
str

The address as a hex string

TYPE: str