update type codes

- type codes are zero-padded so the keys need to be
- changed the :txn key to :transaction