AddOutput adds an Output to the template.
(quorum int, pubkeys []ed25519.PublicKey, amount int64, assetID bc.Hash, refData, tags []byte)
| 264 | |
| 265 | // AddOutput adds an Output to the template. |
| 266 | func (tpl *Template) AddOutput(quorum int, pubkeys []ed25519.PublicKey, amount int64, assetID bc.Hash, refData, tags []byte) *Output { |
| 267 | out := &Output{ |
| 268 | Quorum: quorum, |
| 269 | Pubkeys: pubkeys, |
| 270 | Amount: amount, |
| 271 | AssetID: assetID, |
| 272 | Refdata: i10rjson.HexBytes(refData), |
| 273 | TokenTags: i10rjson.HexBytes(tags), |
| 274 | Index: tpl.index, |
| 275 | } |
| 276 | tpl.index++ |
| 277 | tpl.Outputs = append(tpl.Outputs, out) |
| 278 | return out |
| 279 | } |
| 280 | |
| 281 | // AddRetirement adds a Retirement to the template. |
| 282 | func (tpl *Template) AddRetirement(amount int64, assetID bc.Hash, refData []byte) *Retirement { |
no outgoing calls