We don't use this outside of the module, so I suggest just creating a local function called `transaction` or `makeTransaction`, rather than adding it as a property of `api`.