}
// TODO: IssuanceProgram vs arguments?
+ // TODO: also need to hard-code mapTx
// TODO: save AssetDefinition
// txin := types.NewIssuanceInput(nonce[:], a.Amount, asset.IssuanceProgram, nil, asset.RawDefinitionByte)
in.Type = "spend"
in.ControlProgram = orig.ControlProgram()
in.SpentOutputID = e.SpentOutputId
+ case *bc.CrossChainInput:
+ in.Type = "cross_chain_in"
+ in.ControlProgram = orig.ControlProgram()
+ in.SpentOutputID = e.MainnetOutputId
}
return in
switch e := e.(type) {
case *bc.Spend:
e.WitnessArguments = args
+ case *bc.CrossChainInput:
+ e.WitnessArguments = args
}
}
in.InputID = id
e := tx.Entries[id]
switch e := e.(type) {
+ case *bc.CrossChainInput:
+ in.Type = "cross_chain_in"
+ in.ControlProgram = orig.ControlProgram()
+ in.Address = w.getAddressFromControlProgram(in.ControlProgram)
+ in.SpentOutputID = e.MainnetOutputId
+ arguments := orig.Arguments()
+ for _, arg := range arguments {
+ in.WitnessArguments = append(in.WitnessArguments, arg)
+ }
case *bc.Spend:
in.Type = "spend"
in.ControlProgram = orig.ControlProgram()