SignatureValues returns signature values. This signature needs to be in the [R || S || V] format where V is 0 or 1.
(tx *Transaction, sig []byte)
| 181 | // SignatureValues returns signature values. This signature |
| 182 | // needs to be in the [R || S || V] format where V is 0 or 1. |
| 183 | func (fs FrontierSigner) SignatureValues(tx *Transaction, sig []byte) (r, s, v *big.Int, err error) { |
| 184 | if len(sig) != 65 { |
| 185 | panic(fmt.Sprintf("wrong size for signature: got %d, want 65", len(sig))) |
| 186 | } |
| 187 | r = new(big.Int).SetBytes(sig[:32]) |
| 188 | s = new(big.Int).SetBytes(sig[32:64]) |
| 189 | v = new(big.Int).SetBytes([]byte{sig[64] + 27}) |
| 190 | return r, s, v, nil |
| 191 | } |
| 192 | |
| 193 | // Hash returns the hash to be signed by the sender. |
| 194 | // It does not uniquely identify the transaction. |