Update btcwire path import paths to new location.
This commit is contained in:
parent
6c36218ef3
commit
857a78fcdf
1 changed files with 3 additions and 3 deletions
|
@ -8,8 +8,8 @@ import (
|
||||||
"encoding/hex"
|
"encoding/hex"
|
||||||
"fmt"
|
"fmt"
|
||||||
|
|
||||||
|
"github.com/btcsuite/btcd/wire"
|
||||||
"github.com/btcsuite/btcec"
|
"github.com/btcsuite/btcec"
|
||||||
"github.com/btcsuite/btcwire"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// This example demonstrates signing a message with a secp256k1 private key that
|
// This example demonstrates signing a message with a secp256k1 private key that
|
||||||
|
@ -26,7 +26,7 @@ func Example_signMessage() {
|
||||||
|
|
||||||
// Sign a message using the private key.
|
// Sign a message using the private key.
|
||||||
message := "test message"
|
message := "test message"
|
||||||
messageHash := btcwire.DoubleSha256([]byte(message))
|
messageHash := wire.DoubleSha256([]byte(message))
|
||||||
signature, err := privKey.Sign(messageHash)
|
signature, err := privKey.Sign(messageHash)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
fmt.Println(err)
|
fmt.Println(err)
|
||||||
|
@ -80,7 +80,7 @@ func Example_verifySignature() {
|
||||||
|
|
||||||
// Verify the signature for the message using the public key.
|
// Verify the signature for the message using the public key.
|
||||||
message := "test message"
|
message := "test message"
|
||||||
messageHash := btcwire.DoubleSha256([]byte(message))
|
messageHash := wire.DoubleSha256([]byte(message))
|
||||||
verified := signature.Verify(messageHash, pubKey)
|
verified := signature.Verify(messageHash, pubKey)
|
||||||
fmt.Println("Signature Verified?", verified)
|
fmt.Println("Signature Verified?", verified)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue