You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* windows compatibility
* fix broken images in plugin-chooser
* Adding to the wishlist easily
* scheduler callbacks
* More sophisticated process of distinguishing exts from specter-desktop for dynamic extension-loading
* bugfix grep
* adding apscheduler as requirement
* Proper scheduler implementation
* Update src/cryptoadvance/specter/services/callbacks.py
Co-authored-by: Manolis <70536101+moneymanolis@users.noreply.github.com>
* Frontend renaming to plugins
* sanity-check and docs
* bugfix and docs
Co-authored-by: Manolis <70536101+moneymanolis@users.noreply.github.com>
Copy file name to clipboardExpand all lines: docs/services/services.md
+9-1Lines changed: 9 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,6 @@ It is up to each `Service` implementation to decide what data is stored; the `Se
79
79
80
80
This is also where `Service`-wide configuration or other information should be stored, _**even if it is not secret**_ (see above intro about not polluting other existing data stores).
81
81
82
-
83
82
### `ServiceEncryptedStorageManager`
84
83
Because the `ServiceEncryptedStorage` is specific to each individual user, this manager provides convenient access to automatically retrieve the `current_user` from the Flask context and provide the correct user's `ServiceEncryptedStorage`. It is implemented as a `Singleton` which can be retrieved simply by importing the class and calling `get_instance()`.
Whenever possible, external code should not directly access these `Service`-related support classes but rather should ask for them through the `Service` class.
101
100
101
+
### `ServiceUnencryptedStorage`
102
+
A disadvantage of the `ServiceEncryptedStorage` is, that the user needs to be freshly logged in in order to be able to decrypt the secrets. If you want to avoid that login but your extension should still store data on disk, you can use the `ServiceUnencryptedStorage`.
103
+
104
+
In parallel with the `ServiceEncryptedStorageManager` there is also a `ServiceUnencryptedStorageManager` which is used exactly the same way.
102
105
103
106
### `ServiceAnnotationsStorage`
104
107
Annotations are any address-specific or transaction-specific data from a `Service` that we might want to present to the user (not yet implemented). Example: a `Service` that integrates with a onchain storefront would have product/order data associated with a utxo. That additional data could be imported by the `Service` and stored as an annotation. This annotation data could then be displayed to the user when viewing the details for that particular address or tx.
@@ -107,6 +110,11 @@ Annotations are stored on a per-wallet and per-`Service` basis as _unencrypted_
107
110
108
111
_Note: current `Service` implementations have not yet needed this feature so displaying annotations is not yet implemented._
109
112
113
+
### callback methods
114
+
Your service-class will inherit a callback-method which will get called for various reasons with the "reason" being a string as the first parameter. Checkout the `cryptoadvance.specter.services.callbacks` file for the specific callbacks.
115
+
116
+
Some important one is the `after_serverpy_init_app` which passes a `Scheduler` class which can be used to setup regular tasks.
117
+
110
118
111
119
### `controller.py`
112
120
The minimal url routes for `Service` selection and management.
0 commit comments