We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ce9291 commit d4bf4f9Copy full SHA for d4bf4f9
script.go
@@ -3,7 +3,7 @@ package bitcoin
3
import (
4
"errors"
5
6
- "github.com/libsv/go-bt"
+ "github.com/libsv/go-bt/bscript"
7
)
8
9
// ScriptFromAddress will create an output P2PKH script from an address string
@@ -14,11 +14,11 @@ func ScriptFromAddress(address string) (string, error) {
14
}
15
16
// Generate a script from address
17
- rawScript, err := bt.NewP2PKHOutputFromAddress(address, 0)
+ rawScript, err := bscript.NewP2PKHFromAddress(address)
18
if err != nil {
19
return "", err
20
21
22
// Return the string version
23
- return rawScript.GetLockingScriptHexString(), nil
+ return rawScript.ToString(), nil
24
0 commit comments