code: func PublicKeyFromBytes(bs []byte, curveType CurveType) (PublicKey, error) {
  	switch curveType {
  	case CurveTypeEd25519:
  		if len(bs) != ed25519.PublicKeySize {
  			return PublicKey{}, fmt.Errorf("bytes passed have length %v but ed25519 public keys have %v bytes",
  				len(bs), ed25519.PublicKeySize)
  		}
  	case CurveTypeSecp256k1:
  		if len(bs) != btcec.PubKeyBytesLenCompressed {
  			return PublicKey{}, fmt.Errorf("bytes passed have length %v but secp256k1 public keys have %v bytes",
  				len(bs), btcec.PubKeyBytesLenCompressed)
  		}
  	case CurveTypeUnset:
  		if len(bs) > 0 {
  			return PublicKey{}, fmt.Errorf("attempting to create an 'unset' PublicKey but passed non-empty key bytes: %X", bs)
  		}
  		return PublicKey{}, nil
  	default:
  		return PublicKey{}, ErrInvalidCurve(curveType)
  	}
  
  	return PublicKey{PublicKey: bs, CurveType: curveType}, nil
  }
docs: // Currently this is a stub that reads the raw bytes returned by key_client and returns
  // an ed25519 public key.