Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chunkView Unmarshal exception #21

Closed
vic-dayou opened this issue Jul 20, 2022 · 1 comment
Closed

chunkView Unmarshal exception #21

vic-dayou opened this issue Jul 20, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@vic-dayou
Copy link

The main network blcok 70249973 already supports secp256k1 algorithm,
but sdk still does not support it, currently chunkView Unmarshal exception。

func WrapRawKey(keyType PublicKeyType, key []byte) (pk PublicKey, err error) {
	switch keyType {
	case KeyTypeED25519:
		if len(key) != ed25519.PublicKeySize {
			return pk, ErrInvalidPublicKey
		}

		pk[0] = RawKeyTypeED25519
		copy(pk[1:], key[0:ed25519.PublicKeySize])
		return
	case KeyTypeSECP256K1:
		// TODO!
		return pk, fmt.Errorf("SECP256K1 is not supported yet")
	}

	return pk, ErrInvalidKeyType
}
@mikroskeem mikroskeem added the bug Something isn't working label Jul 20, 2022
@mikroskeem mikroskeem self-assigned this Jul 20, 2022
@mikroskeem
Copy link
Member

Should be solved by #30. Can you confirm if this works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants