5 // crosschaininput is the result of a transfer of value. The value it contains
6 // comes from the main chain. It satisfies the Entry interface.
8 func (CrossChainInput) typ() string { return "crosschaininput1" }
10 func (cci *CrossChainInput) writeForHash(w io.Writer) {
11 mustWriteForHash(w, cci.MainchainOutputId)
14 // SetDestination will link the CrossChainInput to the output
15 func (cci *CrossChainInput) SetDestination(id *Hash, val *AssetAmount, pos uint64) {
16 cci.WitnessDestination = &ValueDestination{
23 // NewCrossChainInput creates a new CrossChainInput.
24 func NewCrossChainInput(mainchainOutputID *Hash, value *AssetAmount, ordinal uint64) *CrossChainInput {
25 return &CrossChainInput{
26 MainchainOutputId: mainchainOutputID,