Beispiel #1
0
func (p PublicKey) NodePublicKey() string {
	hash, err := crypto.NewRipplePublicNode(p[:])
	if err != nil {
		return "Bad node public key"
	}
	return hash.String()
}
Beispiel #2
0
func (m *TMProposeSet) Extend() (ExtendedMessage, error) {
	key, err := crypto.ParsePublicKey(m.NodePubKey)
	if err != nil {
		return nil, err
	}
	public, err := crypto.NewRipplePublicNode(key.SerializeCompressed())
	if err != nil {
		return nil, err
	}
	sig, err := crypto.ParseSignature(m.Signature)
	if err != nil {
		return nil, err
	}
	return &ProposeSet{
		TMProposeSet: m,
		PublicKey:    key,
		Signature:    sig,
		NodePublic:   public,
	}, nil
}