From 81bf4e8cc21a46577918fac8c3bfd92ecf270608 Mon Sep 17 00:00:00 2001 From: Slavomir Date: Sun, 29 Aug 2021 19:16:52 +0200 Subject: [PATCH] Add SighashTypeID --- sighash.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sighash.go b/sighash.go index 86c4813..b809859 100644 --- a/sighash.go +++ b/sighash.go @@ -12,6 +12,10 @@ func Sighash(namespace string, name string) []byte { return sum[0:8] } +func SighashTypeID(namespace string, name string) TypeID { + return TypeIDFromBytes(Sighash(namespace, name)) +} + // Namespace for calculating state instruction sighash signatures. const SIGHASH_STATE_NAMESPACE string = "state"