AddIssuance adds an Issuance to the template.
(version int, blockchainID []byte, assetTag []byte, quorum int, keyHashes [][]byte, path [][]byte, pubkeys []ed25519.PublicKey, amount int64, refData, nonce []byte)
| 222 | |
| 223 | // AddIssuance adds an Issuance to the template. |
| 224 | func (tpl *Template) AddIssuance(version int, blockchainID []byte, assetTag []byte, quorum int, keyHashes [][]byte, path [][]byte, pubkeys []ed25519.PublicKey, amount int64, refData, nonce []byte) *Issuance { |
| 225 | iss := &Issuance{ |
| 226 | Version: version, |
| 227 | BlockchainID: blockchainID, |
| 228 | Quorum: quorum, |
| 229 | KeyHashes: asHexBytes(keyHashes), |
| 230 | Path: asHexBytes(path), |
| 231 | Pubkeys: pubkeys, |
| 232 | Amount: amount, |
| 233 | AssetTag: assetTag, |
| 234 | Refdata: i10rjson.HexBytes(refData), |
| 235 | Nonce: nonce, |
| 236 | Index: tpl.index, |
| 237 | } |
| 238 | tpl.index++ |
| 239 | tpl.Issuances = append(tpl.Issuances, iss) |
| 240 | return iss |
| 241 | } |
| 242 | |
| 243 | // AddInput adds an Input to the template. |
| 244 | func (tpl *Template) AddInput(quorum int, keyHashes [][]byte, path [][]byte, pubkeys []ed25519.PublicKey, amount int64, assetID bc.Hash, anchor, inputRefdata []byte, version int) *Input { |