At Algorand Builder (a framework for building Algorand projects, something like Truffle in Ethereum). We have high level deployer.optInToASA function, demonstrated in our example. We are working on adding similar support for logic signatures (PR will be merged beginning of the next week).
NOTE: You should use master version - there are lot of goodies, which are not yet released. We are closing up API updates and will release new version next week.