To avoid having a big dependency of ElectrumApi I suggest defining an interface that must be satisfied for the various BitcoinJS API used accross the code.
This way thia library can be used innmany context (ie. react native without tiny-secp) or other blockchains such as Liquid/Elements.