crypto: add StringCompressed() for PublicKey

Add StringCompressed to get a string representation of the key in
compressed form.

Close #3263

Signed-off-by: Ekaterina Pavlova <ekt@morphbits.io>
This commit is contained in:
Ekaterina Pavlova 2024-04-09 12:13:43 +03:00
parent 8913542f93
commit ae3515e819
19 changed files with 64 additions and 74 deletions

View file

@ -196,7 +196,7 @@ func Init(t *testing.T, rootpath string, e *neotest.Executor) {
require.NoError(t, ntr.Accounts[0].Decrypt("one", ntr.Scrypt))
designateSuperInvoker.Invoke(t, stackitem.Null{}, "designateAsRole",
int64(noderoles.P2PNotary), []any{ntr.Accounts[0].PublicKey().Bytes()})
t.Logf("Designated Notary node: %s", hex.EncodeToString(ntr.Accounts[0].PublicKey().Bytes()))
t.Logf("Designated Notary node: %s", ntr.Accounts[0].PublicKey().StringCompressed())
// Block #10: push verification contract with arguments into the chain.
verifyPath = filepath.Join(testDataPrefix, "verify_args", "verification_with_args_contract.go")