From 59add9eb48c3dbcda0b1705c2e2137f4e53aab26 Mon Sep 17 00:00:00 2001 From: shaojunda Date: Tue, 3 Jan 2023 16:35:58 +0800 Subject: [PATCH] chore: update script generation statement --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index e35c9a5a..859d2cf2 100644 --- a/README.md +++ b/README.md @@ -175,7 +175,7 @@ key, err := secp256k1.RandomNew() if err != nil { // handle error } -script := address.GenerateScriptSecp256K1Blake160SignhashAll(key) +script := systemscript.Secp256K1Blake160SignhashAll(key) addr := &address.Address{Script: script, Network: types.NetworkTest} encodedAddr, err := addr.Encode() ``` @@ -188,7 +188,7 @@ Convert elliptic curve public key to an address (`secp256k1_blake160_signash_all ```go // You should provide an elliptic curve public key of compressed format, with 33 bytes. -script, err := address.GenerateScriptSecp256K1Blake160SignhashAllByPublicKey("0x03a0a7a7597b019828a1dda6ed52ab25181073ec3a9825d28b9abbb932fe1ec83d") +script, err := systemscript.Secp256K1Blake160SignhashAllByPublicKey("0x03a0a7a7597b019828a1dda6ed52ab25181073ec3a9825d28b9abbb932fe1ec83d") if err != nil { // handle error }