Smart contracts and wallets specification and reference implementation report FINAL