bitshares / bitshares-core

BitShares Blockchain node and command-line wallet
https://bitshares.github.io/
Other
1.17k stars 643 forks source link

Clean up plugin architecture #65

Open vikramrajkumar opened 7 years ago

vikramrajkumar commented 7 years ago

From @theoreticalbts on August 18, 2015 18:19

Currently our plugin architecture is not well encapsulated. Here are some problems I found:

Copied from original issue: cryptonomex/graphene#246

vikramrajkumar commented 7 years ago

From @bytemaster on August 18, 2015 18:22

While I agree that it would be nice to clean this up. Do not assign items to yourself that you will not be working on this week. This is low priority.

vikramrajkumar commented 7 years ago

From @theoreticalbts on March 3, 2016 18:26

One of the problems with FC's API implementation is that it's not possible to get a "black box" API. For example, to implement this ticket, we would want a method get_api( string api_name ) which should check that the user's authorized to access the API given in the config file, but the implementation of this method need not be aware of the details of API methods. But the only way to refer to an API is through fc::api<T>. So fc::api needs an abstract superclass which has the "generic" API stuff (e.g. working with handles and having an entry point for calling a method with string name and vector<variant> args).

vikramrajkumar commented 7 years ago

From @theoreticalbts on March 3, 2016 19:1

In addition, it would be nice if a plugin could introduce new wallet commands in addition to new API calls. Perhaps a syntax plugin_name.command_name could be used in the wallet to access plugin-provided commands, and perhaps via configuration you could dump some plugins into the global "namespace" making their commands accessible without a dot.