GetSignBytes() returns the canonical byte representation of the Transaction for signing and signature verification
()
| 148 | |
| 149 | // GetSignBytes() returns the canonical byte representation of the Transaction for signing and signature verification |
| 150 | func (x *Transaction) GetSignBytes() ([]byte, ErrorI) { |
| 151 | // exit with proto bytes but omit the signature |
| 152 | return Marshal(&Transaction{ |
| 153 | MessageType: x.MessageType, |
| 154 | Msg: x.Msg, |
| 155 | Signature: nil, |
| 156 | Time: x.Time, |
| 157 | CreatedHeight: x.CreatedHeight, |
| 158 | Fee: x.Fee, |
| 159 | Memo: x.Memo, |
| 160 | NetworkId: x.NetworkId, |
| 161 | ChainId: x.ChainId, |
| 162 | }) |
| 163 | } |
| 164 | |
| 165 | // Sign() executes a digital signature on the transaction |
| 166 | func (x *Transaction) Sign(pk crypto.PrivateKeyI) (err ErrorI) { |