MCPcopy Create free account
hub / github.com/chain/txvm / AddRetirement

Method AddRetirement

protocol/txbuilder/template.go:282–292  ·  view source on GitHub ↗

AddRetirement adds a Retirement to the template.

(amount int64, assetID bc.Hash, refData []byte)

Source from the content-addressed store, hash-verified

280
281// AddRetirement adds a Retirement to the template.
282func (tpl *Template) AddRetirement(amount int64, assetID bc.Hash, refData []byte) *Retirement {
283 ret := &Retirement{
284 Amount: amount,
285 AssetID: assetID,
286 Refdata: i10rjson.HexBytes(refData),
287 Index: tpl.index,
288 }
289 tpl.index++
290 tpl.Retirements = append(tpl.Retirements, ret)
291 return ret
292}
293
294// SignFunc is the type of a callback that can generate a signature
295// for a given message and a given keyID and derivation path. If the

Callers 2

TestTxBuilderFunction · 0.95
mainFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestTxBuilderFunction · 0.76