PROTOCOL: Add methods for managing wallet (v4r2) plugins/subscriptions
Subscription contracts are unusable within web app based on TON Connect 2. There is no way to add a plugin to wallet, nor to remove it.
I want a method connector.deployAndAddPlugin to be available. It must accept plugin stateInit (so that subscription code is not unnecessarily fixed), its workchain, amount of funds to send there, etc (like in TonWeb) + optionally wallet address, so that subscription is not activated on the wrong account.
Optionally, methods connector.addPlugin, connector.deletePlugin, etc could be added as well.
These methods are crucially important for plugins usage. I'd be grateful if they are added before the end of current Hack-a-TONx.
The use case is linked to my project https://github.com/ProgramCrafter/ratelance/.
The platform needs to take stakes from freelancers because otherwise they could lock job poster's money in multisig smart contract forever, and now they'll lock their own money as well.
However, taking stake at the very beginning is not very nice: what if job poster does not accept offer? That's why it's needed to be able to withdraw money at the moment when job poster accepts the offer. This is exactly what v4 wallet plugins offer.
Hi @ProgramCrafter , thanks for the contribution. This functionality is really important, but its implementation requires careful preparation so that the use of the plugin is safe for the user. We plan to add this functionality in the future.