Function getScriptAddress

Derives a script address (enterprise address) from a script.

This function calculates the script's hash, creates a script credential from it, and then constructs an enterprise address for the specified network.

If any step of the address creation process fails.