code: func (v *Verifier) commitTransferAction(transferAction *token.PlainTransfer, txID string, simulator ledger.LedgerWriter) error {
  	var outputID string
  	var err error
  	for i, output := range transferAction.GetOutputs() {
  		if output.Owner != nil {
  			outputID, err = createOutputKey(txID, i)
  		} else {
  			outputID, err = createRedeemKey(txID, i)
  		}
  		if err != nil {
  			return &customtx.InvalidTxError{Msg: fmt.Sprintf("error creating output ID: %s", err)}
  		}
  
  		err = v.addOutput(outputID, output, simulator)
  		if err != nil {
  			return err
  		}
  	}
  	return v.markInputsSpent(txID, transferAction.GetInputs(), simulator)
  }
docs: // commitTransferAction is called for both transfer and redeem transactions
  // Check the owner of each output to determine how to generate the key