[#199] owner: Rename to user, refactor and doc

Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
Leonard Lyubich 2022-04-11 09:30:22 +03:00 committed by LeL
parent d20999113a
commit 1ed426b8a6
36 changed files with 546 additions and 557 deletions

12
user/util.go Normal file
View file

@ -0,0 +1,12 @@
package user
import (
"crypto/ecdsa"
"github.com/nspcc-dev/neo-go/pkg/crypto/keys"
)
// IDFromKey forms the ID using script hash calculated for the given key.
func IDFromKey(id *ID, key ecdsa.PublicKey) {
id.SetScriptHash((*keys.PublicKey)(&key).GetScriptHash())
}