The key here is what kind of confidence interval for the binomial proportions is given. Say the standard Wald asymptotic confidence limits. Remember that: regardless what kind of info you have, the proportion is always defined as two parameters: n1=#of events, and N=#of all observations.
The code for testing the risk difference is similar to the following program:
JingJu