Skip to content

Commit d4bf4f9

Browse files
committed
Fix for wrong script func
1 parent 1ce9291 commit d4bf4f9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

script.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package bitcoin
33
import (
44
"errors"
55

6-
"github.com/libsv/go-bt"
6+
"github.com/libsv/go-bt/bscript"
77
)
88

99
// ScriptFromAddress will create an output P2PKH script from an address string
@@ -14,11 +14,11 @@ func ScriptFromAddress(address string) (string, error) {
1414
}
1515

1616
// Generate a script from address
17-
rawScript, err := bt.NewP2PKHOutputFromAddress(address, 0)
17+
rawScript, err := bscript.NewP2PKHFromAddress(address)
1818
if err != nil {
1919
return "", err
2020
}
2121

2222
// Return the string version
23-
return rawScript.GetLockingScriptHexString(), nil
23+
return rawScript.ToString(), nil
2424
}

0 commit comments

Comments
 (0)