Exemplo n.º 1
0
func (kp *Full) SignDecorated(input []byte) (xdr.DecoratedSignature, error) {
	sig, err := kp.Sign(input)
	if err != nil {
		return xdr.DecoratedSignature{}, err
	}

	return xdr.DecoratedSignature{
		Hint:      xdr.SignatureHint(kp.Hint()),
		Signature: xdr.Signature(sig),
	}, nil
}
Exemplo n.º 2
0
func (kp *Full) Sign(input []byte) ([]byte, error) {
	_, priv := kp.keys()
	return xdr.Signature(ed25519.Sign(priv, input)[:]), nil
}