Пример #1
0
func SignSignable(priv []byte, data interfaces.ISignable) ([]byte, error) {
	d, err := data.MarshalBinarySig()
	if err != nil {
		return nil, err
	}
	return Sign(priv, d), nil
}
Пример #2
0
func SignCommit(n uint64, tx interfaces.ISignable) {
	err := tx.Sign(NewPrivKey(n))
	if err != nil {
		panic(err)
	}
}