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

Struct Template

protocol/txbuilder/template.go:43–59  ·  view source on GitHub ↗

Template contains the ingredients for a transaction: Issuances, Inputs, Outputs, and Retirements, plus transaction tags and min- and maxtimes. A Template can be created directly or with a call to Build. Elements can be added to a template directly or with calls to AddIssuance, AddInput, AddOutput, A

Source from the content-addressed store, hash-verified

41// elements have been added, any needed signatures are added with
42// Sign. The completed transaction can be extracted with Tx.
43type Template struct {
44 Issuances []*Issuance `json:"issuances"`
45 Inputs []*Input `json:"inputs"`
46 Outputs []*Output `json:"outputs"`
47 Retirements []*Retirement `json:"retirements"`
48 TxTags i10rjson.HexBytes `json:"transaction_tags"`
49 MinTimeMS uint64 `json:"min_time_ms"`
50 MaxTimeMS uint64 `json:"max_time_ms"`
51
52 materialization *materialization
53
54 rollbacks []func()
55 callbacks []func() error
56
57 legacyOutputs bool
58 index uint64
59}
60
61// SetOutputV1 causes Template.Tx to produce old-style outputs, which
62// don't log token tags. The default is for version 2 outputs, which

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected