❔ I see this pattern is repeated a lot in this module; is it useful to refactor into a separate function? _Originally posted by @todofixthis in https://github.com/BlockchainLabsNZ/chainops-sdk/pull/16_